![]() |
Peano
|
Simple particle with a fixed interaction radius h which moves according to leapfrog KDK scheme. More...
Public Member Functions | |
__init__ (self, name, cfl_factor, initial_time_step_size, particle_particle_interaction_over_particle_sets_kernel="", touch_particles_of_set_first_time_kernel="", touch_particles_of_set_last_time_kernel="") | |
Initialise the particle. | |
algorithm_steps (self) | |
Leapfrog consists basically of four steps per particle. | |
initialisation_steps (self) | |
No particular initialisation required. | |
![]() | |
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 | |
cfl_factor | |
initial_time_step_size | |
velocity | |
accelerator | |
v_full | |
u_full | |
u | |
density | |
pressure | |
soundSpeed | |
v_sig_AV | |
particle_particle_interaction_over_particle_sets_kernel | |
touch_particles_of_set_first_time_kernel | |
touch_particles_of_set_last_time_kernel | |
name | |
![]() | |
particles_per_cell | |
min_h | |
max_h | |
name | |
![]() | |
name | |
partid | |
![]() | |
generator | |
data | |
peano4_mpi_and_storage_aspect | |
![]() | |
association | |
name | |
namespace | |
subdirectory | |
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. | |
![]() | |
_algorithm_steps | |
_initialisation_steps | |
![]() | |
_additional_load_and_store_arguments | |
![]() | |
_additional_load_and_store_arguments | |
Simple particle with a fixed interaction radius h which moves according to leapfrog KDK scheme.
By default, it 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. Besides the default variables x and h, the particle has the following properties:
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.
You will need to add further properties for any SPH project.
particle_particle_interaction_over_particle_sets_kernel is a C++ string which defines a force between two particles. It has access to three important objects:
Please consult the guidebook for a definition of local and active particles but take into account that the local particles always are a subset of the active particles.
Besides the actual particle-to-particle calculation, i.e. a force calculation, users can also provide kernels that kick in when you touch particles for the first time before you actually compute any particle-particle interaction, and there is a plug-in point what you do just once the particle-particle interaction has terminated. The latter point is reached before we do the actual time stepping. In both plug-in points, you have a vertex marker which gives you the position of the vertex to which a particular is associated, and you have the localParticles. This is a vector of pointers in this particular case.
Definition at line 11 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.__init__ | ( | self, | |
name, | |||
particles_per_cell, | |||
min_h, | |||
max_h = "", | |||
touch_particles_of_set_first_time_kernel = "", | |||
touch_particles_of_set_last_time_kernel = "" ) |
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 61 of file DisappearingParticleTest.py.
References swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.__init__().
Referenced by swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.__init__().
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.algorithm_steps | ( | self | ) |
Leapfrog consists basically of four steps per particle.
We first determine the force. Then we update the velocity by half a timestep and move the particle by a full timestep. Then the force is re-computed and the second half of the velocity update is done. Some variations of this KDK form re-arrange the steps executed per timestep to avoid a second force loop.
Reimplemented from swift2.particle.Particle.Particle.
Definition at line 111 of file DisappearingParticleTest.py.
References swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.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_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.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_first_time_kernel(), swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.touch_particles_of_set_first_time_kernel, and swift2.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize.touch_particles_of_set_first_time_kernel.
Referenced by swift2.particle.Particle.Particle._add_dependency_checks().
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.initialisation_steps | ( | self | ) |
No particular initialisation required.
Reimplemented from swift2.particle.Particle.Particle.
Definition at line 247 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.accelerator |
Definition at line 77 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.cfl_factor |
Definition at line 72 of file DisappearingParticleTest.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.tests.DisappearingParticleTest.DisappearingParticleTest.density |
Definition at line 87 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.initial_time_step_size |
Definition at line 73 of file DisappearingParticleTest.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.tests.DisappearingParticleTest.DisappearingParticleTest.name |
Definition at line 136 of file DisappearingParticleTest.py.
Referenced by exahype2.solvers.aderdg.kernels.Gemms.Gemms.__repr__(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__setup_algorithm_steps(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.__setup_algorithm_steps(), swift2.particle.AlgorithmStep.AlgorithmStep.__str__(), peano4.datamodel.DoF.DoF.additional_load_and_store_arguments_for_other_dof(), swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle.algorithm_steps(), peano4.solversteps.UserActionSet.UserActionSet.get_action_set_name(), peano4.datamodel.DoF.DoF.get_full_qualified_type(), peano4.datamodel.DoF.DoF.get_logical_type_name(), dastgen2.attributes.Enumeration.Enumeration.get_to_string(), and swift2.particle.Particle.Particle.readme_descriptor().
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.particle_particle_interaction_over_particle_sets_kernel |
Definition at line 99 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.pressure |
Definition at line 88 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.soundSpeed |
Definition at line 89 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.touch_particles_of_set_first_time_kernel |
Definition at line 102 of file DisappearingParticleTest.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.tests.DisappearingParticleTest.DisappearingParticleTest.touch_particles_of_set_last_time_kernel |
Definition at line 105 of file DisappearingParticleTest.py.
Referenced by swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps().
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.u |
Definition at line 86 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.u_full |
Definition at line 85 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.v_full |
Definition at line 84 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.v_sig_AV |
Definition at line 90 of file DisappearingParticleTest.py.
swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.velocity |
Definition at line 76 of file DisappearingParticleTest.py.