17template<
typename ValueType>
26template<
typename ValueType>
36template<
typename ValueType>
45 static std::string
name() {
return "Gauss"; }
47 static std::string
doc() {
return "Gauss-Green Laplacian"; }
49 static std::string
schema() {
return "none"; }
52 : Base(exec, mesh), surfaceInterpolation_(exec, mesh, inputs),
53 faceNormalGradient_(exec, mesh, inputs),
63 computeLaplacianExp<ValueType>(
64 faceNormalGradient_, gamma, phi, lapPhi.
internalVector(), operatorScaling
74 std::string
name =
"laplacian(" + gamma.
name +
"," + phi.
name +
")";
83 computeLaplacianExp<ValueType>(
84 faceNormalGradient_, gamma, phi, lapPhi.
internalVector(), operatorScaling
96 computeLaplacianExp<ValueType>(faceNormalGradient_, gamma, phi, lapPhi, operatorScaling);
107 ls, gamma, phi, operatorScaling, *sparsityPattern_.get(), faceNormalGradient_
111 std::unique_ptr<LaplacianOperatorFactory<ValueType>>
clone()
const override
113 return std::make_unique<GaussGreenLaplacian<ValueType>>(*this);
122 const std::shared_ptr<SparsityPattern> sparsityPattern_;
126template class GaussGreenLaplacian<scalar>;
127template class GaussGreenLaplacian<Vec3>;
const Vector< T > & value() const
Get the view storing the computed values from the boundary condition.
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 BoundaryData< ValueType > & boundaryData() const
Returns a const reference to the boundary field.
const Vector< ValueType > & internalVector() const
Returns a const reference to the internal field.
static std::string name()
GaussGreenLaplacian(const Executor &exec, const UnstructuredMesh &mesh, const Input &inputs)
static std::string schema()
virtual VolumeField< ValueType > laplacian(const SurfaceField< scalar > &gamma, VolumeField< ValueType > &phi, const dsl::Coeff operatorScaling) const override
virtual void laplacian(la::LinearSystem< ValueType, localIdx > &ls, const SurfaceField< scalar > &gamma, VolumeField< ValueType > &phi, const dsl::Coeff operatorScaling) override
virtual void laplacian(VolumeField< ValueType > &lapPhi, const SurfaceField< scalar > &gamma, VolumeField< ValueType > &phi, const dsl::Coeff operatorScaling) override
virtual void laplacian(Vector< ValueType > &lapPhi, const SurfaceField< scalar > &gamma, VolumeField< ValueType > &phi, const dsl::Coeff operatorScaling) override
std::unique_ptr< LaplacianOperatorFactory< ValueType > > clone() const override
Represents a surface field in a finite volume method.
Represents a volume boundary field for a cell-centered 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 computeLaplacianExp(const FaceNormalGradient< ValueType > &, const SurfaceField< scalar > &, VolumeField< ValueType > &, Vector< ValueType > &, const dsl::Coeff)
std::vector< BoundaryType > createCalculatedBCs(const UnstructuredMesh &mesh)
void computeLaplacianImpl(la::LinearSystem< ValueType, localIdx > &ls, const SurfaceField< scalar > &gamma, VolumeField< ValueType > &phi, const dsl::Coeff operatorScaling, const SparsityPattern &sparsityPattern, const FaceNormalGradient< ValueType > &faceNormalGradient)
std::variant< Dictionary, TokenList > Input
void fill(Vector< ValueType > &a, const std::type_identity_t< ValueType > value, std::pair< localIdx, localIdx > range={0, 0})
Fill the field with a scalar value using a specific executor.
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor