|
| | FindPointsGSLIB () |
| | Serial constructor.
|
| |
| | FindPointsGSLIB (Mesh &mesh_in, const double bbox_rel_size_inc=0.1, const double newt_tol=1.0e-12, const int npt_max=256) |
| | Serial constructor + setup with given Mesh (see Setup)
|
| |
| | FindPointsGSLIB (MPI_Comm comm_) |
| | Constructor for ParMesh.
|
| |
| | FindPointsGSLIB (ParMesh &mesh_in, const double bbox_rel_size_inc=0.1, const double newt_tol=1.0e-12, const int npt_max=256) |
| | Constructor + setup with given ParMesh (see Setup)
|
| |
| virtual | ~FindPointsGSLIB () |
| |
| | FindPointsGSLIB (const FindPointsGSLIB &)=delete |
| |
| FindPointsGSLIB & | operator= (const FindPointsGSLIB &)=delete |
| |
| void | Setup (Mesh &m, const double bbox_rel_size_inc=0.1, const double newt_tol=1.0e-12, const int npt_max=256) |
| | Preprocess the internal mesh in gslib.
|
| |
| void | SetupSurf (Mesh &m, const double bbox_rel_size_inc=0.1, const double newt_tol=1.0e-12) |
| | Preprocess the surface mesh to compute data for FindPoints.
|
| |
| void | SetupSurfWithAABBExpansion (Mesh &m, const Vector &aabb_sz_inc, const double newt_tol=1.0e-12) |
| | Preprocess the surface mesh to compute data for FindPoints using absolute AABB expansion.
|
| |
| void | FindPoints (const Vector &point_pos, int point_pos_ordering=Ordering::byNODES) |
| | Searches positions given in physical space by point_pos.
|
| |
| void | FindPoints (const ParticleVector &point_pos) |
| | Convenience function when point positions are in a ParticleVector.
|
| |
| void | FindPointsSurf (const Vector &point_pos, int point_pos_ordering=Ordering::byNODES) |
| | Searches positions given in physical space by point_pos on surface mesh.
|
| |
| void | FindPointsSurf (const ParticleVector &point_pos) |
| | Convenience function when point positions are in a ParticleVector.
|
| |
| void | FindPoints (Mesh &m, const Vector &point_pos, const int point_pos_ordering=Ordering::byNODES, const double bbox_rel_size_inc=0.1, const double newt_tol=1.0e-12, const int npt_max=256) |
| | Setup FindPoints and search positions.
|
| |
| virtual void | Interpolate (const GridFunction &field_in, Vector &field_out) |
| | Interpolation of field values at prescribed reference space positions.
|
| |
| virtual void | Interpolate (const GridFunction &field_in, Vector &field_out, const int field_out_ordering) |
| | Interpolation of field values, with output ordering specification.
|
| |
| virtual void | InterpolateSurf (const GridFunction &field_in, Vector &field_out) |
| | Same as Interpolate but for surface meshes.
|
| |
| virtual void | InterpolateSurf (const GridFunction &field_in, Vector &field_out, const int field_out_ordering) |
| | Same as Interpolate but for surface meshes with specified output ordering.
|
| |
| void | Interpolate (const Vector &point_pos, const GridFunction &field_in, Vector &field_out, int point_pos_ordering=Ordering::byNODES) |
| | Search positions and interpolate.
|
| |
| void | Interpolate (const Vector &point_pos, const GridFunction &field_in, Vector &field_out, const int point_pos_ordering, const int field_out_ordering) |
| | Search positions and interpolate with given point and output ordering.
|
| |
| void | Interpolate (Mesh &m, const Vector &point_pos, const GridFunction &field_in, Vector &field_out, const int point_pos_ordering=Ordering::byNODES) |
| |
| virtual void | SetL2AvgType (AvgType avgtype_) |
| | Average type to be used for L2 functions in-case a point is located at an element boundary where the function might be multi-valued.
|
| |
| virtual void | SetDefaultInterpolationValue (double interp_value_) |
| | Set the default interpolation value for points that are not found in the mesh.
|
| |
| virtual void | SetDistanceToleranceForPointsFoundOnBoundary (double bdr_tol_) |
| | Tolerance for detecting points outside the 'curvilinear' boundary.
|
| |
| virtual void | SetGPUtoCPUFallback (bool mode) |
| | Enable/Disable use of CPU functions for GPU data if the gslib version is older.
|
| |
| virtual void | FreeData () |
| | Cleans up memory allocated internally by gslib.
|
| |
| virtual const Array< unsigned int > & | GetCode () const |
| | Return code for each point searched by FindPoints: inside element (0), element boundary (1), or not found (2).
|
| |
| virtual const Array< unsigned int > & | GetElem () const |
| | Return element number for each point found by FindPoints.
|
| |
| virtual const Array< unsigned int > & | GetProc () const |
| | Return MPI rank on which each point was found by FindPoints.
|
| |
| virtual const Vector & | GetReferencePosition () const |
| | Return reference coordinates for each point found by FindPoints.
|
| |
| virtual const Vector & | GetDist () const |
| | Return distance between the sought and the found point in physical space.
|
| |
| virtual const Array< unsigned int > & | GetGSLIBElem () const |
| | Return element number for each point found by FindPoints corresponding to GSLIB mesh. gsl_mfem_elem != gsl_elem for mesh with simplices.
|
| |
| virtual const Vector & | GetGSLIBReferencePosition () const |
| | Return reference coordinates in [-1,1] (internal range in GSLIB) for each point found by FindPoints.
|
| |
| Array< unsigned int > | GetPointsNotFoundIndices () const |
| | Get array of indices of not-found points.
|
| |
| void | GetAxisAlignedBoundingBoxes (Vector &aabb) const |
| |
| void | GetOrientedBoundingBoxes (DenseTensor &obbA, Vector &obbC, Vector &obbV) const |
| |
| Mesh * | GetBoundingBoxMesh (int type) |
| | Return the bounding boxes as a mesh on rank 0.
|
| |
| virtual const Vector & | GetGLLMesh () const |
| | Return the internal vector of mesh node coordinates at the GLL points.
|
| |
|
The physical-space point that the user seeks to interpolate at could be located inside an element on another mpi rank. To enable a custom interpolation procedure (e.g., strain tensor computation) we need a mechanism to first send element indices and reference-space coordinates to the mpi-ranks where each point is found. Then the custom interpolation can be done locally by the user before sending the interpolated values back to the mpi-ranks that the query originated from. Example usage looks something like this:
FindPoints() -> DistributePointInfoToOwningMPIRanks() -> Computation by user -> DistributeInterpolatedValues().
|
| virtual void | DistributePointInfoToOwningMPIRanks (Array< unsigned int > &recv_elem, Vector &recv_ref, Array< unsigned int > &recv_code) |
| |
| virtual void | DistributeInterpolatedValues (const Vector &int_vals, const int vdim, const int ordering, Vector &field_out) const |
| |
|
| void | SetupCrystal () |
| |
| void | FreeCrystal () |
| |
| virtual void | InterpolateH1 (const GridFunction &field_in, Vector &field_out, const int field_out_ordering) |
| |
| virtual void | InterpolateGeneral (const GridFunction &field_in, Vector &field_out, const int field_out_ordering) |
| |
| virtual void | SetupSplitMeshes () |
| | Since GSLIB is designed to work with quads/hexes, we split every triangle/tet/prism/pyramid element into quads/hexes.
|
| |
| virtual void | SetupIntegrationRuleForSplitMesh (Mesh *mesh, IntegrationRule *irule, int order) |
| | Setup integration points that will be used to interpolate the nodal location at points expected by GSLIB.
|
| |
| virtual void | SetupIntegrationRules (const int order, Array< IntegrationRule * > &ir_out) |
| | Build integration rules at the given order for each split mesh and store them in ir_out. Requires that SetupSplitMeshes has already been called.
|
| |
| virtual void | SetupSplitMeshesAndIntegrationRules (const int order) |
| | Helper function that calls SetupSplitMeshes and SetupIntegrationRules.
|
| |
| virtual void | GetNodalValues (const GridFunction *gf_in, Vector &node_vals, const Array< IntegrationRule * > *ir_in=nullptr, bool by_element=false) const |
| | Get GridFunction value at the points expected by GSLIB.
|
| |
| virtual void | MapRefPosAndElemIndices () |
| | Map {r,s,t} coordinates from [-1,1] to [0,1] for MFEM. For simplices, find the original element number (that was split into micro quads/hexes) during the setup phase.
|
| |
| void | FindPointsLocal3 (const Vector &point_pos, int point_pos_ordering, Array< unsigned int > &gsl_code_dev_l, Array< unsigned int > &gsl_elem_dev_l, Vector &gsl_ref_l, Vector &gsl_dist_l, int npt) |
| | FindPoints locally on device for 3D.
|
| |
| void | FindPointsLocal2 (const Vector &point_pos, int point_pos_ordering, Array< unsigned int > &gsl_code_dev_l, Array< unsigned int > &gsl_elem_dev_l, Vector &gsl_ref_l, Vector &gsl_dist_l, int npt) |
| | FindPoints locally on device for 2D.
|
| |
| void | FindPointsSurfLocal3 (const Vector &point_pos, int point_pos_ordering, Array< unsigned int > &gsl_code_dev_l, Array< unsigned int > &gsl_elem_dev_l, Vector &gsl_ref_l, Vector &gsl_dist_l, int npt) |
| | FindPoints locally on device for 3D surface elements.
|
| |
| void | FindPointsEdgeLocal3 (const Vector &point_pos, int point_pos_ordering, Array< unsigned int > &gsl_code_dev_l, Array< unsigned int > &gsl_elem_dev_l, Vector &gsl_ref_l, Vector &gsl_dist_l, int npt) |
| | FindPoints locally on device for 3D edge elements.
|
| |
| void | FindPointsEdgeLocal2 (const Vector &point_pos, int point_pos_ordering, Array< unsigned int > &gsl_code_dev_l, Array< unsigned int > &gsl_elem_dev_l, Vector &gsl_ref_l, Vector &gsl_dist_l, int npt) |
| | FindPoints locally on device for 2D edge elements.
|
| |
| void | InterpolateLocal3 (const Vector &field_in, Array< int > &gsl_elem_dev_l, Vector &gsl_ref_l, Vector &field_out, int npt, int ncomp, int dof1dsol) |
| | Interpolate on device for 3D.
|
| |
| void | InterpolateLocal2 (const Vector &field_in, Array< int > &gsl_elem_dev_l, Vector &gsl_ref_l, Vector &field_out, int npt, int ncomp, int dof1dsol) |
| | Interpolate on device for 2D.
|
| |
| void | InterpolateLocal1 (const Vector &field_in, Array< int > &gsl_elem_dev_l, Vector &gsl_ref_l, Vector &field_out, int npt, int ncomp, int dof1dsol) |
| | Interpolate on device for 1D.
|
| |
| void | SetupDevice () |
| | Prepare data for device execution for volume meshes.
|
| |
| void | FindPointsOnDevice (const Vector &point_pos, const int point_pos_ordering=Ordering::byNODES) |
| | Searches positions given in physical space by point_pos. These positions can be ordered byNodes: (XXX...,YYY...,ZZZ) or byVDim: (XYZ,XYZ,....XYZ) specified by point_pos_ordering.
|
| |
| void | InterpolateOnDevice (const Vector &field_in_evec, Vector &field_out, const int nel, const int ncomp, const int dof1dsol, const int ordering) |
| | Interpolation of field values at prescribed reference space positions.
|
| |
| void | InterpolateSurfBase (const Vector &field_in, Vector &field_out, const int nel, const int ncomp, const int dof1dsol, const int field_out_ordering) |
| | Interpolation of field values at prescribed reference space positions for surface meshes.
|
| |
| void | FindPointsEdgeSetup2 (DevStruct &devs, const double *const elx[2], const unsigned n, const unsigned int nel, const unsigned m, const double bbox_rel_size_inc, const unsigned int local_hash_size, const unsigned int global_hash_size, const Vector *aabb_sz_inc) |
| | Preprocess 2D surface mesh needed for FindPoints.
|
| |
| void | FindPointsSurfSetup3 (DevStruct &devs, const double *const elx[3], const unsigned n, const unsigned int nel, const unsigned m, const double bbox_rel_size_inc, const unsigned int local_hash_size, const unsigned int global_hash_size, const int rD, const Vector *aabb_sz_inc) |
| | Preprocess 3D surface mesh needed for FindPoints.
|
| |
| void | SetupSurfBase (Mesh &m, const double bbox_rel_size_inc, const Vector *aabb_sz_inc, const double newt_tol) |
| | Shared implementation for the public surface-setup methods.
|
| |
FindPointsGSLIB can robustly evaluate a GridFunction on an arbitrary collection of points. See Mittal et al., "General Field Evaluation in
High-Order Meshes on GPUs". (2025). Computers & Fluids. for technical details.
There are three key functions in FindPointsGSLIB:
- Setup - constructs the internal data structures of gslib. See Setup.
- FindPoints - for any given arbitrary set of points in physical space, gslib finds the element number, MPI rank, and the reference space coordinates inside the element that each point is located in. gslib also returns a code that indicates whether the point was found inside an element, on element border, or not found in the domain. For points returned as found on
element border, the point is either on an element edge/face or near the domain boundary, and gslib also returns a distance to the border. Points near (but outside) the domain boundary must then be marked as not found using the distance returned by gslib. See FindPoints.
- Interpolate - Interpolates any grid function at the points found using 2. For functions in L2 finite element space, use SetL2AvgType to specify how to interpolate values at points located at element boundaries where the function might be multi-valued. See Interpolate.
FindPointsGSLIB also provides interface to use these functions through a single call.
For custom interpolation (e.g., evaluating strain rate tensor), we provide functions that use gslib to send element index and corresponding reference-space coordinates for each point to the mpi rank that the element is located on. Then, custom interpolation can be defined locally by the user before sending the values back to mpi ranks where the query originated from. See DistributePointInfoToOwningMPIRanks and DistributeInterpolatedValues.
Definition at line 114 of file gslib.hpp.