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());
233 for (
int i = 0; i < mesh.
GetNE(); i++)
241 double val = fabs(coeff.
Eval(*tr, ip));
242 if (p < numeric_limits<double>::infinity())
267 for (
int i = 0; i < mesh.
GetNE(); i++)
275 coeff.
Eval(vval, *tr, ip);
276 if (p < numeric_limits<double>::infinity())
278 for (
int idim(0); idim < vdim; ++idim)
280 norm += ip.
weight * tr->
Weight() * pow(fabs( vval(idim) ), p);
285 for (
int idim(0); idim < vdim; ++idim)
287 val = fabs(vval(idim));
303 double norm =
LpNormLoop(p, coeff, mesh, irs);
305 if (p < numeric_limits<double>::infinity())
310 norm = -pow(-norm, 1.0/p);
314 norm = pow(norm, 1.0/p);
324 double norm =
LpNormLoop(p, coeff, mesh, irs);
326 if (p < numeric_limits<double>::infinity())
331 norm = -pow(-norm, 1.0/p);
335 norm = pow(norm, 1.0/p);
346 double loc_norm =
LpNormLoop(p, coeff, pmesh, irs);
347 double glob_norm = 0;
349 MPI_Comm comm = pmesh.
GetComm();
351 if (p < numeric_limits<double>::infinity())
353 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_SUM, comm);
358 glob_norm = -pow(-glob_norm, 1.0/p);
362 glob_norm = pow(glob_norm, 1.0/p);
367 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_MAX, comm);
376 double loc_norm =
LpNormLoop(p, coeff, pmesh, irs);
377 double glob_norm = 0;
379 MPI_Comm comm = pmesh.
GetComm();
381 if (p < numeric_limits<double>::infinity())
383 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_SUM, comm);
388 glob_norm = -pow(-glob_norm, 1.0/p);
392 glob_norm = pow(glob_norm, 1.0/p);
397 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)
Resizes the vector if the new size is different.
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.
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
Class for parallel meshes.