36 int coarse_element = cf.
embeddings[fine_element].parent;
55 return (constants(att-1));
58 void PWCoefficient::InitMap(
const Array<int> & attr,
61 MFEM_VERIFY(attr.
Size() == coefs.
Size(),
63 "Attribute and coefficient arrays have incompatible "
66 for (
int i=0; i<attr.
Size(); i++)
70 UpdateCoefficient(attr[i], *coefs[i]);
79 std::map<int, Coefficient*>::iterator
p = pieces.begin();
80 for (; p != pieces.end(); p++)
82 if (p->second != NULL)
84 p->second->SetTime(t);
93 std::map<int, Coefficient*>::const_iterator
p = pieces.find(att);
94 if (p != pieces.end())
96 if ( p->second != NULL)
98 return p->second->Eval(T, ip);
114 return Function(transip);
118 return TDFunction(transip, GetTime());
125 Mesh *gf_mesh = GridF->FESpace()->GetMesh();
126 if (T.
mesh == gf_mesh)
128 return GridF->GetValue(T, ip, Component);
134 return GridF->GetValue(*coarse_T, coarse_ip, Component);
140 if (Q1) { Q1->SetTime(t); }
141 if (Q2) { Q2->SetTime(t); }
150 return (*Transform2)(Q1->Eval(T, ip, GetTime()),
151 Q2->Eval(T, ip, GetTime()));
155 return (*Transform1)(Q1->Eval(T, ip, GetTime()));
161 if (weight) { weight->SetTime(t); }
167 MFEM_VERIFY(vcenter.
Size() <= 3,
168 "SetDeltaCenter::Maximum number of dim supported is 3")
169 for (
int i = 0; i < vcenter.
Size(); i++) { center[i] = vcenter[i]; }
170 sdim = vcenter.
Size();
183 return weight ? weight->Eval(T, ip, GetTime())*w : w;
188 if (c) { c->SetTime(t); }
206 void PWVectorCoefficient::InitMap(
const Array<int> & attr,
209 MFEM_VERIFY(attr.
Size() == coefs.
Size(),
210 "PWVectorCoefficient: "
211 "Attribute and coefficient arrays have incompatible "
214 for (
int i=0; i<attr.
Size(); i++)
216 if (coefs[i] != NULL)
218 UpdateCoefficient(attr[i], *coefs[i]);
225 MFEM_VERIFY(coef.
GetVDim() == vdim,
226 "PWVectorCoefficient::UpdateCoefficient: "
227 "VectorCoefficient has incompatible dimension.");
228 pieces[attr] = &coef;
235 std::map<int, VectorCoefficient*>::iterator
p = pieces.begin();
236 for (; p != pieces.end(); p++)
238 if (p->second != NULL)
240 p->second->SetTime(t);
249 std::map<int, VectorCoefficient*>::const_iterator
p = pieces.find(att);
250 if (p != pieces.end())
252 if ( p->second != NULL)
254 p->second->Eval(V, T, ip);
274 Function(transip, V);
278 TDFunction(transip, GetTime(), V);
282 V *= Q->Eval(T, ip, GetTime());
289 for (
int i = 0; i <
dim; i++)
298 for (
int i = 0; i <
vdim; i++)
300 if (Coeff[i]) { Coeff[i]->SetTime(t); }
307 if (ownCoeff[i]) {
delete Coeff[i]; }
314 for (
int i = 0; i <
vdim; i++)
316 if (ownCoeff[i]) {
delete Coeff[i]; }
324 for (
int i = 0; i <
vdim; i++)
326 V(i) = this->
Eval(i, T, ip);
346 if (T.
mesh == gf_mesh)
374 gf -> FESpace() ->
GetMesh() -> SpaceDimension() : 0)
382 gf -> FESpace() ->
GetMesh() -> SpaceDimension() : 0;
389 if (T.
mesh == gf_mesh)
430 if (T.
mesh == gf_mesh)
452 if (T.
mesh == gf_mesh)
520 void PWMatrixCoefficient::InitMap(
const Array<int> & attr,
523 MFEM_VERIFY(attr.
Size() == coefs.
Size(),
524 "PWMatrixCoefficient: "
525 "Attribute and coefficient arrays have incompatible "
528 for (
int i=0; i<attr.
Size(); i++)
530 if (coefs[i] != NULL)
540 "PWMatrixCoefficient::UpdateCoefficient: "
541 "MatrixCoefficient has incompatible height.");
543 "PWMatrixCoefficient::UpdateCoefficient: "
544 "MatrixCoefficient has incompatible width.");
548 "PWMatrixCoefficient::UpdateCoefficient: "
549 "MatrixCoefficient has incompatible symmetry.");
551 pieces[attr] = &coef;
558 std::map<int, MatrixCoefficient*>::iterator
p = pieces.begin();
559 for (; p != pieces.end(); p++)
561 if (p->second != NULL)
563 p->second->SetTime(t);
572 std::map<int, MatrixCoefficient*>::const_iterator
p = pieces.find(att);
573 if (p != pieces.end())
575 if ( p->second != NULL)
577 p->second->Eval(K, T, ip);
605 "MatrixFunctionCoefficient is not symmetric");
609 SymmFunction(transip, Ksym);
613 for (
int i=0; i<
height; ++i)
615 for (
int j=i; j<
width; ++j)
617 const double Kij = Ksym[j - i + os];
619 if (j != i) { K(j,i) = Kij; }
629 Function(transip, K);
633 TDFunction(transip,
GetTime(), K);
652 "MatrixFunctionCoefficient is not symmetric");
663 SymmFunction(transip, K);
691 Function(transip, K);
695 TDFunction(transip,
GetTime(), K);
724 if (Coeff[i]) { Coeff[i]->SetTime(t); }
731 if (ownCoeff[i*
width+j]) {
delete Coeff[i*
width+j]; }
732 Coeff[i*
width+j] = c;
733 ownCoeff[i*
width+j] = own;
740 if (ownCoeff[i]) {
delete Coeff[i]; }
748 for (
int i = 0; i <
height; i++)
750 for (
int j = 0; j <
width; j++)
752 K(i,j) = this->
Eval(i, j, T, ip);
807 :
a(&A),
b(&B), va(A.GetVDim()), vb(B.GetVDim())
810 "InnerProductCoefficient: "
811 "Arguments have incompatible dimensions.");
831 :
a(&A),
b(&B), va(A.GetVDim()), vb(B.GetVDim())
834 "VectorRotProductCoefficient: "
835 "Arguments must have dimension equal to two.");
850 return va[0] * vb[1] - va[1] * vb[0];
854 :
a(&A), ma(A.GetHeight(), A.GetWidth())
857 "DeterminantCoefficient: "
858 "Argument must be a square matrix.");
876 ACoef(NULL), BCoef(NULL),
878 alphaCoef(NULL), betaCoef(NULL),
879 alpha(1.0), beta(1.0)
886 double alpha_,
double beta_)
888 ACoef(&A_), BCoef(&B_),
889 A(A_.GetVDim()), B(A_.GetVDim()),
890 alphaCoef(NULL), betaCoef(NULL),
891 alpha(alpha_), beta(beta_)
894 "VectorSumCoefficient: "
895 "Arguments must have the same dimension.");
903 ACoef(&A_), BCoef(&B_),
908 alpha(0.0), beta(0.0)
911 "VectorSumCoefficient: "
912 "Arguments must have the same dimension.");
917 if (ACoef) { ACoef->
SetTime(t); }
918 if (BCoef) { BCoef->
SetTime(t); }
919 if (alphaCoef) { alphaCoef->
SetTime(t); }
920 if (betaCoef) { betaCoef->
SetTime(t); }
928 if ( ACoef) { ACoef->
Eval(A, T, ip); }
929 if ( BCoef) { BCoef->
Eval(B, T, ip); }
930 if (alphaCoef) { alpha = alphaCoef->
Eval(T, ip); }
931 if ( betaCoef) { beta = betaCoef->
Eval(T, ip); }
932 add(alpha, A, beta, B, V);
957 double sa = (a == NULL) ? aConst : a->
Eval(T, ip);
978 V *= (nv > tol) ? (1.0/nv) : 0.0;
987 "VectorCrossProductCoefficient: "
988 "Arguments must have dimension equal to three.");
1004 V[0] = va[1] * vb[2] - va[2] * vb[1];
1005 V[1] = va[2] * vb[0] - va[0] * vb[2];
1006 V[2] = va[0] * vb[1] - va[1] * vb[0];
1012 ma(A.GetHeight(), A.GetWidth()), vb(B.GetVDim())
1015 "MatrixVectorProductCoefficient: "
1016 "Arguments have incompatible dimensions.");
1040 for (
int d=0; d<dim; d++) { M(d,d) = 1.0; }
1045 double alpha_,
double beta_)
1047 a(&A),
b(&B),
alpha(alpha_), beta(beta_),
1048 ma(A.GetHeight(), A.GetWidth())
1051 "MatrixSumCoefficient: "
1052 "Arguments must have the same dimensions.");
1066 if ( beta != 1.0 ) { M *= beta; }
1075 ma(A.GetHeight(), A.GetWidth()),
1076 mb(B.GetHeight(), B.GetWidth())
1079 "MatrixProductCoefficient: "
1080 "Arguments must have compatible dimensions.");
1114 double sa = (a == NULL) ? aConst : a->
Eval(T, ip);
1141 "InverseMatrixCoefficient: "
1142 "Argument must be a square matrix.");
1162 va(A.GetVDim()), vb(B.GetVDim())
1178 for (
int i=0; i<va.
Size(); i++)
1180 for (
int j=0; j<vb.
Size(); j++)
1182 M(i, j) = va[i] * vb[j];
1212 for (
int i=0; i<vk.Size(); i++)
1215 for (
int j=0; j<vk.Size(); j++)
1217 M(i, j) -= vk[i] * vk[j];
1220 M *= ((a == NULL ) ? aConst : a->
Eval(T, ip) );
1229 for (
int i = 0; i < mesh.
GetNE(); i++)
1237 double val = fabs(coeff.
Eval(*tr, ip));
1263 for (
int i = 0; i < mesh.
GetNE(); i++)
1271 coeff.
Eval(vval, *tr, ip);
1274 for (
int idim(0); idim < vdim; ++idim)
1281 for (
int idim(0); idim < vdim; ++idim)
1283 val = fabs(vval(idim));
1299 double norm =
LpNormLoop(p, coeff, mesh, irs);
1306 norm = -
pow(-norm, 1.0/p);
1310 norm =
pow(norm, 1.0/p);
1320 double norm =
LpNormLoop(p, coeff, mesh, irs);
1327 norm = -
pow(-norm, 1.0/p);
1331 norm =
pow(norm, 1.0/p);
1342 double loc_norm =
LpNormLoop(p, coeff, pmesh, irs);
1343 double glob_norm = 0;
1345 MPI_Comm comm = pmesh.
GetComm();
1349 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_SUM, comm);
1352 if (glob_norm < 0.0)
1354 glob_norm = -
pow(-glob_norm, 1.0/p);
1358 glob_norm =
pow(glob_norm, 1.0/p);
1363 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_MAX, comm);
1372 double loc_norm =
LpNormLoop(p, coeff, pmesh, irs);
1373 double glob_norm = 0;
1375 MPI_Comm comm = pmesh.
GetComm();
1379 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_SUM, comm);
1382 if (glob_norm < 0.0)
1384 glob_norm = -
pow(-glob_norm, 1.0/p);
1388 glob_norm =
pow(glob_norm, 1.0/p);
1393 MPI_Allreduce(&loc_norm, &glob_norm, 1, MPI_DOUBLE, MPI_MAX, comm);
1406 MFEM_VERIFY(index_ >= 0,
"Index must be >= 0");
1407 MFEM_VERIFY(index_ < QuadF.
GetVDim(),
1408 "Index must be < QuadratureFunction length");
1411 MFEM_VERIFY(length_ > 0,
"Length must be > 0");
1412 MFEM_VERIFY(length_ <= QuadF.
GetVDim() - index,
1413 "Length must be <= (QuadratureFunction length - index)");
1433 for (
int i = 0; i <
vdim; i++)
1435 V(i) = temp(index + i);
1445 MFEM_VERIFY(qf.
GetVDim() == 1,
"QuadratureFunction's vdim must be 1");
int GetNPoints() const
Returns the number of the points in the integration rule.
int GetVDim() const
Get the vector dimension.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the vector coefficient at ip.
int Size() const
Return the logical size of the array.
virtual void SetTime(double t)
Set the time for time dependent coefficients.
Class for an integration rule - an Array of IntegrationPoint.
void GetVectorValues(int i, const IntegrationRule &ir, DenseMatrix &vals, DenseMatrix &tr) const
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the vector coefficient at ip.
Class for grid function - Vector with associated FE space.
const GridFunction * GridFunc
void Set(int i, int j, Coefficient *c, bool own=true)
Set the coefficient located at (i,j) in the matrix. By default by default this will take ownership of...
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient at ip.
const GridFunction * GridFunc
Base class for vector Coefficients that optionally depend on time and space.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the vector curl coefficient at ip.
TransposeMatrixCoefficient(MatrixCoefficient &A)
Construct with the matrix coefficient. Result is .
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 ...
VectorCrossProductCoefficient(VectorCoefficient &A, VectorCoefficient &B)
Construct with the two coefficients. Result is A x B.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient at ip.
virtual void GetVectorValue(int i, const IntegrationPoint &ip, Vector &val) const
NormalizedVectorCoefficient(VectorCoefficient &A, double tol=1e-6)
Return a vector normalized to a length of one.
void SetSize(int s)
Change the size of the DenseSymmetricMatrix to s x s.
void SetSize(int s)
Resize the vector to size s.
MatrixVectorProductCoefficient(MatrixCoefficient &A, VectorCoefficient &B)
Constructor with two coefficients. Result is A*B.
double Eval(int i, ElementTransformation &T, const IntegrationPoint &ip)
void SetDeltaCenter(const Vector ¢er)
Set the center location of the delta function.
void SetTime(double t)
Set the time for internally stored coefficients.
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
void SetTime(double t)
Set the time for internally stored coefficients.
void SetTime(double t)
Set the time for internally stored coefficients.
double GetTime()
Get the time for time dependent coefficients.
Element::Type GetElementType(int i) const
Returns the type of element i.
double Norml2() const
Returns the l2 norm of the vector.
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 ...
void SetTime(double t)
Set the time for internally stored coefficients.
void SetTime(double t)
Set the time for internally stored coefficients.
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)
Evaluate the vector coefficient at ip.
CurlGridFunctionCoefficient(const GridFunction *gf)
Construct the coefficient with a vector grid function gf. The grid function is not owned by the coeff...
int GetNE() const
Returns number of elements.
void UpdateCoefficient(int attr, VectorCoefficient &coef)
Replace a single Coefficient for a particular attribute.
GradientGridFunctionCoefficient(const GridFunction *gf)
Construct the coefficient with a scalar grid function gf. The grid function is not owned by the coeff...
CrossCrossCoefficient(double A, VectorCoefficient &K)
virtual void Eval(DenseMatrix &M, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient at ip.
virtual ~MatrixArrayCoefficient()
virtual void SetTime(double t)
Set the time for time dependent coefficients.
void SetTime(double t)
Set the time for internally stored coefficients.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient at ip.
void add(const Vector &v1, const Vector &v2, Vector &v)
DeterminantCoefficient(MatrixCoefficient &A)
Construct with the matrix.
ScalarMatrixProductCoefficient(double A, MatrixCoefficient &B)
Constructor with one coefficient. Result is A*B.
virtual void Eval(DenseMatrix &M, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
virtual void Eval(DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
int GetHeight() const
Get the height of the matrix.
virtual void SetTime(double t)
Set the time for time dependent coefficients.
double Eval(int i, int j, ElementTransformation &T, const IntegrationPoint &ip)
InnerProductCoefficient(VectorCoefficient &A, VectorCoefficient &B)
Construct with the two vector coefficients. Result is .
void SetTime(double t)
Set the time for internally stored coefficients.
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
void SetTime(double t)
Set the time for internally stored coefficients.
void SetTime(double t)
Set the time for internally stored coefficients.
void SetTime(double t)
Set the time for internally stored coefficients.
void SetTime(double t)
Set the time for internally stored coefficients.
double ComputeLpNorm(double p, Coefficient &coeff, Mesh &mesh, const IntegrationRule *irs[])
Compute the Lp norm of a function f. .
void SetTime(double t)
Set the time for internally stored coefficients.
void SetTime(double t)
Set the time for internally stored coefficients.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient in the element described by T at the point ip.
double GetTime()
Get the time for time dependent coefficients.
ElementTransformation * RefinedToCoarse(Mesh &coarse_mesh, const ElementTransformation &T, const IntegrationPoint &ip, IntegrationPoint &coarse_ip)
double LpNormLoop(double p, Coefficient &coeff, Mesh &mesh, const IntegrationRule *irs[])
Mesh * GetMesh() const
Returns the mesh.
QuadratureFunctionCoefficient(QuadratureFunction &qf)
Constructor with a quadrature function as input.
void Add(const double c, const DenseMatrix &A)
Adds the matrix A multiplied by the number c to the matrix.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient.
OuterProductCoefficient(VectorCoefficient &A, VectorCoefficient &B)
Construct with two vector coefficients. Result is .
void SetGridFunction(const GridFunction *gf)
Set the vector grid function.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient at ip.
void Invert()
Replaces the current matrix with its inverse.
void Set(int i, Coefficient *c, bool own=true)
Sets coefficient in the vector.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient at ip.
void UpdateCoefficient(int attr, MatrixCoefficient &coef)
Replace a single coefficient for a particular attribute.
virtual ~VectorArrayCoefficient()
Destroys vector coefficient.
void SetTime(double t)
Set the time for internally stored coefficients.
void SetTime(double t)
Set the time for internally stored coefficients.
void SetTime(double t)
Set the time for internally stored coefficients.
int GetVDim()
Returns dimension of the vector.
FiniteElementSpace * FESpace()
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient at ip.
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 ...
const GridFunction * GridFunc
virtual const double * HostRead() const
Shortcut for mfem::Read(vec.GetMemory(), vec.Size(), false).
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the determinant coefficient at ip.
void SetTime(double t)
Set the time for internally stored coefficients.
void SetComponent(int index_, int length_)
FDualNumber< tbase > pow(const FDualNumber< tbase > &a, const FDualNumber< tbase > &b)
pow([dual number],[dual number])
void GetDeltaCenter(Vector ¢er)
Write the center of the delta function into center.
virtual void Eval(DenseMatrix &M, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
double p(const Vector &x, double t)
void SetGridFunction(const GridFunction *gf)
Set the scalar grid function.
void Transpose()
(*this) = (*this)^t
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
VectorQuadratureFunctionCoefficient(QuadratureFunction &qf)
Constructor with a quadrature function as input.
virtual void SetTime(double t)
Set the time for time dependent coefficients.
virtual void Eval(DenseMatrix &M, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
virtual void SetTime(double t)
Set the time for time dependent coefficients.
Base class for Matrix Coefficients that optionally depend on time and space.
virtual void Eval(DenseMatrix &M, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient.
void GetColumnReference(int c, Vector &col)
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the vector coefficient at ip.
virtual void EvalDelta(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Return the specified direction vector multiplied by the value returned by DeltaCoefficient::EvalDelta...
MatrixProductCoefficient(MatrixCoefficient &A, MatrixCoefficient &B)
Construct with the two coefficients. Result is A * B.
const GridFunction * GridFunc
double ComputeGlobalLpNorm(double p, Coefficient &coeff, ParMesh &pmesh, const IntegrationRule *irs[])
Compute the global Lp norm of a function f. .
double GetDivergence(ElementTransformation &tr) const
virtual double EvalDelta(ElementTransformation &T, const IntegrationPoint &ip)
The value of the function assuming we are evaluating at the delta center.
const CoarseFineTransformations & GetRefinementTransforms()
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient at ip.
MatrixArrayCoefficient(int dim)
Construct a coefficient matrix of dimensions dim * dim. The actual coefficients still need to be adde...
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the gradient vector coefficient at ip.
Class for integration point with weight.
void SetTime(double t)
Set the time for internally stored coefficients.
virtual void SetTime(double t)
Set the time for time dependent coefficients.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the scalar divergence coefficient at ip.
double GetTime()
Get the time for time dependent coefficients.
void GetElementTransformation(int i, IsoparametricTransformation *ElTr)
DivergenceGridFunctionCoefficient(const GridFunction *gf)
Construct the coefficient with a vector grid function gf. The grid function is not owned by the coeff...
virtual void Eval(DenseMatrix &M, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
void SetTime(double t)
Set the time for internally stored coefficients.
virtual void Eval(DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient.
void SetDirection(const Vector &d_)
void GetElementValues(int idx, Vector &values)
Return all values associated with mesh element idx in a Vector.
VectorSumCoefficient(int dim)
void SetGridFunction(const GridFunction *gf)
Set the grid function for this coefficient. Also sets the Vector dimension to match that of the gf...
int index(int i, int j, int nx, int ny)
void GetGradients(ElementTransformation &tr, const IntegrationRule &ir, DenseMatrix &grad) const
virtual void Eval(DenseMatrix &M, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
double infinity()
Define a shortcut for std::numeric_limits<double>::infinity()
void SetTime(double t)
Set the time for internally stored coefficients.
MatrixSumCoefficient(MatrixCoefficient &A, MatrixCoefficient &B, double alpha_=1.0, double beta_=1.0)
Construct with the two coefficients. Result is alpha_ * A + beta_ * B.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the coefficient in the element described by T at the point ip.
VectorArrayCoefficient(int dim)
Construct vector of dim coefficients. The actual coefficients still need to be added with Set()...
virtual void Eval(DenseSymmetricMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
void GetCurl(ElementTransformation &tr, Vector &curl) const
void Mult(const double *x, double *y) const
Matrix vector multiplication.
virtual void SetTime(double t)
Set the time for time dependent coefficients.
int GetWidth() const
Get the width of the matrix.
void SetTime(double t)
Set the time for internally stored coefficients.
VectorRotProductCoefficient(VectorCoefficient &A, VectorCoefficient &B)
Constructor with two vector coefficients. Result is .
virtual void Eval(DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
virtual void Eval(DenseMatrix &M, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the matrix coefficient at ip.
virtual void EvalSymmetric(Vector &K, ElementTransformation &T, const IntegrationPoint &ip)
(DEPRECATED) Evaluate the symmetric matrix coefficient at ip.
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
void SetTime(double t)
Set the time for internally stored coefficients.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient.
void SetTime(double t)
Set the time for internally stored coefficients.
Class for parallel meshes.
InverseMatrixCoefficient(MatrixCoefficient &A)
Construct with the matrix coefficient. Result is .
void SetTime(double t)
Set the time for internally stored coefficients.
Class representing a function through its values (scalar or vector) at quadrature points...
void SetTime(double t)
Set the time for internally stored coefficients.
void SetTime(double t)
Set the time for internally stored coefficients.
void GetGradient(ElementTransformation &tr, Vector &grad) const
ScalarVectorProductCoefficient(double A, VectorCoefficient &B)
Constructor with constant and vector coefficient. Result is A * B.
VectorGridFunctionCoefficient()
Construct an empty coefficient. Calling Eval() before the grid function is set will cause a segfault...
void SetTime(double t)
Set the time for internally stored coefficients.