fluid io for cartesian coordinates, double percision More...
#include <FluidIOnew.hpp>

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... | |
| void | CreateFile (const int istep, const std::string ftype) |
| Create a hdf5 File. More... | |
| void | CloseFile () |
| Close opened hdf5 file. More... | |
| void | OpenFile (const int istep, const std::string ftype) |
| add extra attribute to different groups [string] More... | |
| auto & | AddAttributeTo (const std::string &grouppath, const std::string attrname, const std::string str) |
| auto & | AddAttributeTo (const std::string &grouppath, const std::string attrname, const int in) |
| template<typename T > | |
| auto & | AddDataSetTo (const std::string &grouppath, const std::string dataname, const T indata[], const std::vector< size_t > dims) |
| void | CalOffset (const std::vector< int > &shape, const std::vector< int > &gridflag, std::vector< hsize_t > &offset) |
| void | MemSlice (const auto *in, auto *out, const std::vector< int > &shape, const std::vector< hsize_t > &offset, const std::vector< hsize_t > &count) |
| void | MemExtend (const auto *in, auto *out, const std::vector< int > &shape, const std::vector< hsize_t > &offset, const std::vector< hsize_t > &count) |
| auto & | AddField (const std::string fieldname, const 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[], 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... | |
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 | geomeshid |
| hid_t | physparaid |
| hid_t | otherinfoid |
| hid_t | fieldid |
Private Attributes | |
| const int | _dim = N_dim |
| h5::FileAccessProps | _fapl |
| std::string | _casename = "default" |
| std::string | _space = "physical" |
| std::string | _filestyle = "onestep" |
| std::string | _storagestyle = "cartregular" |
| std::string | _dataspacestyle = "c-style" |
| std::string | _filepath = "./" |
| std::string | _filenameprefix = "fluidfield" |
| std::string | _filename |
| 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 |
fluid io for cartesian coordinates, double percision
|
inline |
Construct a new Fluid Cart Regular D object.
References fileionew::FluidCartRegularD< N_dim >::_gh_down, fileionew::FluidCartRegularD< N_dim >::_gh_up, fileionew::FluidCartRegularD< N_dim >::_meshnumc, fileionew::FluidCartRegularD< N_dim >::_meshnumf, fileionew::FluidCartRegularD< N_dim >::_mpi_coord, fileionew::FluidCartRegularD< N_dim >::_mpi_proc, fileionew::FluidCartRegularD< N_dim >::_ptr_meshc, and fileionew::FluidCartRegularD< N_dim >::_ptr_meshf.
|
inline |
Destroy the Fluid Cart Regular D object.
References fileionew::FluidCartRegularD< N_dim >::_ptr_meshc, and fileionew::FluidCartRegularD< N_dim >::_ptr_meshf.
|
inline |
|
inline |
References fileionew::FluidCartRegularD< N_dim >::_fapl, and fileionew::FluidCartRegularD< N_dim >::_filename.

|
inline |
References fileionew::FluidCartRegularD< N_dim >::_fapl, fileionew::FluidCartRegularD< N_dim >::_filename, and fileionew::DataSpace().

| auto & fileionew::FluidCartRegularD< N_dim >::AddField | ( | const std::string | fieldname, |
| const double | data[], | ||
| const std::vector< int > | shape, | ||
| const std::vector< int > | gridflag, | ||
| const std::vector< int > | shapetotal | ||
| ) |
References fileionew::check_collective_io(), fileionew::DataSpace(), and fileionew::Fields().


|
inline |
add Field to Field group only support serial version
| fieldname | field name |
| data | double data |
| shape | shape of field at current proc |
| gridflag | grid flag (1,0,1),(F,c,F) |
References fileionew::FluidCartRegularD< N_dim >::AddField().

|
inlinestatic |
| void fileionew::FluidCartRegularD< N_dim >::CalOffset | ( | const std::vector< int > & | shape, |
| const std::vector< int > & | gridflag, | ||
| std::vector< hsize_t > & | offset | ||
| ) |
| void fileionew::FluidCartRegularD< N_dim >::CloseFile |
Close opened hdf5 file.

| void fileionew::FluidCartRegularD< N_dim >::CreateFile | ( | const int | istep, |
| const std::string | ftype | ||
| ) |
Create a hdf5 File.
| istep | computation step |
| ftype | select a file style, onestep/mid |
References fileionew::DataSpace(), fileionew::Fields(), fileionew::FileProps(), fileionew::intTostr(), fileionew::Others(), and fileionew::PhysParams().


|
inlinestatic |
| void fileionew::FluidCartRegularD< N_dim >::MemExtend | ( | const auto * | in, |
| auto * | out, | ||
| const std::vector< int > & | shape, | ||
| const std::vector< hsize_t > & | offset, | ||
| const std::vector< hsize_t > & | count | ||
| ) |
| void fileionew::FluidCartRegularD< N_dim >::MemSlice | ( | const auto * | in, |
| auto * | out, | ||
| const std::vector< int > & | shape, | ||
| const std::vector< hsize_t > & | offset, | ||
| const std::vector< hsize_t > & | count | ||
| ) |
| void fileionew::FluidCartRegularD< N_dim >::OpenFile | ( | const int | istep, |
| const std::string | ftype | ||
| ) |
add extra attribute to different groups [string]
| group | which group ,a enum constant |
| attrname | attribute name |
| str | attribute val |
References fileionew::DataSpace(), fileionew::FileProps(), fileionew::intTostr(), and fileionew::PhysParams().

| void fileionew::FluidCartRegularD< N_dim >::Print |
Print the abstract of the current file attributes.
References fileionew::intTostr().

| auto & fileionew::FluidCartRegularD< N_dim >::ReadField | ( | const std::string | fieldname, |
| double | data[], | ||
| const std::vector< int > | shape, | ||
| const std::vector< int > | gridflag, | ||
| const std::vector< int > | shapetotal | ||
| ) |
References fileionew::check_collective_io(), and fileionew::Fields().

|
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];.
| domain_down | the lower boundary of Domain |
| domain_up | the upper boundary of domain |
References fileionew::FluidCartRegularD< N_dim >::_domain_down, and fileionew::FluidCartRegularD< N_dim >::_domain_up.
|
inline |
|
inline |
Set the File Attributes object not to create attribute, just set the standard attribute to the buffer in current object.
| name | attribute name |
| val | attribute value |
References fileionew::FluidCartRegularD< N_dim >::_rho0, fileionew::FluidCartRegularD< N_dim >::_visc0, and fileionew::strToLower().

