AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
Aqua::InputOutput Namespace Reference

Input/Output data interfaces. More...

Namespaces

namespace  CommandLineArgs

Data Structures

class  ArrayVariable
 An array variable. More...
class  ASCII
 Plain text particles data files loader/saver. More...
class  CSV
 CSV particles data files loader/saver. More...
class  DoubleVariable
 A double variable. More...
class  FastASCII
 Plain text particles data files loader/saver. More...
class  FileManager
 Input/Output files manager. This class acts as a base class, controlling the subclasses which will load/save the files. More...
class  FloatVariable
 A float variable. More...
class  InputOutput
 Base class for input/output file managers. More...
class  IntVariable
 An integer variable. More...
class  Logger
 On screen and log file output manager. More...
class  LongVariable
 A 64bits integer variable. More...
class  Particles
 Particles file loader/saver base class. More...
class  ProblemSetup
 Simulation configuration data. More...
class  Report
 Base class for all the report file managers. More...
class  ScalarNumberVariable
class  ScalarVariable
 A generic Scalar variable. More...
class  ScalarVecVariable
 A generic Scalar variable, of 2 or more components. More...
class  State
 Load/Save the XML simulation definition files. More...
class  TimeManager
 Simulation time flow manager. More...
class  UIntVariable
 An unsigned integer variable. More...
class  ULongVariable
 An integer variable. More...
class  Variable
 A generic variable. Almost useless, use the overloaded classes instead of this one. More...
class  Variables
 Variables manager, which can interpret the types on the fly. More...
class  VTK
 VTK particles data files loader/saver. More...

Typedefs

Variable aliases

Some alias to make easier to create preprocessor directives

typedef IntVariable iclVariable
typedef LongVariable lclVariable
typedef UIntVariable uiclVariable
typedef ULongVariable ulclVariable
typedef FloatVariable fclVariable
typedef DoubleVariable dclVariable
typedef IVec2Variable ivec2Variable
typedef IVec3Variable ivec3Variable
typedef IVec4Variable ivec4Variable
typedef IVec8Variable ivec8Variable
typedef LVec2Variable lvec2Variable
typedef LVec3Variable lvec3Variable
typedef LVec4Variable lvec4Variable
typedef LVec8Variable lvec8Variable
typedef UIVec2Variable uivec2Variable
typedef UIVec3Variable uivec3Variable
typedef UIVec4Variable uivec4Variable
typedef UIVec8Variable uivec8Variable
typedef ULVec2Variable ulvec2Variable
typedef ULVec3Variable ulvec3Variable
typedef ULVec4Variable ulvec4Variable
typedef ULVec8Variable ulvec8Variable
typedef Vec2Variable vec2Variable
typedef Vec3Variable vec3Variable
typedef Vec4Variable vec4Variable
typedef Vec8Variable vec8Variable
typedef DVec2Variable dvec2Variable
typedef DVec3Variable dvec3Variable
typedef DVec4Variable dvec4Variable
typedef DVec8Variable dvec8Variable

Functions

std::atomic< Logger * > g_logger_singleton_ptr (nullptr)
 Singleton instance of Aqua::InputOutput::Logger.
std::string time_and_date ()
 Get a string with the date and time.
void CL_CALLBACK particles_cb (cl_event event, cl_int event_command_status, void *user_data)
 Callback called when all the fields have been downloaded.
static std::vector< unsigned int > _toolsList (std::string list, ProblemSetup &sim_data, std::string prefix)
 Helper function to get a list of tool placements from a list of names.
static std::vector< unsigned int > _toolsName (std::string name, ProblemSetup &sim_data, std::string prefix)
 Helper function to get a list of tool placements from a wildcard.
static void _toolAttr (ProblemSetup::sphTool *tool, DOMElement *elem, std::string attr, std::string def_val)
 Helper function to get and XML attribute for a tool.
static void _toolAttr (ProblemSetup::sphTool *tool, DOMElement *elem, std::string attr)
 Helper function to get and XML attribute for a tool.
std::string npy_type_name (int np_type)
template<typename T>
const std::string valptr_as_string (T *ptr, unsigned int n)
 Stringify a value pointer.
std::string tokNameToVarName (const std::string &name)
 Convert the names populated at the tokenizer to variable names.

Variables

static std::string _remaining
static std::vector< unsigned int > _tool_places
 Helper storage for the functions _toolsList() and _toolsName()
static std::ostringstream pyerr

Detailed Description

Input/Output data interfaces.

Typedef Documentation

◆ dclVariable

