MFEM
v4.6.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. More... | |
virtual | ~InverseElementTransformation () |
void | SetTransformation (ElementTransformation &Trans) |
Set a new forward ElementTransformation, Trans. More... | |
void | SetInitialGuessType (InitGuessType itype) |
Choose how the initial guesses for subsequent calls to Transform() will be selected. More... | |
void | SetInitialGuess (const IntegrationPoint &init_ip) |
Set the initial guess for subsequent calls to Transform(), switching to the GivenPoint InitGuessType at the same time. More... | |
void | SetInitGuessPointsType (int q_type) |
Set the Quadrature1D type used for the Closest* initial guess types. More... | |
void | SetInitGuessRelOrder (int order) |
Set the relative order used for the Closest* initial guess types. More... | |
void | SetSolverType (SolverType stype) |
Specify which algorithm to use for solving the transformation equation, i.e. when calling the Transform() method. More... | |
void | SetMaxIter (int max_it) |
Set the maximum number of iterations when solving for a reference point. More... | |
void | SetReferenceTol (double ref_sp_tol) |
Set the reference-space convergence tolerance. More... | |
void | SetPhysicalRelTol (double phys_rel_tol) |
Set the relative physical-space convergence tolerance. More... | |
void | SetElementTol (double el_tol) |
Set the tolerance used to determine if a point lies inside or outside of the reference element. More... | |
void | SetPrintLevel (int pr_level) |
Set the desired print level, useful for debugging. More... | |
int | FindClosestPhysPoint (const Vector &pt, const IntegrationRule &ir) |
Find the IntegrationPoint mapped closest to pt. More... | |
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. More... | |
virtual int | Transform (const Vector &pt, IntegrationPoint &ip) |
Given a point, pt, in physical space, find its reference coordinates, ip. More... | |
Protected Member Functions | |
void | NewtonPrint (int mode, double 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 |
int | qpts_type |
int | rel_qpts_order |
int | solver_type |
int | max_iter |
double | ref_tol |
double | phys_rtol |
double | ip_tol |
int | print_level |
The inverse transformation of a given ElementTransformation.
Definition at line 185 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 189 of file eltrans.hpp.
Solution strategy.
Definition at line 204 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 222 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 275 of file eltrans.hpp.
|
inlinevirtual |
Definition at line 289 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 328 of file eltrans.hpp.
|
inline |
Set the Quadrature1D type used for the Closest*
initial guess types.
Definition at line 304 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 310 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 300 of file eltrans.hpp.
|
inline |
Choose how the initial guesses for subsequent calls to Transform() will be selected.
Definition at line 296 of file eltrans.hpp.
|
inline |
Set the maximum number of iterations when solving for a reference point.
Definition at line 317 of file eltrans.hpp.
|
inline |
Set the relative physical-space convergence tolerance.
Definition at line 323 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 334 of file eltrans.hpp.
|
inline |
Set the reference-space convergence tolerance.
Definition at line 320 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 314 of file eltrans.hpp.
|
inline |
Set a new forward ElementTransformation, Trans.
Definition at line 292 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 235 of file eltrans.hpp.
|
protected |
Definition at line 234 of file eltrans.hpp.
|
protected |
Definition at line 242 of file eltrans.hpp.
|
protected |
Definition at line 239 of file eltrans.hpp.
|
protected |
Definition at line 241 of file eltrans.hpp.
|
protected |
Definition at line 243 of file eltrans.hpp.
|
protected |
Definition at line 236 of file eltrans.hpp.
|
protected |
Definition at line 240 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 231 of file eltrans.hpp.