diff --git a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp index 14ed3fdbb63e0061b835d5f9235a442366dccc8f..b8598910a62198afe13251d34b19950dca53fe04 100644 --- a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp +++ b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp @@ -43,41 +43,41 @@ SPtr<Parameter> Parameter::make() Parameter::Parameter() { - this->setOutputPath("C:/Output/"); + this->setOutputPath("C:/Output/"); - this->setOutputPrefix("MyFile"); + this->setOutputPrefix("MyFile"); - this->setPrintFiles(false); + this->setPrintFiles(false); - this->setD3Qxx((int)27); + this->setD3Qxx((int)27); - this->setTimestepEnd((uint)10); + this->setTimestepEnd((uint)10); - this->setTimestepOut((uint)1); + this->setTimestepOut((uint)1); - this->setTimestepStartOut((uint)0); + this->setTimestepStartOut((uint)0); - this->setViscosityLB((real)0.001); + this->setViscosityLB((real)0.001); - this->setVelocityLB((real)0.01); + this->setVelocityLB((real)0.01); this->setSc((real)1.0); this->setG_r((real)0.0); - this->setViscosityRatio((real)1.0); + this->setViscosityRatio((real)1.0); - this->setVelocityRatio((real)1.0); + this->setVelocityRatio((real)1.0); - this->setDensityRatio((real)1.0); + this->setDensityRatio((real)1.0); - this->setPressureRatio((real)1.0); + this->setPressureRatio((real)1.0); - this->setPathAndFilename(this->getOutputPath() + "/" + this->getOutputPrefix()); + this->setPathAndFilename(this->getOutputPath() + "/" + this->getOutputPrefix()); - this->setlimitOfNodesForVTK((uint)30000000); + this->setlimitOfNodesForVTK((uint)30000000); - ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// // Advection Diffusion this->setIsADcalculationOn(false); } @@ -87,9 +87,9 @@ Parameter::~Parameter() Parameter* Parameter::instance = 0; Parameter* Parameter::getInstanz() { - if( instance == 0 ) - instance = new Parameter(); - return instance; + if( instance == 0 ) + instance = new Parameter(); + return instance; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -97,19 +97,19 @@ Parameter* Parameter::getInstanz() //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Parameter::initParameter() { - //host - parametersOnHost = new ParameterStruct; - parametersOnHost->numberofthreads = 64; - parametersOnHost->omega = (real)1.0/((real)3.0*this->viscosityLB+(real)0.5); - parametersOnHost->isEvenTimestep = true; + //host + parametersOnHost = new ParameterStruct; + parametersOnHost->numberofthreads = 64; + parametersOnHost->omega = (real)1.0/((real)3.0*this->viscosityLB+(real)0.5); + parametersOnHost->isEvenTimestep = true; // set diffusivity parametersOnHost->diffusivity = (real)0.01; - //device - parametersOnDevice = new ParameterStruct; - parametersOnDevice->numberofthreads = parametersOnHost->numberofthreads; - parametersOnDevice->omega = parametersOnHost->omega; - parametersOnDevice->isEvenTimestep = parametersOnHost->isEvenTimestep; + //device + parametersOnDevice = new ParameterStruct; + parametersOnDevice->numberofthreads = parametersOnHost->numberofthreads; + parametersOnDevice->omega = parametersOnHost->omega; + parametersOnDevice->isEvenTimestep = parametersOnHost->isEvenTimestep; // set diffusivity parametersOnDevice->diffusivity = parametersOnHost->diffusivity; } @@ -120,39 +120,39 @@ void Parameter::initParameter() //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Parameter::setlimitOfNodesForVTK(uint limitOfNodesForVTK) { - this->limitOfNodesForVTK = limitOfNodesForVTK; + this->limitOfNodesForVTK = limitOfNodesForVTK; } void Parameter::setD3Qxx(int d3qxx) { - this->D3Qxx = d3qxx; + this->D3Qxx = d3qxx; } void Parameter::setTimestepEnd(uint timestepEnd) { - this->timestepEnd = timestepEnd; + this->timestepEnd = timestepEnd; } void Parameter::setTimestepOut(uint timestepOut) { - this->timestepOut = timestepOut; + this->timestepOut = timestepOut; } void Parameter::setTimestepStartOut(uint timestepStartOut) { - this->timestepStartOut = timestepStartOut; + this->timestepStartOut = timestepStartOut; } void Parameter::setOutputPath(std::string outputPath) { - this->outputPath = outputPath; + this->outputPath = outputPath; } void Parameter::setOutputPrefix(std::string outputPrefix) { - this->outputPrefix = outputPrefix; + this->outputPrefix = outputPrefix; } void Parameter::setPathAndFilename(std::string pathAndFilename) { - this->pathAndFilename = pathAndFilename; + this->pathAndFilename = pathAndFilename; } void Parameter::setIsADcalculationOn(bool calcAD) { - this->calcAD = calcAD; + this->calcAD = calcAD; } void Parameter::setIsBodyForceOn(bool calcBF) { @@ -160,35 +160,35 @@ void Parameter::setIsBodyForceOn(bool calcBF) } void Parameter::setPrintFiles(bool printfiles) { - this->printFiles = printfiles; + this->printFiles = printfiles; } void Parameter::setViscosityLB(real viscosity) { - this->viscosityLB = viscosity; + this->viscosityLB = viscosity; } void Parameter::setVelocityLB(real velocity) { - this->velocityLB = velocity; + this->velocityLB = velocity; } void Parameter::setViscosityRatio(real viscosityRatio) { - this->viscosityRatio = viscosityRatio; + this->viscosityRatio = viscosityRatio; } void Parameter::setVelocityRatio(real velocityRatio) { - this->velocityRatio = velocityRatio; + this->velocityRatio = velocityRatio; } void Parameter::setDensityRatio(real densityRatio) { - this->densityRatio = densityRatio; + this->densityRatio = densityRatio; } void Parameter::setPressureRatio(real pressureRatio) { - this->pressRatio = pressureRatio; + this->pressRatio = pressureRatio; } void Parameter::setRe(real Re) { - this->Re = Re; + this->Re = Re; } void Parameter::setSc(real Sc) { @@ -204,14 +204,14 @@ void Parameter::setG_r(real g_r) } void Parameter::setMemsizeGPU(double addMemory, bool reset) { - if (reset == true) - { - this->memsizeGPU = 0.; - } - else - { - this->memsizeGPU += addMemory; - } + if (reset == true) + { + this->memsizeGPU = 0.; + } + else + { + this->memsizeGPU += addMemory; + } } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -222,23 +222,23 @@ void Parameter::setMemsizeGPU(double addMemory, bool reset) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// uint Parameter::getlimitOfNodesForVTK() { - return this->limitOfNodesForVTK; + return this->limitOfNodesForVTK; } ParameterStruct* Parameter::getParD() { - return this->parametersOnDevice; + return this->parametersOnDevice; } ParameterStruct* Parameter::getParH() { - return this->parametersOnHost; + return this->parametersOnHost; } bool Parameter::getIsTimestepEven() { - return this->parametersOnHost->isEvenTimestep; + return this->parametersOnHost->isEvenTimestep; } bool Parameter::getIsADcalculationOn() { - return this->calcAD; + return this->calcAD; } bool Parameter::getIsBodyForceOn() { @@ -246,67 +246,67 @@ bool Parameter::getIsBodyForceOn() } int Parameter::getD3Qxx() { - return this->D3Qxx; + return this->D3Qxx; } uint Parameter::getTimestepStart() { - return 1; + return 1; } uint Parameter::getTimestepEnd() { - return this->timestepEnd; + return this->timestepEnd; } uint Parameter::getTimestepOut() { - return this->timestepOut; + return this->timestepOut; } uint Parameter::getTimestepStartOut() { - return this->timestepStartOut; + return this->timestepStartOut; } std::string Parameter::getOutputPath() { - return this->outputPath; + return this->outputPath; } std::string Parameter::getOutputPrefix() { - return this->outputPrefix; + return this->outputPrefix; } std::string Parameter::getPathAndFilename() { - return this->pathAndFilename; + return this->pathAndFilename; } bool Parameter::getPrintFiles() { - return this->printFiles; + return this->printFiles; } real Parameter::getViscosityLB() { - return this->viscosityLB; + return this->viscosityLB; } real Parameter::getVelocityLB() { - return this->velocityLB; + return this->velocityLB; } real Parameter::getViscosityRatio() { - return this->viscosityRatio; + return this->viscosityRatio; } real Parameter::getVelocityRatio() { - return this->velocityRatio; + return this->velocityRatio; } real Parameter::getDensityRatio() { - return this->densityRatio; + return this->densityRatio; } real Parameter::getPressureRatio() { - return this->pressRatio; + return this->pressRatio; } real Parameter::getRe() { - return this->Re; + return this->Re; } real Parameter::getSc() { @@ -322,7 +322,7 @@ real Parameter::getG_r() } double Parameter::getMemsizeGPU() { - return this->memsizeGPU; + return this->memsizeGPU; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -332,23 +332,23 @@ double Parameter::getMemsizeGPU() // initial condition fluid void Parameter::setInitialCondition(std::function<void(real, real, real, real&, real&, real&, real&)> initialCondition) { - this->initialCondition = initialCondition; + this->initialCondition = initialCondition; } std::function<void(real, real, real, real&, real&, real&, real&)>& Parameter::getInitialCondition() { - return this->initialCondition; + return this->initialCondition; } // initial condition concentration void Parameter::setInitialConditionAD(std::function<void(real, real, real, real&)> initialConditionAD) { - this->initialConditionAD = initialConditionAD; + this->initialConditionAD = initialConditionAD; } std::function<void(real, real, real, real&)>& Parameter::getInitialConditionAD() { - return this->initialConditionAD; + return this->initialConditionAD; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h index 533ab72b0d1d312e6ce096a6f507820443737fbd..3e212482de466c4c4451d9d02d2ce6433a02edce 100644 --- a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h +++ b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h @@ -42,55 +42,55 @@ //! \brief struct holds and manages the LB-parameter of the simulation that correspond to a certain level //! \brief For this purpose it holds structures and pointer for host and device data, respectively. struct ParameterStruct{ - ////////////////////////////////////////////////////////////////////////// - //! \brief decides if the simulation timestep is even or odd - //! \brief this information is important for the esoteric twist - bool isEvenTimestep; - ////////////////////////////////////////////////////////////////////////// - //! \brief stores the number of threads per GPU block - uint numberofthreads; - ////////////////////////////////////////////////////////////////////////// - //! \brief store all distribution functions for the D3Q27 - Distributions27 distributions; - ////////////////////////////////////////////////////////////////////////// - //! \brief stores the type for every lattice node (f.e. fluid node) - uint *typeOfGridNode; - ////////////////////////////////////////////////////////////////////////// - //! \brief store the neighbors in +X, +Y, +Z, and in diagonal negative direction - //! \brief this information is important because we use an indirect addressing scheme - uint *neighborX, *neighborY, *neighborZ, *neighborInverse; - ////////////////////////////////////////////////////////////////////////// - //! \brief store the coordinates for every lattice node - real *coordinateX, *coordinateY, *coordinateZ; - ////////////////////////////////////////////////////////////////////////// - //! \brief store the macroscopic values (velocity, density, pressure) - //! \brief for every lattice node - real *velocityX, *velocityY, *velocityZ, *rho, *pressure; - //! \brief stores the value for omega - real omega; - ////////////////////////////////////////////////////////////////////////// - //! \brief stores the number of nodes (based on indirect addressing scheme) - uint numberOfNodes; - //! \brief stores the size of the memory consumption for real/int values of the above arrays - uint mem_size_real, mem_size_int; + ////////////////////////////////////////////////////////////////////////// + //! \brief decides if the simulation timestep is even or odd + //! \brief this information is important for the esoteric twist + bool isEvenTimestep; + ////////////////////////////////////////////////////////////////////////// + //! \brief stores the number of threads per GPU block + uint numberofthreads; + ////////////////////////////////////////////////////////////////////////// + //! \brief store all distribution functions for the D3Q27 + Distributions27 distributions; + ////////////////////////////////////////////////////////////////////////// + //! \brief stores the type for every lattice node (f.e. fluid node) + uint *typeOfGridNode; + ////////////////////////////////////////////////////////////////////////// + //! \brief store the neighbors in +X, +Y, +Z, and in diagonal negative direction + //! \brief this information is important because we use an indirect addressing scheme + uint *neighborX, *neighborY, *neighborZ, *neighborInverse; + ////////////////////////////////////////////////////////////////////////// + //! \brief store the coordinates for every lattice node + real *coordinateX, *coordinateY, *coordinateZ; + ////////////////////////////////////////////////////////////////////////// + //! \brief store the macroscopic values (velocity, density, pressure) + //! \brief for every lattice node + real *velocityX, *velocityY, *velocityZ, *rho, *pressure; + //! \brief stores the value for omega + real omega; + ////////////////////////////////////////////////////////////////////////// + //! \brief stores the number of nodes (based on indirect addressing scheme) + uint numberOfNodes; + //! \brief stores the size of the memory consumption for real/int values of the above arrays + uint mem_size_real, mem_size_int; ////////////////////////////////////////////////////////////////////////// //! \brief stores the slip boundary condition data QforBoundaryConditions slipBC; //! \brief number of lattice nodes for the slip boundary condition uint numberOfSlipBCnodes; ////////////////////////////////////////////////////////////////////////// - //! \brief stores the velocity boundary condition data - QforBoundaryConditions veloBC; - //! \brief number of lattice nodes for the velocity boundary condition - uint numberOfVeloBCnodes; - ////////////////////////////////////////////////////////////////////////// - //! \brief stores the geometry boundary condition data - QforBoundaryConditions geometryBC; - //! \brief number of lattice nodes for the velocity boundary condition - uint numberOfgeometryBCnodes; - ////////////////////////////////////////////////////////////////////////// - //! \brief sets the forcing uniform on every fluid node in all three space dimensions - real *forcing; + //! \brief stores the velocity boundary condition data + QforBoundaryConditions veloBC; + //! \brief number of lattice nodes for the velocity boundary condition + uint numberOfVeloBCnodes; + ////////////////////////////////////////////////////////////////////////// + //! \brief stores the geometry boundary condition data + QforBoundaryConditions geometryBC; + //! \brief number of lattice nodes for the velocity boundary condition + uint numberOfgeometryBCnodes; + ////////////////////////////////////////////////////////////////////////// + //! \brief sets the forcing uniform on every fluid node in all three space dimensions + real *forcing; ////////////////////////////////////////////////////////////////////////// // Advection Diffusion @@ -110,47 +110,47 @@ struct ParameterStruct{ class VIRTUALFLUIDS_GPU_EXPORT Parameter { public: - //////////////////////////////////////////////////////////////////////////// - //! \brief generate a new instance of parameter object - static SPtr<Parameter> make(); - //! \brief returns the instance generate a new instance of parameter object - static Parameter* getInstanz(); - //! \brief Pointer to instance of ParameterStruct - stored on Host System - ParameterStruct* getParH(); - //! \brief Pointer to instance of ParameterStruct - stored on Device (GPU) - ParameterStruct* getParD(); + //////////////////////////////////////////////////////////////////////////// + //! \brief generate a new instance of parameter object + static SPtr<Parameter> make(); + //! \brief returns the instance generate a new instance of parameter object + static Parameter* getInstanz(); + //! \brief Pointer to instance of ParameterStruct - stored on Host System + ParameterStruct* getParH(); + //! \brief Pointer to instance of ParameterStruct - stored on Device (GPU) + ParameterStruct* getParD(); - ////////////////////////////////////////////////////////////////////////// - //! \brief initialization of necessary parameters at startup - void initParameter(); + ////////////////////////////////////////////////////////////////////////// + //! \brief initialization of necessary parameters at startup + void initParameter(); - ////////////////////////////////////////////////////////////////////////// - //set methods - ////////////////////////////////////////////////////////////////////////// - //! \brief sets the limit of nodes, that can be written to a binary unstructured grid VTK file - //! \param limitOfNodesForVTK holds the maximum number of nodes - void setlimitOfNodesForVTK(uint limitOfNodesForVTK); - //! \brief sets the LBM stencil - //! \param d3qxx holds the number of neighbors (f.e. 27) - void setD3Qxx(int d3qxx); - //! \brief sets timestep to stop the simulation - //! \param timestepEnd holds the last timestep of the simulation - void setTimestepEnd(uint timestepEnd); - //! \brief sets time interval to write output files - //! \param timestepOut holds the value for the output interval - void setTimestepOut(uint timestepOut); - //! \brief sets first timestep to write output files - //! \param timestepStartOut holds the value for the first output timestep - void setTimestepStartOut(uint timestepStartOut); - //! \brief sets the path, where the vtk-files are stored - //! \param string "oPath" represents the output path - void setOutputPath(std::string outputPath); - //! \brief sets the prefix of the vtk-files name - //! \param string "oPrefix" represents the file-name-prefix - void setOutputPrefix(std::string outputPrefix); - //! \brief sets the complete string for the vtk-files with results - //! \param string "fname" represents the combination of path and prefix - void setPathAndFilename(std::string pathAndFilename); + ////////////////////////////////////////////////////////////////////////// + //set methods + ////////////////////////////////////////////////////////////////////////// + //! \brief sets the limit of nodes, that can be written to a binary unstructured grid VTK file + //! \param limitOfNodesForVTK holds the maximum number of nodes + void setlimitOfNodesForVTK(uint limitOfNodesForVTK); + //! \brief sets the LBM stencil + //! \param d3qxx holds the number of neighbors (f.e. 27) + void setD3Qxx(int d3qxx); + //! \brief sets timestep to stop the simulation + //! \param timestepEnd holds the last timestep of the simulation + void setTimestepEnd(uint timestepEnd); + //! \brief sets time interval to write output files + //! \param timestepOut holds the value for the output interval + void setTimestepOut(uint timestepOut); + //! \brief sets first timestep to write output files + //! \param timestepStartOut holds the value for the first output timestep + void setTimestepStartOut(uint timestepStartOut); + //! \brief sets the path, where the vtk-files are stored + //! \param string "oPath" represents the output path + void setOutputPath(std::string outputPath); + //! \brief sets the prefix of the vtk-files name + //! \param string "oPrefix" represents the file-name-prefix + void setOutputPrefix(std::string outputPrefix); + //! \brief sets the complete string for the vtk-files with results + //! \param string "fname" represents the combination of path and prefix + void setPathAndFilename(std::string pathAndFilename); //! \brief sets the status, if Advection Diffusion should be calculated //! \param if calcAD is true, the Advection Diffusion will be calculated void setIsADcalculationOn(bool calcAD); @@ -158,29 +158,29 @@ public: //! \param if calcBF is true, the body force will be calculated void setIsBodyForceOn(bool calcBF); //! \brief sets the status, if the vtk files should be printed - //! \param if printfiles is true, the vtk files will be printed - void setPrintFiles(bool printfiles); - //! \brief sets the viscosity in LB units - //! \param viscosity in LB units - void setViscosityLB(real viscosity); - //! \brief sets the velocity in LB units - //! \param velocity in LB units - void setVelocityLB(real velocity); - //! \brief sets the viscosity ratio between SI and LB units - //! \param viscosityRatio SI/LB units - void setViscosityRatio(real viscosityRatio); - //! \brief sets the velocity ratio between SI and LB units - //! \param velocityRatio SI/LB units - void setVelocityRatio(real velocityRatio); - //! \brief sets the density ratio between SI and LB units - //! \param densityRatio SI/LB units - void setDensityRatio(real densityRatio); - //! \brief sets the pressure ratio between SI and LB units - //! \param pressureRatio SI/LB units - void setPressureRatio(real pressureRatio); - //! \brief sets the Reynolds number (Re) for the simulation - //! \param Reynolds number (Re) - void setRe(real Re); + //! \param if printfiles is true, the vtk files will be printed + void setPrintFiles(bool printfiles); + //! \brief sets the viscosity in LB units + //! \param viscosity in LB units + void setViscosityLB(real viscosity); + //! \brief sets the velocity in LB units + //! \param velocity in LB units + void setVelocityLB(real velocity); + //! \brief sets the viscosity ratio between SI and LB units + //! \param viscosityRatio SI/LB units + void setViscosityRatio(real viscosityRatio); + //! \brief sets the velocity ratio between SI and LB units + //! \param velocityRatio SI/LB units + void setVelocityRatio(real velocityRatio); + //! \brief sets the density ratio between SI and LB units + //! \param densityRatio SI/LB units + void setDensityRatio(real densityRatio); + //! \brief sets the pressure ratio between SI and LB units + //! \param pressureRatio SI/LB units + void setPressureRatio(real pressureRatio); + //! \brief sets the Reynolds number (Re) for the simulation + //! \param Reynolds number (Re) + void setRe(real Re); //! \brief sets the Schmidt number (Sc) for the simulation //! \param sets the Schmidt number (Sc) void setSc(real Sc); @@ -191,53 +191,53 @@ public: //! \param reduced acceleration due to gravity in buoyancy driven flow (LBM units) void setG_r(real g_r); //! \brief sets the necessary memory on the device(s)/GPU(s) - //! \param addMemory is the amount of additional memory - //! \param reset decides if the value for overall GPU memory should be set to zero - void setMemsizeGPU(double addMemory, bool reset); + //! \param addMemory is the amount of additional memory + //! \param reset decides if the value for overall GPU memory should be set to zero + void setMemsizeGPU(double addMemory, bool reset); - ////////////////////////////////////////////////////////////////////////// - //get methods - ////////////////////////////////////////////////////////////////////////// - //! \brief return the limit of nodes, that can be written to a binary unstructured grid VTK file - uint getlimitOfNodesForVTK(); - //! \brief return if the timestep is even or odd - bool getIsTimestepEven(); + ////////////////////////////////////////////////////////////////////////// + //get methods + ////////////////////////////////////////////////////////////////////////// + //! \brief return the limit of nodes, that can be written to a binary unstructured grid VTK file + uint getlimitOfNodesForVTK(); + //! \brief return if the timestep is even or odd + bool getIsTimestepEven(); //! \brief return true if Advection Diffusion calculation is switched on bool getIsADcalculationOn(); //! \brief return true if body force calculation is switched on bool getIsBodyForceOn(); //! \brief return if the simulation should write VTK files - bool getPrintFiles(); - //! \brief return the number of neighbors of a lattice node (stencil) - int getD3Qxx(); - //! \brief return the output path - std::string getOutputPath(); - //! \brief return the prefix of the output files - std::string getOutputPrefix(); - //! \brief return the combination of output path and prefix - std::string getPathAndFilename(); - //! \brief return the timestep to start the simulation (in this code version = 1) - uint getTimestepStart(); - //! \brief return the timestep to end the simulation - uint getTimestepEnd(); - //! \brief return the time interval to write output files - uint getTimestepOut(); - //! \brief return the timestep to start writing output files - uint getTimestepStartOut(); - //! \brief return the viscosity in LB units - real getViscosityLB(); - //! \brief return the velocity in LB units - real getVelocityLB(); - //! \brief return the viscosity ratio in SI/LB units - real getViscosityRatio(); - //! \brief return the velocity ratio in SI/LB units - real getVelocityRatio(); - //! \brief return the density ratio in SI/LB units - real getDensityRatio(); - //! \brief return the pressure ratio in SI/LB units - real getPressureRatio(); - //! \brief return the Reynolds number - real getRe(); + bool getPrintFiles(); + //! \brief return the number of neighbors of a lattice node (stencil) + int getD3Qxx(); + //! \brief return the output path + std::string getOutputPath(); + //! \brief return the prefix of the output files + std::string getOutputPrefix(); + //! \brief return the combination of output path and prefix + std::string getPathAndFilename(); + //! \brief return the timestep to start the simulation (in this code version = 1) + uint getTimestepStart(); + //! \brief return the timestep to end the simulation + uint getTimestepEnd(); + //! \brief return the time interval to write output files + uint getTimestepOut(); + //! \brief return the timestep to start writing output files + uint getTimestepStartOut(); + //! \brief return the viscosity in LB units + real getViscosityLB(); + //! \brief return the velocity in LB units + real getVelocityLB(); + //! \brief return the viscosity ratio in SI/LB units + real getViscosityRatio(); + //! \brief return the velocity ratio in SI/LB units + real getVelocityRatio(); + //! \brief return the density ratio in SI/LB units + real getDensityRatio(); + //! \brief return the pressure ratio in SI/LB units + real getPressureRatio(); + //! \brief return the Reynolds number + real getRe(); //! \brief return the Schmidt number real getSc(); //! \brief return number of nodes used to discretize characteristic length scale L @@ -245,9 +245,9 @@ public: //! \brief return reduced acceleration due to gravity in buoyancy driven flow (LBM units) real getG_r(); //! \brief return the used device memory - double getMemsizeGPU(); + double getMemsizeGPU(); - //////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////// // initial condition fluid void setInitialCondition(std::function<void(real, real, real, real &, real &, real &, real &)> initialCondition); std::function<void(real, real, real, real &, real &, real &, real &)> &getInitialCondition(); @@ -256,24 +256,24 @@ public: std::function<void(real, real, real, real &)> &getInitialConditionAD(); ////////////////////////////////////////////////////////////////////////// - //! Class destructor - ~Parameter(); + //! Class destructor + ~Parameter(); protected: private: - //! \brief instance of parameter object - static Parameter* instance; - //! \brief stencil for the LB simulation, number of node neighbors - int D3Qxx; - //! \brief limit of nodes, that can be written to a binary unstructured grid VTK file - uint limitOfNodesForVTK; - //! \brief last timestep of the simulation - uint timestepEnd; - //! \brief time interval to write output files - uint timestepOut; - //! \brief timestep - start writing output files - uint timestepStartOut; - //! \brief Reynolds number - real Re; + //! \brief instance of parameter object + static Parameter* instance; + //! \brief stencil for the LB simulation, number of node neighbors + int D3Qxx; + //! \brief limit of nodes, that can be written to a binary unstructured grid VTK file + uint limitOfNodesForVTK; + //! \brief last timestep of the simulation + uint timestepEnd; + //! \brief time interval to write output files + uint timestepOut; + //! \brief timestep - start writing output files + uint timestepStartOut; + //! \brief Reynolds number + real Re; //! \brief Schmidt number real Sc; //! \brief number of nodes used to discretize characteristic length scale L @@ -281,35 +281,35 @@ private: //! \brief reduced acceleration due to gravity in buoyancy driven flow (LBM units) real g_r; //! \brief viscosity and velocity in LB units - real viscosityLB, velocityLB; - //! \brief ratio SI units / LB units for viscosity, velocity, density and pressure - real viscosityRatio, velocityRatio; - real densityRatio, pressRatio; - //! \brief used device memory - double memsizeGPU; + real viscosityLB, velocityLB; + //! \brief ratio SI units / LB units for viscosity, velocity, density and pressure + real viscosityRatio, velocityRatio; + real densityRatio, pressRatio; + //! \brief used device memory + double memsizeGPU; //! \brief Advection Diffusion calculation on/off bool calcAD; //! \brief Include body forces on/off bool calcBF; //! \brief write output files on/off - bool printFiles; - //! \brief strings to store output path, prefix and combination of both - std::string pathAndFilename, outputPath, outputPrefix; + bool printFiles; + //! \brief strings to store output path, prefix and combination of both + std::string pathAndFilename, outputPath, outputPrefix; - //////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////// //! \brief initial condition fluid std::function<void(real, real, real, real &, real &, real &, real &)> initialCondition; //! \brief initial condition concentration std::function<void(real, real, real, real &)> initialConditionAD; //! \brief pointer to LB-parameter struct on host system - ParameterStruct* parametersOnHost; - //! \brief pointer to LB-parameter struct on device/GPU - ParameterStruct* parametersOnDevice; + ParameterStruct* parametersOnHost; + //! \brief pointer to LB-parameter struct on device/GPU + ParameterStruct* parametersOnDevice; - //! Class default constructor - Parameter(); - //Parameter(const Parameter&); + //! Class default constructor + Parameter(); + //Parameter(const Parameter&); }; #endif