12#ifndef MTOPINTEGRATORS_HPP
13#define MTOPINTEGRATORS_HPP
74 diff(diffco),load(hsrco), powerc(pp), rhomin(minrho), beta(betac), eta(etac)
81 return "QLinearDiffusion";
97 real_t rz=0.5+0.5*std::tanh(beta*(dd[0]-eta));
99 real_t fd=di*(std::pow(rz,powerc)+rhomin);
102 real_t rez = 0.5*(uu[0]*uu[0]+uu[1]*uu[1]+uu[2]*uu[2])*fd-uu[3]*ll;
113 real_t rz=0.5+0.5*std::tanh(beta*(dd[0]-eta));
114 real_t fd=di*(std::pow(rz,powerc)+rhomin);
130 real_t tt=std::tanh(beta*(dd[0]-eta));
132 real_t fd=di*powerc*std::pow(rz,powerc-1.0)*0.5*(1.0-tt*tt)*beta;
134 rr[0] = -(aa[0]*uu[0]+aa[1]*uu[1]+aa[2]*uu[2])*fd;
144 real_t tt=std::tanh(beta*(dd[0]-eta));
146 real_t fd=di*(std::pow(rz,powerc)+rhomin);
Dynamic 2D array using row-major layout.
Base class for representing function at integration points.
virtual void QResidual(ElementTransformation &T, const IntegrationPoint &ip, mfem::Vector &dd, mfem::Vector &uu, mfem::Vector &rr)=0
virtual void AQResidual(ElementTransformation &T, const IntegrationPoint &ip, mfem::Vector &dd, mfem::Vector &uu, mfem::Vector &aa, mfem::Vector &rr)=0
virtual std::string GetType()=0
Returns a user defined string identifying the function.
virtual real_t QEnergy(ElementTransformation &T, const IntegrationPoint &ip, mfem::Vector &dd, mfem::Vector &uu)
virtual void QGradResidual(ElementTransformation &T, const IntegrationPoint &ip, mfem::Vector &dd, mfem::Vector &uu, mfem::DenseMatrix &hh)=0
Returns the gradient of the residual at a integration point.
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
virtual real_t Eval(ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the coefficient in the element described by T at the point ip.
Data type dense matrix using column-major storage.
virtual void AssembleElementVector(const Array< const FiniteElement * > &el, ElementTransformation &Tr, const Array< const Vector * > &elfun, const Array< Vector * > &elvec) override
Returns the gradient of the objective contribution at element level.
virtual real_t GetElementEnergy(const Array< const FiniteElement * > &el, ElementTransformation &Tr, const Array< const Vector * > &elfun) override
Returns the objective contribution at element level.
Class for integration point with weight.
virtual void AssembleElementVector(const Array< const FiniteElement * > &el, const Array< const FiniteElement * > &pel, ElementTransformation &Tr, const Array< const Vector * > &elfun, const Array< const Vector * > &pelfun, const Array< Vector * > &elvec) override
Computes the element's residual.
ParametricLinearDiffusion(BaseQFunction &qfunm)
virtual real_t GetElementEnergy(const Array< const FiniteElement * > &el, const Array< const FiniteElement * > &pel, ElementTransformation &Tr, const Array< const Vector * > &elfun, const Array< const Vector * > &pelfun) override
Computes the local energy.
virtual void AssemblePrmElementVector(const Array< const FiniteElement * > &el, const Array< const FiniteElement * > &pel, ElementTransformation &Tr, const Array< const Vector * > &elfun, const Array< const Vector * > &alfun, const Array< const Vector * > &pelfun, const Array< Vector * > &elvec) override
virtual void AssembleElementGrad(const Array< const FiniteElement * > &el, const Array< const FiniteElement * > &pel, ElementTransformation &Tr, const Array< const Vector * > &elfun, const Array< const Vector * > &pelfun, const Array2D< DenseMatrix * > &elmats) override
Computes the stiffness/tangent matrix.
virtual std::string GetType() override
Returns a user defined string identifying the function.
QLinearDiffusion(mfem::Coefficient &diffco, mfem::Coefficient &hsrco, real_t pp=1.0, real_t minrho=1e-7, real_t betac=4.0, real_t etac=0.5)
virtual void AQResidual(ElementTransformation &T, const IntegrationPoint &ip, Vector &dd, Vector &uu, Vector &aa, Vector &rr) override
virtual void QGradResidual(ElementTransformation &T, const IntegrationPoint &ip, Vector &dd, Vector &uu, DenseMatrix &hh) override
Returns the gradient of the residual at a integration point.
virtual void QResidual(ElementTransformation &T, const IntegrationPoint &ip, Vector &dd, Vector &uu, Vector &rr) override
Returns the derivative of QEnergy with respect to the state vector uu.
virtual real_t QEnergy(ElementTransformation &T, const IntegrationPoint &ip, Vector &dd, Vector &uu) override