46 MFEM_VERIFY(
Jtr != NULL,
47 "Requires a target Jacobian, use SetTargetJacobian().");
56 const double cos_Jpr = (col1 * col2) / norm_prod,
57 sin_Jpr = fabs(Jpr.
Det()) / norm_prod;
62 const double cos_Jtr = (col1 * col2) / norm_prod,
63 sin_Jtr = fabs(
Jtr->
Det()) / norm_prod;
65 return 0.5 * (1.0 - cos_Jpr * cos_Jtr - sin_Jpr * sin_Jtr);
70 MFEM_VERIFY(
Jtr != NULL,
71 "Requires a target Jacobian, use SetTargetJacobian().");
80 double norm_c1 = col1.
Norml2(),
83 double cos_Jpr_12 = (col1 * col2) / (norm_c1 * norm_c2),
84 cos_Jpr_13 = (col1 * col3) / (norm_c1 * norm_c3),
85 cos_Jpr_23 = (col2 * col3) / (norm_c2 * norm_c3);
86 double sin_Jpr_12 = std::sqrt(1.0 - cos_Jpr_12 * cos_Jpr_12),
87 sin_Jpr_13 = std::sqrt(1.0 - cos_Jpr_13 * cos_Jpr_13),
88 sin_Jpr_23 = std::sqrt(1.0 - cos_Jpr_23 * cos_Jpr_23);
96 double cos_Jtr_12 = (col1 * col2) / (norm_c1 * norm_c2),
97 cos_Jtr_13 = (col1 * col3) / (norm_c1 * norm_c3),
98 cos_Jtr_23 = (col2 * col3) / (norm_c2 * norm_c3);
99 double sin_Jtr_12 = std::sqrt(1.0 - cos_Jtr_12 * cos_Jtr_12),
100 sin_Jtr_13 = std::sqrt(1.0 - cos_Jtr_13 * cos_Jtr_13),
101 sin_Jtr_23 = std::sqrt(1.0 - cos_Jtr_23 * cos_Jtr_23);
103 return (3.0 - cos_Jpr_12 * cos_Jtr_12 - sin_Jpr_12 * sin_Jtr_12
104 - cos_Jpr_13 * cos_Jtr_13 - sin_Jpr_13 * sin_Jtr_13
105 - cos_Jpr_23 * cos_Jtr_23 - sin_Jpr_23 * sin_Jtr_23) / 6.0;
110 MFEM_VERIFY(
Jtr != NULL,
111 "Requires a target Jacobian, use SetTargetJacobian().");
125 return 0.5 * (ratio_Jpr / ratio_Jtr + ratio_Jtr / ratio_Jpr) - 1.0;
130 MFEM_VERIFY(
Jtr != NULL,
131 "Requires a target Jacobian, use SetTargetJacobian().");
140 double norm_c1 = col1.
Norml2(),
143 double ratio_Jpr_1 = norm_c1 / std::sqrt(norm_c2 * norm_c3),
144 ratio_Jpr_2 = norm_c2 / std::sqrt(norm_c1 * norm_c3),
145 ratio_Jpr_3 = norm_c3 / std::sqrt(norm_c1 * norm_c2);
153 double ratio_Jtr_1 = norm_c1 / std::sqrt(norm_c2 * norm_c3),
154 ratio_Jtr_2 = norm_c2 / std::sqrt(norm_c1 * norm_c3),
155 ratio_Jtr_3 = norm_c3 / std::sqrt(norm_c1 * norm_c2);
157 return ( 0.5 * (ratio_Jpr_1 / ratio_Jtr_1 + ratio_Jtr_1 / ratio_Jpr_1) +
158 0.5 * (ratio_Jpr_2 / ratio_Jtr_2 + ratio_Jtr_2 / ratio_Jpr_2) +
159 0.5 * (ratio_Jpr_3 / ratio_Jtr_3 + ratio_Jtr_3 / ratio_Jpr_3) - 3.0
217 const double c2 = weight*c1*c1;
295 const double c2 = weight*c1/2;
296 const double c3 = c1*c2;
312 return 0.5*I1b*I1b - 2.0;
370 return 0.5*(I2b + 1.0/I2b) - 1.0;
400 return I1b*(I1b - 1.0);
428 return 0.5*(I2*I2 + 1./(I2*I2) - 2.);
447 const double I2 =
ie.
Get_I2(), I2inv_sq = 1.0 / (I2 * I2);
458 return (I2b - 1.0)*(I2b - 1.0) - I2b + std::sqrt(I2b*I2b +
eps);
463 MFEM_ABORT(
"Metric not implemented yet. Use metric mu_55 instead.");
471 MFEM_ABORT(
"Metric not implemented yet. Use metric mu_55 instead.");
479 return 0.5*(I2b - 1.0)*(I2b - 1.0)/(I2b -
tau0);
490 const double c = (I2b - 1.0)/(I2b -
tau0);
506 const double c0 = 1.0/(I2b -
tau0);
507 const double c = c0*(I2b - 1.0);
552 double d_I1b_I2b_data[9];
556 const double a = weight/(6*std::sqrt(I1b_I2b));
590 const double c1 = weight/9;
652 return 0.5*(I3b + 1.0/I3b) - 1.0;
715 const double c1 = weight*c0*c0;
716 const double c2 = -2*c0*c1;
730 return 0.5*(I3b - 1.0)*(I3b - 1.0)/(I3b -
tau0);
741 const double c = (I3b - 1.0)/(I3b -
tau0);
762 const double c0 = 1.0/(I3b -
tau0);
763 const double c = c0*(I3b - 1.0);
771 MFEM_VERIFY(
nodes,
"Nodes are not given!");
772 MFEM_ASSERT(
avg_volume == 0.0,
"The average volume is already computed!");
775 const int NE = mesh->
GetNE();
779 for (
int i = 0; i < NE; i++)
803 area_NE[0] = volume; area_NE[1] = NE;
804 MPI_Allreduce(area_NE, area_NE + 2, 2, MPI_DOUBLE, MPI_SUM,
comm);
824 MFEM_ASSERT(Wideal.
Width() == Jtr.
SizeJ(),
"");
830 for (
int i = 0; i < ir.
GetNPoints(); i++) { Jtr(i) = Wideal; }
842 el_volume =
avg_volume / ncmesh->GetElementSizeReduction(e_id);
846 1./W.Height()), Wideal);
847 for (
int i = 0; i < ir.
GetNPoints(); i++) { Jtr(i) = W; }
870 const double det = Jtr(i).Det();
871 MFEM_VERIFY(det > 0.0,
"The given mesh is inverted!");
872 Jtr(i).Set(std::pow(det / detW, 1./dim), Wideal);
878 MFEM_ABORT(
"invalid target type!");
904 "Target type GIVEN_FULL requires a MatrixCoefficient.");
920 MFEM_ABORT(
"Incompatible target type for analytic adaptation!");
962 MFEM_VERIFY(
target_spec.
Size() > 0,
"Target specification is not set!");
972 MFEM_VERIFY(
tspec_fes,
"A call to SetDiscreteTargerSpec() is needed.");
983 Vector shape(ntspec_dofs), tspec_vals(ntspec_dofs);
988 const double min_size = tspec_vals.
Min();
989 MFEM_ASSERT(min_size > 0.0,
990 "Non-positive size propagated in the target definition.");
996 const double size = std::max(shape * tspec_vals, min_size);
997 Jtr(i).Set(std::pow(size / Wideal.
Det(), 1.0/
dim), Wideal);
1002 MFEM_ABORT(
"Incompatible target type for analytic adaptation!");
1098 Vector shape, p, p0, d_vals;
1144 const double weight = ip.
weight * Jtr_i.
Det();
1161 energy += weight * val;
1195 Vector shape, p, p0, d_vals, grad;
1233 const double weight = ip.
weight * Jtr_i.
Det();
1288 Vector shape, p, p0, d_vals;
1326 const double weight = ip.
weight * Jtr_i.
Det();
1346 for (
int i = 0; i < dof; i++)
1348 const double w_shape_i = weight_m * shape(i);
1349 for (
int j = 0; j < dof; j++)
1351 const double w = w_shape_i * shape(j);
1352 for (
int d1 = 0; d1 <
dim; d1++)
1354 for (
int d2 = 0; d2 <
dim; d2++)
1356 elmat(d1*dof + i, d2*dof + j) += w * grad_grad(d1, d2);
1385 double &metric_energy,
1408 metric_energy = 0.0;
1410 for (
int i = 0; i < fes->
GetNE(); i++)
1424 const double weight = ip.
weight * Jtr(i).Det();
1431 lim_energy += weight;
1440 const int NE = mesh.
GetNE();
1443 DenseMatrix Winv(dim), T(dim), A(dim), dshape, pos;
1448 for (
int i = 0; i < NE; i++)
1465 for (
int j = 0; j < nsp; j++)
1476 metric_gf(gf_dofs[j]) = metric.
EvalW(T);
int GetNPoints() const
Returns the number of the points in the integration rule.
Abstract class for Finite Elements.
MatrixCoefficient * matrix_tspec
InvariantsEvaluator2D< double > ie
virtual void SetParDiscreteTargetSpec(ParGridFunction &tspec)
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual void SetInitialField(const Vector &init_nodes, const Vector &init_field)=0
int GetDim() const
Returns the reference space dimension for the finite element.
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const =0
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
void AddMultVWt(const Vector &v, const Vector &w, DenseMatrix &VWt)
VWt += v w^t.
void SetSerialMetaInfo(const Mesh &m, const FiniteElementCollection &fec, int num_comp)
Class for an integration rule - an Array of IntegrationPoint.
VectorCoefficient * vector_tspec
const TargetType target_type
Class for grid function - Vector with associated FE space.
InvariantsEvaluator3D< double > ie
void Assemble_ddI2b(scalar_t w, scalar_t *A)
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
void Assemble_ddI2b(scalar_t w, scalar_t *A)
void SetDerivativeMatrix(int height, const scalar_t *Deriv)
The Deriv matrix is dof x 2, using column-major storage.
const GridFunction * lim_dist
InvariantsEvaluator2D< double > ie
void EnableNormalization(const GridFunction &x)
Computes the normalization factors of the metric and limiting integrals using the mesh position given...
const scalar_t * Get_dI3b()
void SetSize(int s)
Resize the vector to size s.
void InterpolateTMOP_QualityMetric(TMOP_QualityMetric &metric, const TargetConstructor &tc, const Mesh &mesh, GridFunction &metric_gf)
Interpolates the metric's values at the nodes of metric_gf.
void GetElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom in array dofs for i'th element.
TMOP_QualityMetric * metric
InvariantsEvaluator2D< double > ie
Base class for limiting functions to be used in class TMOP_Integrator.
virtual double EvalW(const DenseMatrix &Jpt) const =0
Evaluate the strain energy density function, W = W(Jpt).
virtual void Eval_d2(const Vector &x, const Vector &x0, double dist, DenseMatrix &d2) const =0
Returns the Hessian of the limiting function f(x, x0, d) with respect to x.
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
int Width() const
Get the width (size of input) of the Operator. Synonym with NumCols().
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
double Norml2() const
Returns the l2 norm of the vector.
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
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 ...
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
void GetSubVector(const Array< int > &dofs, Vector &elemvect) const
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const =0
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
InvariantsEvaluator2D< double > ie
int GetOrder() const
Returns the order of the finite element. In the case of anisotropic orders, returns the maximum order...
ParFiniteElementSpace * pfes
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
Data type dense matrix using column-major storage.
int Size() const
Returns the size of the vector.
void SetSize(int i, int j, int k)
int GetNE() const
Returns number of elements.
virtual void SetSerialDiscreteTargetSpec(GridFunction &tspec)
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
Abstract parallel finite element space.
InvariantsEvaluator2D< double > ie
InvariantsEvaluator2D< double > ie
const GridFunction * nodes
void Assemble_TProd(scalar_t w, const scalar_t *X, const scalar_t *Y, scalar_t *A)
void Assemble_ddI1(scalar_t w, scalar_t *A)
double * GetData() const
Returns the matrix data array.
double * GetData() const
Return a pointer to the beginning of the Vector data.
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
Default limiter function in TMOP_Integrator.
Geometry::Type GetElementBaseGeometry(int i) const
void Set(double alpha, const double *A)
Set the matrix to alpha * A, assuming that A has the same dimensions as the matrix and uses column-ma...
virtual void ComputeElementTargets(int e_id, const FiniteElement &fe, const IntegrationRule &ir, const Vector &elfun, DenseTensor &Jtr) const
Given an element and quadrature rule, computes ref->target transformation Jacobians for each quadratur...
void Assemble_ddI2(scalar_t w, scalar_t *A)
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual void ComputeElementTargets(int e_id, const FiniteElement &fe, const IntegrationRule &ir, const Vector &elfun, DenseTensor &Jtr) const
Given an element and quadrature rule, computes ref->target transformation Jacobians for each quadratur...
Coefficient * scalar_tspec
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
const DenseMatrix & GetGeomToPerfGeomJac(int GeomType) const
void SetTargetJacobian(const DenseMatrix &_Jtr)
Specify the reference-element -> target-element Jacobian matrix for the point of interest.
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
Geometry::Type GetGeomType() const
Returns the Geometry::Type of the reference element.
void Add(const DenseMatrix &A, const DenseMatrix &B, double alpha, DenseMatrix &C)
C = A + alpha*B.
int GetNE() const
Returns number of elements in the mesh.
Abstract class for local mesh quality metrics in the target-matrix optimization paradigm (TMOP) by P...
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.
virtual ~AdaptivityEvaluator()
void SetJacobian(const scalar_t *Jac)
The Jacobian should use column-major storage.
void Assemble_ddI3b(scalar_t w, scalar_t *A)
InvariantsEvaluator3D< double > ie
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
void EnableLimiting(const GridFunction &n0, const GridFunction &dist, Coefficient &w0, TMOP_LimiterFunction *lfunc=NULL)
Adds a limiting term to the integrator (general version).
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
Mesh * GetMesh() const
Returns the mesh.
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
InvariantsEvaluator2D< double > ie
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
const TargetConstructor * targetC
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
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...
const scalar_t * Get_dI2b()
virtual void GetElementDofs(int i, Array< int > &dofs) const
Returns indexes of degrees of freedom in array dofs for i'th element.
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
InvariantsEvaluator2D< double > ie
const IntegrationRule & GetNodes() const
void SetDerivativeMatrix(int height, const scalar_t *Deriv)
The Deriv matrix is dof x 3, using column-major storage.
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
void UpdateTargetSpecification(const Vector &new_x)
InvariantsEvaluator2D< double > ie
int GetNumRootElements()
Return the number of root elements.
void GetValues(int i, const IntegrationRule &ir, Vector &vals, int vdim=1) const
virtual void AssembleElementVector(const FiniteElement &el, ElementTransformation &T, const Vector &elfun, Vector &elvect)
Perform the local action of the NonlinearFormIntegrator.
int GetVDim() const
Returns vector dimension.
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
A class for non-conforming AMR on higher-order hexahedral, prismatic, quadrilateral or triangular mes...
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
FiniteElementSpace * FESpace()
void GetColumn(int c, Vector &col) const
void Assemble_ddI1b(scalar_t w, scalar_t *A)
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
void ComputeAvgVolume() const
void CalcInverse(const DenseMatrix &a, DenseMatrix &inva)
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
double Min() const
Returns the minimal element of the vector.
double * Data() const
Returns the matrix data array.
void Transpose()
(*this) = (*this)^t
void AddMultABt(const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &ABt)
ABt += A * B^t.
virtual void AssembleElementGrad(const FiniteElement &el, ElementTransformation &T, const Vector &elfun, DenseMatrix &elmat)
Assemble the local gradient matrix.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
int GetDof() const
Returns the number of degrees of freedom in the finite element.
void Assemble_ddI2(scalar_t w, scalar_t *A)
const scalar_t * Get_dI1()
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
Base class Coefficient that may optionally depend on time.
InvariantsEvaluator3D< double > ie
const scalar_t * Get_dI1()
virtual void ComputeElementTargets(int e_id, const FiniteElement &fe, const IntegrationRule &ir, const Vector &elfun, DenseTensor &Jtr) const
Given an element and quadrature rule, computes ref->target transformation Jacobians for each quadratur...
InvariantsEvaluator2D< double > ie
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual void SetAnalyticTargetSpec(Coefficient *sspec, VectorCoefficient *vspec, MatrixCoefficient *mspec)
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
const scalar_t * Get_dI1b()
void SetDataAndSize(double *d, int s)
Set the Vector data and size.
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
const scalar_t * Get_dI1b()
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
InvariantsEvaluator3D< double > ie
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
const scalar_t * Get_dI2b()
virtual double Eval(const Vector &x, const Vector &x0, double d) const =0
Returns the limiting function, f(x, x0, d).
Class for integration point with weight.
AdaptivityEvaluator * adapt_eval
InvariantsEvaluator3D< double > ie
void Assemble_TProd(scalar_t w, const scalar_t *X, const scalar_t *Y, scalar_t *A)
const scalar_t * Get_dI2()
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
void GetElementTransformation(int i, IsoparametricTransformation *ElTr)
void ComputeNormalizationEnergies(const GridFunction &x, double &metric_energy, double &lim_energy)
void SetParMetaInfo(const ParMesh &m, const FiniteElementCollection &fec, int num_comp)
Parallel version of SetSerialMetaInfo.
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
virtual double GetElementEnergy(const FiniteElement &el, ElementTransformation &T, const Vector &elfun)
Computes the integral of W(Jacobian(Trt)) over a target zone.
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
void Assemble_ddI1(scalar_t w, scalar_t *A)
virtual void Eval_d1(const Vector &x, const Vector &x0, double dist, Vector &d1) const =0
Returns the gradient of the limiting function f(x, x0, d) with respect to x.
const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement associated with i'th element.
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
InvariantsEvaluator2D< double > ie
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
InvariantsEvaluator2D< double > ie
NCMesh * ncmesh
Optional non-conforming mesh extension.
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the coefficient in the element described by T at the point ip.
const scalar_t * Get_dI2()
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
void MultAtB(const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &AtB)
Multiply the transpose of a matrix A with a matrix B: At*B.
const FiniteElementCollection * FEColl() const
void GetNodes(Vector &node_coord) const
InvariantsEvaluator3D< double > ie
const GridFunction * nodes0
const FiniteElementSpace * tspec_fes
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
void UseExternalData(double *d, int h, int w)
Change the data array and the size of the DenseMatrix.
Class for parallel grid function.
void Assemble_ddI1b(scalar_t w, scalar_t *A)
Base class representing target-matrix construction algorithms for mesh optimization via the target-ma...
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
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...
Rank 3 tensor (array of matrices)
Class for parallel meshes.
IntegrationRules IntRules(0, Quadrature1D::GaussLegendre)
A global object with all integration rules (defined in intrules.cpp)
TMOP_LimiterFunction * lim_func
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
InvariantsEvaluator3D< double > ie
void ParEnableNormalization(const ParGridFunction &x)
virtual void EvalP(const DenseMatrix &Jpt, DenseMatrix &P) const
Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
virtual void ComputeAtNewPosition(const Vector &new_nodes, Vector &new_field)=0
virtual double EvalW(const DenseMatrix &Jpt) const
Evaluate the strain energy density function, W = W(Jpt).
virtual void AssembleH(const DenseMatrix &Jpt, const DenseMatrix &DS, const double weight, DenseMatrix &A) const
Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the...
ParFiniteElementSpace * ParFESpace() const
void SetJacobian(const scalar_t *Jac)
The Jacobian should use column-major storage.