PhyStar  v0.0.0 thu24
fileio::FluidCartRegularD< N_dim, FT > Class Template Reference

fluid io for cartesian coordinates, double percision More...

#include <FluidIO.hpp>

Collaboration diagram for fileio::FluidCartRegularD< N_dim, FT >:

Public Member Functions

 FluidCartRegularD ()
 Construct a new Fluid Cart Regular D object. More...
 
 ~FluidCartRegularD ()
 Destroy the Fluid Cart Regular D object. More...
 
auto & SetMeshc (const int dim, const int N, const double meshc[])
 Set the Mesh [center] object. More...
 
auto & SetMeshf (int dim, int N, const double meshf[])
 Set the Mesh [face] object. More...
 
auto & SetGhostMesh (std::vector< int > gh_down, std::vector< int > gh_up={})
 Set the Ghost Mesh object if gh_up={}, it means that gh_down and gh_up have the same size of ghost mesh if the size of gh_down n is below N_dim, the size of ghost mesh of gh_down[n] and gh_down[n+1]...gh_down[N_dim-1] should equal to gh_down[n-1];. More...
 
auto & SetGhostMesh (std::vector< std::vector< int >> gh)
 
auto & SetGhostMesh (int gh_down, int gh_up=-1)
 Set the Ghost Mesh object if only input gh_down, it means that gh_up=gh_down. More...
 
auto & SetDomain (std::vector< double > domain_down, std::vector< double > domain_up)
 Set the compuational Domain object if the size of domain_down/up n is below N_dim, the value of domain_down/up[n] ,[n+1]should equal to domain_down/up[n-1];. More...
 
auto & SetDomain (std::vector< std::vector< double >> domain)
 
auto & SetFileAttr (std::string name, std::string val)
 Set the File Attributes object not to create attribute, just set the standard attribute to the buffer in current object. More...
 
auto & SetFileAttr (std::string name, double val)
 Set the File Attributes object not to create attribute, just set the standard attribute to the buffer in current object. More...
 
void Print ()
 Print the abstract of the current file attributes. More...
 
auto CreateFile (const int istep, const std::string ftype)
 Create a hdf5 File. More...
 
void CloseFile ()
 Close opened hdf5 file. More...
 
auto & AddAttributeTo (const FluidGroup &group, const std::string attrname, const std::string str)
 add extra attribute to different groups [string] More...
 
auto & AddAttributeTo (const FluidGroup &group, const std::string attrname, const int intdata[], const int n)
 add extra attribute to different groups [int array] More...
 
auto & AddAttributeTo (const FluidGroup &group, const std::string attrname, const double data[], const int n)
 add extra attribute to different groups [double array] More...
 
auto & AddAttributeTo (const FluidGroup &group, const std::string attrname, const int intdata)
 add extra attribute to different groups [int] More...
 
auto & AddAttributeTo (const FluidGroup &group, const std::string attrname, const double data)
 add extra attribute to different groups [double] More...
 
auto & AddDataSetTo (const FluidGroup &group, const std::string dataname, const int intdata[], const int n0)
 add dataset to different groups [int array] one dimension More...
 
auto & AddDataSetTo (const FluidGroup &group, const std::string dataname, const int intdata[], const int n0, const int n1)
 add dataset to different groups [int array] two dimension More...
 
auto & AddDataSetTo (const FluidGroup &group, const std::string dataname, const int intdata[], const int n0, const int n1, const int n2)
 add dataset to different groups [int array] three dimension More...
 
auto & AddDataSetTo (const FluidGroup &group, const std::string dataname, const double data[], const int n0)
 add dataset to different groups [double array] one dimension More...
 
auto & AddDataSetTo (const FluidGroup &group, const std::string dataname, const double data[], const int n0, const int n1)
 add dataset to different groups [double array] two dimension More...
 
auto & AddDataSetTo (const FluidGroup &group, const std::string dataname, const double data[], const int n0, const int n1, const int n2)
 add dataset to different groups [double array] three dimension More...
 
auto & AddDataSetCplxTo (const FluidGroup &group, const std::string dataname, const std::complex< double > data[], const int n0, const int n1)
 
auto & AddField (const std::string fieldname, const double data[], const std::vector< int > shape, const std::vector< int > gridflag, const std::vector< int > shapetotal)
 add Field to Field group for mpi version, but it also supports serial version More...
 
auto & AddFieldWithoutGhost (const std::string &fieldname, const double data[], const std::vector< int > &shape, const std::vector< int > &gridflag, const std::vector< int > &shapetotal)
 
auto & AddFieldDefault (const std::string &fieldname, const double data[], const std::vector< int > &shape, const std::vector< int > &gridflag, const std::vector< int > &shapetotal)
 
auto & AddCplxField (const std::string fieldname, const std::complex< double > data[], const std::vector< int > shape, const std::vector< int > gridflag, const std::vector< int > shapetotal)
 
auto & AddCplxFieldWithoutGhost (const std::string &fieldname, const std::complex< double > data[], const std::vector< int > &shape, const std::vector< int > &gridflag, const std::vector< int > &shapetotal)
 
auto & AddCplxFieldDefault (const std::string &fieldname, const std::complex< double > data[], const std::vector< int > &shape, const std::vector< int > &gridflag, const std::vector< int > &shapetotal)
 
auto & AddField (const std::string fieldname, double data[], std::vector< int > shape, std::vector< int > gridflag)
 add Field to Field group only support serial version More...
 
auto & AddCplxField (const std::string fieldname, std::complex< double > data[], std::vector< int > shape, std::vector< int > gridflag)
 
void CalOffset (const std::vector< int > &shape, const std::vector< int > &gridflag, hsize_t offset[])
 calculate offset for writing data by mpi More...
 
void MemSlice (const auto *in, auto *out, const int shape[], hsize_t offset[], hsize_t count[])
 
auto OpenFile (const int istep, const std::string ftype)
 Open a existed file. More...
 
auto & ReadAttributeFrom (const FluidGroup &group, const std::string attrname, std::string &str)
 Read attribute from different groups[string]. More...
 
auto & ReadAttributeFrom (const FluidGroup &group, const std::string attrname, int intdata[])
 Read attribute from different groups [int array]. More...
 
auto & ReadAttributeFrom (const FluidGroup &group, const std::string attrname, double data[])
 Read attribute from different groups [double array]. More...
 
auto & ReadDataSetFrom (const FluidGroup &group, const std::string dataname, int intdata[])
 Read dataset from different groups [int array]. More...
 
auto & ReadDataSetFrom (const FluidGroup &group, const std::string dataname, double data[])
 Read dataset from different groups [double array]. More...
 
auto & ReadField (const std::string fieldname, double data[], std::vector< int > shape, std::vector< int > gridflag, const std::vector< int > shapetotal)
 Read field from Field group for mpi verison, but it also supports serial version. More...
 
auto & ReadFieldWithoutGhost (const std::string &fieldname, double data[], const std::vector< int > &shape, const std::vector< int > &gridflag, const std::vector< int > &shapetotal)
 
auto & ReadFieldDefault (const std::string &fieldname, double data[], const std::vector< int > &shape, const std::vector< int > &gridflag, const std::vector< int > &shapetotal)
 
auto & ReadCplxField (const std::string fieldname, std::complex< double > data[], std::vector< int > shape, std::vector< int > gridflag, const std::vector< int > shapetotal)
 
auto & ReadCplxFieldWithoutGhost (const std::string &fieldname, std::complex< double > data[], const std::vector< int > &shape, const std::vector< int > &gridflag, const std::vector< int > &shapetotal)
 
auto & ReadCplxFieldDefault (const std::string &fieldname, std::complex< double > data[], const std::vector< int > &shape, const std::vector< int > &gridflag, const std::vector< int > &shapetotal)
 
auto & ReadField (const std::string fieldname, double data[], std::vector< int > shape, std::vector< int > gridflag)
 Read field from Field group only support serial verison. More...
 
auto & ReadCplxField (const std::string fieldname, std::complex< double > data[], std::vector< int > shape, std::vector< int > gridflag)
 

Static Public Member Functions

static void AllocateBuffer (const int &maxlength)
 
static void DeallocateBuffer ()
 

Public Attributes

hid_t fileid
 handles of HDF5 More...
 
hid_t filepropid
 
hid_t dataspaceid
 
hid_t physparaid
 
