22 mfem_error(
"LinearFormIntegrator::AssembleRHSElementVect(...)");
53 add(elvect, ip.
weight * val, shape, elvect);
60 MFEM_ASSERT(
delta != NULL,
"coefficient must be DeltaCoefficient");
79 int intorder = oa * el.
GetOrder() + ob;
92 add(elvect, ip.
weight * val, shape, elvect);
110 int intorder = oa * el.
GetOrder() + ob;
120 Q.
Eval(Qvec, Tr, ip);
133 Vector tangent(dim), Qvec;
141 mfem_error(
"These methods make sense only in 2D problems.");
147 int intorder = oa * el.
GetOrder() + ob;
157 tangent(0) = Jac(0,0);
158 tangent(1) = Jac(1,0);
160 Q.
Eval(Qvec, Tr, ip);
164 add(elvect, ip.
weight*(Qvec*tangent), shape, elvect);
196 Q.
Eval (Qvec, Tr, ip);
198 for (
int k = 0; k < vdim; k++)
202 for (
int s = 0; s < dof; s++)
204 elvect(dof*k+s) += ip.
weight * cf * shape(s);
213 MFEM_ASSERT(
vec_delta != NULL,
"coefficient must be VectorDeltaCoefficient");
224 MultVWt(shape, Qvec, elvec_as_mat);
255 for (
int k = 0; k < vdim; k++)
256 for (
int s = 0; s < dof; s++)
258 elvect(dof*k+s) += vec(k) * shape(s);
292 for (
int k = 0; k < vdim; k++)
294 for (
int s = 0; s < dof; s++)
296 elvect(dof*k+s) += vec(k) * shape(s);
330 QF.
Eval (vec, Tr, ip);
340 MFEM_ASSERT(
vec_delta != NULL,
"coefficient must be VectorDeltaCoefficient");
350 vshape.
Mult(vec, elvect);
377 nor *= Sign * ip.
weight * F -> Eval (Tr, ip);
378 for (
int j = 0; j < dof; j++)
379 for (
int k = 0; k <
dim; k++)
381 elvect(dof*k+j) += nor(k) * shape(j);
412 add(elvect, val, shape, elvect);
440 f.
Eval(f_loc, Tr, ip);
444 Swap<double>(f_hat(0), f_hat(1));
445 f_hat(0) = -f_hat(0);
455 mfem_error(
"BoundaryFlowIntegrator::AssembleRHSElementVect\n"
456 " is not implemented as boundary integrator!\n"
457 " Use LinearForm::AddBdrFaceIntegrator instead of\n"
458 " LinearForm::AddBoundaryIntegrator.");
464 int dim, ndof, order;
465 double un, w, vu_data[3], nor_data[3];
469 Vector vu(vu_data, dim), nor(nor_data, dim);
500 nor(0) = 2*eip.
x - 1.0;
508 w = 0.5*alpha*un - beta*fabs(un);
510 elvect.
Add(w, shape);
518 mfem_error(
"DGDirichletLFIntegrator::AssembleRHSElementVect");
525 bool kappa_is_nonzero = (
kappa != 0.);
564 nor(0) = 2*eip.
x - 1.0;
596 if (kappa_is_nonzero)
607 mfem_error(
"DGElasticityDirichletLFIntegrator::AssembleRHSElementVect");
613 MFEM_ASSERT(Tr.
Elem2No < 0,
"interior boundary is not supported");
615 #ifdef MFEM_THREAD_SAFE
627 const int ndofs = el.
GetDof();
628 const int nvdofs = dim*ndofs;
664 Mult(dshape, adjJ, dshape_ps);
668 nor(0) = 2*eip.
x - 1.0;
675 double wL, wM, jcoef;
680 jcoef =
kappa * (wL + 2.0*wM) * (nor*nor);
681 dshape_ps.
Mult(nor, dshape_dn);
682 dshape_ps.
Mult(u_dir, dshape_du);
723 const double t1 =
alpha * wL * (u_dir*
nor);
724 for (
int im = 0, i = 0; im <
dim; ++im)
726 const double t2 = wM *
u_dir(im);
727 const double t3 = wM *
nor(im);
728 const double tj = jcoef *
u_dir(im);
729 for (
int idof = 0; idof < ndofs; ++idof, ++i)
int GetNPoints() const
Returns the number of the points in the integration rule.
Abstract class for Finite Elements.
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 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.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
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)
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
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 space on each 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)
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.
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...
VectorDeltaCoefficient * vec_delta
int GetVDim()
Returns dimension of the vector.
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 GetGeomType() const
Returns the Geometry::Type of the reference element.
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 ...
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)
double EvalDelta(ElementTransformation &T, const IntegrationPoint &ip)
Return the Scale() multiplied by the weight Coefficient, if any.
Vector & Set(const double a, const Vector &x)
(*this) = a * x
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 &el, ElementTransformation &Tr, Vector &elvect)
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)=0
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)