134 struct gslib::crystal *
cr;
168 struct gslib::crystal *
cr;
188 const int field_out_ordering);
193 const int field_out_ordering);
224 bool by_element =
false)
const;
235 Vector &gsl_dist_l,
int npt);
241 Vector &gsl_dist_l,
int npt);
245 int point_pos_ordering,
254 int point_pos_ordering,
263 int point_pos_ordering,
291 int npt,
int ncomp,
int dof1dsol);
316 const int nel,
const int ncomp,
317 const int dof1dsol,
const int ordering);
322 const int nel,
const int ncomp,
323 const int dof1dsol,
const int field_out_ordering);
327 const double *
const elx[2],
329 const unsigned int nel,
331 const double bbox_rel_size_inc,
332 const unsigned int local_hash_size,
333 const unsigned int global_hash_size,
334 const Vector *aabb_sz_inc);
338 const double *
const elx[3],
340 const unsigned int nel,
342 const double bbox_rel_size_inc,
343 const unsigned int local_hash_size,
344 const unsigned int global_hash_size,
346 const Vector *aabb_sz_inc);
374 const double bbox_rel_size_inc,
375 const Vector *aabb_sz_inc,
376 const double newt_tol);
383 const double newt_tol = 1.0e-12,
384 const int npt_max = 256);
392 const double newt_tol = 1.0e-12,
393 const int npt_max = 256);
416 void Setup(
Mesh &m,
const double bbox_rel_size_inc = 0.1,
417 const double newt_tol = 1.0e-12,
418 const int npt_max = 256);
422 const double bbox_rel_size_inc = 0.1,
423 const double newt_tol = 1.0e-12);
458 const double newt_tol = 1.0e-12);
506 const double bbox_rel_size_inc = 0.1,
507 const double newt_tol = 1.0e-12,
508 const int npt_max = 256);
528 const int field_out_ordering);
538 const int field_out_ordering);
552 Vector &field_out,
const int point_pos_ordering,
553 const int field_out_ordering);
739 const double bbox_rel_size_inc = 0.1,
740 const double newt_tol = 1.0e-12,
741 const int npt_max = 256);
794 struct gslib::crystal *
cr;
821#if defined(MFEM_USE_MPI)
839 struct gslib::crystal *cr =
nullptr;
840 struct gslib::comm *gsl_comm =
nullptr;
841 int sdim, n_local_cells, num_procs;
843 Vector gmap_bnd_min, gmap_bnd_max;
847 void SetupCrystal(
const MPI_Comm &comm);
869 Vector &elmax,
int nel,
int sdim,
int n,
902 std::map<
int, std::vector<int>> &pt_to_procs)
const;
918 void Setup(
const MPI_Comm &comm,
Vector &elmin,
Vector &elmax,
922 int GetGlobalGridCellFromPoint(
Vector &xyz)
const;
926 void GlobalGridCellToProcAndLocalIndex(
int i,
int &proc,
int &idx)
const;
929 void GetProcAndLocalIndexFromPoint(
Vector &xyz,
int &proc,
int &idx)
const;
Rank 3 tensor (array of matrices)
FindPointsGSLIB can robustly evaluate a GridFunction on an arbitrary collection of points....
virtual void DistributePointInfoToOwningMPIRanks(Array< unsigned int > &recv_elem, Vector &recv_ref, Array< unsigned int > &recv_code)
void GetAxisAlignedBoundingBoxes(Vector &aabb) const
virtual ~FindPointsGSLIB()
void FindPointsSurf(const ParticleVector &point_pos)
Convenience function when point positions are in a ParticleVector.
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 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...
Array< unsigned int > gsl_code
Array< Mesh * > mesh_split
void FindPoints(const ParticleVector &point_pos)
Convenience function when point positions are in a ParticleVector.
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 const Vector & GetDist() const
Return distance between the sought and the found point in physical space.
virtual void InterpolateGeneral(const GridFunction &field_in, Vector &field_out, const int field_out_ordering)
virtual void InterpolateH1(const GridFunction &field_in, Vector &field_out, const int field_out_ordering)
void FindPoints(const Vector &point_pos, int point_pos_ordering=Ordering::byNODES)
Searches positions given in physical space by point_pos.
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 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 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.
virtual const Vector & GetReferencePosition() const
Return reference coordinates for each point found by FindPoints.
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.
Array< int > split_element_geom
virtual void Interpolate(const GridFunction &field_in, Vector &field_out)
Interpolation of field values at prescribed reference space positions.
Array< FiniteElementSpace * > fes_rst_map
virtual void SetGPUtoCPUFallback(bool mode)
Enable/Disable use of CPU functions for GPU data if the gslib version is older.
Mesh * GetBoundingBoxMesh(int type)
Return the bounding boxes as a mesh on rank 0.
virtual const Array< unsigned int > & GetCode() const
Return code for each point searched by FindPoints: inside element (0), element boundary (1),...
Array< int > split_element_index
FiniteElementCollection * fec_map_lin
FindPointsGSLIB()
Serial constructor.
virtual const Array< unsigned int > & GetElem() const
Return element number for each point found by FindPoints.
virtual void DistributeInterpolatedValues(const Vector &int_vals, const int vdim, const int ordering, Vector &field_out) const
struct gslib::comm * gsl_comm
Array< unsigned int > gsl_elem
Array< unsigned int > recv_proc
virtual const Array< unsigned int > & GetGSLIBElem() const
Return element number for each point found by FindPoints corresponding to GSLIB mesh....
virtual void SetupSplitMeshesAndIntegrationRules(const int order)
Helper function that calls SetupSplitMeshes and SetupIntegrationRules.
Array< unsigned int > gsl_proc
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 GS...
virtual const Vector & GetGSLIBReferencePosition() const
Return reference coordinates in [-1,1] (internal range in GSLIB) for each point found by FindPoints.
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.
Array< unsigned int > gsl_mfem_elem
Array< IntegrationRule * > ir_split
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 GetOrientedBoundingBoxes(DenseTensor &obbA, Vector &obbC, Vector &obbV) const
virtual const Vector & GetGLLMesh() const
Return the internal vector of mesh node coordinates at the GLL points.
double default_interp_value
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.
Array< IntegrationRule * > ir_split_sol
virtual void SetupSplitMeshes()
Since GSLIB is designed to work with quads/hexes, we split every triangle/tet/prism/pyramid element i...
virtual void MapRefPosAndElemIndices()
Map {r,s,t} coordinates from [-1,1] to [0,1] for MFEM. For simplices, find the original element numbe...
virtual void FreeData()
Cleans up memory allocated internally by gslib.
virtual void InterpolateSurf(const GridFunction &field_in, Vector &field_out)
Same as Interpolate but for surface meshes.
virtual void SetDefaultInterpolationValue(double interp_value_)
Set the default interpolation value for points that are not found in the mesh.
Array< unsigned int > GetPointsNotFoundIndices() const
Get array of indices of not-found points.
FindPointsGSLIB & operator=(const FindPointsGSLIB &)=delete
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 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.
Array< GridFunction * > gf_rst_map
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.
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 ...
virtual const Array< unsigned int > & GetProc() const
Return MPI rank on which each point was found by FindPoints.
Array< int > split_element_map
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.
void FindPointsSurf(const Vector &point_pos, int point_pos_ordering=Ordering::byNODES)
Searches positions given in physical space by point_pos on surface mesh.
FindPointsGSLIB(const FindPointsGSLIB &)=delete
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.
Array< unsigned int > recv_index
struct mfem::FindPointsGSLIB::DevStruct DEV
int ir_split_sol_order
Order at which ir_split_sol was built; -1 means not built.
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 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.
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....
void SetupDevice()
Prepare data for device execution for volume meshes.
virtual void SetDistanceToleranceForPointsFoundOnBoundary(double bdr_tol_)
Tolerance for detecting points outside the 'curvilinear' boundary.
struct gslib::crystal * cr
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.
Collection of finite elements from the same family in multiple dimensions. This class is used to matc...
Class for gather-scatter (gs) operations on Vectors based on corresponding global identifiers.
struct gslib::comm * gsl_comm
void GS(Vector &senddata, GSOp op)
GSOPGSLIB(Array< long long > &ids)
GSOp
Supported operation types. See class description.
struct gslib::crystal * cr
struct gslib::gs_data * gsl_data
void UpdateIdentifiers(const Array< long long > &ids)
Class to map a point in physical space to candidate ranks.
const Array< int > & GetGridMap() const
const Vector & GetGridFac() const
Return the number of grid cells per unit extent in each direction.
const Vector & GetGridMin() const
Return the minimum extent of the grid in each direction.
GlobalBBoxTensorGridMap(ParMesh &pmesh, int nx)
Constructor for a given mesh and number of tensor grid divisions.
void MapPointsToProcs(Vector &xyz, int ordering, std::map< int, std::vector< int > > &pt_to_procs) const
Get list of procs corresponding to the list of points.
const Vector & GetGridMax() const
Return the maximum extent of the grid in each direction.
const Array< int > & GetGridN() const
Return the grid resolution (number of cells) in each direction.
~GlobalBBoxTensorGridMap()
Class for grid function - Vector with associated FE space.
Class for an integration rule - an Array of IntegrationPoint.
OversetFindPointsGSLIB enables use of findpts for arbitrary number of overlapping grids.
void Interpolate(const Vector &point_pos, const Array< unsigned int > &point_id, const GridFunction &field_in, Vector &field_out, const int point_pos_ordering=Ordering::byNODES)
void Setup(Mesh &m, const int meshid, GridFunction *gfmax=nullptr, const double bbox_rel_size_inc=0.1, const double newt_tol=1.0e-12, const int npt_max=256)
void FindPoints(const Vector &point_pos, const Array< unsigned int > &point_id, const int point_pos_ordering=Ordering::byNODES)
OversetFindPointsGSLIB(MPI_Comm comm_)
Class for parallel meshes.
ParticleVector carries vector data (of a given vector dimension) for an arbitrary number of particles...
Ordering::Type GetOrdering() const
Get the ordering of data in the ParticleVector.
struct gslib::hash_data_3 * hash3
Array< unsigned int > lh_offset
struct gslib::crystal * cr
Array< unsigned int > gh_offset
struct gslib::hash_data_2 * hash2