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) { }
456 : F(NULL), oa(
a), ob(
b) { }
458 : F(&
f), oa(
a), ob(
b) { }
482 int a = 2,
int b = 0)
483 :
f(QG), oa(
a), ob(
b) { }
551 const double s,
const double k)
554 const double s,
const double k)
585 #ifndef MFEM_THREAD_SAFE 599 double alpha_,
double kappa_)
636 std::default_random_engine generator;
637 std::normal_distribution<double> dist;
639 bool save_factors =
false;
648 if (seed_ > 0) {
SetSeed(seed_); }
658 MPI_Comm_rank(comm, &myid);
660 int seed = (seed_ > 0) ? seed_ + myid : time(0) + myid;
669 if (seed_ > 0) {
SetSeed(seed_); }
675 generator.seed(seed);
697 for (
int i = 0; i<L.
Size(); i++)
704 for (
int i = 0; i<NE; i++)
712 for (
int i = 0; i<L.
Size(); i++)
736 MFEM_WARNING(
"Integration rule not used in this class. " 737 "The QuadratureFunction integration rules are used instead");
748 MFEM_WARNING(
"Integration rule not used in this class. " 749 "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");
780 MFEM_WARNING(
"Integration rule not used in this class. " 781 "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 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)
virtual bool SupportsDevice() const
Method probing for assembly on device.
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
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.
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
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)
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
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)
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b) override
Method defining assembly on device.
void DeleteAll()
Delete the whole array.
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.
virtual bool SupportsDevice() const
Method probing for assembly on device.
VectorBoundaryFluxLFIntegrator(Coefficient &f, double s=1.0, const IntegrationRule *ir=NULL)
std::function< double(const Vector &)> f(double mass_coeff)
virtual bool SupportsDevice() const override
Method probing for assembly on device.
DomainLFGradIntegrator(VectorCoefficient &QF)
Constructs the domain integrator (Q, grad v)
Quadrature function coefficient which requires that the quadrature rules used for this coefficient be...
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)
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)
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
virtual bool SupportsDevice() const
Method probing for assembly on device.
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() const
Method probing for assembly on device.
VectorFEDomainLFDivIntegrator(Coefficient &QF)
Constructs the domain integrator (Q, div v)
virtual bool SupportsDevice() const
Method probing for assembly on device.
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.
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 AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
VectorFEDomainLFIntegrator(VectorCoefficient &F)
Vector coefficient defined by a scalar DeltaCoefficient and a constant vector direction.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
virtual bool SupportsDevice() const
Method probing for assembly on device.
void ResetFactors(int NE)
Resets the array of saved lower triangular Cholesky decomposition matrices. The parameter NE should b...
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 AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
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)
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)
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)
virtual bool SupportsDevice() const
Method probing for assembly on device.
~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...
virtual void AssembleDevice(const FiniteElementSpace &fes, const Array< int > &markers, Vector &b)
Method defining assembly on device.
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 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)