27template<
typename FieldValueType,
typename AssemblyType = FieldValueType>
30 BoundedDiv<FieldValueType, AssemblyType>>
37 static std::string
name() {
return "bounded"; }
39 static std::string
doc()
41 return "Bounded convection scheme wrapper. Reads `bounded <inner>` "
42 "and adds -fvm::Sp(surfaceIntegrate(faceFlux), psi) to the inner "
43 "scheme's discretisation so continuity-error noise can't push "
44 "ψ negative cell-to-cell.";
47 static std::string
schema() {
return "none"; }
55 const dsl::Coeff operatorScaling)
const override;
61 const dsl::Coeff operatorScaling)
const override;
67 const dsl::Coeff operatorScaling)
const override;
72 const dsl::Coeff operatorScaling)
const override;
74 std::unique_ptr<DivOperatorFactory<FieldValueType, AssemblyType>>
clone()
const override;
85 std::unique_ptr<DivOperatorFactory<FieldValueType, AssemblyType>> inner_;
93template<
typename FieldValueType,
typename AssemblyType = FieldValueType>
Represents an unstructured mesh in NeoN.
A class to contain the data and executors for a field and define some basic operations.
A class that represents a coefficient for the NeoN dsl.
void div(VolumeField< FieldValueType > &divPhi, const SurfaceField< scalar > &faceFlux, const VolumeField< FieldValueType > &phi, const dsl::Coeff operatorScaling) const override
std::unique_ptr< DivOperatorFactory< FieldValueType, AssemblyType > > clone() const override
void div(la::LinearSystem< AssemblyType, FieldValueType > &ls, const SurfaceField< scalar > &faceFlux, const VolumeField< FieldValueType > &phi, const dsl::Coeff operatorScaling) const override
BoundedDiv(const Executor &exec, const UnstructuredMesh &mesh, const Input &inputs)
VolumeField< FieldValueType > div(const SurfaceField< scalar > &faceFlux, const VolumeField< FieldValueType > &phi, const dsl::Coeff operatorScaling) const override
static std::string schema()
void div(Vector< FieldValueType > &divPhi, const SurfaceField< scalar > &faceFlux, const VolumeField< FieldValueType > &phi, const dsl::Coeff operatorScaling) const override
static std::string name()
Represents a surface field in a finite volume method.
Represents a volume field in a finite volume method.
A class representing a linear system of equations.
A template class for registering derived classes with a base class.
void applyBoundedDivDiagonal(la::LinearSystem< AssemblyType, FieldValueType > &ls, const SurfaceField< scalar > &faceFlux, const UnstructuredMesh &mesh, const dsl::Coeff scaling)
std::variant< Dictionary, TokenList > Input
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor