20template<
typename ValueType>
32 divConfig.get<
NeoN::detail::RefHolder<
VolumeField<ValueType>>>(
"field").c,
33 dsl::Operator::Type::Implicit
35 coeffA_(divConfig.get<
NeoN::detail::RefHolder<dsl::Coeff>>(
"coeff").c),
36 coeffB_(lapConfig.get<
NeoN::detail::RefHolder<dsl::Coeff>>(
"coeff").c),
51 if (std::holds_alternative<Dictionary>(input))
53 auto dict = std::get<Dictionary>(input);
54 std::string lapSchemeName =
"laplacian(" + gamma_.
name +
"," + this->
field_.name +
")";
55 std::string divSchemeName =
"div(" + flux_.
name +
"," + this->
getVector().name +
")";
68 divSurfaceInterpolation_ =
69 std::make_shared<SurfaceInterpolation<ValueType>>(this->
field_.exec(), mesh, divTokens);
72 std::make_shared<FaceNormalGradient<ValueType>>(this->
field_.exec(), mesh, laplTokens);
75 std::string
getName()
const {
return "FusedDivLapOperator"; }
89 std::shared_ptr<SurfaceInterpolation<ValueType>> divSurfaceInterpolation_;
91 std::shared_ptr<FaceNormalGradient<ValueType>> faceNormalGradient_;
94extern template class GaussGreenDdtDivLaplacian<scalar>;
95extern template class GaussGreenDdtDivLaplacian<Vec3>;
A class representing a dictionary that stores key-value pairs.
A class representing a list of tokens.
ReturnType & get(const size_t &idx)
Retrieves the value associated with the given index, casting it to the specified type.
void remove(size_t index)
Removes a value from the token list based on the specified index.
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.
const VolumeField< ValueType > & field_
OperatorMixin(const Executor exec, const Coeff &coeffs, const VolumeField< ValueType > &field, Operator::Type type)
const VolumeField< ValueType > & getVector() const
virtual const Executor & exec() const final
std::string getName() const
GaussGreenDdtDivLaplacian(const Executor &exec, Dictionary divConfig, Dictionary lapConfig)
void read(const Input &input)
void implicitOperation(la::LinearSystem< ValueType > &ls, scalar t, scalar dt) const
Dictionary getConfig() const
void explicitOperation(Vector< ValueType > &source, scalar t, scalar dt) const
ValueType VectorValueType
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.
#define NF_ERROR_EXIT(message)
Macro for printing an error message and aborting the program.
Integer types used throughout NeoN.
std::variant< Dictionary, TokenList > Input
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor