28 return (constants(att-1));
41 return ((*Function)(transip));
45 return (*TDFunction)(transip, GetTime());
52 return GridF -> GetValue (T.
ElementNo, ip, Component);
60 return (*Transform2)(Q1->Eval(T, ip, GetTime()),
61 Q2->Eval(T, ip, GetTime()));
65 return (*Transform1)(Q1->Eval(T, ip, GetTime()));
71 MFEM_VERIFY(vcenter.
Size() <= 3,
72 "SetDeltaCenter::Maximum number of dim supported is 3")
73 for (
int i = 0; i < vcenter.
Size(); i++) { center[i] = vcenter[i]; }
74 sdim = vcenter.
Size();
87 return weight ? weight->Eval(T, ip, GetTime())*w : w;
116 (*Function)(transip, V);
120 (*TDFunction)(transip, GetTime(), V);
124 V *= Q->Eval(T, ip, GetTime());
131 for (
int i = 0; i <
dim; i++)
139 for (
int i = 0; i <
vdim; i++)
149 for (
int i = 0; i <
vdim; i++)
151 V(i) = this->
Eval(i, T, ip);
229 (*Function)(transip, K);
233 (*TDFunction)(transip,
GetTime(), K);
266 for (
int i = 0; i <
height; i++)
268 for (
int j = 0; j <
width; j++)
270 K(i,j) = this->
Eval(i, j, T, ip);
296 for (
int i = 0; i < mesh.
GetNE(); i++)
304 double val = fabs(coeff.
Eval(*tr, ip));
330 for (
int i = 0; i < mesh.
GetNE(); i++)
338 coeff.
Eval(vval, *tr, ip);
341 for (
int idim(0); idim < vdim; ++idim)
343 norm += ip.
weight * tr->
Weight() * pow(fabs( vval(idim) ), p);
348 for (
int idim(0); idim < vdim; ++idim)
350 val = fabs(vval(idim));
366 double norm =
LpNormLoop(p, coeff, mesh, irs);
373 norm = -pow(-norm, 1.0/p);
377 norm = pow(norm, 1.0/p);
387 double norm =
LpNormLoop(p, coeff, mesh, irs);
394 norm = -pow(-norm, 1.0/p);
398 norm = pow(norm, 1.0/p);
409 double loc_norm =
LpNormLoop(p, coeff, pmesh, irs);
410 double glob_norm = 0;
412 MPI_Comm comm = pmesh.
GetComm();
416 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_SUM, comm);
421 glob_norm = -pow(-glob_norm, 1.0/p);
425 glob_norm = pow(glob_norm, 1.0/p);
430 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_MAX, comm);
439 double loc_norm =
LpNormLoop(p, coeff, pmesh, irs);
440 double glob_norm = 0;
442 MPI_Comm comm = pmesh.
GetComm();
446 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_SUM, comm);
451 glob_norm = -pow(-glob_norm, 1.0/p);
455 glob_norm = pow(glob_norm, 1.0/p);
460 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_MAX, comm);
int GetNPoints() const
Returns the number of the points in the integration rule.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Class for an integration rule - an Array of IntegrationPoint.
Class for grid function - Vector with associated FE space.
VectorGridFunctionCoefficient(GridFunction *gf)
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
void GetVectorValue(int i, const IntegrationPoint &ip, Vector &val) const
void SetSize(int s)
Resize the vector to size s.
double Eval(int i, ElementTransformation &T, const IntegrationPoint &ip)
Evaluates i'th component of the vector.
void SetDeltaCenter(const Vector ¢er)
virtual void Eval(DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)=0
Data type dense matrix using column-major storage.
int Size() const
Returns the size of the vector.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
int GetNE() const
Returns number of elements.
virtual ~MatrixArrayCoefficient()
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate coefficient.
virtual void Eval(DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)
double Eval(int i, int j, ElementTransformation &T, const IntegrationPoint &ip)
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
double ComputeLpNorm(double p, Coefficient &coeff, Mesh &mesh, const IntegrationRule *irs[])
double LpNormLoop(double p, Coefficient &coeff, Mesh &mesh, const IntegrationRule *irs[])
void SetDirection(const Vector &_d)
int GetElementType(int i) const
Returns the type of element i.
virtual ~VectorArrayCoefficient()
Destroys vector coefficient.
int GetVDim()
Returns dimension of the vector.
void GetDeltaCenter(Vector ¢er)
Base class Coefficient that may optionally depend on time.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient function.
void GetColumnReference(int c, Vector &col)
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
void EvalDelta(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Return the specified direction vector multiplied by the value returned by DeltaCoefficient::EvalDelta...
double ComputeGlobalLpNorm(double p, Coefficient &coeff, ParMesh &pmesh, const IntegrationRule *irs[])
double EvalDelta(ElementTransformation &T, const IntegrationPoint &ip)
Return the Scale() multiplied by the weight Coefficient, if any.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
MatrixArrayCoefficient(int dim)
Class for integration point with weight.
void GetElementTransformation(int i, IsoparametricTransformation *ElTr)
void GetVectorValues(ElementTransformation &T, const IntegrationRule &ir, DenseMatrix &vals) const
double infinity()
Define a shortcut for std::numeric_limits<double>::infinity()
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)=0
VectorArrayCoefficient(int dim)
Construct vector of dim coefficients.
virtual void Eval(DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
Class for parallel meshes.