class for volume optimizer More...
Public Member Functions | |
volumeOptimizer (partTetMeshSimplex &simplex) | |
construct from partTetMeshSimplex More... | |
~volumeOptimizer () | |
void | optimizeNodePosition (const scalar tol=0.001) |
find the best position for the node More... | |
![]() | |
simplexSmoother (partTetMeshSimplex &simplex) | |
construct from partTetMeshSimplex More... | |
virtual | ~simplexSmoother () |
Private Member Functions | |
scalar | evaluateFunc () const |
evaluate functional More... | |
scalar | evaluateStabilisationFactor () const |
find appropriate value of K More... | |
void | evaluateGradientsExact (vector &, tensor &) const |
evaluate gradients of the functional More... | |
scalar | optimiseDivideAndConquer (const scalar tol) |
optimize position using a divide and conquer algorithm More... | |
scalar | optimiseSteepestDescent (const scalar tol) |
optimise using the steepest descent More... | |
Static Private Attributes | |
static const vector | dirVecs [8] |
direction vectors for divide and conquer algorithm More... | |
Additional Inherited Members | |
![]() | |
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... | |
class for volume optimizer
Definition at line 53 of file volumeOptimizer.H.
volumeOptimizer | ( | partTetMeshSimplex & | simplex | ) |
construct from partTetMeshSimplex
Definition at line 56 of file volumeOptimizer.C.
~volumeOptimizer | ( | ) |
Definition at line 61 of file volumeOptimizer.C.
|
private |
evaluate functional
Definition at line 41 of file volumeOptimizerEvaluateGradients.C.
References partTet::a(), tetrahedron::a(), partTet::b(), tetrahedron::b(), partTet::c(), tetrahedron::c(), partTet::d(), tetrahedron::d(), volumeOptimizer::evaluateStabilisationFactor(), forAll, Foam::func(), tetrahedron::mag(), Foam::magSqr(), simplexSmoother::points_, Foam::pow(), Foam::sqr(), Foam::sqrt(), and simplexSmoother::tets_.
Referenced by volumeOptimizer::optimiseDivideAndConquer(), and volumeOptimizer::optimiseSteepestDescent().
|
private |
find appropriate value of K
Definition at line 75 of file volumeOptimizerEvaluateGradients.C.
References partTet::a(), tetrahedron::a(), partTet::b(), tetrahedron::b(), partTet::c(), tetrahedron::c(), partTet::d(), tetrahedron::d(), forAll, tetrahedron::mag(), Foam::magSqr(), Foam::max(), Foam::min(), simplexSmoother::points_, and simplexSmoother::tets_.
Referenced by volumeOptimizer::evaluateFunc().
evaluate gradients of the functional
calculate the gradient of the volume
calculate the Frobenius norm
calculate the volume of the tetrahedron
calculate the stabilisation factor for the volume
evaluate the stabilised volume
calculate the gradient of the stabilisation volume
calculate the gradient of the Frobenius norm
calculate the gradient of the stabilised volume
calculate the gradient of the functional
calculate the second gradient of the stabilisation volume
calculate the second gradient of the stabilised volume
calculate the second gradient
Definition at line 113 of file volumeOptimizerEvaluateGradients.C.
References partTet::a(), tetrahedron::a(), partTet::b(), tetrahedron::b(), partTet::c(), tetrahedron::c(), partTet::d(), tetrahedron::d(), IOstream::defaultPrecision(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, Foam::Info, tetrahedron::mag(), Foam::magSqr(), p, Foam::pow(), Foam::sqr(), Foam::sqrt(), Foam::twoSymm(), Tensor::xx(), Tensor::yy(), Vector< scalar >::zero, Tensor::zero, and Tensor::zz().
Referenced by volumeOptimizer::optimiseSteepestDescent().
|
private |
optimize position using a divide and conquer algorithm
find the value of the functional in the centre of the bnd box
set the centre with the minimum value as the centre for future search
halve the search range
calculate the tolerence
Definition at line 222 of file volumeOptimizerEvaluateGradients.C.
References simplexSmoother::bb_, volumeOptimizer::dirVecs, Foam::endl(), volumeOptimizer::evaluateFunc(), Foam::func(), Foam::Info, Foam::mag(), boundBox::max(), boundBox::min(), simplexSmoother::pointI_, simplexSmoother::points_, Vector< Cmpt >::x(), Vector< Cmpt >::y(), Vector< Cmpt >::z(), and Vector< scalar >::zero.
Referenced by volumeOptimizer::optimizeNodePosition().
|
private |
optimise using the steepest descent
it seems that this direction is wrong, stop the loop
move in random direction this is usually needed to move the point off the zero volume
Definition at line 286 of file volumeOptimizerEvaluateGradients.C.
References partTet::a(), partTet::b(), partTet::c(), Foam::det(), Foam::endl(), volumeOptimizer::evaluateFunc(), volumeOptimizer::evaluateGradientsExact(), forAll, Foam::Info, Foam::inv(), partTet::mag(), Foam::mag(), Foam::min(), n, Foam::nl, triangle::normal(), p, simplexSmoother::pointI_, simplexSmoother::points_, relax(), simplexSmoother::tets_, and Vector< scalar >::zero.
Referenced by volumeOptimizer::optimizeNodePosition().
|
virtual |
find the best position for the node
find the optimum using divide and conquer
check if the location can be improved using the steepest descent
scale back to the original size
Implements simplexSmoother.
Definition at line 67 of file volumeOptimizer.C.
References simplexSmoother::bb_, boundBox::contains(), forAll, Foam::func(), boundBox::mag(), boundBox::max(), boundBox::min(), volumeOptimizer::optimiseDivideAndConquer(), volumeOptimizer::optimiseSteepestDescent(), p, simplexSmoother::pointI_, and simplexSmoother::points_.
Referenced by boundaryLayerOptimisation::calculateNormalVectorsSmother(), tetMeshOptimisation::optimiseBoundaryVolumeOptimizer(), and tetMeshOptimisation::optimiseUsingVolumeOptimizer().
|
staticprivate |
direction vectors for divide and conquer algorithm
Definition at line 59 of file volumeOptimizer.H.
Referenced by volumeOptimizer::optimiseDivideAndConquer().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.