![]() |
MFEM v4.8.0
Finite element discretization library
|
Performs batch inverse element transforms. Currently only supports non-mixed meshes with SEGMENT, SQUARE, or CUBE geometries. Mixed element order meshes are projected onto an equivalent uniform order mesh. More...
#include <eltrans.hpp>
Classes | |
struct | Kernels |
Public Types | |
using | ClosestPhysPointKernelType |
using | ClosestPhysDofKernelType |
using | ClosestRefDofKernelType |
using | ClosestRefPointKernelType |
using | NewtonKernelType |
using | NewtonEdgeScanKernelType |
Public Member Functions | |
BatchInverseElementTransformation () | |
BatchInverseElementTransformation (const GridFunction &nodes, MemoryType d_mt=MemoryType::DEFAULT) | |
BatchInverseElementTransformation (const Mesh &mesh, MemoryType d_mt=MemoryType::DEFAULT) | |
~BatchInverseElementTransformation () | |
void | SetInitialGuessType (InverseElementTransformation::InitGuessType itype) |
Choose how the initial guesses for subsequent calls to Transform() will be selected. ClosestRefNode is currently not supported. | |
void | SetInitGuessPointsType (int q_type) |
void | SetInitGuessRelOrder (int order) |
Set the relative order used for the Closest* initial guess types. | |
void | SetInitGuessOrder (int order) |
int | GetBasisType () const |
void | SetSolverType (InverseElementTransformation::SolverType stype) |
Specify which algorithm to use for solving the transformation equation, i.e. when calling the Transform() method. NewtonSegmentProject is currently not supported. | |
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 | UpdateNodes (const GridFunction &nodes, MemoryType d_mt=MemoryType::DEFAULT) |
Updates internal datastructures if nodes change. Some version of UpdateNodes must be called at least once before calls to Transform if nodes have changed. | |
void | UpdateNodes (const Mesh &mesh, MemoryType d_mt=MemoryType::DEFAULT) |
Updates internal datastructures if mesh nodes change. Some version of UpdateNodes must be called at least once before calls to Transform if mesh nodes have changed. mesh.GetNodes() must not be null. | |
void | Transform (const Vector &pts, const Array< int > &elems, Array< int > &types, Vector &refs, bool use_device=true, Array< int > *iters=nullptr) const |
Performs a batch request of a set of points belonging to the given elements. pts list of physical point coordinates ordered by Ordering::Type::byNODES. elems which element index to search for each corresponding point in pts types output search classification (. | |
MFEM_REGISTER_KERNELS (FindClosestPhysPoint, ClosestPhysPointKernelType,(int, int, bool)) | |
MFEM_REGISTER_KERNELS (FindClosestPhysDof, ClosestPhysDofKernelType,(int, int, bool)) | |
MFEM_REGISTER_KERNELS (FindClosestRefDof, ClosestRefDofKernelType,(int, int, bool)) | |
MFEM_REGISTER_KERNELS (FindClosestRefPoint, ClosestRefPointKernelType,(int, int, bool)) | |
MFEM_REGISTER_KERNELS (NewtonSolve, NewtonKernelType,(int, int, InverseElementTransformation::SolverType, bool)) | |
MFEM_REGISTER_KERNELS (NewtonEdgeScan, NewtonEdgeScanKernelType,(int, int, InverseElementTransformation::SolverType, bool)) | |
Static Public Member Functions | |
template<int Dim, int SDim> | |
static void | AddFindClosestSpecialization () |
template<int Dim, int SDim, InverseElementTransformation::SolverType SType> | |
static void | AddNewtonSolveSpecialization () |
Performs batch inverse element transforms. Currently only supports non-mixed meshes with SEGMENT, SQUARE, or CUBE geometries. Mixed element order meshes are projected onto an equivalent uniform order mesh.
Definition at line 405 of file eltrans.hpp.
Definition at line 555 of file eltrans.hpp.
mfem::BatchInverseElementTransformation::BatchInverseElementTransformation | ( | ) |
Uninitialized BatchInverseElementTransformation. Users must call UpdateNodes before Transform.
Definition at line 24 of file batchitrans.cpp.
mfem::BatchInverseElementTransformation::BatchInverseElementTransformation | ( | const GridFunction & | nodes, |
MemoryType | d_mt = MemoryType::DEFAULT ) |
Constructs a BatchInverseElementTransformation given nodes representing the mesh nodes.
Definition at line 28 of file batchitrans.cpp.
mfem::BatchInverseElementTransformation::BatchInverseElementTransformation | ( | const Mesh & | mesh, |
MemoryType | d_mt = MemoryType::DEFAULT ) |
Constructs a BatchInverseElementTransformation for a given mesh. mesh.GetNodes() must not be null.
Definition at line 35 of file batchitrans.cpp.
mfem::BatchInverseElementTransformation::~BatchInverseElementTransformation | ( | ) |
Definition at line 39 of file batchitrans.cpp.
|
inlinestatic |
Definition at line 605 of file eltrans.hpp.
|
inlinestatic |
Definition at line 618 of file eltrans.hpp.
|
inline |
Gets the basis type nodes are projected onto, or BasisType::Invalid if uninitialized.
Definition at line 490 of file eltrans.hpp.
mfem::BatchInverseElementTransformation::MFEM_REGISTER_KERNELS | ( | FindClosestPhysDof | , |
ClosestPhysDofKernelType | , | ||
(int, int, bool) | ) |
mfem::BatchInverseElementTransformation::MFEM_REGISTER_KERNELS | ( | FindClosestPhysPoint | , |
ClosestPhysPointKernelType | , | ||
(int, int, bool) | ) |
mfem::BatchInverseElementTransformation::MFEM_REGISTER_KERNELS | ( | FindClosestRefDof | , |
ClosestRefDofKernelType | , | ||
(int, int, bool) | ) |
mfem::BatchInverseElementTransformation::MFEM_REGISTER_KERNELS | ( | FindClosestRefPoint | , |
ClosestRefPointKernelType | , | ||
(int, int, bool) | ) |
mfem::BatchInverseElementTransformation::MFEM_REGISTER_KERNELS | ( | NewtonEdgeScan | , |
NewtonEdgeScanKernelType | , | ||
(int, int, InverseElementTransformation::SolverType, bool) | ) |
mfem::BatchInverseElementTransformation::MFEM_REGISTER_KERNELS | ( | NewtonSolve | , |
NewtonKernelType | , | ||
(int, int, InverseElementTransformation::SolverType, bool) | ) |
|
inline |
The number of points in each spatial direction is given by the formula order+1.
Definition at line 486 of file eltrans.hpp.
|
inline |
Set the Quadrature1D type used for the Closest*
and EdgeScan
initial guess types.
Definition at line 472 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 478 of file eltrans.hpp.
|
inline |
Choose how the initial guesses for subsequent calls to Transform() will be selected. ClosestRefNode is currently not supported.
Definition at line 463 of file eltrans.hpp.
|
inline |
Set the maximum number of iterations when solving for a reference point.
Definition at line 503 of file eltrans.hpp.
|
inline |
Set the relative physical-space convergence tolerance.
Definition at line 509 of file eltrans.hpp.
|
inline |
Set the reference-space convergence tolerance.
Definition at line 506 of file eltrans.hpp.
|
inline |
Specify which algorithm to use for solving the transformation equation, i.e. when calling the Transform() method. NewtonSegmentProject is currently not supported.
Definition at line 495 of file eltrans.hpp.
void mfem::BatchInverseElementTransformation::Transform | ( | const Vector & | pts, |
const Array< int > & | elems, | ||
Array< int > & | types, | ||
Vector & | refs, | ||
bool | use_device = true, | ||
Array< int > * | iters = nullptr ) const |
Performs a batch request of a set of points belonging to the given elements. pts list of physical point coordinates ordered by Ordering::Type::byNODES. elems which element index to search for each corresponding point in pts types output search classification (.
Definition at line 118 of file batchitrans.cpp.
void mfem::BatchInverseElementTransformation::UpdateNodes | ( | const GridFunction & | nodes, |
MemoryType | d_mt = MemoryType::DEFAULT ) |
Updates internal datastructures if nodes change. Some version of UpdateNodes must be called at least once before calls to Transform if nodes have changed.
Definition at line 47 of file batchitrans.cpp.
void mfem::BatchInverseElementTransformation::UpdateNodes | ( | const Mesh & | mesh, |
MemoryType | d_mt = MemoryType::DEFAULT ) |
Updates internal datastructures if mesh nodes change. Some version of UpdateNodes must be called at least once before calls to Transform if mesh nodes have changed. mesh.GetNodes() must not be null.
Definition at line 41 of file batchitrans.cpp.