hid_t otherinfoid
 
hid_t fieldid
 

Private Attributes

const int _dim = N_dim
 
std::string _casename = "default"
 
std::string _space = "physical"
 
std::string _filestyle = "onestep"
 
std::string _storagestyle = "c-style"
 
std::string _dataspacestyle = "cartregular"
 
std::string _filepath = "./"
 
std::string _filenameprefix = "fluidfield"
 
int _meshnumc [N_dim] = {0}
 
int _meshnumf [N_dim] = {0}
 
int _gh_down [N_dim] = {0}
 
int _gh_up [N_dim] = {0}
 
double * _ptr_meshc [N_dim]
 
double * _ptr_meshf [N_dim]
 
int _numbernamelength = 7
 
double _domain_down [N_dim] = {0}
 
double _domain_up [N_dim] = {0}
 
double _visc0 = 0.
 
double _rho0 = 0.
 
int _mpi_coord [N_dim]
 
int _mpi_proc [N_dim]
 

Static Private Attributes

static double * _rtemp = nullptr
 
static std::complex< double > * _ctemp = nullptr
 
static int _maxlength = 0
 

Detailed Description

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
class fileio::FluidCartRegularD< N_dim, FT >

fluid io for cartesian coordinates, double percision

Constructor & Destructor Documentation

◆ FluidCartRegularD()

◆ ~FluidCartRegularD()

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
fileio::FluidCartRegularD< N_dim, FT >::~FluidCartRegularD ( )
inline

Member Function Documentation

◆ AddAttributeTo() [1/5]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddAttributeTo ( const FluidGroup group,
const std::string  attrname,
const double  data 
)

add extra attribute to different groups [double]

Parameters
groupwhich group, an enum constant
attrnameattribute name
dataattribute, double
Returns
auto& *this

