AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Public Member Functions
Aqua::InputOutput::ProblemSetup::sphParticlesSet Class Reference

Particles set data. More...

#include <ProblemSetup.h>

Public Member Functions

 sphParticlesSet ()
 Constructor.
 
 ~sphParticlesSet ()
 Destructor.
 
void n (unsigned int N)
 Set the number of particles.
 
unsigned int n () const
 Get the number of particles.
 
void addScalar (std::string name, std::string value)
 Add a scalar property for this particles set.
 
std::vector< std::string > scalarNames () const
 Get the scalar names list.
 
std::vector< std::string > scalarValues () const
 Get the scalar values list.
 
void input (std::string path, std::string format, std::string fields)
 Set the file path from which the particles should be read.
 
const std::string inputPath () const
 Get the file path from the particles would be read.
 
const std::string inputFormat () const
 Get the input file format.
 
std::vector< std::string > inputFields () const
 Get the input file fields.
 
void output (std::string path, std::string format, std::string fields)
 Set the file path where the particles should be written.
 
const std::string outputPath () const
 Get the output file path.
 
const std::string outputFormat () const
 Get the output file format.
 
std::vector< std::string > outputFields () const
 Get the output file fields.
 

Detailed Description

Particles set data.

In AQUAgpusph the particles can be deivided in sets. Each set may have different physic properties, or it can be used just to separate the particles by type (i.e. Fluid particles/Boundaries/Sensors).

Each particles set should be loaded from a different files, as well as saved in different files.

These setting are set between the following XML tags:

<ParticlesSet n="100000">
</ParticlesSet>

Where <strong class= is the number of particles for this set of particles.

See also
Aqua::InputOutput::Particles

Constructor & Destructor Documentation

◆ sphParticlesSet()

Aqua::InputOutput::ProblemSetup::sphParticlesSet::sphParticlesSet ( )

Constructor.

◆ ~sphParticlesSet()

Aqua::InputOutput::ProblemSetup::sphParticlesSet::~sphParticlesSet ( )

Destructor.

Member Function Documentation

◆ addScalar()

void Aqua::InputOutput::ProblemSetup::sphParticlesSet::addScalar ( std::string  name,
std::string  value 
)

Add a scalar property for this particles set.

This field can be set with the tag Scalar, for instance: <Scalar name="delta" value="1.0" />

◆ input()

void Aqua::InputOutput::ProblemSetup::sphParticlesSet::input ( std::string  path,
std::string  format,
std::string  fields 
)

Set the file path from which the particles should be read.

This field can be set with the tag Load, for instance: <Load format="ASCII" file="./Fluid.dat" fields="r,normal" />

Several constants can be used in the file name. See Aqua::setStrConstants()

Parameters
pathFile path.
formatFile format.
fieldsFields to be loaded from the file
See also
Aqua::InputOutput::Particles
Here is the call graph for this function:

◆ inputFields()

std::vector< std::string > Aqua::InputOutput::ProblemSetup::sphParticlesSet::inputFields ( ) const
inline

Get the input file fields.

Returns
Fields to be loaded list.
See also
input()

◆ inputFormat()

const std::string Aqua::InputOutput::ProblemSetup::sphParticlesSet::inputFormat ( ) const
inline

Get the input file format.

Returns
File format.
See also
input()

◆ inputPath()

const std::string Aqua::InputOutput::ProblemSetup::sphParticlesSet::inputPath ( ) const
inline

Get the file path from the particles would be read.

Returns
File path.
See also
input()

◆ n() [1/2]

unsigned int Aqua::InputOutput::ProblemSetup::sphParticlesSet::n ( ) const
inline

Get the number of particles.

Returns
Number of particles.

◆ n() [2/2]

void Aqua::InputOutput::ProblemSetup::sphParticlesSet::n ( unsigned int  N)
inline

Set the number of particles.

Parameters
NNumber of particles.

◆ output()

void Aqua::InputOutput::ProblemSetup::sphParticlesSet::output ( std::string  path,
std::string  format,
std::string  fields 
)

Set the file path where the particles should be written.

This field can be set with the tag Save, for instance: <Save format="VTK" file="output.proc{mpi_rank}.{index}.vtk" fields="r,normal" />

Several scaper strings can be used to let AQUAgpusph compute the file path, at the appropriate Aqua::InputOutput::Particles instance. See Aqua::newFilePath()

Parameters
pathFile path.
formatFile format.
fieldsFields to be loaded from the file
See also
Aqua::InputOutput::Particles
Note
In case "%d"/"{index}" is not provided, it will be appended at the end of the file name, as well as the appropriate file extension (backward compatibility)
Here is the call graph for this function:

◆ outputFields()

std::vector< std::string > Aqua::InputOutput::ProblemSetup::sphParticlesSet::outputFields ( ) const
inline

Get the output file fields.

Returns
Fields to be written list.
See also
output()

◆ outputFormat()

const std::string Aqua::InputOutput::ProblemSetup::sphParticlesSet::outputFormat ( ) const
inline

Get the output file format.

Returns
File format.
See also
output()

◆ outputPath()

const std::string Aqua::InputOutput::ProblemSetup::sphParticlesSet::outputPath ( ) const
inline

Get the output file path.

Returns
File path.
See also
output()

◆ scalarNames()

std::vector< std::string > Aqua::InputOutput::ProblemSetup::sphParticlesSet::scalarNames ( ) const
inline

Get the scalar names list.

Returns
scalar names.

◆ scalarValues()

std::vector< std::string > Aqua::InputOutput::ProblemSetup::sphParticlesSet::scalarValues ( ) const
inline

Get the scalar values list.

Returns
scalar values.

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