MFEM v4.7.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 } |
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) |
Set the Quadrature1D type used for the Closest* initial guess types. | |
void | SetInitGuessRelOrder (int order) |
Set the relative order used for the Closest* initial guess types. | |
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 |
const IntegrationPoint * | ip0 |
int | init_guess_type |
GeometryRefiner | refiner |
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 186 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(). |
Definition at line 190 of file eltrans.hpp.
Solution strategy.
Definition at line 205 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 223 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 276 of file eltrans.hpp.
|
inlinevirtual |
Definition at line 290 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 70 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 97 of file eltrans.cpp.
|
protected |
Definition at line 129 of file eltrans.cpp.
|
protected |
Definition at line 158 of file eltrans.cpp.
|
protected |
Definition at line 172 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 329 of file eltrans.hpp.
|
inline |
Set the Quadrature1D type used for the Closest*
initial guess types.
Definition at line 305 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 311 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 301 of file eltrans.hpp.
|
inline |
Choose how the initial guesses for subsequent calls to Transform() will be selected.
Definition at line 297 of file eltrans.hpp.
|
inline |
Set the maximum number of iterations when solving for a reference point.
Definition at line 318 of file eltrans.hpp.
|
inline |
Set the relative physical-space convergence tolerance.
Definition at line 324 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 335 of file eltrans.hpp.
|
inline |
Set the reference-space convergence tolerance.
Definition at line 321 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 315 of file eltrans.hpp.
|
inline |
Set a new forward ElementTransformation, Trans.
Definition at line 293 of file eltrans.hpp.
|
virtual |
Given a point, pt, in physical space, find its reference coordinates, ip.
Definition at line 336 of file eltrans.cpp.
|
protected |
Definition at line 236 of file eltrans.hpp.
|
protected |
Definition at line 235 of file eltrans.hpp.
|
protected |
Definition at line 243 of file eltrans.hpp.
|
protected |
Definition at line 240 of file eltrans.hpp.
|
protected |
Definition at line 242 of file eltrans.hpp.
|
protected |
Definition at line 244 of file eltrans.hpp.
|
protected |
Definition at line 241 of file eltrans.hpp.
|
protected |
Definition at line 237 of file eltrans.hpp.
|
protected |
Definition at line 238 of file eltrans.hpp.
|
protected |
Definition at line 239 of file eltrans.hpp.
|
protected |
Definition at line 232 of file eltrans.hpp.