|
inline |
Set the File Attributes object not to create attribute, just set the standard attribute to the buffer in current object.
| name | attribute name |
| val | attribute value |
References fileionew::FluidCartRegularD< N_dim >::_casename, fileionew::FluidCartRegularD< N_dim >::_dataspacestyle, fileionew::FluidCartRegularD< N_dim >::_filepath, fileionew::FluidCartRegularD< N_dim >::_filestyle, fileionew::FluidCartRegularD< N_dim >::_space, fileionew::FluidCartRegularD< N_dim >::_storagestyle, and fileionew::strToLower().


|
inline |
Set the Ghost Mesh object if only input gh_down, it means that gh_up=gh_down.
| gh_down | ghost mesh size of lower boudnary |
| gh_up | ghost mesh size of upper boudnary |
References fileionew::FluidCartRegularD< N_dim >::_gh_down, and fileionew::FluidCartRegularD< N_dim >::_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];.
| gh_down | ghost mesh size of lower boudnary |
| gh_up | ghost mesh size of upper boudnary |

|
inline |
|
inline |
Set the Mesh [center] object.
| dim | which dimension/direction |
| N | size of mesh |
| meshc | mesh [center] |
References fileionew::FluidCartRegularD< N_dim >::_meshnumc, and fileionew::FluidCartRegularD< N_dim >::_ptr_meshc.

|
inline |
Set the Mesh [face] object.
| dim | which dimension/direction |
| N | size of mesh |
| meshf | mesh [face] |
References fileionew::FluidCartRegularD< N_dim >::_meshnumf, and fileionew::FluidCartRegularD< N_dim >::_ptr_meshf.
|
private |
|
inlinestaticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inlinestaticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inlinestaticprivate |
|
private |
|
private |
|
private |
| hid_t fileionew::FluidCartRegularD< N_dim >::fieldid |
| hid_t fileionew::FluidCartRegularD< N_dim >::fileid |
handles of HDF5
| hid_t fileionew::FluidCartRegularD< N_dim >::filepropid |
| hid_t fileionew::FluidCartRegularD< N_dim >::geomeshid |
| hid_t fileionew::FluidCartRegularD< N_dim >::otherinfoid |
| hid_t fileionew::FluidCartRegularD< N_dim >::physparaid |