15 #include "../config/config.hpp" 16 #include "coefficient.hpp" 188 : Q(QG), oa(
a), ob(
b) { }
218 : Q(QG), oa(
a), ob(
b) { }
243 : Q(QG), oa(
a), ob(
b) { }
450 : F(NULL), oa(
a), ob(
b) { }
452 : F(&
f), oa(
a), ob(
b) { }
470 int a = 2,
int b = 0)
471 :
f(QG), oa(
a), ob(
b) { }
497 {
f = &f_;
u = &u_;
alpha =
a; beta = 0.5*
a; }
501 {
f = &f_;
u = &u_;
alpha =
a; beta =
b; }
539 const double s,
const double k)
542 const double s,
const double k)
573 #ifndef MFEM_THREAD_SAFE 587 double alpha_,
double kappa_)
624 std::default_random_engine generator;
625 std::normal_distribution<double> dist;
627 bool save_factors =
false;
636 if (seed_ > 0) {
SetSeed(seed_); }
646 MPI_Comm_rank(comm, &myid);
648 int seed = (seed_ > 0) ? seed_ + myid : time(0) + myid;
657 if (seed_ > 0) {
SetSeed(seed_); }
663 generator.seed(seed);
685 for (
int i = 0; i<L.
Size(); i++)
692 for (
int i = 0; i<NE; i++)
700 for (
int i = 0; i<L.
Size(); i++)
724 MFEM_WARNING(
"Integration rule not used in this class. " 725 "The QuadratureFunction integration rules are used instead");
736 MFEM_WARNING(
"Integration rule not used in this class. " 737 "The QuadratureFunction integration rules are used instead");
756 MFEM_WARNING(
"Integration rule not used in this class. " 757 "The QuadratureFunction integration rules are used instead");
768 MFEM_WARNING(
"Integration rule not used in this class. " 769 "The QuadratureFunction integration rules are used instead");
Abstract class for all finite elements.
virtual void AssembleDeltaElementVect(const FiniteElement &fe, ElementTransformation &Trans, Vector &elvect)
Assemble the delta coefficient at the IntegrationPoint set in Trans which is assumed to map to the de...
virtual bool SupportsDevice()
Method probing for assembly on device.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
Class for domain integration L(v) := (f, v)
void GetDeltaCenter(Vector ¢er)
VectorFEDomainLFCurlIntegrator(VectorCoefficient &F)
Constructs the domain integrator (Q, curl v)
Class for an integration rule - an Array of IntegrationPoint.
virtual void AssembleDeltaElementVect(const FiniteElement &fe, ElementTransformation &Trans, Vector &elvect)
Assemble the delta coefficient at the IntegrationPoint set in Trans which is assumed to map to the de...
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
Base class for vector Coefficients that optionally depend on time and space.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
void SetSize(int s)
Resize the vector to size s.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
VectorBoundaryLFIntegrator(VectorCoefficient &QG)
Constructs a boundary integrator with a given VectorCoefficient QG.
Class for domain integrator L(v) := (f, grad v)
BoundaryNormalLFIntegrator(VectorCoefficient &QG, int a=1, int b=1)
Constructs a boundary integrator with a given Coefficient QG.
DGElasticityDirichletLFIntegrator(VectorCoefficient &uD_, Coefficient &lambda_, Coefficient &mu_, double alpha_, double kappa_)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
Vector quadrature function coefficient which requires that the quadrature rules used for this vector ...
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
WhiteGaussianNoiseDomainLFIntegrator(int seed_=0)
Sets the seed_ of the random number generator. A fixed seed allows for a reproducible sequence of whi...
virtual void AssembleDeltaElementVect(const FiniteElement &fe, ElementTransformation &Trans, Vector &elvect)
Assemble the delta coefficient at the IntegrationPoint set in Trans which is assumed to map to the de...
DeltaLFIntegrator(VectorCoefficient &vq, const IntegrationRule *ir=NULL)
This constructor should be used by derived classes that use a VectorDeltaCoefficient.
Data type dense matrix using column-major storage.
Delta function coefficient optionally multiplied by a weight coefficient and a scaled time dependent ...
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
Class for boundary integration L(v) := (g, v)
BoundaryFlowIntegrator(Coefficient &f_, VectorCoefficient &u_, double a, double b)
DGDirichletLFIntegrator(Coefficient &u, const double s, const double k)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
void DeleteAll()
Delete the whole array.
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
WhiteGaussianNoiseDomainLFIntegrator(MPI_Comm comm_, int seed_)
Sets the MPI communicator comm_ and the seed_ of the random number generator. A fixed seed allows for...
void GetDeltaCenter(Vector ¢er)
Returns the center of the delta coefficient.
VectorBoundaryFluxLFIntegrator(Coefficient &f, double s=1.0, const IntegrationRule *ir=NULL)
DomainLFGradIntegrator(VectorCoefficient &QF)
Constructs the domain integrator (Q, grad v)
Quadrature function coefficient which requires that the quadrature rules used for this coefficient be...
double f(const Vector &xvec)
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
virtual void AssembleDeltaElementVect(const FiniteElement &fe, ElementTransformation &Trans, Vector &elvect) override
Assemble the delta coefficient at the IntegrationPoint set in Trans which is assumed to map to the de...
BoundaryFlowIntegrator(Coefficient &f_, VectorCoefficient &u_, double a)
Class for boundary integration .
DomainLFIntegrator(Coefficient &QF, int a=2, int b=0)
Constructs a domain integrator with a given Coefficient.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
VectorFEBoundaryFluxLFIntegrator(int a=1, int b=-1)
VectorFEBoundaryTangentLFIntegrator(VectorCoefficient &QG, int a=2, int b=0)
virtual bool SupportsDevice()
Method probing for assembly on device.
virtual bool SupportsDevice()
Method probing for assembly on device.
BoundaryLFIntegrator(Coefficient &QG, int a=1, int b=1)
Constructs a boundary integrator with a given Coefficient QG. Integration order will be a * basis_ord...
VectorDeltaCoefficient * vec_delta
virtual void AssembleDeltaElementVect(const FiniteElement &fe, ElementTransformation &Trans, Vector &elvect)
Assemble the delta coefficient at the IntegrationPoint set in Trans which is assumed to map to the de...
VectorFEBoundaryFluxLFIntegrator(Coefficient &f, int a=2, int b=0)
void SetSeed(int seed)
Sets/resets the seed of the random number generator.
virtual void SetIntRule(const IntegrationRule *ir)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
DomainLFIntegrator(Coefficient &QF, const IntegrationRule *ir)
Constructs a domain integrator with a given Coefficient.
void GetDeltaCenter(Vector ¢er)
Write the center of the delta function into center.
virtual bool SupportsDevice() override
Method probing for assembly on device.
VectorFEDomainLFDivIntegrator(Coefficient &QF)
Constructs the domain integrator (Q, div v)
DeltaLFIntegrator(Coefficient &q, const IntegrationRule *ir=NULL)
This constructor should be used by derived classes that use a scalar DeltaCoefficient.
QuadratureLFIntegrator(QuadratureFunctionCoefficient &qfc, const IntegrationRule *ir)
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
Base class for Matrix Coefficients that optionally depend on time and space.
Abstract class for integrators that support delta coefficients.
VectorDomainLFIntegrator(VectorCoefficient &QF)
Constructs a domain integrator with a given VectorCoefficient.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
VectorFEDomainLFIntegrator(VectorCoefficient &F)
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b) override
Method defining assembly on device.
Vector coefficient defined by a scalar DeltaCoefficient and a constant vector direction.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
void ResetFactors(int NE)
Resets the array of saved lower triangular Cholesky decomposition matrices. The parameter NE should b...
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
virtual void AssembleDeltaElementVect(const FiniteElement &fe, ElementTransformation &Trans, Vector &elvect)
Assemble the delta coefficient at the IntegrationPoint set in Trans which is assumed to map to the de...
BoundaryTangentialLFIntegrator(VectorCoefficient &QG, int a=1, int b=1)
Constructs a boundary integrator with a given Coefficient QG.
virtual void SetIntRule(const IntegrationRule *ir)
virtual void AssembleRHSElementVect(const FiniteElement &fe, ElementTransformation &Tr, Vector &elvect)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
virtual bool SupportsDevice()
Method probing for assembly on device.
int Size() const
Return the logical size of the array.
for VectorFiniteElements (Nedelec, Raviart-Thomas)
virtual void AssembleRHSElementVect(const FiniteElement &fe, ElementTransformation &Tr, Vector &elvect)
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
void SaveFactors(int NE)
Saves the lower triangular matrices in the element-wise Cholesky decomposition. The parameter NE shou...
bool IsDelta() const
Returns true if the derived class instance uses a delta coefficient.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
~WhiteGaussianNoiseDomainLFIntegrator()
Class for boundary integration .
VectorDomainLFGradIntegrator(VectorCoefficient &QF)
Constructs the domain integrator (Q, grad v)
virtual void AssembleDeltaElementVect(const FiniteElement &fe, ElementTransformation &Trans, Vector &elvect)
Assemble the delta coefficient at the IntegrationPoint set in Trans which is assumed to map to the de...
double u(const Vector &xvec)
DGDirichletLFIntegrator(Coefficient &u, MatrixCoefficient &q, const double s, const double k)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
Class for boundary integration in 2D.
VectorQuadratureLFIntegrator(VectorQuadratureFunctionCoefficient &vqfc, const IntegrationRule *ir)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect) override
DGDirichletLFIntegrator(Coefficient &u, Coefficient &q, const double s, const double k)
virtual bool SupportsDevice()
Method probing for assembly on device.
virtual void AssembleDeltaElementVect(const FiniteElement &fe, ElementTransformation &Trans, Vector &elvect)=0
Assemble the delta coefficient at the IntegrationPoint set in Trans which is assumed to map to the de...
double f(const Vector &p)