References fileio::AddAttribute(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

Here is the call graph for this function:

◆ AddAttributeTo() [2/5]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddAttributeTo ( const FluidGroup group,
const std::string  attrname,
const double  data[],
const int  n 
)

add extra attribute to different groups [double array]

Parameters
groupwhich group, an enum constant
attrnameattribute name
dataattribute, double array
nsize of double array
Returns
auto& *this

References fileio::AddAttribute(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

Here is the call graph for this function:

◆ AddAttributeTo() [3/5]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddAttributeTo ( const FluidGroup group,
const std::string  attrname,
const int  intdata 
)

add extra attribute to different groups [int]

Parameters
groupwhich group ,a enum constant
attrnameattribute name
intdataattribute,int
Returns
auto& *this

References fileio::AddAttribute(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

Here is the call graph for this function:

◆ AddAttributeTo() [4/5]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddAttributeTo ( const FluidGroup group,
const std::string  attrname,
const int  intdata[],
const int  n 
)

add extra attribute to different groups [int array]

Parameters
groupwhich group ,a enum constant
attrnameattribute name
intdataattribute,int array
nsize of int array
Returns
auto& *this

References fileio::AddAttribute(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

Here is the call graph for this function:

◆ AddAttributeTo() [5/5]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddAttributeTo ( const FluidGroup group,
const std::string  attrname,
const std::string  str 
)

add extra attribute to different groups [string]

Parameters
groupwhich group ,a enum constant
attrnameattribute name
strattribute val
Returns
auto& *this

References fileio::AddAttribute(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

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

◆ AddCplxField() [1/2]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddCplxField ( const std::string  fieldname,
const std::complex< double >  data[],
const std::vector< int >  shape,
const std::vector< int >  gridflag,
const std::vector< int >  shapetotal 
)

References fileio::WithoutGhost.

Here is the caller graph for this function:

◆ AddCplxField() [2/2]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::AddCplxField ( const std::string  fieldname,
std::complex< double >  data[],
std::vector< int >  shape,
std::vector< int >  gridflag 
)
inline

References fileio::FluidCartRegularD< N_dim, FT >::AddCplxField().

Here is the call graph for this function:

◆ AddCplxFieldDefault()

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddCplxFieldDefault ( const std::string &  fieldname,
const std::complex< double >  data[],
const std::vector< int > &  shape,
const std::vector< int > &  gridflag,
const std::vector< int > &  shapetotal 
)

References fileio::AddAttribute(), and fileio::DestroyCompound().

Here is the call graph for this function:

◆ AddCplxFieldWithoutGhost()

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddCplxFieldWithoutGhost ( const std::string &  fieldname,
const std::complex< double >  data[],
const std::vector< int > &  shape,
const std::vector< int > &  gridflag,
const std::vector< int > &  shapetotal 
)

References fileio::AddAttribute(), and fileio::DestroyCompound().

Here is the call graph for this function:

◆ AddDataSetCplxTo()

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddDataSetCplxTo ( const FluidGroup group,
const std::string  dataname,
const std::complex< double >  data[],
const int  n0,
const int  n1 
)

◆ AddDataSetTo() [1/6]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddDataSetTo ( const FluidGroup group,
const std::string  dataname,
const double  data[],
const int  n0 
)

add dataset to different groups [double array] one dimension

Parameters
groupwhich group, an enum constant
datanamedataset name
datadouble array
n0size of double array, 0-dimension
Returns
auto&

References fileio::AddDataSet(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

Here is the call graph for this function:

◆ AddDataSetTo() [2/6]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddDataSetTo ( const FluidGroup group,
const std::string  dataname,
const double  data[],
const int  n0,
const int  n1 
)

add dataset to different groups [double array] two dimension

Parameters
groupwhich group, an enum constant
datanamedataset name
datadouble array
n0size of double array, 0-dimension
n1size of double array, 1-dimension
Returns
auto&

References fileio::AddDataSet(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

Here is the call graph for this function:

◆ AddDataSetTo() [3/6]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddDataSetTo ( const FluidGroup group,
const std::string  dataname,
const double  data[],
const int  n0,
const int  n1,
const int  n2 
)

add dataset to different groups [double array] three dimension

Parameters
groupwhich group, an enum constant
datanamedataset name
datadouble array
n0size of int array, 0-dimension
n1size of int array, 1-dimension
n2size of int array, 2-dimension
Returns
auto& *this

References fileio::AddDataSet(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

Here is the call graph for this function:

◆ AddDataSetTo() [4/6]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddDataSetTo ( const FluidGroup group,
const std::string  dataname,
const int  intdata[],
const int  n0 
)

add dataset to different groups [int array] one dimension

Parameters
groupwhich group, an enum constant
datanamedataset name
intdataint array
n0size of int array, 0-dimension
Returns
auto& *this

References fileio::AddDataSet(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

Here is the call graph for this function:

◆ AddDataSetTo() [5/6]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddDataSetTo ( const FluidGroup group,
const std::string  dataname,
const int  intdata[],
const int  n0,
const int  n1 
)

add dataset to different groups [int array] two dimension

Parameters
groupwhich group, an enum constant
datanamedataset name
intdataint array
n0size of int array, 0-dimension
n1size of int array, 1-dimension
n2size of int array, 2-dimension
Returns
auto& *this

References fileio::AddDataSet(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

Here is the call graph for this function:

◆ AddDataSetTo() [6/6]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddDataSetTo ( const FluidGroup group,
const std::string  dataname,
const int  intdata[],
const int  n0,
const int  n1,
const int  n2 
)

add dataset to different groups [int array] three dimension

Parameters
groupwhich group, an enum constant
datanamedataset name
intdataint array
n0size of int array, 0-dimension
n1size of int array, 1-dimension
Returns
auto& *this

References fileio::AddDataSet(), fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, and fileio::kPhysPara.

Here is the call graph for this function:

◆ AddField() [1/2]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddField ( const std::string  fieldname,
const double  data[],
const std::vector< int >  shape,
const std::vector< int >  gridflag,
const std::vector< int >  shapetotal 
)

add Field to Field group for mpi version, but it also supports serial version

Parameters
fieldnamefield name
datadouble data
shapeshape of field at current proc
gridflaggrid flag (1,0,1),(F,c,F)
shapetotaltotal shape of field
Returns
auto& *this

References fileio::WithoutGhost.

Here is the caller graph for this function:

◆ AddField() [2/2]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::AddField ( const std::string  fieldname,
double  data[],
std::vector< int >  shape,
std::vector< int >  gridflag 
)
inline

add Field to Field group only support serial version

Parameters
fieldnamefield name
datadouble data
shapeshape of field at current proc
gridflaggrid flag (1,0,1),(F,c,F)
Returns
auto& *this

References fileio::FluidCartRegularD< N_dim, FT >::AddField().

Here is the call graph for this function:

◆ AddFieldDefault()

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddFieldDefault ( const std::string &  fieldname,
const double  data[],
const std::vector< int > &  shape,
const std::vector< int > &  gridflag,
const std::vector< int > &  shapetotal 
)

References fileio::AddAttribute().

Here is the call graph for this function:

◆ AddFieldWithoutGhost()

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::AddFieldWithoutGhost ( const std::string &  fieldname,
const double  data[],
const std::vector< int > &  shape,
const std::vector< int > &  gridflag,
const std::vector< int > &  shapetotal 
)

References fileio::AddAttribute().

Here is the call graph for this function:

◆ AllocateBuffer()

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
static void fileio::FluidCartRegularD< N_dim, FT >::AllocateBuffer ( const int &  maxlength)
inlinestatic

◆ CalOffset()

template<int N_dim, FileTag FT>
void fileio::FluidCartRegularD< N_dim, FT >::CalOffset ( const std::vector< int > &  shape,
const std::vector< int > &  gridflag,
hsize_t  offset[] 
)

calculate offset for writing data by mpi

Template Parameters
N_dim
FTFileTag
Parameters
shapearray size of the current block
gridflagcenter or face
offset

◆ CloseFile()

template<int N_dim, FileTag FT>
void fileio::FluidCartRegularD< N_dim, FT >::CloseFile

Close opened hdf5 file.

Here is the caller graph for this function:

◆ CreateFile()

template<int N_dim, FileTag FT>
auto fileio::FluidCartRegularD< N_dim, FT >::CreateFile ( const int  istep,
const std::string  ftype 
)

Create a hdf5 File.

Parameters
istepcomputation step
ftypeselect a file style, onestep/mid
Returns
auto id of opened file

References fileio::AddAttribute(), fileio::AddDataSet(), fileio::DataSpace(), fileio::Fields(), fileio::FileProps(), fileio::intTostr(), fileio::Others(), fileio::PhysParams(), and fileio::WithoutGhost.

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

◆ DeallocateBuffer()

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
static void fileio::FluidCartRegularD< N_dim, FT >::DeallocateBuffer ( )
inlinestatic

◆ MemSlice()

template<int N_dim, FileTag FT>
void fileio::FluidCartRegularD< N_dim, FT >::MemSlice ( const auto *  in,
auto *  out,
const int  shape[],
hsize_t  offset[],
hsize_t  count[] 
)

References fileio::WithoutGhost.

◆ OpenFile()

template<int N_dim, FileTag FT>
auto fileio::FluidCartRegularD< N_dim, FT >::OpenFile ( const int  istep,
const std::string  ftype 
)

Open a existed file.

Parameters
istepcomputational step
ftypefile style : onestep/mid
Returns
auto id of opened file

References fileio::DataSpace(), fileio::Fields(), fileio::FileProps(), fileio::intTostr(), fileio::kFileProp, fileio::kGeoMesh, fileio::kPhysPara, fileio::Others(), fileio::PhysParams(), and fileio::WithoutGhost.

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

◆ Print()

template<int N_dim, FileTag FT>
void fileio::FluidCartRegularD< N_dim, FT >::Print

Print the abstract of the current file attributes.

References fileio::intTostr().

Here is the call graph for this function:

◆ ReadAttributeFrom() [1/3]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadAttributeFrom ( const FluidGroup group,
const std::string  attrname,
double  data[] 
)

Read attribute from different groups [double array].

Parameters
[in]groupwhich group, an enum constant
[in]attrnameattribute name
[out]dataattribute value,double array
Returns
auto& *this

References fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, fileio::kPhysPara, and fileio::ReadAttribute().

Here is the call graph for this function:

◆ ReadAttributeFrom() [2/3]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadAttributeFrom ( const FluidGroup group,
const std::string  attrname,
int  intdata[] 
)

Read attribute from different groups [int array].

Parameters
[in]groupwhich group, an enum constant
[in]attrnameattribute name
[out]intdataattribute value,int array
Returns
auto& *this

References fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, fileio::kPhysPara, and fileio::ReadAttribute().

Here is the call graph for this function:

◆ ReadAttributeFrom() [3/3]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadAttributeFrom ( const FluidGroup group,
const std::string  attrname,
std::string &  str 
)

Read attribute from different groups[string].

Parameters
[in]groupwhich group, an enum constant
[in]attrnameattribute name
[out]strattribute value
Returns
auto& *this

References fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, fileio::kPhysPara, and fileio::ReadStringAttribute().

Here is the call graph for this function:

◆ ReadCplxField() [1/2]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::ReadCplxField ( const std::string  fieldname,
std::complex< double >  data[],
std::vector< int >  shape,
std::vector< int >  gridflag 
)
inline

References fileio::FluidCartRegularD< N_dim, FT >::ReadCplxField().

Here is the call graph for this function:

◆ ReadCplxField() [2/2]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadCplxField ( const std::string  fieldname,
std::complex< double >  data[],
std::vector< int >  shape,
std::vector< int >  gridflag,
const std::vector< int >  shapetotal 
)

References fileio::WithoutGhost.

Here is the caller graph for this function:

◆ ReadCplxFieldDefault()

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadCplxFieldDefault ( const std::string &  fieldname,
std::complex< double >  data[],
const std::vector< int > &  shape,
const std::vector< int > &  gridflag,
const std::vector< int > &  shapetotal 
)

References fileio::ReadAttribute().

Here is the call graph for this function:

◆ ReadCplxFieldWithoutGhost()

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadCplxFieldWithoutGhost ( const std::string &  fieldname,
std::complex< double >  data[],
const std::vector< int > &  shape,
const std::vector< int > &  gridflag,
const std::vector< int > &  shapetotal 
)

References fileio::ReadAttribute().

Here is the call graph for this function:

◆ ReadDataSetFrom() [1/2]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadDataSetFrom ( const FluidGroup group,
const std::string  dataname,
double  data[] 
)

Read dataset from different groups [double array].

Parameters
[in]groupwhich group, an enum constant
[in]datanameattribute name
[out]dataattribute value,int array
Returns
auto& *this

References fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, fileio::kPhysPara, and fileio::ReadDataSet().

Here is the call graph for this function:

◆ ReadDataSetFrom() [2/2]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadDataSetFrom ( const FluidGroup group,
const std::string  dataname,
int  intdata[] 
)

Read dataset from different groups [int array].

Parameters
[in]groupwhich group, an enum constant
[in]datanameattribute name
[out]intdataattribute value,int array
Returns
auto& *this

References fileio::kField, fileio::kFileProp, fileio::kGeoMesh, fileio::kOtherInfo, fileio::kPhysPara, and fileio::ReadDataSet().

Here is the call graph for this function:

◆ ReadField() [1/2]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::ReadField ( const std::string  fieldname,
double  data[],
std::vector< int >  shape,
std::vector< int >  gridflag 
)
inline

Read field from Field group only support serial verison.

Parameters
[in]fieldnamefield name
[out]datafield data
[in]shapeshape of field
[in]gridflaggrid flag, (1,0,1) means (Face,center,Face)
Returns
auto& *this

References fileio::FluidCartRegularD< N_dim, FT >::ReadField().

Here is the call graph for this function:

◆ ReadField() [2/2]

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadField ( const std::string  fieldname,
double  data[],
std::vector< int >  shape,
std::vector< int >  gridflag,
const std::vector< int >  shapetotal 
)

Read field from Field group for mpi verison, but it also supports serial version.

Parameters
[in]fieldnamefield name
[out]datafield data
[in]shapeshape of field
[in]gridflaggrid flag, (1,0,1) means (Face,center,Face)
Returns
auto& *this

References fileio::WithoutGhost.

Here is the caller graph for this function:

◆ ReadFieldDefault()

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadFieldDefault ( const std::string &  fieldname,
double  data[],
const std::vector< int > &  shape,
const std::vector< int > &  gridflag,
const std::vector< int > &  shapetotal 
)

References fileio::ReadAttribute().

Here is the call graph for this function:

◆ ReadFieldWithoutGhost()

template<int N_dim, FileTag FT>
auto & fileio::FluidCartRegularD< N_dim, FT >::ReadFieldWithoutGhost ( const std::string &  fieldname,
double  data[],
const std::vector< int > &  shape,
const std::vector< int > &  gridflag,
const std::vector< int > &  shapetotal 
)

References fileio::ReadAttribute().

Here is the call graph for this function:

◆ SetDomain() [1/2]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::SetDomain ( std::vector< double >  domain_down,
std::vector< double >  domain_up 
)
inline

Set the compuational Domain object if the size of domain_down/up n is below N_dim, the value of domain_down/up[n] ,[n+1]should equal to domain_down/up[n-1];.

Parameters
domain_downthe lower boundary of Domain
domain_upthe upper boundary of domain
Returns
auto& *this

References fileio::FluidCartRegularD< N_dim, FT >::_domain_down, and fileio::FluidCartRegularD< N_dim, FT >::_domain_up.

◆ SetDomain() [2/2]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::SetDomain ( std::vector< std::vector< double >>  domain)
inline

◆ SetFileAttr() [1/2]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::SetFileAttr ( std::string  name,
double  val 
)
inline

Set the File Attributes object not to create attribute, just set the standard attribute to the buffer in current object.

Parameters
nameattribute name
valattribute value
Returns
auto& *this

References fileio::FluidCartRegularD< N_dim, FT >::_rho0, fileio::FluidCartRegularD< N_dim, FT >::_visc0, and fileio::strToLower().

Here is the call graph for this function:

◆ SetFileAttr() [2/2]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::SetFileAttr ( std::string  name,
std::string  val 
)
inline

Set the File Attributes object not to create attribute, just set the standard attribute to the buffer in current object.

Parameters
nameattribute name
valattribute value
Returns
auto& *this

References fileio::FluidCartRegularD< N_dim, FT >::_casename, fileio::FluidCartRegularD< N_dim, FT >::_dataspacestyle, fileio::FluidCartRegularD< N_dim, FT >::_filenameprefix, fileio::FluidCartRegularD< N_dim, FT >::_filepath, fileio::FluidCartRegularD< N_dim, FT >::_filestyle, fileio::FluidCartRegularD< N_dim, FT >::_space, fileio::FluidCartRegularD< N_dim, FT >::_storagestyle, and fileio::strToLower().

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

◆ SetGhostMesh() [1/3]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::SetGhostMesh ( int  gh_down,
int  gh_up = -1 
)
inline

Set the Ghost Mesh object if only input gh_down, it means that gh_up=gh_down.

Parameters
gh_downghost mesh size of lower boudnary
gh_upghost mesh size of upper boudnary
Returns
auto& *this

References fileio::FluidCartRegularD< N_dim, FT >::_gh_down, and fileio::FluidCartRegularD< N_dim, FT >::_gh_up.

◆ SetGhostMesh() [2/3]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::SetGhostMesh ( std::vector< int >  gh_down,
std::vector< int >  gh_up = {} 
)
inline

Set the Ghost Mesh object if gh_up={}, it means that gh_down and gh_up have the same size of ghost mesh if the size of gh_down n is below N_dim, the size of ghost mesh of gh_down[n] and gh_down[n+1]...gh_down[N_dim-1] should equal to gh_down[n-1];.

Parameters
gh_downghost mesh size of lower boudnary
gh_upghost mesh size of upper boudnary
Returns
auto& *this
Here is the caller graph for this function:

◆ SetGhostMesh() [3/3]

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::SetGhostMesh ( std::vector< std::vector< int >>  gh)
inline

◆ SetMeshc()

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::SetMeshc ( const int  dim,
const int  N,
const double  meshc[] 
)
inline

Set the Mesh [center] object.

Parameters
dimwhich dimension/direction
Nsize of mesh
meshcmesh [center]
Returns
auto& *this

References fileio::FluidCartRegularD< N_dim, FT >::_meshnumc, and fileio::FluidCartRegularD< N_dim, FT >::_ptr_meshc.

Here is the caller graph for this function:

◆ SetMeshf()

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
auto& fileio::FluidCartRegularD< N_dim, FT >::SetMeshf ( int  dim,
int  N,
const double  meshf[] 
)
inline

Set the Mesh [face] object.

Parameters
dimwhich dimension/direction
Nsize of mesh
meshfmesh [face]
Returns
auto& *this

References fileio::FluidCartRegularD< N_dim, FT >::_meshnumf, and fileio::FluidCartRegularD< N_dim, FT >::_ptr_meshf.

Member Data Documentation

◆ _casename

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
std::string fileio::FluidCartRegularD< N_dim, FT >::_casename = "default"
private

◆ _ctemp

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
std::complex<double>* fileio::FluidCartRegularD< N_dim, FT >::_ctemp = nullptr
inlinestaticprivate

◆ _dataspacestyle

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
std::string fileio::FluidCartRegularD< N_dim, FT >::_dataspacestyle = "cartregular"
private

◆ _dim

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
const int fileio::FluidCartRegularD< N_dim, FT >::_dim = N_dim
private

◆ _domain_down

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
double fileio::FluidCartRegularD< N_dim, FT >::_domain_down[N_dim] = {0}
private

◆ _domain_up

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
double fileio::FluidCartRegularD< N_dim, FT >::_domain_up[N_dim] = {0}
private

◆ _filenameprefix

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
std::string fileio::FluidCartRegularD< N_dim, FT >::_filenameprefix = "fluidfield"
private

◆ _filepath

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
std::string fileio::FluidCartRegularD< N_dim, FT >::_filepath = "./"
private

◆ _filestyle

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
std::string fileio::FluidCartRegularD< N_dim, FT >::_filestyle = "onestep"
private

◆ _gh_down

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
int fileio::FluidCartRegularD< N_dim, FT >::_gh_down[N_dim] = {0}
private

◆ _gh_up

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
int fileio::FluidCartRegularD< N_dim, FT >::_gh_up[N_dim] = {0}
private

◆ _maxlength

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
int fileio::FluidCartRegularD< N_dim, FT >::_maxlength = 0
inlinestaticprivate

◆ _meshnumc

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
int fileio::FluidCartRegularD< N_dim, FT >::_meshnumc[N_dim] = {0}
private

◆ _meshnumf

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
int fileio::FluidCartRegularD< N_dim, FT >::_meshnumf[N_dim] = {0}
private

◆ _mpi_coord

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
int fileio::FluidCartRegularD< N_dim, FT >::_mpi_coord[N_dim]
private

◆ _mpi_proc

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
int fileio::FluidCartRegularD< N_dim, FT >::_mpi_proc[N_dim]
private

◆ _numbernamelength

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
int fileio::FluidCartRegularD< N_dim, FT >::_numbernamelength = 7
private

◆ _ptr_meshc

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
double* fileio::FluidCartRegularD< N_dim, FT >::_ptr_meshc[N_dim]
private

◆ _ptr_meshf

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
double* fileio::FluidCartRegularD< N_dim, FT >::_ptr_meshf[N_dim]
private

◆ _rho0

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
double fileio::FluidCartRegularD< N_dim, FT >::_rho0 = 0.
private

◆ _rtemp

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
double* fileio::FluidCartRegularD< N_dim, FT >::_rtemp = nullptr
inlinestaticprivate

◆ _space

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
std::string fileio::FluidCartRegularD< N_dim, FT >::_space = "physical"
private

◆ _storagestyle

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
std::string fileio::FluidCartRegularD< N_dim, FT >::_storagestyle = "c-style"
private

◆ _visc0

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
double fileio::FluidCartRegularD< N_dim, FT >::_visc0 = 0.
private

◆ dataspaceid

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
hid_t fileio::FluidCartRegularD< N_dim, FT >::dataspaceid

◆ fieldid

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
hid_t fileio::FluidCartRegularD< N_dim, FT >::fieldid

◆ fileid

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
hid_t fileio::FluidCartRegularD< N_dim, FT >::fileid

handles of HDF5

◆ filepropid

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
hid_t fileio::FluidCartRegularD< N_dim, FT >::filepropid

◆ otherinfoid

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
hid_t fileio::FluidCartRegularD< N_dim, FT >::otherinfoid

◆ physparaid

template<int N_dim, FileTag FT = FileTag::WithoutGhost>
hid_t fileio::FluidCartRegularD< N_dim, FT >::physparaid

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