![]() |
Peano
|
Test only the density calculation algorithmic step. More...
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) | |
Initialise the particle. | |
![]() | |
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. | |
![]() | |
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="::swift2::kernels::") | |
Switch the prefix (namespace) of all particle iterators. | |
![]() | |
configure (self, namespace, association, 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. | |
![]() | |
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. | |
![]() | |
_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. | |
Protected Attributes | |
_algorithm_steps | |
_initialisation_steps | |
![]() | |
_sph_flavour | |
_alpha_av | |
_beta_av | |
_hydro_dimensions | |
_algorithm_steps | |
_initialisation_steps | |
_cfl_factor | |
_initial_time_step_size | |
![]() | |
_sph_flavour | |
_cfl_factor | |
_initial_time_step_size | |
_constant_time_step_size | |
_hydro_dimensions | |
_eta_factor | |
_h_max_iterations | |
_h_hydro_min | |
_h_hydro_max | |
_h_tolerance | |
_swift_project_namespace | |
_mantissa_size | |
![]() | |
_algorithm_steps | |
_initialisation_steps | |
![]() | |
_additional_load_and_store_arguments | |
![]() | |
_additional_load_and_store_arguments | |
Test only the density calculation algorithmic step.
Inherit everything from SPHLeapfrogFixedSearchRadius, just modify the algorithm steps.
Definition at line 14 of file testDensityCalculation.py.
swift2.particle.tests.testDensityCalculation.testDensityCalculation.__init__ | ( | self, | |
name, | |||
particles_per_cell, | |||
min_h, | |||
max_h, | |||
constant_time_step_size = 5, | |||
swift_project_namespace = 0.6, | |||
particles_per_cell = 0.5 ) |
Initialise the particle.
This is the baseclass for a particle, i.e. we only add the absolute minimum of information to a particle. As we inherit from the toolbox particle, we already have some attributes defined. These are the guys which are not explicitly visible from the code snippet below, i.e. they are introduced by the superclass constructor.
Here's an overview of pre-defined attributes that each and every particle hosts:
Reimplemented from swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius.
Definition at line 23 of file testDensityCalculation.py.
References swift2.particle.tests.testDensityCalculation.testDensityCalculation.__init__(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._setup_algorithm_steps(), swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._setup_algorithm_steps(), swift2.particle.SPHParticle.SPHParticle._setup_algorithm_steps(), swift2.particle.tests.testDensityCalculation.testDensityCalculation._setup_algorithm_steps(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._setup_initialisation_steps(), swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._setup_initialisation_steps(), swift2.particle.SPHParticle.SPHParticle._setup_initialisation_steps(), and swift2.particle.tests.testDensityCalculation.testDensityCalculation._setup_initialisation_steps().
Referenced by swift2.particle.tests.testDensityCalculation.testDensityCalculation.__init__().
|
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 swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius.
Definition at line 49 of file testDensityCalculation.py.
References swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius.algorithm_steps_dict.
Referenced by swift2.particle.tests.testDensityCalculation.testDensityCalculation.__init__().
|
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 swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius.
Definition at line 75 of file testDensityCalculation.py.
Referenced by swift2.particle.tests.testDensityCalculation.testDensityCalculation.__init__().
|
protected |
Definition at line 71 of file testDensityCalculation.py.
Referenced by swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._setup_algorithm_steps(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.add_to_reduction(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.algorithm_steps(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.algorithm_steps(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cell_kernel(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cell_kernel(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.initialisation_steps(), swift2.particle.SPHParticle.SPHParticle.switch_namespace_of_all_particle_iterators(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_first_time_kernel(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_first_time_kernel(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_last_time_kernel(), and swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_last_time_kernel().
|
protected |