![]() |
MFEM v4.8.0
Finite element discretization library
|
The inverse transformation of a given ElementTransformation. More...
#include <eltrans.hpp>
Public Types | |
enum | InitGuessType { Center = 0 , ClosestPhysNode = 1 , ClosestRefNode = 2 , GivenPoint = 3 , EdgeScan } |
Algorithms for selecting an initial guess. More... | |
enum | SolverType { Newton = 0 , NewtonSegmentProject = 1 , NewtonElementProject = 2 } |
Solution strategy. More... | |
enum | TransformResult { Inside = 0 , Outside = 1 , Unknown = 2 } |
Values returned by Transform(). More... | |
Public Member Functions | |
InverseElementTransformation (ElementTransformation *Trans=NULL) | |
Construct the InverseElementTransformation with default parameters. | |
virtual | ~InverseElementTransformation () |
void | SetTransformation (ElementTransformation &Trans) |
Set a new forward ElementTransformation, Trans. | |
void | SetInitialGuessType (InitGuessType itype) |
Choose how the initial guesses for subsequent calls to Transform() will be selected. | |
void | SetInitialGuess (const IntegrationPoint &init_ip) |
Set the initial guess for subsequent calls to Transform(), switching to the GivenPoint InitGuessType at the same time. | |
void | SetInitGuessPointsType (int q_type) |
void | SetInitGuessRelOrder (int order) |
Set the relative order used for the Closest* initial guess types. | |
void | SetInitGuessOrder (int order) |
void | SetSolverType (SolverType stype) |
Specify which algorithm to use for solving the transformation equation, i.e. when calling the Transform() method. | |
void | SetMaxIter (int max_it) |
Set the maximum number of iterations when solving for a reference point. | |
void | SetReferenceTol (real_t ref_sp_tol) |
Set the reference-space convergence tolerance. | |
void | SetPhysicalRelTol (real_t phys_rel_tol) |
Set the relative physical-space convergence tolerance. | |
void | SetElementTol (real_t el_tol) |
Set the tolerance used to determine if a point lies inside or outside of the reference element. | |
void | SetPrintLevel (int pr_level) |
Set the desired print level, useful for debugging. | |
int | FindClosestPhysPoint (const Vector &pt, const IntegrationRule &ir) |
Find the IntegrationPoint mapped closest to pt. | |
int | FindClosestRefPoint (const Vector &pt, const IntegrationRule &ir) |
Find the IntegrationPoint mapped closest to pt, using a norm that approximates the (unknown) distance in reference coordinates. | |
virtual int | Transform (const Vector &pt, IntegrationPoint &ip) |
Given a point, pt, in physical space, find its reference coordinates, ip. | |
Protected Member Functions | |
void | NewtonPrint (int mode, real_t val) |
void | NewtonPrintPoint (const char *prefix, const Vector &pt, const char *suffix) |
int | NewtonSolve (const Vector &pt, IntegrationPoint &ip) |
Protected Attributes | |
ElementTransformation * | T |
IntegrationPoint | ip0 |
int | init_guess_type |
GeometryRefiner | refiner |
int | qpts_order |
int | rel_qpts_order |
int | solver_type |
int | max_iter |
real_t | ref_tol |
real_t | phys_rtol |
real_t | ip_tol |
int | print_level |
The inverse transformation of a given ElementTransformation.
Definition at line 199 of file eltrans.hpp.
Algorithms for selecting an initial guess.
Enumerator | |
---|---|
Center | Use the center of the reference element. |
ClosestPhysNode | Use the point returned by FindClosestPhysPoint() from a reference-space grid of type and size controlled by SetInitGuessPointsType() and SetInitGuessRelOrder(), respectively. |
ClosestRefNode | Use the point returned by FindClosestRefPoint() from a reference-space grid of type and size controlled by SetInitGuessPointsType() and SetInitGuessRelOrder(), respectively. |
GivenPoint | Use a specific point, set with SetInitialGuess(). |
EdgeScan | Performs full solves on multiple points along the r/s/t=0 edges of the element. It is recommended that SetInitGuessRelOrder() is chosen such that max(trans_order+order,0)+1 <= 4 with SetInitGuessPointsType() as Quadrature1D::ClosedUniform.
|
Definition at line 203 of file eltrans.hpp.
Solution strategy.
Definition at line 224 of file eltrans.hpp.
Values returned by Transform().
Enumerator | |
---|---|
Inside | The point is inside the element. |
Outside | The point is probably outside the element. |
Unknown | The algorithm failed to determine where the point is. |
Definition at line 242 of file eltrans.hpp.
|
inline |
Construct the InverseElementTransformation with default parameters.
Some practical considerations regarding the choice of initial guess type and solver type:
Definition at line 297 of file eltrans.hpp.
|
inlinevirtual |
Definition at line 317 of file eltrans.hpp.
int mfem::InverseElementTransformation::FindClosestPhysPoint | ( | const Vector & | pt, |
const IntegrationRule & | ir ) |
Find the IntegrationPoint mapped closest to pt.
This function uses the given IntegrationRule, ir, maps its points to physical space and finds the one that is closest to the point pt.
pt | The query point. |
ir | The IntegrationRule, i.e. the set of reference points to map to physical space and check. |
Definition at line 71 of file eltrans.cpp.
int mfem::InverseElementTransformation::FindClosestRefPoint | ( | const Vector & | pt, |
const IntegrationRule & | ir ) |
Find the IntegrationPoint mapped closest to pt, using a norm that approximates the (unknown) distance in reference coordinates.
Definition at line 98 of file eltrans.cpp.
|
protected |
Definition at line 130 of file eltrans.cpp.
|
protected |
Definition at line 159 of file eltrans.cpp.
|
protected |
Definition at line 173 of file eltrans.cpp.
|
inline |
Set the tolerance used to determine if a point lies inside or outside of the reference element.
This tolerance is used only with the pure Newton solver.
Definition at line 368 of file eltrans.hpp.
|
inline |
The number of points in each spatial direction is given by the formula order+1.
Definition at line 347 of file eltrans.hpp.
|
inline |
Set the Quadrature1D type used for the Closest*
and EdgeScan
initial guess types.
Definition at line 333 of file eltrans.hpp.
|
inline |
Set the relative order used for the Closest*
initial guess types.
The number of points in each spatial direction is given by the formula max(trans_order+order,0)+1, where trans_order is the order of the current ElementTransformation.
Definition at line 339 of file eltrans.hpp.
|
inline |
Set the initial guess for subsequent calls to Transform(), switching to the GivenPoint InitGuessType at the same time.
Definition at line 328 of file eltrans.hpp.
|
inline |
Choose how the initial guesses for subsequent calls to Transform() will be selected.
Definition at line 324 of file eltrans.hpp.
|
inline |
Set the maximum number of iterations when solving for a reference point.
Definition at line 357 of file eltrans.hpp.
|
inline |
Set the relative physical-space convergence tolerance.
Definition at line 363 of file eltrans.hpp.
|
inline |
Set the desired print level, useful for debugging.
The valid options are: -1 - never print (default); 0 - print only errors; 1 - print the first and last iterations; 2 - print every iteration; and 3 - print every iteration including point coordinates.
Definition at line 374 of file eltrans.hpp.
|
inline |
Set the reference-space convergence tolerance.
Definition at line 360 of file eltrans.hpp.
|
inline |
Specify which algorithm to use for solving the transformation equation, i.e. when calling the Transform() method.
Definition at line 354 of file eltrans.hpp.
|
inline |
Set a new forward ElementTransformation, Trans.
Definition at line 320 of file eltrans.hpp.
|
virtual |
Given a point, pt, in physical space, find its reference coordinates, ip.
Definition at line 338 of file eltrans.cpp.
|
protected |
Definition at line 255 of file eltrans.hpp.
|
protected |
Definition at line 254 of file eltrans.hpp.
|
protected |
Definition at line 264 of file eltrans.hpp.
|
protected |
Definition at line 261 of file eltrans.hpp.
|
protected |
Definition at line 263 of file eltrans.hpp.
|
protected |
Definition at line 265 of file eltrans.hpp.
|
protected |
Definition at line 257 of file eltrans.hpp.
|
protected |
Definition at line 262 of file eltrans.hpp.
|
protected |
Definition at line 256 of file eltrans.hpp.
|
protected |
Definition at line 259 of file eltrans.hpp.
|
protected |
Definition at line 260 of file eltrans.hpp.
|
protected |
Definition at line 251 of file eltrans.hpp.