milupHPC documentation
  • include
Classes | Namespaces | Macros | Typedefs | Enumerations | Variables
parameter.h File Reference

Settings via preprocessor directives, typedefs, constants, structs. More...

#include <limits>
#include <iostream>
+ Include dependency graph for parameter.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SimulationParameters
 
struct  To
 Specify target: device or host. More...
 
struct  Smoothing
 (SPH) available smoothing kernels. More...
 
struct  Execution
 Execution location (host/device). More...
 
struct  Curve
 Available space-filling curves. More...
 
struct  IntegratorSelection
 Available integrators. More...
 
struct  Entry
 

Namespaces

namespace  Constants
 (Physical) constants
 

Macros

#define MAX_LEVEL   21
 
#define DEBUGGING   0
 
#define SAFETY_LEVEL   1
 
#define DIM   3
 Dimension of the problem. More...
 
#define power_two(x)   (1 << (x))
 
#define POW_DIM   power_two(DIM)
 
#define SI_UNITS   0
 [0]: natural units, [1]: SI units More...
 
#define CUBIC_DOMAINS   1
 
#define GRAVITY_SIM   1
 Simulation with gravitational forces. More...
 
#define SPH_SIM   0
 SPH simulation. More...
 
#define INTEGRATE_ENERGY   0
 integrate energy equation More...
 
#define INTEGRATE_DENSITY   0
 integrate density equation More...
 
#define INTEGRATE_SML   0
 integrate smoothing length More...
 
#define DECOUPLE_SML   0
 decouple smoothing length for pc integrator(s) More...
 
#define VARIABLE_SML   0
 variable smoothing length More...
 
#define SML_CORRECTION   0
 correct smoothing length More...
 
#define SPH_EQU_VERSION   1
 
#define ARTIFICIAL_VISCOSITY   1
 
#define BALSARA_SWITCH   0
 
#define AVERAGE_KERNELS   0
 
#define DEAL_WITH_TOO_MANY_INTERACTIONS   0
 
#define SHEPARD_CORRECTION   0
 
#define SOLID   0
 
#define NAVIER_STOKES   0
 
#define ARTIFICIAL_STRESS   0
 
#define POROSITY   0
 
#define ZERO_CONSISTENCY   0
 
#define LINEAR_CONSISTENCY   0
 
#define FRAGMENTATION   0
 
#define PALPHA_POROSITY   0
 
#define PLASTICITY   0
 
#define KLEY_VISCOSITY   0
 
#define KEY_MAX   ULONG_MAX
 
#define DOMAIN_LIST_SIZE   512
 
#define MAX_DEPTH   128
 
#define MAX_NUM_INTERACTIONS   180
 
#define NUM_THREADS_LIMIT_TIME_STEP   256
 
#define NUM_THREADS_CALC_CENTER_OF_MASS   256
 
#define COURANT_FACT   0.4
 
#define FORCES_FACT   0.2
 
#define DBL_MAX   dbl_max;
 

Typedefs

typedef double real
 
typedef int integer
 
typedef unsigned long keyType
 
typedef int idInteger
 
typedef struct SimulationParameters SimulationParameters
 

Enumerations

enum  EquationOfStates {
  EOS_TYPE_POLYTROPIC_GAS = 0 , EOS_TYPE_ISOTHERMAL_GAS = 3 , EOS_TYPE_IDEAL_GAS = 9 , EOS_TYPE_LOCALLY_ISOTHERMAL_GAS = 12 ,
  EOS_TYPE_POLYTROPIC_GAS = 0 , EOS_TYPE_ISOTHERMAL_GAS = 3 , EOS_TYPE_IDEAL_GAS = 9 , EOS_TYPE_LOCALLY_ISOTHERMAL_GAS = 12
}
 implemented equation of states More...
 

Variables

constexpr real dbl_max = std::numeric_limits<real>::max()
 
constexpr real Constants::G = 6.67430e-11
 Gravitational constant. More...
 

Detailed Description

Settings via preprocessor directives, typedefs, constants, structs.

Many pre-processor directives are part of the implementation. The code can be used for simulations in one dimension, two dimensions and three dimensions via conditional compiling in dependence of the pre-processor directive DIM.

Warning
However, the code is currently not appropriately tested for DIM 1 and DIM 2 and therefore no statement about the functionality and correctness can be made at this point.

Most important are the flags GRAVITY_SIM and SPH_SIM which enable or disable the gravitational and SPH part of the code.

Author
Michael Staneker
Bug:
no known bugs
Todo:
remove deprecated flags and avoid flags that don't match

Definition in file parameter.h.

Macro Definition Documentation

◆ ARTIFICIAL_STRESS

#define ARTIFICIAL_STRESS   0

Definition at line 93 of file parameter.h.

◆ ARTIFICIAL_VISCOSITY

#define ARTIFICIAL_VISCOSITY   1

Definition at line 84 of file parameter.h.

◆ AVERAGE_KERNELS

#define AVERAGE_KERNELS   0

Definition at line 88 of file parameter.h.

◆ BALSARA_SWITCH

#define BALSARA_SWITCH   0

Definition at line 85 of file parameter.h.

◆ COURANT_FACT

#define COURANT_FACT   0.4

Definition at line 111 of file parameter.h.

◆ CUBIC_DOMAINS

#define CUBIC_DOMAINS   1

Definition at line 46 of file parameter.h.

◆ DBL_MAX

#define DBL_MAX   dbl_max;

Definition at line 116 of file parameter.h.

◆ DEAL_WITH_TOO_MANY_INTERACTIONS

#define DEAL_WITH_TOO_MANY_INTERACTIONS   0

Definition at line 89 of file parameter.h.

◆ DEBUGGING

#define DEBUGGING   0

Definition at line 27 of file parameter.h.

◆ DECOUPLE_SML

#define DECOUPLE_SML   0

decouple smoothing length for pc integrator(s)

Definition at line 64 of file parameter.h.

◆ DIM

#define DIM   3

Dimension of the problem.

Definition at line 38 of file parameter.h.

◆ DOMAIN_LIST_SIZE

#define DOMAIN_LIST_SIZE   512

Definition at line 104 of file parameter.h.

◆ FORCES_FACT

#define FORCES_FACT   0.2

Definition at line 113 of file parameter.h.

◆ FRAGMENTATION

#define FRAGMENTATION   0

Definition at line 97 of file parameter.h.

◆ GRAVITY_SIM

#define GRAVITY_SIM   1

Simulation with gravitational forces.

Definition at line 49 of file parameter.h.

◆ INTEGRATE_DENSITY

#define INTEGRATE_DENSITY   0

integrate density equation

Definition at line 58 of file parameter.h.

◆ INTEGRATE_ENERGY

#define INTEGRATE_ENERGY   0

integrate energy equation

Definition at line 55 of file parameter.h.

◆ INTEGRATE_SML

#define INTEGRATE_SML   0

integrate smoothing length

Definition at line 61 of file parameter.h.

◆ KEY_MAX

#define KEY_MAX   ULONG_MAX

Definition at line 102 of file parameter.h.

◆ KLEY_VISCOSITY

#define KLEY_VISCOSITY   0

Definition at line 100 of file parameter.h.

◆ LINEAR_CONSISTENCY

#define LINEAR_CONSISTENCY   0

Definition at line 96 of file parameter.h.

◆ MAX_DEPTH

#define MAX_DEPTH   128

Definition at line 105 of file parameter.h.

◆ MAX_LEVEL

#define MAX_LEVEL   21

Definition at line 25 of file parameter.h.

◆ MAX_NUM_INTERACTIONS

#define MAX_NUM_INTERACTIONS   180

Definition at line 106 of file parameter.h.

◆ NAVIER_STOKES

#define NAVIER_STOKES   0

Definition at line 92 of file parameter.h.

◆ NUM_THREADS_CALC_CENTER_OF_MASS

#define NUM_THREADS_CALC_CENTER_OF_MASS   256

Definition at line 108 of file parameter.h.

◆ NUM_THREADS_LIMIT_TIME_STEP

#define NUM_THREADS_LIMIT_TIME_STEP   256

Definition at line 107 of file parameter.h.

◆ PALPHA_POROSITY

#define PALPHA_POROSITY   0

Definition at line 98 of file parameter.h.

◆ PLASTICITY

#define PLASTICITY   0

Definition at line 99 of file parameter.h.

◆ POROSITY

#define POROSITY   0

Definition at line 94 of file parameter.h.

◆ POW_DIM

#define POW_DIM   power_two(DIM)

