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()));
94 (*Function)(transip, V);
98 (*TDFunction)(transip, GetTime(), V);
102 V *= Q->Eval(T, ip, GetTime());
109 for (
int i = 0; i <
dim; i++)
117 for (
int i = 0; i <
vdim; i++)
127 for (
int i = 0; i <
vdim; i++)
129 V(i) = Coeff[i]->Eval(T, ip,
GetTime());
193 (*Function)(transip, K);
197 (*TDFunction)(transip,
GetTime(), K);
220 for (i = 0; i <
vdim; i++)
221 for (j = 0; j <
vdim; j++)
223 K(i,j) = Coeff[i*vdim+j] ->
Eval(T, ip,
GetTime());
248 for (
int i = 0; i < mesh.
GetNE(); i++)
256 double val = fabs(coeff.
Eval(*tr, ip));
257 if (p < numeric_limits<double>::infinity())
282 for (
int i = 0; i < mesh.
GetNE(); i++)
290 coeff.
Eval(vval, *tr, ip);
291 if (p < numeric_limits<double>::infinity())
293 for (
int idim(0); idim < vdim; ++idim)
295 norm += ip.
weight * tr->
Weight() * pow(fabs( vval(idim) ), p);
300 for (
int idim(0); idim < vdim; ++idim)
302 val = fabs(vval(idim));
318 double norm =
LpNormLoop(p, coeff, mesh, irs);
320 if (p < numeric_limits<double>::infinity())
325 norm = -pow(-norm, 1.0/p);
329 norm = pow(norm, 1.0/p);
339 double norm =
LpNormLoop(p, coeff, mesh, irs);
341 if (p < numeric_limits<double>::infinity())
346 norm = -pow(-norm, 1.0/p);
350 norm = pow(norm, 1.0/p);
361 double loc_norm =
LpNormLoop(p, coeff, pmesh, irs);
362 double glob_norm = 0;
364 MPI_Comm comm = pmesh.
GetComm();
366 if (p < numeric_limits<double>::infinity())
368 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_SUM, comm);
373 glob_norm = -pow(-glob_norm, 1.0/p);
377 glob_norm = pow(glob_norm, 1.0/p);
382 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_MAX, comm);
391 double loc_norm =
LpNormLoop(p, coeff, pmesh, irs);
392 double glob_norm = 0;
394 MPI_Comm comm = pmesh.
GetComm();
396 if (p < numeric_limits<double>::infinity())
398 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_SUM, comm);
403 glob_norm = -pow(-glob_norm, 1.0/p);
407 glob_norm = pow(glob_norm, 1.0/p);
412 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 integration rule.
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 if the new size is different.
virtual void Eval(DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)=0
Data type dense matrix using column-major storage.
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)
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[])
int GetElementType(int i) const
Returns the type of element i.
double Eval(int i, int j, ElementTransformation &T, IntegrationPoint &ip)
virtual ~VectorArrayCoefficient()
Destroys vector coefficient.
int GetVDim()
Returns dimension of the vector.
double Eval(int i, ElementTransformation &T, IntegrationPoint &ip)
Evaluates i'th component of the vector.
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)
double ComputeGlobalLpNorm(double p, Coefficient &coeff, ParMesh &pmesh, const IntegrationRule *irs[])
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
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.