PlasCom2  1.0
XPACC Multi-physics simluation application
sizeextent Class Reference

Simple Block Structured Mesh object. More...

Detailed Description

Simple Block Structured Mesh object.

Block structured mesh object holds irange, jrange, and krange. Elements are ordered in dictionary ordering of lower left node

Definition at line 21 of file IndexUtil.H.

#include <IndexUtil.H>

Public Member Functions

 sizeextent ()
 
 sizeextent (const sizeextent &inExtent)
 
template<typename IntType >
 sizeextent (const std::vector< IntType > &inStart, const std::vector< IntType > &inSize)
 
template<typename IntType >
 sizeextent (const std::vector< std::vector< IntType > > &inextent)
 
template<typename ContainerType >
 sizeextent (const ContainerType &inflatextent)
 
template<typename T >
 sizeextent (const T *src, int nd=3)
 
template<typename T >
 sizeextent (int nd, const T *src)
 
void destroy ()
 
template<typename ContainerType >
void Init (const ContainerType &inflatextent)
 
template<typename IntType >
void Init (const std::vector< IntType > &inStart, const std::vector< IntType > &inSize)
 
template<typename ContainerType >
void InitSimple (const ContainerType &inSize)
 
template<typename T >
void InitSimple (int numDim, const T *inSizes)
 
std::vector< size_t > Starts () const
 
std::vector< size_t > Ends () const
 
std::vector< size_t > Sizes () const
 
void Copy (const sizeextent &inExtent)
 
void Sync ()
 
size_t NNodes () const
 
size_t NNodes (int inDir) const
 
size_t ND () const
 
template<typename ContainerType >
void Flatten (ContainerType &output) const
 
template<typename ContainerType >
void dir_loop (size_t nd, size_t indoff, std::vector< size_t > &NP, const sizeextent &inExtent, ContainerType &indices) const
 
template<typename ContainerType >
void GetFlatIndices (const sizeextent &extent, ContainerType &indices) const
 
template<typename ContainerType >
ContainerType FlatIndices (const sizeextent &extent) const
 
void Overlap (const sizeextent &inextent, sizeextent &outextent) const
 
sizeextent Neighboring (const sizeextent &inextent, int nbrDim) const
 
sizeextent Overlap (const sizeextent &inextent) const
 
int Protrude (const sizeextent &inExtent)
 
template<typename ContainerType >
int ProtrudeLimit (const ContainerType &inOffset, const ContainerType &inLimits)
 
sizeextent Protruded (const sizeextent &inExtent)
 
template<typename ContainerType >
int Protrude (const ContainerType &protrusionOffsets)
 
sizeextent operator- (const sizeextent &inExtent) const
 
sizeextentoperator+= (const sizeextent &inExtent)
 
sizeextent RelativeTranslation (const sizeextent &inOrigin, const sizeextent &inDestination) const
 
int RelativeTranslation (const sizeextent &inOrigin, const sizeextent &inDestination, sizeextent &returnExtent) const
 
template<typename ContainerType >
sizeextent Protruded (const ContainerType &protrusionOffsets)
 
template<typename ContainerType >
int Translate (const ContainerType &translationOffsets, bool reverseOffset=false)
 
template<typename ContainerType >
void FindSharedNodes (std::vector< sizeextent > &extent_pool, std::vector< sizeextent > &shared_extents, ContainerType &neighbors) const
 
int Skewness (const sizeextent &inExtent)
 
template<typename ContainerType >
std::vector< size_t > Coordinates (size_t nodeIndex)
 
template<typename ContainerType >
size_t NodeIndex (ContainerType &index) const
 
std::ostream & PrettyPrint (std::ostream &outStream) const
 

Private Attributes

size_t _nd
 
std::vector< size_t > _Np
 
std::vector< size_t > _N
 

Friends

std::ostream & operator<< (std::ostream &outStream, const sizeextent &sizeExtent)
 
std::istream & operator>> (std::istream &inStream, sizeextent &sizeExtent)
 
Inheritance diagram for sizeextent:
Collaboration diagram for sizeextent:

Constructor & Destructor Documentation

◆ sizeextent() [1/7]

sizeextent ( )
inline

Definition at line 30 of file IndexUtil.H.

◆ sizeextent() [2/7]

sizeextent ( const sizeextent inExtent)
inline

Definition at line 38 of file IndexUtil.H.

References sizeextent::Copy().

Here is the call graph for this function:

◆ sizeextent() [3/7]

sizeextent ( const std::vector< IntType > &  inStart,
const std::vector< IntType > &  inSize 
)
inlineexplicit

Definition at line 45 of file IndexUtil.H.

References sizeextent::_nd, and sizeextent::Sync().

Here is the call graph for this function:

◆ sizeextent() [4/7]

sizeextent ( const std::vector< std::vector< IntType > > &  inextent)
inlineexplicit

Definition at line 66 of file IndexUtil.H.

References sizeextent::_nd, and sizeextent::Sync().

Here is the call graph for this function:

◆ sizeextent() [5/7]

sizeextent ( const ContainerType &  inflatextent)
inlineexplicit

Definition at line 81 of file IndexUtil.H.

References sizeextent::_nd, and sizeextent::Sync().

Here is the call graph for this function:

◆ sizeextent() [6/7]

sizeextent ( const T *  src,
int  nd = 3 
)
inlineexplicit

Definition at line 95 of file IndexUtil.H.

References sizeextent::Sync().

Here is the call graph for this function:

◆ sizeextent() [7/7]

sizeextent ( int  nd,
const T *  src 
)
inlineexplicit

Definition at line 110 of file IndexUtil.H.

References sizeextent::Sync().

Here is the call graph for this function:

Member Function Documentation

◆ Coordinates()

std::vector<size_t> Coordinates ( size_t  nodeIndex)
inline

Definition at line 706 of file IndexUtil.H.

◆ Copy()

◆ destroy()

void destroy ( )
inline

Definition at line 123 of file IndexUtil.H.

Referenced by sizeextent::Init(), and sizeextent::InitSimple().

Here is the caller graph for this function:

◆ dir_loop()

void dir_loop ( size_t  nd,
size_t  indoff,
std::vector< size_t > &  NP,
const sizeextent inExtent,
ContainerType &  indices 
) const
inline

Definition at line 284 of file IndexUtil.H.

Referenced by sizeextent::GetFlatIndices().

Here is the caller graph for this function:

◆ Ends()

std::vector<size_t> Ends ( ) const
inline

Definition at line 208 of file IndexUtil.H.

◆ FindSharedNodes()

void FindSharedNodes ( std::vector< sizeextent > &  extent_pool,
std::vector< sizeextent > &  shared_extents,
ContainerType &  neighbors 
) const
inline

Definition at line 667 of file IndexUtil.H.

References sizeextent::Overlap().

Here is the call graph for this function:

◆ FlatIndices()

ContainerType FlatIndices ( const sizeextent extent) const
inline

Definition at line 317 of file IndexUtil.H.

◆ Flatten()

◆ GetFlatIndices()

◆ Init() [1/2]

void Init ( const ContainerType &  inflatextent)
inline

Definition at line 133 of file IndexUtil.H.

References sizeextent::destroy(), and sizeextent::Sync().

Referenced by pcpp::util::PartitionCartesianExtent(), pcpp::util::PartitionCartesianInterval(), TestHaloBasic(), TestHaloThreaded(), and TestProbe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Init() [2/2]

void Init ( const std::vector< IntType > &  inStart,
const std::vector< IntType > &  inSize 
)
inline

Definition at line 149 of file IndexUtil.H.

References sizeextent::_nd, sizeextent::destroy(), and sizeextent::Sync().

Here is the call graph for this function:

◆ InitSimple() [1/2]

void InitSimple ( const ContainerType &  inSize)
inline

Definition at line 169 of file IndexUtil.H.

References sizeextent::destroy(), and sizeextent::Sync().

Referenced by rhs< GridT, StateT, OperatorT >::ApplyWENO(), plascom2::operators::sbp::BoundaryStencilConnectivity(), parallel_blockstructured::ComputeUniformRectangularMetrics(), application::ConfigureSimulation(), pcpp::util::CopyInterval(), testfixtures::CreateSerialSimulationFixtures(), halo::CreateSimpleRecvBuffers(), halo::CreateSimpleRecvIndices(), halo::CreateSimpleSendBuffers(), halo::CreateSimpleSendIndices(), testfixtures::CreateSimulationFixtures(), euler::util::CreateSimulationFixtures(), halo::CreateThreadRecvIndices(), halo::CreateThreadSendIndices(), parallel_blockstructured::CurvilinearMetrics(), parallel_blockstructured::ExchangeCoordinates(), parallel_blockstructured::Finalize(), parallel_blockstructured::FlagMask(), plascom2::operators::sbp::HoleStencilConnectivity(), euler::util::InitializeAcousticPulse(), euler::util::InitializeAdvectionDiffusion(), euler::util::InitializeDensityPulse(), Maxwell::util::InitializeGaussianPulse1DXDir(), euler::util::InitializeGaussianScalar(), viscid::util::InitializePoiseuille(), euler::util::InitializeProtoY4Test1(), euler::util::InitializeRiemann1D(), euler::util::InitializeShocktube(), euler::util::InitializeSimulationFixtures(), euler::util::InitializeUniformFlow(), simulation::grid::InitSubRegionFromString(), parallel_blockstructured::ParallelSetup(), mask::SetMask(), parallel_blockstructured::SetupThreads(), TestEOS_ComputeBuffers(), TestEulerKernels(), TestGrid_PBS_IntegratedHalo(), TestGrid_SubRegion(), TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), TestHaloThreaded(), TestHDF5GridIO(), TestHDF5HyperSlab(), TestHDF5PBSGridIO(), TestHDF5Read2DBlockStructuredGrid(), TestHoleDetection(), TestIntervalBasic(), TestMaxwellRHS(), TestOperators(), TestPlasCom2Output(), TestProbe(), TestRK4Advancer(), TestRK4Advancer2(), TestViscidKernels(), TestViscidKernelsCurvilinear(), TestViscidKernelsMetrics(), mask::UnSetMask(), and pcpp::io::hdf5::WriteGrid().

Here is the call graph for this function:

◆ InitSimple() [2/2]

void InitSimple ( int  numDim,
const T *  inSizes 
)
inline

Definition at line 185 of file IndexUtil.H.

References sizeextent::destroy(), and sizeextent::Sync().

Here is the call graph for this function:

◆ ND()

size_t ND ( ) const
inline

◆ Neighboring()

sizeextent Neighboring ( const sizeextent inextent,
int  nbrDim 
) const
inline

Definition at line 351 of file IndexUtil.H.

References ix::util::IntervalOverlaps(), and sizeextent::ND().

Referenced by TestIntervalBasic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NNodes() [1/2]

◆ NNodes() [2/2]

size_t NNodes ( int  inDir) const
inline

Definition at line 263 of file IndexUtil.H.

◆ NodeIndex()

size_t NodeIndex ( ContainerType &  index) const
inline

Definition at line 719 of file IndexUtil.H.

References sizeextent::operator<<, sizeextent::operator>>, and sizeextent::PrettyPrint().

Here is the call graph for this function:

◆ operator+=()

sizeextent& operator+= ( const sizeextent inExtent)
inline

Definition at line 520 of file IndexUtil.H.

◆ operator-()

sizeextent operator- ( const sizeextent inExtent) const
inline