Definition at line 40 of file parameter.h.

◆ power_two

#define power_two (   x)    (1 << (x))

Definition at line 39 of file parameter.h.

◆ SAFETY_LEVEL

#define SAFETY_LEVEL   1
  • SAFETY_LEVEL 0: almost no safety measures
  • SAFETY_LEVEL 1: most relevant/important safety measures
  • SAFETY_LEVEL 2: more safety measures, including assertions
  • SAFETY_LEVEL 3: many security measures, including all assertions

Definition at line 35 of file parameter.h.

◆ SHEPARD_CORRECTION

#define SHEPARD_CORRECTION   0

Definition at line 90 of file parameter.h.

◆ SI_UNITS

#define SI_UNITS   0

[0]: natural units, [1]: SI units

Definition at line 43 of file parameter.h.

◆ SML_CORRECTION

#define SML_CORRECTION   0

correct smoothing length

Definition at line 70 of file parameter.h.

◆ SOLID

#define SOLID   0

Definition at line 91 of file parameter.h.

◆ SPH_EQU_VERSION

#define SPH_EQU_VERSION   1

Choose the SPH representation to solve the momentum and energy equation:

  • SPH_EQU_VERSION 1: original version with
    • HYDRO $dv_a/dt ~ - (p_a/rho_a**2 + p_b/rho_b**2) \nabla_a W_ab$
    • SOLID $dv_a/dt ~ (sigma_a/rho_a**2 + sigma_b/rho_b**2) \nabla_a W_ab$
  • SPH_EQU_VERSION 2: slighty different version with
    • HYDRO $dv_a/dt ~ - (p_a+p_b)/(rho_a*rho_b) \nabla_a W_ab$
    • SOLID $dv_a/dt ~ (sigma_a+sigma_b)/(rho_a*rho_b) \nabla_a W_ab$

Definition at line 81 of file parameter.h.

◆ SPH_SIM

#define SPH_SIM   0

SPH simulation.

Definition at line 52 of file parameter.h.

◆ VARIABLE_SML

#define VARIABLE_SML   0

variable smoothing length

Definition at line 67 of file parameter.h.

◆ ZERO_CONSISTENCY

#define ZERO_CONSISTENCY   0

Definition at line 95 of file parameter.h.

Typedef Documentation

◆ idInteger

typedef int idInteger

Definition at line 19 of file parameter.h.

◆ integer

typedef int integer

Definition at line 17 of file parameter.h.

◆ keyType

typedef unsigned long keyType

Definition at line 18 of file parameter.h.

◆ real

typedef double real

Type definitions

  • real corresponds to floating point precision for whole program
  • keyType influences the maximal tree depth
    • maximal tree depth: (sizeof(keyType) - (sizeof(keyType) % DIM))/DIM

Definition at line 15 of file parameter.h.

◆ SimulationParameters

typedef struct SimulationParameters SimulationParameters

Enumeration Type Documentation

◆ EquationOfStates

enum EquationOfStates

implemented equation of states

Enumerator
EOS_TYPE_POLYTROPIC_GAS 
EOS_TYPE_ISOTHERMAL_GAS 

polytropic EOS for gas, needs polytropic_K and polytropic_gamma in material.cfg file

EOS_TYPE_IDEAL_GAS 

this is pure molecular hydrogen at 10 K

EOS_TYPE_LOCALLY_ISOTHERMAL_GAS 

ideal gas equation, set polytropic_gamma in material.cfg

EOS_TYPE_POLYTROPIC_GAS 

polytropic EOS for gas, needs polytropic_K and polytropic_gamma in material.cfg file

EOS_TYPE_ISOTHERMAL_GAS 

this is pure molecular hydrogen at 10 K

EOS_TYPE_IDEAL_GAS 

ideal gas equation, set polytropic_gamma in material.cfg

EOS_TYPE_LOCALLY_ISOTHERMAL_GAS 

locally isothermal gas: \( p = c_s^2 \cdot \rho \)

Definition at line 233 of file parameter.h.

Variable Documentation

◆ dbl_max

constexpr real dbl_max = std::numeric_limits<real>::max()
constexpr

Definition at line 115 of file parameter.h.


milupHPC - include/parameter.h File Reference
Generated on Wed Aug 31 2022 12:16:53 by Doxygen 1.9.3