Peano
Loading...
Searching...
No Matches
exaparty.api.particle.tests.testDensityCalculation.testDensityCalculation Class Reference

Test only the density calculation algorithmic step. More...

Inheritance diagram for exaparty.api.particle.tests.testDensityCalculation.testDensityCalculation:
Collaboration diagram for exaparty.api.particle.tests.testDensityCalculation.testDensityCalculation:

Public Member Functions

 __init__ (self, name, dimensions_hydro, cfl_factor, initial_time_step_size, particles_per_cell=5, min_h=0.6, max_h=0.5)
Public Member Functions inherited from exaparty.api.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius
 __init__ (self, name, dimensions_hydro=2, cfl_factor=0.1, initial_time_step_size=1e-4, constant_time_step_size=True, exaparty_project_namespace="SPH", particles_per_cell=0, min_h=0.3, max_h=0.3)
 set_parameters (self)
 This function translates "global" particle parameters which are constant throughout the simulation (like CFL factor, minimal time step size, viscosity parameters...) into dastgen attributes of the C++ particle class.
 alpha_av (self)
 Viscosity parameters of the Minimal SPH model.
 alpha_av (self, alpha_av)
 beta_av (self)
 beta_av (self, beta_av)
 get_cpp_namespace_from_project_namespace (self)
 Transform namespace into cpp format.
 readme_descriptor (self)
 Create default readme descriptor.
Public Member Functions inherited from exaparty.api.particle.SPHParticle.SPHParticle
 __init__ (self, name, dimensions_hydro=2, cfl_factor=0.1, initial_time_step_size=1e-4, constant_time_step_size=True, exaparty_project_namespace="SPH", particles_per_cell=0, min_h=0.3, max_h=0.3)
 algorithm_steps (self)
 Return algorithm steps: A list of AlgorithmStep objects to be executed in that order for this particle.
 initialisation_steps (self)
 Return the list of algorithm steps to be executed during initialisation.
 hydro_dimensions (self)
 Forbid users to modify hydro dimensions on-the-fly.
 hydro_dimensions (self, hydro_dimensions)
 eta_factor (self)
 Set the eta factor used by the SPH kernel to target a certain number of neighbour particles.
 eta_factor (self, eta_factor)
 h_hydro_min (self)
 Set the limits allowed for the SPH smoothing length.
 h_hydro_min (self, h_hydro_min)
 h_hydro_max (self)
 h_hydro_max (self, h_hydro_max)
 h_tolerance (self)
 Tolerance for Newton-Raphson convergence criterion.
 h_tolerance (self, h_tolerance)
 h_max_iterations (self)
 Max number of iterations to adapt the SPH smoothing length.
 h_max_iterations (self, h_max_iterations)
 mantissa_size (self)
 Set the mantissa size of doubles and Peano double arrays if we want to use reduced precission via Clang annotations.
 mantissa_size (self, mantissa_size)
 switch_namespace_of_all_particle_iterators (self, new_namespace, old_namespace="::exaparty::kernels::")
 Switch the prefix (namespace) of all particle iterators.
Public Member Functions inherited from exaparty.api.particle.Particle.Particle
 __init__ (self, name, particles_per_cell, min_h, max_h)
 Initialise the particle.
Public Member Functions inherited from peano4.api.toolbox.particles.Particle.Particle
 __init__ (self, name)
 Constructor.
Public Member Functions inherited from peano4.api.datamodel.DaStGen2.DaStGen2
 __init__ (self, name)
 Construct a DaStGen2 object.
 configure (self, namespace, association, subdirectory="", temporary_subdirectory="")
 Configure output.
 additional_load_and_store_arguments (self)
 additional_load_and_store_arguments (self, new_arguments)
 hosts_smart_pointer_attribute (self)
 Does class host a smart pointer attribute.
Public Member Functions inherited from peano4.api.datamodel.DoF.DoF
 __init__ (self, name)
 Create a degree of freedom object.
 get_full_qualified_type (self)
 get_logical_type_name (self)
 What should the data type be called within the data repository, or within action sets.
 get_enumeration_type (self)
 What should the data type be called within the data repository.
 additional_load_and_store_arguments_for_other_dof (self, argument_name, use_dof_association=None)
 You can make Peano's store and load arguments of any DoF depend on other DoFs that you have loaded before.
 subnamespace (self)

Protected Member Functions

 _setup_algorithm_steps (self)
 Set up the internal list of algorithm steps for this particle.
 _setup_initialisation_steps (self)
 Define the algorithm steps to be taken during initialization here.
Protected Member Functions inherited from exaparty.api.particle.Particle.Particle
 _dependency_checks_modify_steps (self, steplist, step_type_name, peano4_event_enum)
 Add dependency checks as well as mesh consistency checks to the algorithm steps.
 _add_dependency_checks (self)
 Add dependency (particle consistency) checks.

Additional Inherited Members

Data Fields inherited from exaparty.api.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius
 balsara = dastgen2.attributes.Double("balsara")
 rot_v = peano4.api.dastgen2.Peano4DoubleArray("rot_v", "Dimensions")
 div_v = dastgen2.attributes.Double("div_v")
 v_sig_AV = dastgen2.attributes.Double("v_sig_AV")
 soundSpeed = dastgen2.attributes.Double("soundSpeed")
 algorithm_steps_dict = get_algorithm_step_dict(self)
