Loading...
Searching...
No Matches
Opm::DamarisOutput Namespace Reference

Below are the Damaris Keywords supported by Damaris to be filled in the built-in XML file. More...

## Classes

struct | DamarisSettings
class | DamarisVarXMLAttributes
| This class contains the extra elements that need to be part of a Damaris <variable> type. More...
class | DamarisVar
| class to store a Damaris variable representation for the XML file (can be used with class DamarisKeywords). More...

## Functions

int | setPosition (const char *field, int64_t pos)
int | setParameter (const char *field, int value)
int | write (const char *field, const void *data)
int | endIteration ()
int | setupWritingPars (Parallel::Communication comm, const int n_elements_local_grid, std::vector< unsigned long long > &elements_rank_offsets)
void | handleError (const int dam_err, Parallel::Communication comm, const std::string &message)
bool | FileExists (const std::string &filename_in, const Parallel::Communication &comm)
| Returns true if the file exists.
std::map< std::string, std::string > | 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.
std::unordered_set< std::string > | getSetOfIncludedVariables ()
std::string | initDamarisXmlFile ()
void | initializeDamaris (const Parallel::Communication comm, const int mpiRank, const std::map< std::string, std::string > &find_replace_map)
| Initialize Damaris by either reading a file specified by the environment variable FLOW_DAMARIS_XML_FILE or by filling in the XML file and storing it in the chosen directory.

## Detailed Description

Below are the Damaris Keywords supported by Damaris to be filled in the built-in XML file.

The entries in the map below will be filled by the corresponding Damaris Keywords.

The command line arguments are defined in opm/simulators/flow/DamarisWriter.hpp and defaults are set in opm/simulators/flow/FlowProblemProperties.hpp

## Function Documentation

## 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()

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.

N.B. This needs to be called before damaris_init()

## 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 reading a file specified by the environment variable FLOW_DAMARIS_XML_FILE or by filling in the XML file and storing it in the chosen directory.

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.