MFEM v4.8.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::TMOP_Combo_QualityMetric Class Reference

#include <tmop.hpp>

Inheritance diagram for mfem::TMOP_Combo_QualityMetric:
[legend]
Collaboration diagram for mfem::TMOP_Combo_QualityMetric:
[legend]

Public Member Functions

virtual void AddQualityMetric (TMOP_QualityMetric *tq, real_t wt=1.0)
 
void SetTargetJacobian (const DenseMatrix &Jtr_) override
 Specify the reference-element -> target-element Jacobian matrix for the point of interest.
 
real_t EvalWMatrixForm (const DenseMatrix &Jpt) const override
 Evaluates the metric in matrix form (opposed to invariant form). Used for validating the invariant evaluations.
 
real_t EvalW (const DenseMatrix &Jpt) const override
 Evaluate the strain energy density function, W = W(Jpt), by using the 2D or 3D matrix invariants, see linalg/invariants.hpp.
 
void EvalP (const DenseMatrix &Jpt, DenseMatrix &P) const override
 Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).
 
void EvalPW (const DenseMatrix &Jpt, DenseMatrix &P) const override
 
void AssembleH (const DenseMatrix &Jpt, const DenseMatrix &DS, const real_t weight, DenseMatrix &A) const override
 Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the local gradient matrix 'A'.
 
void ComputeAvgMetrics (const GridFunction &nodes, const TargetConstructor &tc, Vector &averages) const
 
void ComputeBalancedWeights (const GridFunction &nodes, const TargetConstructor &tc, Vector &weights) const
 
void GetWeights (Array< real_t > &weights) const
 
void SetWeights (const Vector &weights)
 Changes the weights of the metrics in the combination.
 
- Public Member Functions inherited from mfem::TMOP_QualityMetric
 TMOP_QualityMetric ()
 
virtual ~TMOP_QualityMetric ()
 
virtual int Id () const
 Return the metric ID.
 
- Public Member Functions inherited from mfem::HyperelasticModel
 HyperelasticModel ()
 
virtual ~HyperelasticModel ()
 
void SetTransformation (ElementTransformation &Ttr_)
 

Protected Attributes

Array< TMOP_QualityMetric * > tmop_q_arr
 
Array< real_twt_arr
 
- Protected Attributes inherited from mfem::TMOP_QualityMetric
const DenseMatrixJtr
 
- Protected Attributes inherited from mfem::HyperelasticModel
ElementTransformationTtr
 

Additional Inherited Members

- Protected Member Functions inherited from mfem::TMOP_QualityMetric
void SetTransformation (ElementTransformation &)
 The method HyperelasticModel::SetTransformation() is hidden for TMOP_QualityMetrics, because it is not used.
 
void DefaultAssembleH (const DenseTensor &H, const DenseMatrix &DS, const real_t weight, DenseMatrix &A) const
 See AssembleH(). This is a default implementation for the case when the 2nd derivatives of the metric are pre-computed and stored into H. This function is used in combination with AD-based computations.
 

Detailed Description

Abstract class used to define explicit combination of metrics with constant coefficients.

Definition at line 95 of file tmop.hpp.

Member Function Documentation

◆ AddQualityMetric()

virtual void mfem::TMOP_Combo_QualityMetric::AddQualityMetric ( TMOP_QualityMetric * tq,
real_t wt = 1.0 )
inlinevirtual

Definition at line 102 of file tmop.hpp.

◆ AssembleH()

void mfem::TMOP_Combo_QualityMetric::AssembleH ( const DenseMatrix & Jpt,
const DenseMatrix & DS,
const real_t weight,
DenseMatrix & A ) const
overridevirtual

Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the local gradient matrix 'A'.

Parameters
[in]JptRepresents the target->physical transformation Jacobian matrix.
[in]DSGradient of the basis matrix (dof x dim).
[in]weightQuadrature weight coefficient for the point.
[in,out]ALocal gradient matrix where the contribution from this point will be added.

