#include <TempestRemapper.hpp>
Inheritance diagram for moab::TempestRemapper:
Collaboration diagram for moab::TempestRemapper:Public Types | |
| enum | TempestMeshType { DEFAULT = -1 , CS = 0 , RLL = 1 , ICO = 2 , ICOD = 3 , OVERLAP_FILES = 4 , OVERLAP_MEMORY = 5 , OVERLAP_MOAB = 6 } |
Public Types inherited from moab::Remapper | |
| enum | IntersectionContext { DEFAULT = -1 , SourceMesh = 0 , TargetMesh = 1 , OverlapMesh = 2 , CoveringMesh = 3 } |
Public Member Functions | |
| TempestRemapper (moab::Interface *mbInt, bool offlineMode=false) | |
| virtual | ~TempestRemapper () |
| virtual ErrorCode | initialize (bool initialize_fsets=true) |
| Initialize the TempestRemapper object internal data structures including the mesh sets and TempestRemap mesh references. More... | |
| virtual ErrorCode | clear () |
| Deallocate and clear any memory initialized in the TempestRemapper object. More... | |
| moab::ErrorCode | GenerateMesh (Remapper::IntersectionContext ctx, TempestMeshType type) |
| Generate a mesh in memory of given type (CS/RLL/ICO/MPAS(structured)) and store it under the context specified by the user. More... | |
| moab::ErrorCode | LoadMesh (Remapper::IntersectionContext ctx, std::string inputFilename, TempestMeshType type) |
| Load a mesh from disk of given type and store it under the context specified by the user. More... | |
| moab::ErrorCode | ConstructCoveringSet (double tolerance=1e-8, double radius_src=1.0, double radius_tgt=1.0, double boxeps=0.1, bool regional_mesh=false, bool gnomonic=true, int nb_ghost_layers=0) |
| Construct a source covering mesh such that it completely encompasses the target grid in parallel. This operation is critical to ensure that the parallel advancing-front intersection algorithm can compute the intersection mesh only locally without any process communication. More... | |
| moab::ErrorCode | ComputeOverlapMesh (bool kdtree_search=true, bool use_tempest=false) |
| Compute the intersection mesh between the source and target grids that have been instantiated in the Remapper. This function invokes the parallel advancing-front intersection algorithm internally for spherical meshes and can handle arbitrary unstructured grids (CS, RLL, ICO, MPAS) with and without holes. More... | |
| moab::ErrorCode | ConvertTempestMesh (Remapper::IntersectionContext ctx) |
| Convert the TempestRemap mesh object to a corresponding MOAB mesh representation according to the intersection context. More... | |
| moab::ErrorCode | ConvertMeshToTempest (Remapper::IntersectionContext ctx) |
| Convert the MOAB mesh representation to a corresponding TempestRemap mesh object according to the intersection context. More... | |
| Mesh * | GetMesh (Remapper::IntersectionContext ctx) |
| Get the TempestRemap mesh object according to the intersection context. More... | |
| void | SetMesh (Remapper::IntersectionContext ctx, Mesh *mesh, bool overwrite=true) |
| Set the TempestRemap mesh object according to the intersection context. More... | |
| void | SetMeshSet (Remapper::IntersectionContext ctx, moab::EntityHandle mset, moab::Range *entities=nullptr) |
| Set the mesh set according to the intersection context. More... | |
| Mesh * | GetCoveringMesh () |
| Get the covering mesh (TempestRemap) object. More... | |
| moab::EntityHandle & | GetMeshSet (Remapper::IntersectionContext ctx) |
| Get the MOAB mesh set corresponding to the intersection context. More... | |
| moab::EntityHandle | GetMeshSet (Remapper::IntersectionContext ctx) const |
| Const overload. Get the MOAB mesh set corresponding to the intersection context. More... | |
| moab::Range & | GetMeshEntities (Remapper::IntersectionContext ctx) |
| Get the mesh element entities corresponding to the intersection context. More... | |
| const moab::Range & | GetMeshEntities (Remapper::IntersectionContext ctx) const |
| Const overload. Get the mesh element entities corresponding to the intersection context. More... | |
| moab::Range & | GetMeshVertices (Remapper::IntersectionContext ctx) |
| Get the mesh vertices corresponding to the intersection context. Useful for point-cloud meshes. More... | |
| const moab::Range & | GetMeshVertices (Remapper::IntersectionContext ctx) const |
| Const overload. Get the mesh vertices corresponding to the intersection context. Useful for point-cloud meshes. More... | |
| moab::EntityHandle & | GetCoveringSet () |
| Get access to the underlying source covering set if available. Else return the source set. More... | |
| void | SetMeshType (Remapper::IntersectionContext ctx, const std::vector< int > &metadata) |
| Set the mesh type corresponding to the intersection context. More... | |
| void | ResetMeshSet (Remapper::IntersectionContext ctx, moab::EntityHandle meshSet) |
| Reconstruct mesh, used now only for IO; need a better solution maybe. More... | |
| TempestMeshType | GetMeshType (Remapper::IntersectionContext ctx) const |
| Get the mesh type corresponding to the intersection context. More... | |
| moab::ErrorCode | WriteTempestIntersectionMesh (std::string strOutputFileName, const bool fAllParallel, const bool fInputConcave, const bool fOutputConcave) |
| Gather the overlap mesh and associated source/target data and write it out to disk using the TempestRemap output interface. This information can then be used with the "GenerateOfflineMap" tool in TempestRemap as needed. More... | |
| moab::ErrorCode | GenerateCSMeshMetadata (const int ntot_elements, moab::Range &entities, moab::Range *secondary_entities, const std::string &dofTagName, int nP) |
Generate the necessary metadata and specifically the GLL node numbering for DoFs for a CS mesh. This negates the need for running external code like HOMME to output the numbering needed for computing maps. The functionality is used through the mbconvert tool to compute processor-invariant Global DoF IDs at GLL nodes. More... | |
| moab::ErrorCode | GenerateMeshMetadata (Mesh &mesh, const int ntot_elements, moab::Range &entities, moab::Range *secondary_entities, const std::string &dofTagName, int nP) |
| Generate the necessary metadata for DoF node numbering in a given mesh. Currently, only the functionality to generate numbering on CS grids is supported. More... | |
| moab::ErrorCode | GetOverlapAugmentedEntities (moab::Range &sharedGhostEntities) |
| Get all the ghosted overlap entities that were accumulated to enable conservation in parallel. More... | |
| moab::ErrorCode | assign_vertex_element_IDs (Tag idtag, EntityHandle this_set, const int dimension=2, const int start_id=1) |
| Internal method to assign vertex and element global IDs if one does not exist already. More... | |
| ErrorCode | GetIMasks (Remapper::IntersectionContext ctx, std::vector< int > &masks) |
| Get the masks that could have been defined. More... | |
Public Member Functions inherited from moab::Remapper | |
| Remapper (moab::Interface *mbInt) | |
| virtual | ~Remapper () |
| moab::Interface * | get_interface () |
| ErrorCode | LoadNativeMesh (std::string filename, moab::EntityHandle &meshset, std::vector< int > &metadata, const char *readopts=0) |
Public Attributes | |
| const bool | offlineWorkflow |
| Flag indicating whether the workflow is in offline mode. More... | |
| bool | meshValidate |
| Flag to enable mesh validation after loading from file. More... | |
| bool | constructEdgeMap |
| Flag to construct the edge map within the TempestRemap data structures. More... | |
Static Public Attributes | |
| static const bool | verbose = true |
| Global verbosity flag. More... | |
Private Member Functions | |
| ErrorCode | ConvertAllMeshesToTempest () |
| Convert all MOAB meshes to TempestRemap format. More... | |
| moab::ErrorCode | ConvertOverlapMeshSourceOrdered () |
| Convert overlap mesh to source-ordered format. More... | |
| moab::ErrorCode | load_tempest_mesh_private (std::string inputFilename, Mesh **tempest_mesh) |
| Load a mesh from disk in TempestRemap format. More... | |
| moab::ErrorCode | convert_mesh_to_tempest_private (Mesh *mesh, moab::EntityHandle meshset, moab::Range &entities, moab::Range *pverts) |
| Convert a MOAB mesh to TempestRemap format. More... | |
| moab::ErrorCode | convert_tempest_mesh_private (TempestMeshType type, Mesh *mesh, moab::EntityHandle &meshset, moab::Range &entities, moab::Range *vertices) |
| Convert a TempestRemap mesh to MOAB format. More... | |
| moab::ErrorCode | AugmentOverlapSet () |
| Augment overlap mesh with ghosted entities. More... | |
Friends | |
| class | TempestOnlineMap |
Additional Inherited Members | |
Protected Attributes inherited from moab::Remapper | |
| Interface * | m_interface |
Definition at line 40 of file TempestRemapper.hpp.
| Enumerator | |
|---|---|
| DEFAULT | |
| CS | |
| RLL | |
| ICO | |
| ICOD | |
| OVERLAP_FILES | |
| OVERLAP_MEMORY | |
| OVERLAP_MOAB | |
Definition at line 61 of file TempestRemapper.hpp.
|
inline |
Definition at line 47 of file TempestRemapper.hpp.
|
virtual |
Definition at line 100 of file TempestRemapper.cpp.
References clear().
| ErrorCode moab::TempestRemapper::assign_vertex_element_IDs | ( | Tag | idtag, |
| EntityHandle | this_set, | ||
| const int | dimension = 2, |
||
| const int | start_id = 1 |
||
| ) |
Internal method to assign vertex and element global IDs if one does not exist already.
| idtag | Tag for the global IDs |
| this_set | MOAB entity handle of the mesh set |
| dimension | Dimension of the mesh (default: 2) |
| start_id | Starting ID (default: 1) |
Definition at line 1026 of file TempestRemapper.cpp.
References ErrorCode, moab::Interface::get_entities_by_dimension(), moab::Remapper::m_interface, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, moab::Range::size(), and moab::Interface::tag_set_data().
Referenced by main().
|
private |
Augment overlap mesh with ghosted entities.
Adds ghosted entities to the overlap mesh to ensure conservation in parallel operations.
Referenced by ComputeOverlapMesh().
|
virtual |
Deallocate and clear any memory initialized in the TempestRemapper object.
Definition at line 105 of file TempestRemapper.cpp.
References moab::Range::clear(), m_covering_source, m_covering_source_entities, m_covering_source_vertices, m_overlap, m_overlap_entities, m_source, m_source_entities, m_source_vertices, m_target, m_target_entities, m_target_vertices, MB_SUCCESS, point_cloud_source, point_cloud_target, and size.
Referenced by main(), and ~TempestRemapper().
| ErrorCode moab::TempestRemapper::ComputeOverlapMesh | ( | bool | kdtree_search = true, |
| bool | use_tempest = false |
||
| ) |
Compute the intersection mesh between the source and target grids that have been instantiated in the Remapper. This function invokes the parallel advancing-front intersection algorithm internally for spherical meshes and can handle arbitrary unstructured grids (CS, RLL, ICO, MPAS) with and without holes.
| kdtree_search | Flag to enable k-d tree search (default: true) |
| use_tempest | Flag to use TempestRemap (default: false) |
Definition at line 1385 of file TempestRemapper.cpp.
References AugmentOverlapSet(), moab::Range::begin(), ConvertOverlapMeshSourceOrdered(), moab::AEntityFactory::create_vert_elem_adjacencies(), dbgprint, moab::Range::end(), moab::Range::erase(), moab::Skinner::find_skin(), moab::IntxUtils::fix_degenerate_quads(), moab::AEntityFactory::get_adjacencies(), moab::Interface::get_entities_by_dimension(), moab::Interface::globalId_tag(), moab::Range::insert(), moab::Intx2Mesh::intersect_meshes(), moab::Intx2Mesh::intersect_meshes_kdtree(), is_parallel, m_covering_source, m_covering_source_set, moab::Remapper::m_interface, m_overlap, m_overlap_set, m_target, m_target_set, mb, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, mbintx, moab::AEntityFactory::notify_create_entity(), point_cloud_target, moab::IntxAreaUtils::positive_orientation(), rank, rrmgrids, moab::DebugOutput::set_prefix(), moab::Range::size(), size, moab::subtract(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::AEntityFactory::vert_elem_adjacencies(), and moab::Interface::write_mesh().
Referenced by main().
| ErrorCode moab::TempestRemapper::ConstructCoveringSet | ( | double | tolerance = 1e-8, |
| double | radius_src = 1.0, |
||
| double | radius_tgt = 1.0, |
||
| double | boxeps = 0.1, |
||
| bool | regional_mesh = false, |
||
| bool | gnomonic = true, |
||
| int | nb_ghost_layers = 0 |
||
| ) |
Construct a source covering mesh such that it completely encompasses the target grid in parallel. This operation is critical to ensure that the parallel advancing-front intersection algorithm can compute the intersection mesh only locally without any process communication.
| tolerance | Tolerance for the covering mesh construction (default: 1e-8) |
| radius_src | Radius of the source mesh (default: 1.0) |
| radius_tgt | Radius of the target mesh (default: 1.0) |
| boxeps | Box epsilon value (default: 0.1) |
| regional_mesh | Flag to indicate if the mesh is regional (default: false) |
| gnomonic | Flag to indicate if the mesh is gnomonic (default: true) |
| nb_ghost_layers | Number of ghost layers (default: 0) |
Definition at line 1238 of file TempestRemapper.cpp.
References moab::Interface::add_entities(), moab::AdaptiveKDTree::build_tree(), ConvertAllMeshesToTempest(), moab::Interface::create_meshset(), moab::Intx2Mesh::FindMaxEdges(), moab::IntxAreaUtils::GaussQuadrature, moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), moab::Range::insert(), is_parallel, m_covering_source, m_covering_source_entities, m_covering_source_set, m_covering_source_vertices, moab::Remapper::m_interface, m_source, m_source_entities, m_source_set, m_source_vertices, m_target_entities, m_target_set, moab::Intx2Mesh::max_edges_1, moab::Intx2Mesh::max_edges_2, max_source_edges, max_target_edges, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, mbintx, MESHSET_SET, moab::AdaptiveKDTree::point_search(), rank, rrmgrids, moab::Intx2Mesh::set_box_error(), moab::Intx2Mesh::set_error_tolerance(), moab::Intx2MeshOnSphere::set_radius_destination_mesh(), moab::Intx2MeshOnSphere::set_radius_source_mesh(), moab::Range::size(), moab::tolerance, and moab::Interface::write_file().
Referenced by main().
|
private |
Convert a MOAB mesh to TempestRemap format.
| mesh | Target TempestRemap mesh pointer |
| meshset | MOAB mesh set to convert |
| entities | Range of entities to convert |
| pverts | Optional pointer to vertex range |
Definition at line 644 of file TempestRemapper.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::compactness(), constructEdgeMap, moab::Range::end(), moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), moab::Interface::globalId_tag(), iface, moab::Range::index(), moab::Remapper::m_interface, MB_CHK_ERR, MB_SUCCESS, offlineWorkflow, moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by ConvertMeshToTempest(), and ResetMeshSet().
|
private |
Convert a TempestRemap mesh to MOAB format.
| type | Type of the TempestRemap mesh |
| mesh | Source TempestRemap mesh |
| meshset | Target MOAB mesh set |
| entities | Range to store converted entities |
| vertices | Optional range to store vertices |
Definition at line 254 of file TempestRemapper.cpp.
References moab::Interface::add_entities(), moab::Range::clear(), moab::Interface::create_element(), dbgprint, moab::Interface::globalId_tag(), iface, is_root, moab::Remapper::m_interface, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, MBPOLYGON, MBQUAD, MBTRI, moab::Interface::query_interface(), rank, moab::DebugOutput::set_prefix(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), and verbose.
Referenced by ConvertTempestMesh().
|
private |
Convert all MOAB meshes to TempestRemap format.
Utility method primarily used in online workflows to convert all meshes to TempestRemap format.
Definition at line 566 of file TempestRemapper.cpp.
References ConvertMeshToTempest(), moab::Remapper::CoveringMesh, m_covering_source, m_source, m_target, MB_CHK_SET_ERR, MB_SUCCESS, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by ConstructCoveringSet().
| ErrorCode moab::TempestRemapper::ConvertMeshToTempest | ( | Remapper::IntersectionContext | ctx | ) |
Convert the MOAB mesh representation to a corresponding TempestRemap mesh object according to the intersection context.
| ctx | Intersection context |
Definition at line 592 of file TempestRemapper.cpp.
References convert_mesh_to_tempest_private(), ConvertOverlapMeshSourceOrdered(), moab::Remapper::CoveringMesh, dbgprint, is_root, m_covering_source, m_covering_source_entities, m_covering_source_set, m_covering_source_vertices, m_overlap, m_source, m_source_entities, m_source_set, m_source_vertices, m_target, m_target_entities, m_target_set, m_target_vertices, MB_CHK_SET_ERR, MB_SUCCESS, moab::Remapper::OverlapMesh, point_cloud_source, point_cloud_target, rank, moab::DebugOutput::set_prefix(), moab::Range::size(), moab::Remapper::SourceMesh, moab::Remapper::TargetMesh, and verbose.
Referenced by ConvertAllMeshesToTempest(), anonymous_namespace{mbtempest.cpp}::handleOverlapMOAB(), and main().
|
private |
Convert overlap mesh to source-ordered format.
Transforms the overlap mesh into a source-ordered format compatible with TempestRemap.
Definition at line 801 of file TempestRemapper.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::end(), moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), moab::Interface::globalId_tag(), iface, moab::IntPairComparator(), is_parallel, m_covering_source_entities, moab::Remapper::m_interface, m_overlap, m_overlap_entities, m_overlap_set, m_target_entities, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, offlineWorkflow, moab::Range::size(), moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by ComputeOverlapMesh(), and ConvertMeshToTempest().
| ErrorCode moab::TempestRemapper::ConvertTempestMesh | ( | Remapper::IntersectionContext | ctx | ) |
Convert the TempestRemap mesh object to a corresponding MOAB mesh representation according to the intersection context.
| ctx | Intersection context |
Definition at line 225 of file TempestRemapper.cpp.
References convert_tempest_mesh_private(), moab::Remapper::DEFAULT, is_root, m_overlap, m_overlap_entities, m_overlap_set, m_overlap_type, m_source, m_source_entities, m_source_set, m_source_type, m_source_vertices, m_target, m_target_entities, m_target_set, m_target_type, m_target_vertices, MB_CHK_SET_ERR, moab::Remapper::SourceMesh, moab::Remapper::TargetMesh, and verbose.
Referenced by anonymous_namespace{mbtempest.cpp}::convertAndWriteMOABMesh(), and main().
| ErrorCode moab::TempestRemapper::GenerateCSMeshMetadata | ( | const int | ntot_elements, |
| moab::Range & | entities, | ||
| moab::Range * | secondary_entities, | ||
| const std::string & | dofTagName, | ||
| int | nP | ||
| ) |
Generate the necessary metadata and specifically the GLL node numbering for DoFs for a CS mesh. This negates the need for running external code like HOMME to output the numbering needed for computing maps. The functionality is used through the mbconvert tool to compute processor-invariant Global DoF IDs at GLL nodes.
| ntot_elements | Total number of elements |
| entities | MOAB range of entities |
| secondary_entities | MOAB range of secondary entities (optional) |
| dofTagName | Name of the DoF tag |
| nP | Number of points |
Definition at line 1058 of file TempestRemapper.cpp.
References GenerateMeshMetadata(), MB_CHK_SET_ERR, MB_INVALID_SIZE, and MB_SUCCESS.
| moab::ErrorCode moab::TempestRemapper::GenerateMesh | ( | Remapper::IntersectionContext | ctx, |
| TempestMeshType | type | ||
| ) |
Generate a mesh in memory of given type (CS/RLL/ICO/MPAS(structured)) and store it under the context specified by the user.
| ctx | Intersection context |
| type | Type of mesh to generate |
| ErrorCode moab::TempestRemapper::GenerateMeshMetadata | ( | Mesh & | mesh, |
| const int | ntot_elements, | ||
| moab::Range & | entities, | ||
| moab::Range * | secondary_entities, | ||
| const std::string & | dofTagName, | ||
| int | nP | ||
| ) |
Generate the necessary metadata for DoF node numbering in a given mesh. Currently, only the functionality to generate numbering on CS grids is supported.
| mesh | Mesh object |
| ntot_elements | Total number of elements |
| entities | MOAB range of entities |
| secondary_entities | MOAB range of secondary entities (optional) |
| dofTagName | Name of the DoF tag |
| nP | Number of points |
Definition at line 1081 of file TempestRemapper.cpp.
References moab::Range::begin(), moab::Range::end(), moab::Interface::get_coords(), moab::Range::insert(), moab::Remapper::m_interface, MB_CHK_SET_ERR, MB_INVALID_SIZE, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by GenerateCSMeshMetadata(), and main().
|
inline |
Get the covering mesh (TempestRemap) object.
Definition at line 755 of file TempestRemapper.hpp.
References m_covering_source.
Referenced by moab::TempestOnlineMap::TempestOnlineMap().
|
inline |
Get access to the underlying source covering set if available. Else return the source set.
Definition at line 760 of file TempestRemapper.hpp.
References m_covering_source_set.
| ErrorCode moab::TempestRemapper::GetIMasks | ( | Remapper::IntersectionContext | ctx, |
| std::vector< int > & | masks | ||
| ) |
Get the masks that could have been defined.
| ctx | Intersection context |
| masks | Vector of masks |
Definition at line 2192 of file TempestRemapper.cpp.
References moab::Remapper::CoveringMesh, moab::Remapper::m_interface, m_source_entities, m_source_vertices, m_target_entities, m_target_vertices, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::Remapper::OverlapMesh, point_cloud_source, point_cloud_target, moab::Range::size(), moab::Remapper::SourceMesh, moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), and moab::Remapper::TargetMesh.
|
inline |
Get the TempestRemap mesh object according to the intersection context.
| ctx | Intersection context |
Definition at line 522 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source, m_overlap, m_source, m_target, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by anonymous_namespace{mbtempest.cpp}::handleOverlapMemory(), anonymous_namespace{mbtempest.cpp}::handleOverlapMOAB(), main(), and moab::TempestOnlineMap::TempestOnlineMap().
|
inline |
Get the mesh element entities corresponding to the intersection context.
| ctx | Intersection context |
Definition at line 632 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_entities, m_overlap_entities, m_source_entities, m_target_entities, MB_SET_ERR_RET_VAL, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by main().
|
inline |
Const overload. Get the mesh element entities corresponding to the intersection context.
| ctx | Intersection context |
Definition at line 650 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_entities, m_overlap_entities, m_source_entities, m_target_entities, MB_SET_ERR_RET_VAL, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
inline |
Get the MOAB mesh set corresponding to the intersection context.
| ctx | Intersection context |
Definition at line 596 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_set, m_overlap_set, m_source_set, m_target_set, MB_SET_ERR_RET_VAL, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by anonymous_namespace{mbtempest.cpp}::convertAndWriteMOABMesh(), anonymous_namespace{mbtempest.cpp}::handleOverlapMemory(), anonymous_namespace{mbtempest.cpp}::handleOverlapMOAB(), and main().
|
inline |
Const overload. Get the MOAB mesh set corresponding to the intersection context.
| ctx | Intersection context |
Definition at line 614 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_set, m_overlap_set, m_source_set, m_target_set, MB_SET_ERR_RET_VAL, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
inline |
Get the mesh type corresponding to the intersection context.
| ctx | Intersection context |
Definition at line 739 of file TempestRemapper.hpp.
References moab::Remapper::DEFAULT, DEFAULT, m_overlap_type, m_source_type, m_target_type, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
inline |
Get the mesh vertices corresponding to the intersection context. Useful for point-cloud meshes.
| ctx | Intersection context |
Definition at line 668 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_vertices, m_source_vertices, m_target_vertices, MB_SET_ERR_RET_VAL, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by main().
|
inline |
Const overload. Get the mesh vertices corresponding to the intersection context. Useful for point-cloud meshes.
| ctx | Intersection context |
Definition at line 684 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_vertices, m_source_vertices, m_target_vertices, MB_SET_ERR_RET_VAL, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
| moab::ErrorCode moab::TempestRemapper::GetOverlapAugmentedEntities | ( | moab::Range & | sharedGhostEntities | ) |
Get all the ghosted overlap entities that were accumulated to enable conservation in parallel.
| sharedGhostEntities | MOAB range of ghosted overlap entities |
Definition at line 762 of file TempestRemapper.cpp.
References moab::Range::clear(), moab::Range::insert(), MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, moab::Range::merge(), moab::Range::size(), and moab::subtract().
Referenced by main().
|
virtual |
Initialize the TempestRemapper object internal data structures including the mesh sets and TempestRemap mesh references.
| initialize_fsets | Flag to initialize the mesh sets (default: true) |
Definition at line 53 of file TempestRemapper.cpp.
References moab::Interface::create_meshset(), is_parallel, is_root, m_covering_source, moab::Remapper::m_interface, m_overlap, m_overlap_set, m_source, m_source_set, m_target, m_target_set, MB_CHK_SET_ERR, MB_SUCCESS, MESHSET_SET, point_cloud_source, point_cloud_target, rank, and size.
Referenced by main().
|
private |
Load a mesh from disk in TempestRemap format.
| inputFilename | Path to the input mesh file |
| tempest_mesh | Pointer to store the loaded TempestRemap mesh |
Definition at line 176 of file TempestRemapper.cpp.
References constructEdgeMap, moab::error(), is_root, MB_SUCCESS, meshValidate, and verbose.
Referenced by LoadMesh().
| ErrorCode moab::TempestRemapper::LoadMesh | ( | Remapper::IntersectionContext | ctx, |
| std::string | inputFilename, | ||
| TempestMeshType | type | ||
| ) |
Load a mesh from disk of given type and store it under the context specified by the user.
| ctx | Intersection context |
| inputFilename | File name of the mesh to load |
| type | Type of mesh to load |
Definition at line 151 of file TempestRemapper.cpp.
References moab::Remapper::DEFAULT, load_tempest_mesh_private(), m_overlap, m_overlap_type, m_source, m_source_type, m_target, m_target_type, MB_CHK_SET_ERR, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by anonymous_namespace{mbtempest.cpp}::handleOverlapMemory(), and main().
|
inline |
Reconstruct mesh, used now only for IO; need a better solution maybe.
| ctx | Intersection context |
| meshSet | MOAB mesh set handle |
Definition at line 570 of file TempestRemapper.hpp.
References convert_mesh_to_tempest_private(), moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_source, m_source_entities, m_source_set, m_source_vertices, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
inline |
Set the TempestRemap mesh object according to the intersection context.
| ctx | Intersection context |
| mesh | Pointer to the TempestRemap mesh object |
| overwrite | Flag to overwrite the existing mesh (default: true) |
Definition at line 540 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source, m_overlap, m_source, m_target, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by anonymous_namespace{mbtempest.cpp}::convertAndWriteMOABMesh(), and anonymous_namespace{mbtempest.cpp}::handleOverlapMemory().
| void moab::TempestRemapper::SetMeshSet | ( | Remapper::IntersectionContext | ctx, |
| moab::EntityHandle | mset, | ||
| moab::Range * | entities = nullptr |
||
| ) |
Set the mesh set according to the intersection context.
| ctx | Intersection context |
| mset | MOAB mesh set handle |
| entities | MOAB range of entities (optional) |
Definition at line 996 of file TempestRemapper.cpp.
References moab::Remapper::CoveringMesh, m_covering_source_entities, m_covering_source_set, m_source_entities, m_source_set, m_target_entities, m_target_set, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
inline |
Set the mesh type corresponding to the intersection context.
| ctx | Intersection context |
| metadata | Vector of mesh type metadata |
Definition at line 700 of file TempestRemapper.hpp.
References m_overlap_type, m_source_metadata, m_source_type, m_target_metadata, m_target_type, OVERLAP_FILES, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by anonymous_namespace{mbtempest.cpp}::handleOverlapMOAB().
| moab::ErrorCode moab::TempestRemapper::WriteTempestIntersectionMesh | ( | std::string | strOutputFileName, |
| const bool | fAllParallel, | ||
| const bool | fInputConcave, | ||
| const bool | fOutputConcave | ||
| ) |
Gather the overlap mesh and associated source/target data and write it out to disk using the TempestRemap output interface. This information can then be used with the "GenerateOfflineMap" tool in TempestRemap as needed.
| strOutputFileName | Output file name |
| fAllParallel | Flag to write all parallel data (default: false) |
| fInputConcave | Flag to indicate if the input mesh is concave (default: false) |
| fOutputConcave | Flag to indicate if the output mesh is concave (default: false) |
Definition at line 960 of file TempestRemapper.cpp.
References MB_SUCCESS.
|
friend |
Definition at line 73 of file TempestRemapper.hpp.
| bool moab::TempestRemapper::constructEdgeMap |
Flag to construct the edge map within the TempestRemap data structures.
If set to true, the edge map will be constructed within the TempestRemap data structures.
Definition at line 390 of file TempestRemapper.hpp.
Referenced by convert_mesh_to_tempest_private(), load_tempest_mesh_private(), and main().
|
private |
Definition at line 515 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), ConvertOverlapMeshSourceOrdered(), initialize(), and moab::TempestOnlineMap::TempestOnlineMap().
|
private |
Definition at line 516 of file TempestRemapper.hpp.
Referenced by convert_tempest_mesh_private(), ConvertMeshToTempest(), ConvertTempestMesh(), initialize(), load_tempest_mesh_private(), and moab::TempestOnlineMap::TempestOnlineMap().
|
private |
Definition at line 512 of file TempestRemapper.hpp.
|
private |
Definition at line 503 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConstructCoveringSet(), ConvertAllMeshesToTempest(), ConvertMeshToTempest(), GetCoveringMesh(), GetMesh(), initialize(), and SetMesh().
|
private |
Definition at line 505 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertOverlapMeshSourceOrdered(), GetMeshEntities(), and SetMeshSet().
|
private |
Definition at line 504 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), ConvertMeshToTempest(), GetCoveringSet(), GetMeshSet(), and SetMeshSet().
|
private |
Definition at line 506 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), and GetMeshVertices().
|
private |
Definition at line 493 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConvertMeshToTempest(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), GetMesh(), initialize(), LoadMesh(), and SetMesh().
|
private |
Definition at line 495 of file TempestRemapper.hpp.
Referenced by clear(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), and GetMeshEntities().
|
private |
Definition at line 496 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), GetMeshSet(), and initialize().
|
private |
Definition at line 494 of file TempestRemapper.hpp.
Referenced by ConvertTempestMesh(), GetMeshType(), LoadMesh(), and SetMeshType().
|
private |
Definition at line 497 of file TempestRemapper.hpp.
|
private |
Definition at line 473 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertAllMeshesToTempest(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMesh(), initialize(), LoadMesh(), ResetMeshSet(), and SetMesh().
|
private |
Definition at line 475 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetIMasks(), GetMeshEntities(), ResetMeshSet(), and SetMeshSet().
|
private |
Definition at line 480 of file TempestRemapper.hpp.
Referenced by SetMeshType().
|
private |
Definition at line 477 of file TempestRemapper.hpp.
Referenced by ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMeshSet(), initialize(), ResetMeshSet(), and SetMeshSet().
|
private |
Definition at line 474 of file TempestRemapper.hpp.
Referenced by ConvertTempestMesh(), GetMeshType(), LoadMesh(), and SetMeshType().
|
private |
Definition at line 476 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetIMasks(), GetMeshVertices(), and ResetMeshSet().
|
private |
Definition at line 483 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConvertAllMeshesToTempest(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMesh(), initialize(), LoadMesh(), and SetMesh().
|
private |
Definition at line 485 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), GetIMasks(), GetMeshEntities(), and SetMeshSet().
|
private |
Definition at line 490 of file TempestRemapper.hpp.
Referenced by SetMeshType().
|
private |
Definition at line 487 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMeshSet(), initialize(), and SetMeshSet().
|
private |
Definition at line 484 of file TempestRemapper.hpp.
Referenced by ConvertTempestMesh(), GetMeshType(), LoadMesh(), and SetMeshType().
|
private |
Definition at line 486 of file TempestRemapper.hpp.
Referenced by clear(), ConvertMeshToTempest(), ConvertTempestMesh(), GetIMasks(), and GetMeshVertices().
|
private |
Definition at line 478 of file TempestRemapper.hpp.
Referenced by ConstructCoveringSet().
|
private |
Definition at line 488 of file TempestRemapper.hpp.
Referenced by ConstructCoveringSet().
|
private |
Definition at line 500 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), and ConstructCoveringSet().
| bool moab::TempestRemapper::meshValidate |
Flag to enable mesh validation after loading from file.
If set to true, the mesh will be validated after it is loaded from a file.
Definition at line 382 of file TempestRemapper.hpp.
Referenced by load_tempest_mesh_private(), and main().
| const bool moab::TempestRemapper::offlineWorkflow |
Flag indicating whether the workflow is in offline mode.
This flag is used to determine the context of the workflow, specifically whether it is running in an offline mode (mbtempest).
Definition at line 375 of file TempestRemapper.hpp.
Referenced by convert_mesh_to_tempest_private(), and ConvertOverlapMeshSourceOrdered().
|
private |
Definition at line 479 of file TempestRemapper.hpp.
Referenced by clear(), ConvertMeshToTempest(), GetIMasks(), and initialize().
|
private |
Definition at line 489 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConvertMeshToTempest(), GetIMasks(), and initialize().
|
private |
Definition at line 517 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), convert_tempest_mesh_private(), ConvertMeshToTempest(), initialize(), and moab::TempestOnlineMap::TempestOnlineMap().
|
private |
Definition at line 514 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), and ConstructCoveringSet().
|
private |
Definition at line 518 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), initialize(), and moab::TempestOnlineMap::TempestOnlineMap().
|
static |
Global verbosity flag.
This flag controls the verbosity of the output. If set to true, more detailed output will be generated.
Definition at line 398 of file TempestRemapper.hpp.
Referenced by convert_tempest_mesh_private(), ConvertMeshToTempest(), ConvertTempestMesh(), and load_tempest_mesh_private().