Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::Remapper Class Reference

#include <Remapper.hpp>

+ Inheritance diagram for moab::Remapper:
+ Collaboration diagram for moab::Remapper:

Public Types

enum  IntersectionContext {
  DEFAULT = -1 , SourceMesh = 0 , TargetMesh = 1 , OverlapMesh = 2 ,
  CoveringMesh = 3 , SourceMeshWithGhosts = 4 , TargetMeshWithGhosts = 5
}
 

Public Member Functions

 Remapper (moab::Interface *mbInt)
 
virtual ~Remapper ()
 
moab::Interfaceget_interface ()
 
ErrorCode LoadNativeMesh (std::string filename, moab::EntityHandle &meshset, std::vector< int > &metadata, const char *readopts=0)
 

Protected Attributes

Interfacem_interface
 

Detailed Description

Definition at line 38 of file Remapper.hpp.

Member Enumeration Documentation

◆ IntersectionContext

Enumerator
DEFAULT 
SourceMesh 
TargetMesh 
OverlapMesh 
CoveringMesh 
SourceMeshWithGhosts 
TargetMeshWithGhosts 

Definition at line 57 of file Remapper.hpp.

58  {
59  DEFAULT = -1, // default context
60  SourceMesh = 0, // source mesh
61  TargetMesh = 1, // target mesh
62  OverlapMesh = 2, // overlap/intersection mesh
63  CoveringMesh = 3, // source mesh covering target mesh
64  SourceMeshWithGhosts = 4, // mesh with extra ghost layers to compute coverage in high order case or bilin
65  TargetMeshWithGhosts = 5 // mesh with extra ghost layers to impose target data limiting
66  };

Constructor & Destructor Documentation

◆ Remapper()

moab::Remapper::Remapper ( moab::Interface mbInt)
inline

Definition at line 44 of file Remapper.hpp.

44  : m_interface( mbInt )
45 #endif
46  {
47  }

◆ ~Remapper()

virtual moab::Remapper::~Remapper ( )
inlinevirtual

Definition at line 49 of file Remapper.hpp.

50  {
51 #ifdef MOAB_HAVE_MPI
52  m_pcomm = NULL;
53 #endif
54  m_interface = NULL;
55  }

References m_interface.

Member Function Documentation

◆ get_interface()

moab::Interface* moab::Remapper::get_interface ( )
inline

Definition at line 68 of file Remapper.hpp.

69  {
70  return m_interface;
71  }

References m_interface.

Referenced by moab::TempestOnlineMap::TempestOnlineMap().

◆ LoadNativeMesh()

ErrorCode moab::Remapper::LoadNativeMesh ( std::string  filename,
moab::EntityHandle meshset,
std::vector< int > &  metadata,
const char *  readopts = 0 
)
inline

Definition at line 114 of file Remapper.hpp.

118  {
119 #ifdef MOAB_HAVE_MPI
120  std::string opts = "";
121  if( readopts )
122  {
123  if( opts.size() )
124  opts = opts + ";" + std::string( readopts );
125  else
126  opts = std::string( readopts );
127  }
128 
129  if( !m_pcomm->rank() ) std::cout << "Reading file (" << filename << ") with options = [" << opts << "]\n";
130 #else
131  const std::string opts = std::string( ( readopts ? readopts : "" ) );
132  std::cout << "Reading file (" << filename << ") with options = [" << opts << "]\n";
133 #endif
134  moab::ErrorCode rval = m_interface->load_file( filename.c_str(), &meshset, opts.c_str() );MB_CHK_ERR( rval );
135 
136  Tag rectilinearTag;
137  rval = m_interface->tag_get_handle( "ClimateMetadata", rectilinearTag );
138 
139  if( rval != MB_FAILURE && rval != MB_TAG_NOT_FOUND && rval != MB_ALREADY_ALLOCATED &&
140  rectilinearTag != nullptr )
141  {
142  int dimSizes[3];
143  rval = m_interface->tag_get_data( rectilinearTag, &meshset, 1,
144  dimSizes ); // MB_CHK_SET_ERR( rval, "Error geting tag data" );
145  metadata.clear();
146  metadata.push_back( dimSizes[0] );
147  metadata.push_back( dimSizes[1] );
148  metadata.push_back( dimSizes[2] );
149  }
150 
151  return MB_SUCCESS;
152  }

References ErrorCode, moab::Interface::load_file(), m_interface, MB_ALREADY_ALLOCATED, MB_CHK_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().

Referenced by CreateTempestMesh(), and main().

Member Data Documentation

◆ m_interface


The documentation for this class was generated from the following file: