PlasCom2  1.0
XPACC Multi-physics simluation application
plascom2::util Namespace Reference

Classes

struct  legacybc
 

Functions

std::ostream & operator<< (std::ostream &outStream, const legacybc &bcDat)
 
std::istream & operator>> (std::istream &inStream, legacybc &bcDat)
 
bool operator== (const legacybc &lhs, const legacybc &rhs)
 
bool operator!= (const legacybc &lhs, const legacybc &rhs)
 
int ReadLegacyBCDat (const std::string &bcFileName, std::vector< legacybc > &bcDat, fixtures::CommunicatorType &inCommunicator, std::ostream &messageStream)
 
int ConvertLegacyConfiguration (fixtures::ConfigurationType &inConfig, fixtures::CommunicatorType &inCommunicator, std::ostream &messageStream)
 
int PC2Compare (const std::string &redFileName, const std::string &blueFileName, double errTolerance, std::ostream &outStream)
 Read two HDF5 files and compare the state data therein. More...
 
template<typename GridType >
int ConfigureGridSubRegions (const fixtures::ConfigurationType &inConfig, const std::string &gridName, GridType &inGrid, std::ostream &messageStream)
 
template<typename GridType >
int ConfigureGrid (const fixtures::ConfigurationType &inConfig, const std::string &gridName, GridType &inGrid, std::ostream &messageStream)
 
int ConfigureGridInfo (const fixtures::ConfigurationType &inConfig, const std::string &gridName, simulation::geometry::gridinfo &gridInfo, std::ostream &messageStream)
 
int ConfigureVirtualNode (const fixtures::ConfigurationType &inConfig, fixtures::CommunicatorType &inCommunicator, pcpp::VirtualNodeType &virtualNode, std::ostream &messageStream)
 
int SplitDomains (const fixtures::ConfigurationType &inConfig, fixtures::CommunicatorType &inCommunicator, application_t::DomainInfoType &domainPartitionInfo, std::vector< application_t::DomainBaseType > &localDomains, std::ostream &messageStream)
 Parititon domains among processors. More...
 
int ConfigurePlatformInfo (const fixtures::ConfigurationType &inConfig, pcpp::PlatformInfoType &platformInfo)
 
int SymmetricElementID (int numDim, int i, int j)
 

Function Documentation

◆ ConfigureGrid()

int plascom2::util::ConfigureGrid ( const fixtures::ConfigurationType inConfig,
const std::string &  gridName,
GridType &  inGrid,
std::ostream &  messageStream 
)

◆ ConfigureGridInfo()

◆ ConfigureGridSubRegions()

int plascom2::util::ConfigureGridSubRegions ( const fixtures::ConfigurationType inConfig,
const std::string &  gridName,
GridType &  inGrid,
std::ostream &  messageStream 
)

Definition at line 43 of file PC2Util.H.

References pcpp::util::ConfigKey(), Parameters::GetValue(), Parameters::GetValueVector(), gridSizes, and simulation::grid::InitSubRegionFromString().

Referenced by ConfigureGrid().

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

◆ ConfigurePlatformInfo()

int plascom2::util::ConfigurePlatformInfo ( const fixtures::ConfigurationType inConfig,
pcpp::PlatformInfoType platformInfo 
)

Definition at line 165 of file PC2Configuration.C.

◆ ConfigureVirtualNode()

◆ ConvertLegacyConfiguration()

◆ operator!=()

bool operator!= ( const legacybc lhs,
const legacybc rhs 
)

Definition at line 389 of file PC2Util.C.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  outStream,
const legacybc bcDat 
)

Definition at line 393 of file PC2Util.C.

References legacybc::bcDir, legacybc::bcInterval, legacybc::bcType, and legacybc::gridID.

◆ operator==()

bool operator== ( const legacybc lhs,
const legacybc rhs 
)

Definition at line 378 of file PC2Util.C.

References legacybc::bcDir, legacybc::bcInterval, legacybc::bcType, and legacybc::gridID.

◆ operator>>()

std::istream & operator>> ( std::istream &  inStream,
legacybc bcDat 
)

Definition at line 402 of file PC2Util.C.

References legacybc::bcDir, legacybc::bcInterval, legacybc::bcType, and legacybc::gridID.

◆ PC2Compare()

int PC2Compare ( const std::string &  redFileName,
const std::string &  blueFileName,
double  errTolerance,
std::ostream &  outStream 
)

Read two HDF5 files and compare the state data therein.

Definition at line 30 of file PC2Util.C.

References pcpp::io::Compatible(), simulation::state::ConvertLegacyState(), parallel_blockstructured::CoordinateData(), pcpp::util::ErrorMetrics(), pcpp::io::hdf5::FileInfo(), simfileinfo::fileName, simfileinfo::formatBits, dataset::GetDataIndex(), simfileinfo::gridNumDimensions, pcpp::io::HASGRID, pcpp::io::HASSTATE, pcpp::io::ISLEGACY, dataset::Meta(), simfileinfo::numGrids, numPoints, numScalars, plascom2::io::hdf5::ReadSingle(), ix::util::RenewStream(), base::Report(), base::SetStateFields(), pcpp::report::SimFileInfo(), and euler::util::ValidateState().

