Opm::DamarisOutput Namespace Reference

Classes

struct  DamarisSettings
 
class  DamarisVar
 
class  DamarisVarXMLAttributes
 

Functions

int endIteration (int rank)
 
int setParameter (const char *field, int rank, int value)
 
int setPosition (const char *field, int rank, int64_t pos)
 
int write (const char *field, int rank, const void *data)
 
int setupWritingPars (Parallel::Communication comm, const int n_elements_local_grid, std::vector< unsigned long long > &elements_rank_offsets)
 
bool FileExists (const std::string &filename_in, const Parallel::Communication &comm)
 
template<class TypeTag >
std::map< std::string, std::string > getDamarisKeywords (const Parallel::Communication &comm, const std::string &OutputDir)
 
std::string initDamarisXmlFile ()
 
void initializeDamaris (const Parallel::Communication comm, const int mpiRank, const std::map< std::string, std::string > &find_replace_map)
 

Function Documentation

◆ endIteration()

int Opm::DamarisOutput::endIteration ( int  rank)

◆ FileExists()

bool Opm::DamarisOutput::FileExists ( const std::string &  filename_in,
const Parallel::Communication comm 
)

Returns true if the file exists. Tests to see if filename string is empty or the "#" character and if so returns false. Tests for file existance on rank 0 and passes result via MPI to all other ranks.

◆ getDamarisKeywords()

template<class TypeTag >
std::map< std::string, std::string > Opm::DamarisOutput::getDamarisKeywords ( const Parallel::Communication comm,
const std::string &  OutputDir 
)

Creates the map of search strings and repacement strings that will be used to modify a templated Damaris XML file which will be used to intialize Damaris. This function will access all the OPM flow comand line arguments related to Damaris and perform checks and logic so as to create a valid XML file. N.B. The created XML file can be overridden using an environment variable FLOW_DAMARIS_XML_FILE that points to a Damaris XML file.

References Opm::DamarisOutput::DamarisSettings::damarisDaskFile_, Opm::DamarisOutput::DamarisSettings::damarisLogLevel_, Opm::DamarisOutput::DamarisSettings::damarisSimName_, Opm::DamarisOutput::DamarisSettings::enableDamarisOutputCollective_, Opm::DamarisOutput::DamarisSettings::getKeywords(), Opm::DamarisOutput::DamarisSettings::nDamarisCores_, Opm::DamarisOutput::DamarisSettings::nDamarisNodes_, Opm::DamarisOutput::DamarisSettings::paraviewPythonFilename_, Opm::DamarisOutput::DamarisSettings::pythonFilename_, Opm::DamarisOutput::DamarisSettings::saveMeshToHDF5_, Opm::DamarisOutput::DamarisSettings::saveToDamarisHDF5_, Opm::DamarisOutput::DamarisSettings::shmemName_, and Opm::DamarisOutput::DamarisSettings::shmemSizeBytes_.

◆ initDamarisXmlFile()

std::string Opm::DamarisOutput::initDamarisXmlFile ( )

◆ initializeDamaris()

void Opm::DamarisOutput::initializeDamaris ( const Parallel::Communication  comm,
const int  mpiRank,
const std::map< std::string, std::string > &  find_replace_map 
)

Initialize Damaris by either: 1/ Filling in a templated XML file and storing it in the chosen directory (output directory) 2/ Reading a file specified by the environment variable FLOW_DAMARIS_XML_FILE

◆ setParameter()

int Opm::DamarisOutput::setParameter ( const char *  field,
int  rank,
int  value 
)

◆ setPosition()

int Opm::DamarisOutput::setPosition ( const char *  field,
int  rank,
int64_t  pos 
)

◆ setupWritingPars()

int Opm::DamarisOutput::setupWritingPars ( Parallel::Communication  comm,
const int  n_elements_local_grid,
std::vector< unsigned long long > &  elements_rank_offsets 
)

◆ write()

int Opm::DamarisOutput::write ( const char *  field,
int  rank,
const void *  data 
)