MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::TMOP_WorstCaseUntangleOptimizer_Metric Class Reference

#include <tmop.hpp>

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

Public Types

enum class  BarrierType { None , Shifted , Pseudo }
 
enum class  WorstCaseType { None , Beta , PMean }
 

Public Member Functions

 TMOP_WorstCaseUntangleOptimizer_Metric (TMOP_QualityMetric &tmop_metric_, int exponent_=1, real_t alpha_=1.5, real_t detT_ep_=0.0001, real_t muT_ep_=0.0001, BarrierType btype_=BarrierType::None, WorstCaseType wctype_=WorstCaseType::None)
 
virtual real_t EvalW (const DenseMatrix &Jpt) const
 Evaluate the strain energy density function, W = W(Jpt), by using the 2D or 3D matrix invariants, see linalg/invariants.hpp.
 
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 real_t weight, DenseMatrix &A) const
 Evaluate the derivative of the 1st Piola-Kirchhoff stress tensor and assemble its contribution to the local gradient matrix 'A'.
 
virtual real_t EvalWBarrier (const DenseMatrix &Jpt) const
 
virtual void SetMinDetT (real_t min_detT_)
 
virtual void SetMaxMuT (real_t max_muT_)
 
virtual BarrierType GetBarrierType ()
 
virtual WorstCaseType GetWorstCaseType ()
 
- Public Member Functions inherited from mfem::TMOP_QualityMetric
 TMOP_QualityMetric ()
 
virtual ~TMOP_QualityMetric ()
 
virtual void SetTargetJacobian (const DenseMatrix &Jtr_)
 Specify the reference-element -> target-element Jacobian matrix for the point of interest.
 
virtual real_t EvalWMatrixForm (const DenseMatrix &Jpt) const
 Evaluates the metric in matrix form (opposed to invariant form). Used for validating the invariant evaluations.
 
virtual int Id () const
 Return the metric ID.
 
- Public Member Functions inherited from mfem::HyperelasticModel
 HyperelasticModel ()
 
virtual ~HyperelasticModel ()
 
void SetTransformation (ElementTransformation &Ttr_)
 

Protected Attributes

TMOP_QualityMetrictmop_metric
 
real_t min_detT
 
real_t max_muT
 
int exponent
 
real_t alpha
 
real_t detT_ep
 
real_t muT_ep
 
BarrierType btype
 
WorstCaseType wctype
 
- 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.
 

Detailed Description

Simultaneous Untangler + Worst Case Improvement Metric Uses a base metric mu and is defined as: mu_tilde = mu_hat, when WorstCaseType = None, = mu_hat/(beta - mu_hat), when WorstCaseType = Beta, = mu_hat^p, when WorstCaseType = PMean, where beta = max(mu_hat) + muT_ep, and mu_hat = (mu/2phi(tau,ep)) where 2phi(tau,ep) = 1, when when BarrierType = None, = 2*(tau - min(alpha*min(tau)-detT_ep,0)), when BarrierType = Shifted = tau^2 + sqrt(tau^2 + ep^2), when BarrierType = Pseudo where tau = det(T), and max(mu_hat) and min(tau) are computed over the entire mesh. Ultimately, this metric can be used for mesh untangling with the BarrierType option and for worst case quality improvement with the WorstCaseType option.

Definition at line 151 of file tmop.hpp.

Member Enumeration Documentation

◆ BarrierType

Enumerator
None 
Shifted 
Pseudo 

Definition at line 154 of file tmop.hpp.

◆ WorstCaseType

Enumerator
None 
Beta 
PMean 

Definition at line 160 of file tmop.hpp.

Constructor & Destructor Documentation

◆ TMOP_WorstCaseUntangleOptimizer_Metric()

mfem::TMOP_WorstCaseUntangleOptimizer_Metric::TMOP_WorstCaseUntangleOptimizer_Metric ( TMOP_QualityMetric & tmop_metric_,
int exponent_ = 1,
real_t alpha_ = 1.5,
real_t detT_ep_ = 0.0001,
real_t muT_ep_ = 0.0001,
BarrierType btype_ = BarrierType::None,
WorstCaseType wctype_ = WorstCaseType::None )
inline

Definition at line 179 of file tmop.hpp.

Member Function Documentation

◆ AssembleH()

virtual void mfem::TMOP_WorstCaseUntangleOptimizer_Metric::AssembleH ( const DenseMatrix & Jpt,
const DenseMatrix & DS,
const real_t weight,
DenseMatrix & A ) const
inlinevirtual

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 204 of file tmop.hpp.

◆ EvalP()

virtual void mfem::TMOP_WorstCaseUntangleOptimizer_Metric::EvalP ( const DenseMatrix & Jpt,
DenseMatrix & P ) const
inlinevirtual

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 201 of file tmop.hpp.

◆ EvalW()

real_t mfem::TMOP_WorstCaseUntangleOptimizer_Metric::EvalW ( const DenseMatrix & Jpt) const
virtual

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 167 of file tmop.cpp.

◆ EvalWBarrier()

real_t mfem::TMOP_WorstCaseUntangleOptimizer_Metric::EvalWBarrier ( const DenseMatrix & Jpt) const
virtual

Definition at line 184 of file tmop.cpp.

◆ GetBarrierType()

virtual BarrierType mfem::TMOP_WorstCaseUntangleOptimizer_Metric::GetBarrierType ( )
inlinevirtual

Definition at line 215 of file tmop.hpp.

◆ GetWorstCaseType()

virtual WorstCaseType mfem::TMOP_WorstCaseUntangleOptimizer_Metric::GetWorstCaseType ( )
inlinevirtual

Definition at line 217 of file tmop.hpp.

◆ SetMaxMuT()

virtual void mfem::TMOP_WorstCaseUntangleOptimizer_Metric::SetMaxMuT ( real_t max_muT_)
inlinevirtual

Definition at line 213 of file tmop.hpp.

◆ SetMinDetT()

virtual void mfem::TMOP_WorstCaseUntangleOptimizer_Metric::SetMinDetT ( real_t min_detT_)
inlinevirtual

Definition at line 211 of file tmop.hpp.

Member Data Documentation

◆ alpha

real_t mfem::TMOP_WorstCaseUntangleOptimizer_Metric::alpha
protected

Definition at line 172 of file tmop.hpp.

◆ btype

BarrierType mfem::TMOP_WorstCaseUntangleOptimizer_Metric::btype
protected

Definition at line 175 of file tmop.hpp.

◆ detT_ep

real_t mfem::TMOP_WorstCaseUntangleOptimizer_Metric::detT_ep
protected

Definition at line 173 of file tmop.hpp.

◆ exponent

int mfem::TMOP_WorstCaseUntangleOptimizer_Metric::exponent
protected

Definition at line 171 of file tmop.hpp.

◆ max_muT

real_t mfem::TMOP_WorstCaseUntangleOptimizer_Metric::max_muT
protected

Definition at line 170 of file tmop.hpp.

◆ min_detT

real_t mfem::TMOP_WorstCaseUntangleOptimizer_Metric::min_detT
protected

Definition at line 169 of file tmop.hpp.

◆ muT_ep

real_t mfem::TMOP_WorstCaseUntangleOptimizer_Metric::muT_ep
protected

Definition at line 174 of file tmop.hpp.

◆ tmop_metric

TMOP_QualityMetric& mfem::TMOP_WorstCaseUntangleOptimizer_Metric::tmop_metric
protected

Definition at line 168 of file tmop.hpp.

◆ wctype

WorstCaseType mfem::TMOP_WorstCaseUntangleOptimizer_Metric::wctype
protected

Definition at line 176 of file tmop.hpp.


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