Definition at line 501 of file IndexUtil.H.

References sizeextent::Copy().

Here is the call graph for this function:

◆ Overlap() [1/2]

◆ Overlap() [2/2]

sizeextent Overlap ( const sizeextent inextent) const
inline

Definition at line 379 of file IndexUtil.H.

References sizeextent::ND(), and sizeextent::Sync().

Here is the call graph for this function:

◆ PrettyPrint()

◆ Protrude() [1/2]

int Protrude ( const sizeextent inExtent)
inline

Definition at line 406 of file IndexUtil.H.

References sizeextent::Sync().

Here is the call graph for this function:

◆ Protrude() [2/2]

int Protrude ( const ContainerType &  protrusionOffsets)
inline

Definition at line 475 of file IndexUtil.H.

References sizeextent::Sync().

Here is the call graph for this function:

◆ Protruded() [1/2]

sizeextent Protruded ( const sizeextent inExtent)
inline

Definition at line 450 of file IndexUtil.H.

References sizeextent::Copy(), and sizeextent::Sync().

Here is the call graph for this function:

◆ Protruded() [2/2]

sizeextent Protruded ( const ContainerType &  protrusionOffsets)
inline

Definition at line 602 of file IndexUtil.H.

References sizeextent::Copy(), and sizeextent::Sync().

Here is the call graph for this function:

◆ ProtrudeLimit()

int ProtrudeLimit ( const ContainerType &  inOffset,
const ContainerType &  inLimits 
)
inline

Definition at line 429 of file IndexUtil.H.

References sizeextent::Sync().

Here is the call graph for this function:

◆ RelativeTranslation() [1/2]

sizeextent RelativeTranslation ( const sizeextent inOrigin,
const sizeextent inDestination 
) const
inline

Definition at line 535 of file IndexUtil.H.

References sizeextent::Copy().

Referenced by euler::util::InitializeProtoY4Test1(), rhs< GridT, StateT, OperatorT >::SetDomainBCs(), and TestHoleDetection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RelativeTranslation() [2/2]

int RelativeTranslation ( const sizeextent inOrigin,
const sizeextent inDestination,
sizeextent returnExtent 
) const
inline

Definition at line 570 of file IndexUtil.H.

References sizeextent::Copy().

Here is the call graph for this function:

◆ Sizes()

std::vector<size_t> Sizes ( ) const
inline

Definition at line 217 of file IndexUtil.H.

Referenced by rhs< GridT, StateT, OperatorT >::HandleBoundaryConditions(), and TestHDF5HyperSlab().

Here is the caller graph for this function:

◆ Skewness()

int Skewness ( const sizeextent inExtent)
inline

Definition at line 688 of file IndexUtil.H.

References sizeextent::_nd.

◆ Starts()

std::vector<size_t> Starts ( ) const
inline

Definition at line 199 of file IndexUtil.H.

Referenced by TestHDF5HyperSlab().

Here is the caller graph for this function:

◆ Sync()

◆ Translate()

int Translate ( const ContainerType &  translationOffsets,
bool  reverseOffset = false 
)
inline

Definition at line 632 of file IndexUtil.H.

References sizeextent::_nd, and sizeextent::Sync().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  outStream,
const sizeextent sizeExtent 
)
friend

Definition at line 24 of file IndexUtil.C.

Referenced by sizeextent::NodeIndex().

◆ operator>>

std::istream& operator>> ( std::istream &  inStream,
sizeextent sizeExtent 
)
friend

Definition at line 35 of file IndexUtil.C.

Referenced by sizeextent::NodeIndex().

Member Data Documentation

◆ _N

std::vector<size_t> _N
private

Definition at line 28 of file IndexUtil.H.

Referenced by sizeextent::Copy().

◆ _nd

◆ _Np

std::vector<size_t> _Np
private

Definition at line 27 of file IndexUtil.H.

Referenced by sizeextent::Copy().


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