24#ifndef PROBLEMSETUP_H_INCLUDED
25#define PROBLEMSETUP_H_INCLUDED
30#define __NO_OUTPUT_MODE__ 0
35#define __FPS_MODE__ 1 << 0
40#define __IPF_MODE__ 1 << 1
45#define __TIME_MODE__ 1 << 0
50#define __ITER_MODE__ 1 << 1
55#define __FRAME_MODE__ 1 << 2
72namespace InputOutput {
107 inline void dims(
unsigned int n) { _dims = n; }
112 inline unsigned int dims()
const {
return _dims; }
119 inline void nCmdQueues(
unsigned int n) { _n_cmd_queues = n; }
126 inline unsigned int nCmdQueues()
const {
return _n_cmd_queues; }
229 device(
const unsigned int platform_index,
230 const unsigned int device_index,
231 const cl_device_type t = CL_DEVICE_TYPE_ALL,
232 const unsigned int bits = 32,
233 const std::string compile_flags =
"")
239 ,
patches({{
"nvidia_#4665567", patch_state::AUTO},
240 {
"nvidia_#9999999", patch_state::AUTO},
339 return patches.at(name) == patch_state::ENABLED;
349 return patches.at(name) == patch_state::DISABLED;
362 std::vector<ProblemSetup::sphSettings::device>
devices;
484 void define(
const std::string name,
485 const std::string value,
486 const bool evaluate);
521 void set(
const std::string name,
const std::string value);
527 const std::string
get(
const std::string name);
533 const std::string
get(
unsigned int index);
539 const std::string getName(
unsigned int index);
544 unsigned int n()
const {
return _data.size(); }
551 bool has(
const std::string name);
554 std::map<std::string, std::string> _data;
748 void n(
size_t N) { _n = N; }
753 size_t n()
const {
return _n; }
760 void addScalar(std::string name, std::string value);
785 void input(std::string path, std::string format, std::string
fields);
791 const std::string
inputPath()
const {
return _in_path; }
803 std::vector<std::string>
inputFields()
const {
return _in_fields; }
823 void output(std::string path, std::string format, std::string
fields);
848 std::vector<std::string> _snames;
850 std::vector<std::string> _svalues;
853 std::string _in_path;
856 std::string _in_format;
859 std::vector<std::string> _in_fields;
862 std::string _out_path;
865 std::string _out_format;
868 std::vector<std::string> _out_fields;
872 std::vector<sphParticlesSet*>
sets;
881 unsigned int _n_cmd_queues;
static PyObject * get(PyObject UNUSED_PARAM *self, PyObject *args, PyObject *keywds)
Get a variable by its name.
Definition Python.cpp:73
static PyObject * set(PyObject UNUSED_PARAM *self, PyObject *args, PyObject *keywds)
Set a variable by its name.
Definition Python.cpp:108
size_t n() const
Get the number of particles.
Definition ProblemSetup.hpp:753
const std::string outputPath() const
Get the output file path.
Definition ProblemSetup.hpp:829
void n(size_t N)
Set the number of particles.
Definition ProblemSetup.hpp:748
const std::string inputPath() const
Get the file path from the particles would be read.
Definition ProblemSetup.hpp:791
std::vector< std::string > scalarValues() const
Get the scalar values list.
Definition ProblemSetup.hpp:770
const std::string outputFormat() const
Get the output file format.
Definition ProblemSetup.hpp:835
std::vector< std::string > scalarNames() const
Get the scalar names list.
Definition ProblemSetup.hpp:765
const std::string inputFormat() const
Get the input file format.
Definition ProblemSetup.hpp:797
std::vector< std::string > outputFields() const
Get the output file fields.
Definition ProblemSetup.hpp:841
sphParticlesSet()
Constructor.
Definition ProblemSetup.cpp:214
std::vector< std::string > inputFields() const
Get the input file fields.
Definition ProblemSetup.hpp:803
__kernel void fields(__global const unsigned int *iset, __global const uint *isplit, __global const usize *mybuffer, __global const unsigned int *ilevel, __global const float *split_weight, __global float *m0, __global float *m, __global vec *r, __global vec *u, __global vec *dudt, __global float *rho, __global float *drhodt, __constant float *dr_level0, usize N, LINKLIST_LOCAL_PARAMS)
Collect the children, and the seed itself, in order to compute the field values of the buffer partner...
Definition Coalesce.cl:426
Main AQUAgpusph namespace.
Definition ArgumentsManager.cpp:50
Set of definitions and macros related with the implementation.
#define DECLDIR
Prefix to export C functions on the compiled library.
Definition sphPrerequisites.hpp:65