Data Fields inherited from exaparty.api.particle.SPHParticle.SPHParticle
 mass = dastgen2.attributes.Double("mass")
 velocity = peano4.api.dastgen2.Peano4DoubleArray("v", "Dimensions")
 acceleration = peano4.api.dastgen2.Peano4DoubleArray("a", "Dimensions")
 density = dastgen2.attributes.Double("density")
 pressure = dastgen2.attributes.Double("pressure")
 smoothL = dastgen2.attributes.Double("smoothingLength", initval=0.0)
 u = dastgen2.attributes.Double("u")
 uDot = dastgen2.attributes.Double("uDot")
 v_full = peano4.api.dastgen2.Peano4DoubleArray("v_full", "Dimensions")
 u_full = dastgen2.attributes.Double("u_full")
 wcount = dastgen2.attributes.Double("wcount")
 wcount_dh = dastgen2.attributes.Double("wcount_dh")
 f = dastgen2.attributes.Double("f")
 hDot = dastgen2.attributes.Double("hDot")
 rho_dh = dastgen2.attributes.Double("rho_dh")
 sml_iteration_count
 sml_iter_left_bound = dastgen2.attributes.Double("smlIterLeftBound")
 sml_iter_right_bound = dastgen2.attributes.Double("smlIterRightBound")
 has_no_neighbours = dastgen2.attributes.Boolean("hasNoNeighbours")
 sml_converged
 density_neighbourcount
 force_neighbourcount
Data Fields inherited from exaparty.api.particle.Particle.Particle
 particles_per_cell = particles_per_cell
 min_h = min_h
 max_h = max_h
Data Fields inherited from peano4.api.toolbox.particles.Particle.Particle
 partid = dastgen2.attributes.Integer("partid", ifdefs=["PeanoDebug > 0"], initval="-1")
Data Fields inherited from peano4.api.datamodel.DaStGen2.DaStGen2
 generator = None
 data = dastgen2.DataModel(name)
 peano4_mpi_and_storage_aspect = peano4.api.dastgen2.MPIAndStorageAspect(peano4.api.datamodel.DoFAssociation.Undef)
Data Fields inherited from peano4.api.datamodel.DoF.DoF
 association = DoFAssociation.Undef
 name = name
list namespace = []
 grid_selector = None
 subdirectory = subdirectory
 temporary_subdirectory = temporary_subdirectory
Static Public Attributes inherited from exaparty.api.particle.Particle.Particle
str DependencyChecks_Attribute_Prefix = "dependencyChecks"
list DependencyChecks_Ifdefs = ["PeanoDebug > 0"]
Static Public Attributes inherited from peano4.api.datamodel.DaStGen2.DaStGen2
str readme_package_descriptor
Protected Attributes inherited from exaparty.api.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius
float _alpha_av = 0.8
float _beta_av = 3.0
Protected Attributes inherited from exaparty.api.particle.SPHParticle.SPHParticle
str _sph_flavour = "none"
 _cfl_factor = cfl_factor
 _initial_time_step_size = initial_time_step_size
 _constant_time_step_size = constant_time_step_size
 _hydro_dimensions = dimensions_hydro
float _eta_factor = 1.2348
int _h_max_iterations = 30
int _h_hydro_min = 1e-6
tuple _h_hydro_max
int _h_tolerance = 1e-4
 _exaparty_project_namespace = exaparty_project_namespace
 _mantissa_size = mantissa_size
Protected Attributes inherited from exaparty.api.particle.Particle.Particle
 _algorithm_steps = modified_steps
 _initialisation_steps = modified_steps
Protected Attributes inherited from peano4.api.datamodel.DoF.DoF
list _additional_load_and_store_arguments = []

Detailed Description

Test only the density calculation algorithmic step.

Inherit everything from SPHLeapfrogFixedSearchRadius, just modify the algorithm steps.

Definition at line 14 of file testDensityCalculation.py.

Constructor & Destructor Documentation

◆ __init__()

exaparty.api.particle.tests.testDensityCalculation.testDensityCalculation.__init__ ( self,
name,
dimensions_hydro,
cfl_factor,
initial_time_step_size,
particles_per_cell = 5,
min_h = 0.6,
max_h = 0.5 )

Member Function Documentation

◆ _setup_algorithm_steps()

exaparty.api.particle.tests.testDensityCalculation.testDensityCalculation._setup_algorithm_steps ( self)
protected

Set up the internal list of algorithm steps for this particle.

We need to maintain an individual instance of this list for cases where we modify the algorithm steps later on. This can happen for example when adding debugging/dependency checks later on.

The algorithm steps shall be a list of AlgorithmStep objects to be executed in that order.

Definitions of the algorithm steps stored in the algorithm_steps_dict are placed in _setup_algorithm_steps_dict(self). The dict is set up during instantiation of this class.

Reimplemented from exaparty.api.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius.

Definition at line 49 of file testDensityCalculation.py.

References exaparty.api.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius.algorithm_steps_dict.

◆ _setup_initialisation_steps()

exaparty.api.particle.tests.testDensityCalculation.testDensityCalculation._setup_initialisation_steps ( self)
protected

Define the algorithm steps to be taken during initialization here.

This follows the same logic as _setup_algorithm_steps. See documentation there for more info.

Make sure self._setup_algorithm_steps_dict() has been called before.

Reimplemented from exaparty.api.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius.

Definition at line 75 of file testDensityCalculation.py.


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