◆ dvec2Variable

◆ dvec3Variable

◆ dvec4Variable

◆ dvec8Variable

◆ fclVariable

◆ iclVariable

◆ ivec2Variable

◆ ivec3Variable

◆ ivec4Variable

◆ ivec8Variable

◆ lclVariable

◆ lvec2Variable

◆ lvec3Variable

◆ lvec4Variable

◆ lvec8Variable

◆ uiclVariable

◆ uivec2Variable

◆ uivec3Variable

◆ uivec4Variable

◆ uivec8Variable

◆ ulclVariable

◆ ulvec2Variable

◆ ulvec3Variable

◆ ulvec4Variable

◆ ulvec8Variable

◆ vec2Variable

◆ vec3Variable

◆ vec4Variable

◆ vec8Variable

Function Documentation

◆ _toolAttr() [1/2]

void Aqua::InputOutput::_toolAttr ( ProblemSetup::sphTool * tool,
DOMElement * elem,
std::string attr )
static

Helper function to get and XML attribute for a tool.

This function will throw an exception if the attribute is missing

Parameters
toolThe tool to edit
elemThe XML element
attrThe XML element attribute
Exceptions
std::runtime_errorIf attr is not an attribute of the elem XML element
Here is the call graph for this function:

◆ _toolAttr() [2/2]

void Aqua::InputOutput::_toolAttr ( ProblemSetup::sphTool * tool,
DOMElement * elem,
std::string attr,
std::string def_val )
static

Helper function to get and XML attribute for a tool.

This function will set the default value if the attribute is not found

Parameters
toolThe tool to edit
elemThe XML element
attrThe XML element attribute
def_valThe default string to be set if it cannot be found
Here is the call graph for this function:

◆ _toolsList()

std::vector< unsigned int > Aqua::InputOutput::_toolsList ( std::string list,
ProblemSetup & sim_data,
std::string prefix )
static

Helper function to get a list of tool placements from a list of names.

Parameters
listList of tools, separated by commas
prefixprefix to become inserted at the beggining of the name of each tool of the list
Returns
The positions of the tools
Warning
This methos is not thread safe

◆ _toolsName()

std::vector< unsigned int > Aqua::InputOutput::_toolsName ( std::string name,
ProblemSetup & sim_data,
std::string prefix )
static

Helper function to get a list of tool placements from a wildcard.

Parameters
nameWildcard formatted tool name
prefixprefix to become inserted at the beggining of the name of each tool of the list
Returns
The positions of the tools
Warning
This methos is not thread safe
Here is the call graph for this function:

◆ g_logger_singleton_ptr()

std::atomic< Logger * > Aqua::InputOutput::g_logger_singleton_ptr ( nullptr )

Singleton instance of Aqua::InputOutput::Logger.

◆ npy_type_name()

std::string Aqua::InputOutput::npy_type_name ( int np_type)

◆ particles_cb()

void CL_CALLBACK Aqua::InputOutput::particles_cb ( cl_event event,
cl_int event_command_status,
void * user_data )

Callback called when all the fields have been downloaded.

This function is just redirecting the work to Aqua::InputOutput::Particles::print_file()

Parameters
eventThe triggering event
event_command_statusCL_COMPLETE upon all dependencies successfully fulfilled. A negative integer if one or more dependencies failed.
user_dataA casted pointer to the Aqua::InputOutput::Particles tool (or the inherited one)

◆ time_and_date()

std::string Aqua::InputOutput::time_and_date ( )

Get a string with the date and time.

Returns
The date and time string
See also
https://stackoverflow.com/questions/17223096/outputting-date-and-time-in-c-using-stdchrono
Here is the call graph for this function:

◆ tokNameToVarName()

std::string Aqua::InputOutput::tokNameToVarName ( const std::string & name)

Convert the names populated at the tokenizer to variable names.

Parameters
nameThe name populated on the tokenizer
Returns
The variable name
Here is the call graph for this function:

◆ valptr_as_string()

template<typename T>
const std::string Aqua::InputOutput::valptr_as_string ( T * ptr,
unsigned int n )

Stringify a value pointer.

Parameters
ptrPointer to the value
nNumber of fields into the data

Variable Documentation

◆ _remaining

std::string Aqua::InputOutput::_remaining
static

◆ _tool_places

std::vector<unsigned int> Aqua::InputOutput::_tool_places
static

Helper storage for the functions _toolsList() and _toolsName()

◆ pyerr

std::ostringstream Aqua::InputOutput::pyerr
static