Peka2D_v5  v5.0
Functions
loadData.cpp File Reference
#include "loadData.h"
Include dependency graph for loadData.cpp:

Functions

EXPORT_DLL int loadControlParameters (Peka2D_Setup *pksetup, t_parameters *spar, t_mesh *mesh, t_message *msg)
 This function loads control parameters. More...
 
EXPORT_DLL int readControlDataFile (char *filename, Peka2D_Setup *pksetup, t_message *msg)
 This function reads control parameters from file .DAT. More...
 
EXPORT_DLL int setControlParameters (Peka2D_Setup *pksetup, t_parameters *spar, t_mesh *mesh, t_message *msg)
 This function passes the simulation execution paramenters from pksetup to spar. More...
 
EXPORT_DLL int loadMeshData (Peka2D_Setup *pksetup, t_parameters *spar, t_mesh *mesh, t_message *msg)
 This function creates the mesh data structure into variable mesh. More...
 
int IsMeshAllocated (t_mesh *mesh, t_message *e)
 This function checks if the mesh is properly allocated. More...
 
int readMeshFile (char *filename, Peka2D_Setup *pksetup, t_mesh *mesh, t_message *e)
 This function reads the mesh data from file and stores it in variable mesh. More...
 
int setInitialState (Peka2D_Setup *pksetup, t_parameters *spar, t_mesh *mesh, t_message *e)
 This function initializes all the computational variables (water depth, water discharge, etc.) in variable mesh. More...
 
int loadBoundaryConditions (Peka2D_Setup *pksetup, t_parameters *spar, t_mesh *mesh, t_message *e)
 This function loads the general setting of the boundary conditions. More...
 
int readOpenBoundaryNodes (char *filename, int nnodes, Peka2D_NodeBoundary *nbc, t_message *e)
 This function reads the number of open boundary nodes. More...
 
int createOpenBounds (Peka2D_NodeBoundary *nbc, Peka2D_OBCWalls *IOBC, Peka2D_OBCWalls *OOBC, t_parameters *spar, t_mesh *mesh, t_message *e)
 This function creates the inlet/outlet structure of the open boundaries. More...
 
int readOpenBoundaryFile (char *filename, Peka2D_NodeBoundary *nbc, Peka2D_OBCWalls *IOBC, Peka2D_OBCWalls *OOBC, t_parameters *spar, t_mesh *mesh, t_message *e)
 This function reads the data of the inlet and outlet open boundaries (hydrographs) from external files and stores it in mesh. More...
 
EXPORT_DLL int loadSoluteData (Peka2D_Setup *pksetup, t_parameters *spar, t_mesh *mesh, t_message *msg)
 
int readSoluteFile (char *filename, Peka2D_SoluteGroup *soluteGroup, t_message *e)
 
int createSoluteStructures (Peka2D_SoluteGroup *soluteGroup, t_parameters *spar, t_mesh *mesh, t_message *e)
 
int setInitialSoluteState (Peka2D_SoluteGroup *soluteGroup, t_parameters *spar, t_mesh *mesh, t_message *e)
 

Function Documentation

◆ createOpenBounds()

int createOpenBounds ( Peka2D_NodeBoundary nbc,
Peka2D_OBCWalls IOBC,
Peka2D_OBCWalls OOBC,
t_parameters spar,
t_mesh mesh,
t_message e 
)

This function creates the inlet/outlet structure of the open boundaries.

Parameters
nbcThis structure variable contains all the information of the boundary nodes.
IOBCThis variable contains the information of the inlet open boundary walls.
OOBCThis variable contains the information of the inlet open boundary walls.

◆ createSoluteStructures()

int createSoluteStructures ( Peka2D_SoluteGroup soluteGroup,
t_parameters spar,
t_mesh mesh,
t_message e 
)

◆ IsMeshAllocated()

int IsMeshAllocated ( t_mesh mesh,
t_message e 
)

This function checks if the mesh is properly allocated.

Parameters
eThis variable notifies if the mesh is not properly allocated.

◆ loadBoundaryConditions()

int loadBoundaryConditions ( Peka2D_Setup pksetup,
t_parameters spar,
t_mesh mesh,
t_message e 
)

This function loads the general setting of the boundary conditions.

◆ loadControlParameters()

EXPORT_DLL int loadControlParameters ( Peka2D_Setup pksetup,
t_parameters spar,
t_mesh mesh,
t_message msg 
)

This function loads control parameters.

◆ loadMeshData()

EXPORT_DLL int loadMeshData ( Peka2D_Setup pksetup,
t_parameters spar,
t_mesh mesh,
t_message msg 
)

This function creates the mesh data structure into variable mesh.

Parameters
meshThis variable is created to contain the structure variables of the computational mesh.

◆ loadSoluteData()

EXPORT_DLL int loadSoluteData ( Peka2D_Setup pksetup,
t_parameters spar,
t_mesh mesh,
t_message msg 
)

◆ readControlDataFile()

EXPORT_DLL int readControlDataFile ( char *  filename,
Peka2D_Setup pksetup,
t_message msg 
)

This function reads control parameters from file .DAT.

Parameters
filenameThis variable passes the name of the data file to read in this the function.
pksetupThis variable gets the information file in this function.

◆ readMeshFile()

int readMeshFile ( char *  filename,
Peka2D_Setup pksetup,
t_mesh mesh,
t_message e 
)

This function reads the mesh data from file and stores it in variable mesh.

Parameters
filenameThis variable passes the name of the data file to read in this the function.
meshThis variable receives the mesh data read from file.

◆ readOpenBoundaryFile()

int readOpenBoundaryFile ( char *  filename,
Peka2D_NodeBoundary nbc,
Peka2D_OBCWalls IOBC,
Peka2D_OBCWalls OOBC,
t_parameters spar,
t_mesh mesh,
t_message e 
)

This function reads the data of the inlet and outlet open boundaries (hydrographs) from external files and stores it in mesh.

Parameters
filenameThis variable passes the name of the file from which the open boundary data is read.

◆ readOpenBoundaryNodes()

int readOpenBoundaryNodes ( char *  filename,
int  nnodes,
Peka2D_NodeBoundary nbc,
t_message e 
)

This function reads the number of open boundary nodes.

Parameters
filenameThis variable passes the name of the file to read the open boundary conditions in this the function.

◆ readSoluteFile()

int readSoluteFile ( char *  filename,
Peka2D_SoluteGroup soluteGroup,
t_message e 
)

◆ setControlParameters()

EXPORT_DLL int setControlParameters ( Peka2D_Setup pksetup,
t_parameters spar,
t_mesh mesh,
t_message msg 
)

This function passes the simulation execution paramenters from pksetup to spar.

Parameters
sparThis variable gets the simulation execution paramenters passed from pksetup in this function.

◆ setInitialSoluteState()

int setInitialSoluteState ( Peka2D_SoluteGroup soluteGroup,
t_parameters spar,
t_mesh mesh,
t_message e 
)

◆ setInitialState()

int setInitialState ( Peka2D_Setup pksetup,
t_parameters spar,
t_mesh mesh,
t_message e 
)

This function initializes all the computational variables (water depth, water discharge, etc.) in variable mesh.

Parameters
meshIn this function, variable mesh receives the initialization of the computational variables.