Computes weight * d(dW_dxi)_d(xj) at the current point, for all i and j, where x1 ... xn are the FE dofs. This function is usually defined using the matrix invariants and their derivatives.

Implements mfem::TMOP_QualityMetric.

Definition at line 484 of file tmop.cpp.

◆ ComputeAvgMetrics()

void mfem::TMOP_Combo_QualityMetric::ComputeAvgMetrics ( const GridFunction & nodes,
const TargetConstructor & tc,
Vector & averages ) const

Computes the averages of all metrics (integral of metric / volume). Works in parallel when called with a ParGridFunction.

Definition at line 528 of file tmop.cpp.

◆ ComputeBalancedWeights()

void mfem::TMOP_Combo_QualityMetric::ComputeBalancedWeights ( const GridFunction & nodes,
const TargetConstructor & tc,
Vector & weights ) const

Computes weights so that the averages of all metrics are equal, and the weights sum to one. Works in parallel when called with a ParGridFunction.

Definition at line 498 of file tmop.cpp.

◆ EvalP()

void mfem::TMOP_Combo_QualityMetric::EvalP ( const DenseMatrix & Jpt,
DenseMatrix & P ) const
overridevirtual

Evaluate the 1st Piola-Kirchhoff stress tensor, P = P(Jpt).

Parameters
[in]JptRepresents the target->physical transformation Jacobian matrix.
[out]PThe evaluated 1st Piola-Kirchhoff stress tensor.

Implements mfem::TMOP_QualityMetric.

Definition at line 460 of file tmop.cpp.

◆ EvalPW()

void mfem::TMOP_Combo_QualityMetric::EvalPW ( const DenseMatrix & Jpt,
DenseMatrix & PW ) const
overridevirtual

Compute dmu/dW

Reimplemented from mfem::TMOP_QualityMetric.

Definition at line 472 of file tmop.cpp.

◆ EvalW()

real_t mfem::TMOP_Combo_QualityMetric::EvalW ( const DenseMatrix & Jpt) const
overridevirtual

Evaluate the strain energy density function, W = W(Jpt), by using the 2D or 3D matrix invariants, see linalg/invariants.hpp.

Parameters
[in]JptRepresents the target->physical transformation Jacobian matrix.

Implements mfem::TMOP_QualityMetric.

Definition at line 450 of file tmop.cpp.

◆ EvalWMatrixForm()

real_t mfem::TMOP_Combo_QualityMetric::EvalWMatrixForm ( const DenseMatrix & Jpt) const
overridevirtual

Evaluates the metric in matrix form (opposed to invariant form). Used for validating the invariant evaluations.

Reimplemented from mfem::TMOP_QualityMetric.

Definition at line 440 of file tmop.cpp.

◆ GetWeights()

void mfem::TMOP_Combo_QualityMetric::GetWeights ( Array< real_t > & weights) const
inline

Definition at line 139 of file tmop.hpp.

◆ SetTargetJacobian()

void mfem::TMOP_Combo_QualityMetric::SetTargetJacobian ( const DenseMatrix & Jtr_)
inlineoverridevirtual

Specify the reference-element -> target-element Jacobian matrix for the point of interest.

The specified Jacobian matrix, Jtr, can be used by metrics that cannot be written just as a function of the target->physical Jacobian matrix, Jpt.

Reimplemented from mfem::TMOP_QualityMetric.

Definition at line 108 of file tmop.hpp.

◆ SetWeights()

void mfem::TMOP_Combo_QualityMetric::SetWeights ( const Vector & weights)
inline

Changes the weights of the metrics in the combination.

Definition at line 142 of file tmop.hpp.

Member Data Documentation

◆ tmop_q_arr

Array<TMOP_QualityMetric *> mfem::TMOP_Combo_QualityMetric::tmop_q_arr
protected

Definition at line 98 of file tmop.hpp.

◆ wt_arr

Array<real_t> mfem::TMOP_Combo_QualityMetric::wt_arr
protected

Definition at line 99 of file tmop.hpp.


The documentation for this class was generated from the following files: