![]() |
Peano
|
Simple particle with fixed search radius subject to explicit Euler. More...
Public Member Functions | |
__init__ (self, name, cfl_factor, initial_time_step_size, enter_cell_kernel="", touch_particles_of_set_first_time_kernel="", touch_particles_of_set_last_time_kernel="", particles_per_cell=0, min_h=0.005, max_h=0.3) | |
Initialise the particle. | |
touch_particles_of_set_first_time_kernel (self) | |
touch_particles_of_set_first_time_kernel (self, value) | |
touch_particles_of_set_last_time_kernel (self) | |
touch_particles_of_set_last_time_kernel (self, value) | |
cell_kernel (self) | |
cell_kernel (self, value) | |
add_to_reduction (self, value) | |
algorithm_steps (self) | |
The explicit Euler basically consists of two steps per particle. | |
initialisation_steps (self) | |
No particular initialisation required, but we reduce once, so we get the initial stats right before we jump into the time stepping. | |
readme_descriptor (self) | |
Create default readme descriptor. | |
![]() | |
configure (self, namespace, association, subdirectory="") | |
I always need the MPI aspect, but I can't add the right one before I don't know whether this DaStGen model is used for vertices, faces or cells. | |
additional_load_and_store_arguments (self) | |
additional_load_and_store_arguments (self, new_arguments) | |
![]() | |
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) | |
Data Fields | |
velocity | |
accelerator | |
cfl_factor | |
initial_time_step_size | |
enter_cell_kernel | |
touch_particles_of_set_first_time_kernel | |
touch_particles_of_set_last_time_kernel | |
![]() | |
particles_per_cell | |
min_h | |
max_h | |
name | |
![]() | |
name | |
partid | |
![]() | |
generator | |
data | |
peano4_mpi_and_storage_aspect | |
![]() | |
association | |
name | |
namespace | |
subdirectory | |
Protected Attributes | |
_algorithm_steps | |
![]() | |
_algorithm_steps | |
_initialisation_steps | |
![]() | |
_additional_load_and_store_arguments | |
![]() | |
_additional_load_and_store_arguments | |
Private Member Functions | |
__setup_algorithm_steps (self) | |
Create a repository of algorithmic steps which are then ordered into the actual time stepping sequence. | |
Additional Inherited Members | |
![]() | |
str | DependencyChecks_Attribute_Prefix = "dependencyChecks" |
list | DependencyChecks_Ifdefs = ["PeanoDebug > 0"] |
![]() | |
str | readme_package_descriptor |
![]() | |
_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. | |
Simple particle with fixed search radius subject to explicit Euler.
Simple particle with a fixed search radius H which moves according to an explicit Euler. By default, the Euler uses global time stepping, i.e. the combination of maximum velocity and minimal mesh size determines the time step size of the subsequent time step. The term fixed means that the search radius does not change throughout the time step. Nothing stops you however to adopt the search radius in-between any two time steps. However, only change the radius in a step which is marked with the AlgorithmStep.Effect.CHANGE_POSITION_OR_INTERACTION_RADIUS.
Besides the default variables x and h, the particle has the following properties:
- a vector a which is the acceleration; - a vector v which is the velocity.
You can add further properties via
myparticle.data.add_attribute( peano4.dastgen2.Peano4DoubleArray("myFancyArray","Dimensions") )
in your code. Or you can create a subclass which adds additional fields after it has called the baseline constructor.
There is a dedicated algorithmic step to do all the force calculation. This step can be tailored to your needs by setting the strings
Each of these is unset (None) by default, but you can make it hold any reasonable C++ string. The Swift2ish way to use them is ot use the iterators from ParticleSetIterators.h to run over the relevant particles.
For the two vertex kernels, this would look similar to
For the cell, it resembles
The documentation of the actual operators ParticleBinaryOperator and ParticleUnaryOperatorOnVertex for more documentation.
name: String To be in line with other conventions, I recommend you start with an uppercase letter. This has to be a valid C++ identifier, i.e. don't use any special symbols besides an underscore.
name: String To be in line with other conventions, I recommend you start with an uppercase letter. This has to be a valid C++ identifier, i.e. don't use any special symbols besides an underscore.
Definition at line 11 of file ExplicitEulerFixedSearchRadius.py.
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__init__ | ( | self, | |
name, | |||
particles_per_cell, | |||
min_h, | |||
max_h = "", | |||
touch_particles_of_set_first_time_kernel = "", | |||
touch_particles_of_set_last_time_kernel = "", | |||
particles_per_cell = 0, | |||
min_h = 0.005, | |||
max_h = 0.3 ) |
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.Particle.Particle.
Definition at line 95 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__init__().
Referenced by swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__init__().
|
private |
Create a repository of algorithmic steps which are then ordered into the actual time stepping sequence.
Definition at line 162 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.cfl_factor, swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cfl_factor, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.cfl_factor, swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.cfl_factor, swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.initial_time_step_size, swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.initial_time_step_size, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.initial_time_step_size, swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.initial_time_step_size, dastgen2.attributes.Attribute.Attribute.name(), exahype2.solvers.aderdg.kernels.Gemms.Gemms.name, exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.name(), exahype2.solvers.fv.FV.FV.name(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.name(), peano4.datamodel.DoF.DoF.name, peano4.solversteps.Step.Step.name, peano4.solversteps.UserActionSet.UserActionSet.name, peano4.toolbox.particles.Particle.Particle.name, swift2.particle.AlgorithmStep.AlgorithmStep.name, swift2.particle.Particle.Particle.name, swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.name, swift2.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize.name, convert::data::Variable.name, solvers.api.Solver.Solver.name(), and api.solvers.Solver.Solver.name().
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.add_to_reduction | ( | self, | |
value ) |
Definition at line 157 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius._algorithm_steps, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._algorithm_steps, swift2.particle.Particle.Particle._algorithm_steps, swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._algorithm_steps, and swift2.particle.tests.testDensityCalculation.testDensityCalculation._algorithm_steps.
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.algorithm_steps | ( | self | ) |
The explicit Euler basically consists of two steps per particle.
We first determine the force. For this, we need access to the neighbours. The step solely alters the individual particle's state. In the next algorithm step, we need this state, as well as global data (the admissible time step size) to update position and velocity. We also determine the CFL condition here. So we
Reimplemented from swift2.particle.Particle.Particle.
Definition at line 232 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius._algorithm_steps, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._algorithm_steps, swift2.particle.Particle.Particle._algorithm_steps, swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._algorithm_steps, and swift2.particle.tests.testDensityCalculation.testDensityCalculation._algorithm_steps.
Referenced by swift2.particle.Particle.Particle._add_dependency_checks().
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cell_kernel | ( | self | ) |
Definition at line 150 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius._algorithm_steps, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._algorithm_steps, swift2.particle.Particle.Particle._algorithm_steps, swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._algorithm_steps, and swift2.particle.tests.testDensityCalculation.testDensityCalculation._algorithm_steps.
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cell_kernel | ( | self, | |
value ) |
Definition at line 154 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius._algorithm_steps, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._algorithm_steps, swift2.particle.Particle.Particle._algorithm_steps, swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._algorithm_steps, and swift2.particle.tests.testDensityCalculation.testDensityCalculation._algorithm_steps.
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.initialisation_steps | ( | self | ) |
No particular initialisation required, but we reduce once, so we get the initial stats right before we jump into the time stepping.
Reimplemented from swift2.particle.Particle.Particle.
Definition at line 249 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius._algorithm_steps, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._algorithm_steps, swift2.particle.Particle.Particle._algorithm_steps, swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._algorithm_steps, and swift2.particle.tests.testDensityCalculation.testDensityCalculation._algorithm_steps.
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.readme_descriptor | ( | self | ) |
Create default readme descriptor.
You might want to overwrite this for your particular particle species to get more detailed info the the README.md file generated by Peano.
Reimplemented from swift2.particle.Particle.Particle.
Definition at line 261 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.cfl_factor, swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cfl_factor, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.cfl_factor, swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.cfl_factor, swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.initial_time_step_size, swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.initial_time_step_size, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.initial_time_step_size, and swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.initial_time_step_size.
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_first_time_kernel | ( | self | ) |
Definition at line 134 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius._algorithm_steps, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._algorithm_steps, swift2.particle.Particle.Particle._algorithm_steps, swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._algorithm_steps, and swift2.particle.tests.testDensityCalculation.testDensityCalculation._algorithm_steps.
Referenced by swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps(), swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.algorithm_steps(), and swift2.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize.algorithm_steps().
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_first_time_kernel | ( | self, | |
value ) |
Definition at line 138 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius._algorithm_steps, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._algorithm_steps, swift2.particle.Particle.Particle._algorithm_steps, swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._algorithm_steps, and swift2.particle.tests.testDensityCalculation.testDensityCalculation._algorithm_steps.
Referenced by swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps(), swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.algorithm_steps(), and swift2.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize.algorithm_steps().
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_last_time_kernel | ( | self | ) |
Definition at line 142 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius._algorithm_steps, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._algorithm_steps, swift2.particle.Particle.Particle._algorithm_steps, swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._algorithm_steps, and swift2.particle.tests.testDensityCalculation.testDensityCalculation._algorithm_steps.
Referenced by swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps().
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_last_time_kernel | ( | self, | |
value ) |
Definition at line 146 of file ExplicitEulerFixedSearchRadius.py.
References swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius._algorithm_steps, swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._algorithm_steps, swift2.particle.Particle.Particle._algorithm_steps, swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._algorithm_steps, and swift2.particle.tests.testDensityCalculation.testDensityCalculation._algorithm_steps.
Referenced by swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps().
|
protected |
Definition at line 174 of file ExplicitEulerFixedSearchRadius.py.
Referenced by swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius._setup_algorithm_steps(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.add_to_reduction(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.add_to_reduction(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.algorithm_steps(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.algorithm_steps(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cell_kernel(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.cell_kernel(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cell_kernel(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.cell_kernel(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.initialisation_steps(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.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.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_first_time_kernel(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_first_time_kernel(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_first_time_kernel(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_last_time_kernel(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_last_time_kernel(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_last_time_kernel(), and swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_last_time_kernel().
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.accelerator |
Definition at line 115 of file ExplicitEulerFixedSearchRadius.py.
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cfl_factor |
Definition at line 119 of file ExplicitEulerFixedSearchRadius.py.
Referenced by swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__setup_algorithm_steps(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.__setup_algorithm_steps(), swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.readme_descriptor(), and swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.readme_descriptor().
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.enter_cell_kernel |
Definition at line 124 of file ExplicitEulerFixedSearchRadius.py.
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.initial_time_step_size |
Definition at line 120 of file ExplicitEulerFixedSearchRadius.py.
Referenced by swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__setup_algorithm_steps(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.__setup_algorithm_steps(), swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.readme_descriptor(), and swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.readme_descriptor().
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_first_time_kernel |
Definition at line 125 of file ExplicitEulerFixedSearchRadius.py.
Referenced by swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps(), swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.algorithm_steps(), and swift2.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize.algorithm_steps().
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_last_time_kernel |
Definition at line 128 of file ExplicitEulerFixedSearchRadius.py.
Referenced by swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps().
swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.velocity |
Definition at line 114 of file ExplicitEulerFixedSearchRadius.py.