Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
Child helper class for ucd mesh, e.g. CAM_SE (HOMME) or MPAS. More...
#include <NCWriteHelper.hpp>
Public Member Functions | |
UcdNCWriteHelper (WriteNC *writeNC, int fileId, const FileOptions &opts, EntityHandle fileSet) | |
virtual | ~UcdNCWriteHelper () |
Protected Member Functions | |
template<typename T > | |
void | jik_to_kji_stride (size_t, size_t nj, size_t nk, T *dest, T *source, Range &localGid) |
This version takes as input the moab range, from which we actually need just the size of each sequence, for a proper transpose of the data. | |
Protected Attributes | |
int | cDim |
Dimension numbers for nCells, nEdges and nVertices. | |
int | eDim |
int | vDim |
Range | localGidCellsOwned |
Local global ID for owned cells, edges and vertices. | |
Range | localGidEdgesOwned |
Range | localGidVertsOwned |
Child helper class for ucd mesh, e.g. CAM_SE (HOMME) or MPAS.
Definition at line 124 of file NCWriteHelper.hpp.
moab::UcdNCWriteHelper::UcdNCWriteHelper | ( | WriteNC * | writeNC, |
int | fileId, | ||
const FileOptions & | opts, | ||
EntityHandle | fileSet | ||
) | [inline] |
Definition at line 127 of file NCWriteHelper.hpp.
: NCWriteHelper( writeNC, fileId, opts, fileSet ), cDim( -1 ), eDim( -1 ), vDim( -1 ) { }
virtual moab::UcdNCWriteHelper::~UcdNCWriteHelper | ( | ) | [inline, virtual] |
Definition at line 131 of file NCWriteHelper.hpp.
{}
void moab::UcdNCWriteHelper::jik_to_kji_stride | ( | size_t | , |
size_t | nj, | ||
size_t | nk, | ||
T * | dest, | ||
T * | source, | ||
Range & | localGid | ||
) | [inline, protected] |
This version takes as input the moab range, from which we actually need just the size of each sequence, for a proper transpose of the data.
Definition at line 137 of file NCWriteHelper.hpp.
References moab::Range::pair_begin(), and moab::Range::pair_end().
Referenced by moab::NCWriteHOMME::write_nonset_variables().
{ std::size_t idxInSource = 0; // Position of the start of the stride // For each subrange, we will transpose a matrix of size // subrange*nj*nk (subrange takes the role of ni) for( Range::pair_iterator pair_iter = localGid.pair_begin(); pair_iter != localGid.pair_end(); ++pair_iter ) { std::size_t size_range = pair_iter->second - pair_iter->first + 1; std::size_t nik = size_range * nk, nij = size_range * nj; for( std::size_t k = 0; k != nk; k++ ) for( std::size_t j = 0; j != nj; j++ ) for( std::size_t i = 0; i != size_range; i++ ) dest[idxInSource + k * nij + j * size_range + i] = source[idxInSource + j * nik + i * nk + k]; idxInSource += ( size_range * nj * nk ); } }
int moab::UcdNCWriteHelper::cDim [protected] |
Dimension numbers for nCells, nEdges and nVertices.
Definition at line 155 of file NCWriteHelper.hpp.
int moab::UcdNCWriteHelper::eDim [protected] |
Definition at line 155 of file NCWriteHelper.hpp.
Range moab::UcdNCWriteHelper::localGidCellsOwned [protected] |
Local global ID for owned cells, edges and vertices.
Definition at line 158 of file NCWriteHelper.hpp.
Referenced by moab::NCWriteGCRM::collect_mesh_info(), moab::NCWriteMPAS::collect_mesh_info(), moab::NCWriteMPAS::collect_variable_data(), moab::NCWriteGCRM::collect_variable_data(), moab::NCWriteGCRM::write_nonset_variables(), and moab::NCWriteMPAS::write_nonset_variables().
Range moab::UcdNCWriteHelper::localGidEdgesOwned [protected] |
Definition at line 158 of file NCWriteHelper.hpp.
Referenced by moab::NCWriteGCRM::collect_mesh_info(), moab::NCWriteMPAS::collect_mesh_info(), moab::NCWriteMPAS::collect_variable_data(), moab::NCWriteGCRM::collect_variable_data(), moab::NCWriteGCRM::write_nonset_variables(), and moab::NCWriteMPAS::write_nonset_variables().
Range moab::UcdNCWriteHelper::localGidVertsOwned [protected] |
Definition at line 158 of file NCWriteHelper.hpp.
Referenced by moab::NCWriteGCRM::collect_mesh_info(), moab::NCWriteHOMME::collect_mesh_info(), moab::NCWriteMPAS::collect_mesh_info(), moab::NCWriteGCRM::collect_variable_data(), moab::NCWriteMPAS::collect_variable_data(), moab::NCWriteHOMME::collect_variable_data(), moab::NCWriteGCRM::write_nonset_variables(), moab::NCWriteMPAS::write_nonset_variables(), and moab::NCWriteHOMME::write_nonset_variables().
int moab::UcdNCWriteHelper::vDim [protected] |
Definition at line 155 of file NCWriteHelper.hpp.