Referenced by main(), TestIntegrated_PFCurvilinear2DX(), TestIntegrated_PFCurvilinear2DY(), TestIntegrated_PFCurvilinear3DZ(), TestIntegrated_PFRectilinear2DX(), TestIntegrated_PFRectilinear2DY(), TestIntegrated_PFRectilinear3DZ(), TestIntegrated_Poiseuille2DX(), TestIntegrated_Poiseuille2DY(), TestIntegrated_Poiseuille3DZ(), TestIntegrated_Scalar_Advection3DZ(), TestIntegrated_ViscousShock2DX(), TestIntegrated_ViscousShock2DY(), TestIntegrated_ViscousShock3DZ(), TestIntegrated_VSCurvilinear2DX(), TestIntegrated_VSCurvilinear2DY(), TestIntegrated_VSCurvilinear3DZ(), TestIntegrated_VSRectilinear2DX(), TestIntegrated_VSRectilinear2DY(), TestIntegrated_VSRectilinear3DZ(), TestPlasCom2_AcousticPulseFarfield2D(), TestPlasCom2_AcousticPulseFarfield3D(), TestPlasCom2_AcousticPulsePeriodic2D(), TestPlasCom2_AcousticPulsePeriodic3D(), TestPlasCom2_AcousticPulseSlipwall2D(), TestPlasCom2_AcousticPulseSlipwall3D(), TestPlasCom2_AcousticPulseSponge2D(), TestPlasCom2_AcousticPulseSponge3D(), TestPlasCom2_APCurvilinearFarfield2D(), TestPlasCom2_APCurvilinearFarfield3D(), TestPlasCom2_APCurvilinearPeriodic2D(), TestPlasCom2_APCurvilinearPeriodic3D(), TestPlasCom2_APCurvilinearSlipwall2D(), TestPlasCom2_APCurvilinearSlipwall3D(), TestPlasCom2_APCurvilinearSponge2D(), TestPlasCom2_APCurvilinearSponge3D(), TestPlasCom2_APRectilinearFarfield2D(), TestPlasCom2_APRectilinearFarfield3D(), TestPlasCom2_APRectilinearPeriodic2D(), TestPlasCom2_APRectilinearPeriodic3D(), TestPlasCom2_APRectilinearSlipwall2D(), TestPlasCom2_APRectilinearSlipwall3D(), TestPlasCom2_APRectilinearSponge2D(), TestPlasCom2_APRectilinearSponge3D(), TestPlasCom2_PFCurvilinear2DX_Regression(), TestPlasCom2_PFCurvilinear2DY_Regression(), TestPlasCom2_PFCurvilinear3DZ_Regression(), TestPlasCom2_PFRectilinear2DX_Regression(), TestPlasCom2_PFRectilinear2DY_Regression(), TestPlasCom2_PFRectilinear3DZ_Regression(), TestPlasCom2_Poiseuille2DX_Regression(), TestPlasCom2_Poiseuille2DY_Regression(), TestPlasCom2_Poiseuille3DZ_Regression(), TestPlasCom2_Restart(), TestPlasCom2_Scalar_Advection2DX(), TestPlasCom2_Scalar_Advection2DY(), TestPlasCom2_Scalar_AdvectionDiffusion2DX(), TestPlasCom2_Scalar_AdvectionDiffusion2DY(), TestPlasCom2_ViscousShock2DX_Regression(), TestPlasCom2_ViscousShock2DY_Regression(), TestPlasCom2_ViscousShock3DZ_Regression(), TestPlasCom2_VSCurvilinear2DX_Regression(), TestPlasCom2_VSCurvilinear2DY_Regression(), TestPlasCom2_VSCurvilinear3DZ_Regression(), TestPlasCom2_VSRectilinear2DX_Regression(), TestPlasCom2_VSRectilinear2DY_Regression(), and TestPlasCom2_VSRectilinear3DZ_Regression().

Here is the call graph for this function:

◆ ReadLegacyBCDat()

int ReadLegacyBCDat ( const std::string &  bcFileName,
std::vector< legacybc > &  bcDat,
fixtures::CommunicatorType inCommunicator,
std::ostream &  messageStream 
)

Definition at line 411 of file PC2Util.C.

References CommunicatorObject::BroadCast(), CommunicatorObject::Check(), CommunicatorObject::Rank(), CommunicatorObject::SetErr(), and x.

Referenced by ConvertLegacyConfiguration(), and TestPlasCom2Input().

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

◆ SplitDomains()

int plascom2::util::SplitDomains ( const fixtures::ConfigurationType inConfig,
fixtures::CommunicatorType inCommunicator,
application_t::DomainInfoType domainPartitionInfo,
std::vector< application_t::DomainBaseType > &  localDomains,
std::ostream &  messageStream 
)

Parititon domains among processors.

SplitDomains partitions the simulation domains among the processors in the simulation, the domain partition info is updated to reflect the number of process-local domains, along with their global index. The domains vector is resized to the number of local domains, and each domain's communicator is set as a domain-specific communicator.

Parameters
inConfigThe input configuration object
inCommunicatorThe input communicator to split
domainPartitionInfoInputs the number of total domains to split, and their names Outputs the number of local domains and their global index
localDomainsOutput the actual local domain objects
messageStreamOutput stream for any status messages
Note
Returns an error if there are no domains, or if the number of domains names does not match the number of domains.
The default is to split the domains equally (i.e. each domain gets an equal number of processors) Other policies can (potentially) be set and parsed using the configuration object.
Todo:
Add domain splitting policies, granularities, and mechanisms for domain-specific policies for more complex domain handling. (e.g. split map)

Definition at line 98 of file PC2Configuration.C.

References info::domainNames, info::globalDomainIndex, info::numDomains, info::numLocalDomains, CommunicatorObject::Rank(), CommunicatorObject::Size(), and CommunicatorObject::Split().

Referenced by application::ConfigureDomains().

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

◆ SymmetricElementID()

int plascom2::util::SymmetricElementID ( int  numDim,
int  i,
int  j 
)
inline

Definition at line 13 of file PC2Util.C.