Loading [MathJax]/extensions/tex2jax.js
Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
}
 

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 

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  };

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 66 of file Remapper.hpp.

67  { 68  return m_interface; 69  }

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 81 of file Remapper.hpp.

85  { 86 #ifdef MOAB_HAVE_MPI 87  std::string opts = ""; 88  if( readopts ) 89  { 90  if( opts.size() ) 91  opts = opts + ";" + std::string( readopts ); 92  else 93  opts = std::string( readopts ); 94  } 95  96  if( !m_pcomm->rank() ) std::cout << "Reading file (" << filename << ") with options = [" << opts << "]\n"; 97 #else 98  const std::string opts = std::string( ( readopts ? readopts : "" ) ); 99  std::cout << "Reading file (" << filename << ") with options = [" << opts << "]\n"; 100 #endif 101  MB_CHK_ERR( m_interface->load_file( filename.c_str(), &meshset, opts.c_str() ) ); 102  103  Tag rectilinearTag; 104  ErrorCode rval = m_interface->tag_get_handle( "ClimateMetadata", rectilinearTag ); 105  106  if( rval != MB_FAILURE && rval != MB_TAG_NOT_FOUND && rval != MB_ALREADY_ALLOCATED && 107  rectilinearTag != nullptr ) 108  { 109  int dimSizes[3]; 110  EntityHandle rootset = 0; 111  rval = m_interface->tag_get_data( rectilinearTag, &rootset, 1, 112  dimSizes ); // MB_CHK_SET_ERR( rval, "Error geting tag data" ); 113  metadata.clear(); 114  metadata.push_back( dimSizes[0] ); 115  metadata.push_back( dimSizes[1] ); 116  metadata.push_back( dimSizes[2] ); 117  } 118  119  return MB_SUCCESS; 120  }

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: