12#ifndef SPDE_SOLVERS_HPP
13#define SPDE_SOLVERS_HPP
16#include <unordered_map>
156 void ActivateRepeatedSolve() { repeated_solve_ =
true; }
159 void DeactivateRepeatedSolve() { repeated_solve_ =
false; }
163 void UpdateRHS(ParLinearForm &
b)
const;
166 void ComputeRationalCoefficients(
real_t exponent);
171 HypreParMatrix stiffness_;
172 HypreParMatrix mass_bc_;
176 const SparseMatrix *restriction_matrix_ =
nullptr;
177 const Operator *prolongation_matrix_ =
nullptr;
184 Array<int> ess_tdof_list_;
185 ParFiniteElementSpace *fespace_ptr_;
189 Array<int> dbc_marker_;
190 Array<int> rbc_marker_;
193 Array<real_t> coeffs_;
194 Array<real_t> poles_;
199 int integer_order_of_exponent_ = 0;
210 int print_level_ = 1;
213 bool repeated_solve_ =
false;
214 bool integer_order_ =
false;
215 bool apply_lift_ =
false;
217 WhiteGaussianNoiseDomainLFIntegrator *integ =
nullptr;
218 ParLinearForm * b_wn =
nullptr;
Data type dense matrix using column-major storage.
Wrapper for hypre's ParCSR matrix class.
Abstract parallel finite element space.
Class for parallel grid function.
void Solve(ParLinearForm &b, ParGridFunction &x)
static DenseMatrix ConstructMatrixCoefficient(real_t l1, real_t l2, real_t l3, real_t e1, real_t e2, real_t e3, real_t nu, int dim)
static real_t ConstructNormalizationCoefficient(real_t nu, real_t l1, real_t l2, real_t l3, int dim)
void GenerateRandomField(ParGridFunction &x)
void SetupRandomFieldGenerator(int seed=0)
void SetPrintLevel(int print_level)
Set the print level.
SPDESolver(real_t nu, const Boundary &bc, ParFiniteElementSpace *fespace, real_t l1=0.1, real_t l2=0.1, real_t l3=0.1, real_t e1=0.0, real_t e2=0.0, real_t e3=0.0)
real_t IntegrateBC(const ParGridFunction &x, const Array< int > &bdr, real_t alpha, real_t beta, real_t gamma, real_t &glb_err)
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
std::map< int, BoundaryType > boundary_attributes
Map to assign homogeneous boundary conditions to defined boundary types.
std::map< int, real_t > dirichlet_coefficients
Coefficient for inhomogeneous Dirichlet boundary conditions.
void PrintInfo(std::ostream &os=mfem::out) const
Print the information specifying the boundary conditions.
void ComputeBoundaryError(const ParGridFunction &solution)
void AddInhomogeneousDirichletBoundaryCondition(int boundary, real_t coefficient)
Add a inhomogeneous Dirichlet boundary condition to the boundary.
void SetRobinCoefficient(real_t coefficient)
Set the robin coefficient for the boundary.
void UpdateIntegrationCoefficients(int i, real_t &alpha, real_t &beta, real_t &gamma)
void VerifyDefinedBoundaries(const Mesh &mesh) const
void AddHomogeneousBoundaryCondition(int boundary, BoundaryType type)
Add a homogeneous boundary condition to the boundary.