|
NeoN
A framework for CFD software
|
Post-assembly functor that pins one cell's value to a reference, removing the constant null space that arises when all boundaries have Neumann (zero-gradient) conditions on operators such as laplacian or div+laplacian. More...
#include <expression.hpp>
Public Member Functions | |
| SetReference (localIdx refCell, ValueType refValue) | |
| void | operator() (la::LinearSystem< ValueType, ValueType, la::CSRMatrix< ValueType, IndexType > > &ls) const override |
| void | applyScalarMatrix (la::LinearSystem< scalar, ValueType, la::CSRMatrix< scalar, IndexType >, la::COOMatrix< scalar, IndexType > > &ls) const override |
| Segregated scalar-matrix / ValueType-rhs form. The scalar diagonal scales the ValueType reference value (scalar * Vec3 broadcasts), so the same pin applies to every component of the right-hand side. | |
Public Member Functions inherited from NeoN::dsl::PostAssemblyBase< VectorType, IndexType > | |
| virtual | ~PostAssemblyBase ()=default |
| virtual void | operator() (la::LinearSystem< VectorType, VectorType, la::CSRMatrix< VectorType, IndexType > > &) const |
| virtual void | applyScalarMatrix (la::LinearSystem< scalar, VectorType, la::CSRMatrix< scalar, IndexType >, la::COOMatrix< scalar, IndexType > > &) const |
| Apply to the segregated scalar-matrix / VectorType-rhs form (a scalar coefficient matrix with a VectorType right-hand side). Default no-op; functors that support the segregated form override this. A distinct name (rather than an operator() overload) avoids colliding with the same-type signature when VectorType == scalar. | |
Post-assembly functor that pins one cell's value to a reference, removing the constant null space that arises when all boundaries have Neumann (zero-gradient) conditions on operators such as laplacian or div+laplacian.
Modifies the assembled linear system in-place: A[refCell, refCell] += A[refCell, refCell] (doubles the diagonal) rhs[refCell] += A[refCell, refCell] * refValue
For distributed systems only the rank that owns the reference cell (assumed to be rank 0 for local cell index 0) applies the modification; all other ranks skip it. For non-distributed systems every rank applies it independently (each holds a full copy). @TODO allow to set a refPoint instead of a refCell, make the refCell a global cellID
Definition at line 66 of file expression.hpp.
|
inline |
Definition at line 70 of file expression.hpp.
|
inlineoverride |
Segregated scalar-matrix / ValueType-rhs form. The scalar diagonal scales the ValueType reference value (scalar * Vec3 broadcasts), so the same pin applies to every component of the right-hand side.
Definition at line 104 of file expression.hpp.
|
inlineoverride |
Definition at line 72 of file expression.hpp.