Public Member Functions | Private Member Functions | Private Attributes
knuppMetric Class Reference

class for mesh untangler More...

Inheritance diagram for knuppMetric:
Inheritance graph
[legend]
Collaboration diagram for knuppMetric:
Collaboration graph
[legend]

Public Member Functions

 knuppMetric (partTetMeshSimplex &simplex)
 
 ~knuppMetric ()
 
void optimizeNodePosition (const scalar tol=0.001)
 
- Public Member Functions inherited from simplexSmoother
 simplexSmoother (partTetMeshSimplex &simplex)
 construct from partTetMeshSimplex More...
 
virtual ~simplexSmoother ()
 

Private Member Functions

scalar evaluateMetric () const
 evaluate the value of the metric More...
 
scalar evaluateMetricNoBeta () const
 
void evaluateGradients (vector &grad, tensor &gradGrad) const
 evaluate metric gradients More...
 

Private Attributes

pointp_
 free vertex More...
 
DynList< vector, 64 > normals_
 normals of triangles forming the outer hull More...
 
DynList< point, 64 > centres_
 centres of triangles forming the outer hull More...
 
scalar beta_
 control parameter. It helps the point get inside the feasible region More...
 

Additional Inherited Members

- Protected Attributes inherited from simplexSmoother
DynList< point, 128 > & points_
 mesh points More...
 
const DynList< partTet, 128 > & tets_
 list tets around the given vertex More...
 
const label pointI_
 label of the point More...
 
boundBox bb_
 bound box More...
 

Detailed Description

class for mesh untangler

Definition at line 53 of file knuppMetric.H.

Constructor & Destructor Documentation

◆ knuppMetric()

◆ ~knuppMetric()

Definition at line 117 of file knuppMetric.C.

Member Function Documentation

◆ evaluateMetric()

scalar evaluateMetric ( ) const
private

evaluate the value of the metric

Definition at line 42 of file knuppMetric.C.

References knuppMetric::beta_, knuppMetric::centres_, forAll, Foam::mag(), knuppMetric::normals_, knuppMetric::p_, and Foam::sqr().

Referenced by knuppMetric::optimizeNodePosition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluateMetricNoBeta()

scalar evaluateMetricNoBeta ( ) const
private

Definition at line 55 of file knuppMetric.C.

References knuppMetric::centres_, forAll, Foam::mag(), knuppMetric::normals_, knuppMetric::p_, and Foam::sqr().

Referenced by knuppMetric::optimizeNodePosition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluateGradients()

void evaluateGradients ( vector grad,
tensor gradGrad 
) const
private

evaluate metric gradients

Definition at line 68 of file knuppMetric.C.

References knuppMetric::beta_, knuppMetric::centres_, forAll, Foam::fvc::grad(), Foam::mag(), knuppMetric::normals_, knuppMetric::p_, Foam::sign(), Vector< scalar >::zero, and Tensor::zero.

Referenced by knuppMetric::optimizeNodePosition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ optimizeNodePosition()

void optimizeNodePosition ( const scalar  tol = 0.001)
virtual

find the best position such that all tets making a simplex have a positive volume

store previous value

evaluate gradients

calculate displacement

it seems that this direction is wrong

Implements simplexSmoother.

Definition at line 124 of file knuppMetric.C.

References simplexSmoother::bb_, knuppMetric::beta_, knuppMetric::centres_, boundBox::contains(), Foam::det(), Foam::endl(), knuppMetric::evaluateGradients(), knuppMetric::evaluateMetric(), knuppMetric::evaluateMetricNoBeta(), forAll, Foam::func(), Foam::Info, Foam::inv(), Foam::mag(), Foam::magSqr(), boundBox::max(), boundBox::min(), VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, knuppMetric::normals_, knuppMetric::p_, relax(), Foam::sqr(), and Vector< scalar >::zero.

Referenced by tetMeshOptimisation::optimiseUsingKnuppMetric().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ p_

point& p_
private

◆ normals_

DynList<vector, 64> normals_
private

◆ centres_

DynList<point, 64> centres_
private

◆ beta_

scalar beta_
private

control parameter. It helps the point get inside the feasible region

Definition at line 68 of file knuppMetric.H.

Referenced by knuppMetric::evaluateGradients(), knuppMetric::evaluateMetric(), knuppMetric::knuppMetric(), and knuppMetric::optimizeNodePosition().


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