GEOSX
Functions
geos::siloFileUtilities Namespace Reference

Functions

template<typename OUTTYPE >
int DB_TYPE ()
 
template<typename TYPE >
int GetNumberOfVariablesInField ()
 
template<typename TYPE >
int GetTensorRank ()
 
template<typename OUTTYPE , typename TYPE >
OUTTYPE CastField (const TYPE &field, int const i=0)
 
template<>
real64 CastField (R1Tensor const &field, int const i)
 Specialization for R1Tensor. More...
 
template<>
int CastField< int, int > (const int &field, int const dummy)
 
template<>
long int CastField< long int, long int > (const long int &field, int const dummy)
 
template<>
int CastField< int, long int > (const long int &field, int const dummy)
 
template<>
long long int CastField< long long int, long long int > (const long long int &field, int const dummy)
 
template<>
int CastField< int, long long int > (const long long int &field, int const dummy)
 
template<>
real64 CastField< real64, real64 > (const real64 &field, int const dummy)
 
template<>
float CastField< float, real64 > (const real64 &field, int const dummy)
 
template<typename TYPE >
void SetVariableNames (string const &fieldName, string_array &varnamestring, char const *varnames[])
 

Detailed Description

Namespace to hold some utilities needed by the functions in SiloFile.

Function Documentation

◆ CastField() [1/2]

template<typename OUTTYPE , typename TYPE >
OUTTYPE geos::siloFileUtilities::CastField ( const TYPE &  field,
int const  i = 0 
)
Template Parameters
OUTTYPEthe type to cast to
TYPEthe type to cast from
Parameters
fieldthe value to cast
ithe component of the varaible to cast, assuming there is dimensionaliy to the variable
Returns
the casted value

◆ CastField() [2/2]

template<>
real64 geos::siloFileUtilities::CastField ( R1Tensor const &  field,
int const  i 
)
inline

Specialization for R1Tensor.

Parameters
fieldthe value to cast
ithe component of the variable to cast
Returns
the casted value

Definition at line 793 of file SiloFile.hpp.

◆ CastField< float, real64 >()

template<>
float geos::siloFileUtilities::CastField< float, real64 > ( const real64 field,
int const  dummy 
)
inline
Todo:
Verify: the TPL version of doxygen on CI cannot parse unnamed parameters, dummy parameter introduced to remove warning
Parameters
fieldthe value to cast
dummyunused parameter
Returns
the casted value

Definition at line 883 of file SiloFile.hpp.

◆ CastField< int, int >()

template<>
int geos::siloFileUtilities::CastField< int, int > ( const int &  field,
int const  dummy 
)
inline
Todo:
Verify: the TPL version of doxygen on CI cannot parse unnamed parameters, dummy parameter introduced to remove warning
Parameters
fieldthe value to cast
dummyunused parameter
Returns
the casted value

Definition at line 805 of file SiloFile.hpp.

◆ CastField< int, long int >()

template<>
int geos::siloFileUtilities::CastField< int, long int > ( const long int &  field,
int const  dummy 
)
inline
Todo:
Verify: the TPL version of doxygen on CI cannot parse unnamed parameters, dummy parameter introduced to remove warning
Parameters
fieldthe value to cast
dummyunused parameter
Returns
the casted value

Definition at line 831 of file SiloFile.hpp.

◆ CastField< int, long long int >()

template<>
int geos::siloFileUtilities::CastField< int, long long int > ( const long long int &  field,
int const  dummy 
)
inline
Todo:
Verify: the TPL version of doxygen on CI cannot parse unnamed parameters, dummy parameter introduced to remove warning
Parameters
fieldthe value to cast
dummyunused parameter
Returns
the casted value

Definition at line 857 of file SiloFile.hpp.

◆ CastField< long int, long int >()

template<>
long int geos::siloFileUtilities::CastField< long int, long int > ( const long int &  field,
int const  dummy 
)
inline
Todo:
Verify: the TPL version of doxygen on CI cannot parse unnamed parameters, dummy parameter introduced to remove warning
Parameters
fieldthe value to cast
dummyunused parameter
Returns
the casted value

Definition at line 818 of file SiloFile.hpp.

◆ CastField< long long int, long long int >()

template<>
long long int geos::siloFileUtilities::CastField< long long int, long long int > ( const long long int &  field,
int const  dummy 
)
inline
Todo:
Verify: the TPL version of doxygen on CI cannot parse unnamed parameters, dummy parameter introduced to remove warning
Parameters
fieldthe value to cast
dummyunused parameter
Returns
the casted value

Definition at line 844 of file SiloFile.hpp.

◆ CastField< real64, real64 >()

template<>
real64 geos::siloFileUtilities::CastField< real64, real64 > ( const real64 field,
int const  dummy 
)
inline
Todo:
Verify: the TPL version of doxygen on CI cannot parse unnamed parameters, dummy parameter introduced to remove warning
Parameters
fieldthe value to cast
dummyunused parameter
Returns
the casted value

Definition at line 870 of file SiloFile.hpp.

◆ DB_TYPE()

template<typename OUTTYPE >
int geos::siloFileUtilities::DB_TYPE ( )
Template Parameters
OUTTYPEthe type of data to write out (int,float,real64)
Returns
the integer identifier associated with the enum DBdatatype defined in the silo.h file.

This templated function is a "specialization only" definition. There is no general definition, only specializations for predetermined data types.

◆ GetNumberOfVariablesInField()

template<typename TYPE >
int geos::siloFileUtilities::GetNumberOfVariablesInField ( )
Template Parameters
TYPEthe data type in question
Returns
the number of "variables" in a data field. For instance, 1 for a int, float or real64. 1 for a scalar 3 for a R1Tensor...etc.

◆ GetTensorRank()

template<typename TYPE >
int geos::siloFileUtilities::GetTensorRank ( )
Template Parameters
TYPEthe data type in question
Returns
the silo DB_VARTYPE specifier that describes the rank of the variable.

◆ SetVariableNames()

template<typename TYPE >
void geos::siloFileUtilities::SetVariableNames ( string const &  fieldName,
string_array varnamestring,
char const *  varnames[] 
)
Template Parameters
thetype of the field
Parameters
fieldNamethe name of the field
varnamestringan array of strings that hold the generated names
varnamesa pointer to each of the strings that hold the generated names

This function sets variable names for a field. In some cases, this will just fill varnamestring with the input variable, and in other cases such as in the case of a tensor, the names will have a suffix with the component of the tensor.