22 mfem_error(
"LinearFormIntegrator::AssembleRHSElementVect(...)");
29 mfem_error(
"LinearFormIntegrator::AssembleRHSElementVect(...)");
59 add(elvect, ip.
weight * val, shape, elvect);
66 MFEM_ASSERT(
delta != NULL,
"coefficient must be DeltaCoefficient");
107 MFEM_ASSERT(
vec_delta != NULL,
"coefficient must be VectorDeltaCoefficient");
117 dshape.
Mult(Qvec, elvect);
132 int intorder = oa * el.
GetOrder() + ob;
145 add(elvect, ip.
weight * val, shape, elvect);
161 int intorder = oa * el.
GetOrder() + ob;
179 add(elvect, val, shape, elvect);
197 int intorder = oa * el.
GetOrder() + ob;
214 Q.
Eval(Qvec, Tr, ip);
227 Vector tangent(dim), Qvec;
235 mfem_error(
"These methods make sense only in 2D problems.");
241 int intorder = oa * el.
GetOrder() + ob;
251 tangent(0) = Jac(0,0);
252 tangent(1) = Jac(1,0);
254 Q.
Eval(Qvec, Tr, ip);
258 add(elvect, ip.
weight*(Qvec*tangent), shape, elvect);
290 Q.
Eval (Qvec, Tr, ip);
292 for (
int k = 0; k < vdim; k++)
296 for (
int s = 0;
s < dof;
s++)
298 elvect(dof*k+
s) += ip.
weight * cf * shape(
s);
307 MFEM_ASSERT(
vec_delta != NULL,
"coefficient must be VectorDeltaCoefficient");
318 MultVWt(shape, Qvec, elvec_as_mat);
348 for (
int k = 0; k < vdim; k++)
349 for (
int s = 0;
s < dof;
s++)
351 elvect(dof*k+
s) += vec(k) * shape(
s);
389 for (
int k = 0; k < vdim; k++)
391 for (
int s = 0;
s < dof;
s++)
393 elvect(dof*k+
s) += vec(k) * shape(
s);
404 int vdim = std::max(spaceDim, el.
GetVDim());
427 QF.
Eval (vec, Tr, ip);
436 MFEM_ASSERT(
vec_delta != NULL,
"coefficient must be VectorDeltaCoefficient");
446 vshape.
Mult(vec, elvect);
454 int n=(spaceDim == 3)? spaceDim : 1;
474 QF->
Eval(vec, Tr, ip);
477 curlshape.
AddMult (vec, elvect);
486 "coefficient must be VectorDeltaCoefficient");
488 int n=(spaceDim == 3)? spaceDim : 1;
495 curlshape.
Mult(vec, elvect);
522 add(elvect, ip.
weight * val, divshape, elvect);
529 MFEM_ASSERT(
delta != NULL,
"coefficient must be DeltaCoefficient");
558 nor *= Sign * ip.
weight * F -> Eval (Tr, ip);
559 for (
int j = 0; j < dof; j++)
560 for (
int k = 0; k <
dim; k++)
562 elvect(dof*k+j) += nor(k) * shape(j);
580 int intorder = oa * el.
GetOrder() + ob;
593 val *= F->
Eval(Tr, ip);
596 elvect.
Add(val, shape);
610 MFEM_VERIFY(vdim == 2,
"VectorFEBoundaryTangentLFIntegrator "
611 "must be called with vector basis functions of dimension 2.");
619 int intorder = oa * el.
GetOrder() + ob;
630 f.
Eval(f_loc, Tr, ip);
639 f_hat(0) = J(0,0) * f_loc(0) + J(1,0) * f_loc(1);
648 Swap<double>(f_hat(0), f_hat(1));
649 f_hat(0) = -f_hat(0);
659 mfem_error(
"BoundaryFlowIntegrator::AssembleRHSElementVect\n"
660 " is not implemented as boundary integrator!\n"
661 " Use LinearForm::AddBdrFaceIntegrator instead of\n"
662 " LinearForm::AddBoundaryIntegrator.");
668 int dim, ndof, order;
669 double un, w, vu_data[3], nor_data[3];
673 Vector vu(vu_data, dim), nor(nor_data, dim);
708 nor(0) = 2*eip.
x - 1.0;
716 w = 0.5*alpha*un - beta*fabs(un);
718 elvect.
Add(w, shape);
725 mfem_error(
"DGDirichletLFIntegrator::AssembleRHSElementVect");
732 bool kappa_is_nonzero = (
kappa != 0.);
774 nor(0) = 2*eip.
x - 1.0;
806 if (kappa_is_nonzero)
816 mfem_error(
"DGElasticityDirichletLFIntegrator::AssembleRHSElementVect");
822 MFEM_ASSERT(Tr.
Elem2No < 0,
"interior boundary is not supported");
824 #ifdef MFEM_THREAD_SAFE
836 const int ndofs = el.
GetDof();
837 const int nvdofs = dim*ndofs;
875 Mult(dshape, adjJ, dshape_ps);
879 nor(0) = 2*eip.
x - 1.0;
886 double wL, wM, jcoef;
891 jcoef =
kappa * (wL + 2.0*wM) * (nor*nor);
892 dshape_ps.
Mult(nor, dshape_dn);
893 dshape_ps.
Mult(u_dir, dshape_du);
934 const double t1 =
alpha * wL * (u_dir*
nor);
935 for (
int im = 0, i = 0; im <
dim; ++im)
937 const double t2 = wM *
u_dir(im);
938 const double t3 = wM *
nor(im);
939 const double tj = jcoef *
u_dir(im);
940 for (
int idof = 0; idof < ndofs; ++idof, ++i)
956 const int vdim = vqfc.
GetVDim();
957 const int ndofs = fe.
GetDof();
962 for (
int q = 0; q < nqp; q++)
967 vqfc.
Eval(temp, Tr, ip);
969 for (
int ind = 0; ind < vdim; ind++)
971 for (
int nd = 0; nd < ndofs; nd++)
973 elvect(nd + ind * ndofs) += w * shape(nd) * temp(ind);
987 const int ndofs = fe.
GetDof();
991 for (
int q = 0; q < nqp; q++)
996 double temp = qfc.
Eval(Tr, ip);
int GetNPoints() const
Returns the number of the points in the integration rule.
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)
int GetDim() const
Returns the reference space dimension for the finite element.
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 CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void MultVWt(const Vector &v, const Vector &w, DenseMatrix &VWt)
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
const IntegrationRule & GetElementIntRule(int idx) const
Get the IntegrationRule associated with mesh element idx.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
void CalcPhysDivShape(ElementTransformation &Trans, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in physical space at the po...
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the vector coefficient in the element described by T at the point ip, storing the result in ...
void SetSize(int s)
Resize the vector to size s.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
virtual void Eval(DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the matrix coefficient in the element described by T at the point ip, storing the result in ...
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...
void CalcAdjugate(const DenseMatrix &a, DenseMatrix &adja)
int GetOrder() const
Returns the order of the finite element. In the case of anisotropic orders, returns the maximum order...
Data type dense matrix using column-major storage.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
int Space() const
Returns the type of FunctionSpace on the element.
double * GetData() const
Return a pointer to the beginning of the Vector data.
void CalcOrtho(const DenseMatrix &J, Vector &n)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
void add(const Vector &v1, const Vector &v2, Vector &v)
virtual void CalcPhysCurlShape(ElementTransformation &Trans, DenseMatrix &curl_shape) const
Evaluate the curl of all shape functions of a vector finite element in physical space at the point de...
Geometry::Type GetGeomType() const
Returns the Geometry::Type of the reference element.
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
void MultTranspose(const double *x, double *y) const
Multiply a vector with the transpose matrix.
const QuadratureFunction & GetQuadFunction() const
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient in the element described by T at the point ip.
void mfem_error(const char *msg)
Function called when an error is encountered. Used by the macros MFEM_ABORT, MFEM_ASSERT, MFEM_VERIFY.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const =0
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
QuadratureSpace * GetSpace() const
Get the associated QuadratureSpace.
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...
void CalcPhysDShape(ElementTransformation &Trans, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in physical space at the poi...
int GetVDim()
Returns dimension of the vector.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the vector coefficient in the element described by T at the point ip, storing the result in ...
void AddMult(const Vector &x, Vector &y) const
y += A.x
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
void CalcPhysVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Equivalent to the CalcVShape() method with the same arguments.
int GetVDim() const
Returns the vector dimension for vector-valued finite elements.
double p(const Vector &x, double t)
int GetDof() const
Returns the number of degrees of freedom in the finite element.
void CalcPhysShape(ElementTransformation &Trans, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in physical space at the point ...
virtual void EvalDelta(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Return the specified direction vector multiplied by the value returned by DeltaCoefficient::EvalDelta...
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
virtual double EvalDelta(ElementTransformation &T, const IntegrationPoint &ip)
The value of the function assuming we are evaluating at the delta center.
Vector & Set(const double a, const Vector &x)
(*this) = a * x
const QuadratureFunction & GetQuadFunction() const
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
Vector & Add(const double a, const Vector &Va)
(*this) += a * Va
Class for integration point with weight.
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 &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 double Eval(ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the coefficient in the element described by T at the point ip.
virtual void AssembleRHSElementVect(const FiniteElement &fe, ElementTransformation &Tr, Vector &elvect)
void Mult(const double *x, double *y) const
Matrix vector multiplication.
virtual void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect)
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)
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const =0
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
IntegrationRules IntRules(0, Quadrature1D::GaussLegendre)
A global object with all integration rules (defined in intrules.cpp)