Peano
Loading...
Searching...
No Matches
exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius Class Reference

Leapfrog ODE integrator. More...

Inheritance diagram for exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius:
Collaboration diagram for exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius:

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, add_partid=False)
 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)
 Return sequence of algorithm steps that have to be called per time step.
 initialisation_steps (self)
 Return sequence of algorithm steps that have to be performed throughout initialisation.
 readme_descriptor (self)
 Create default readme descriptor.
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)

Data Fields

 cfl_factor = cfl_factor
 initial_time_step_size = initial_time_step_size
 velocity = peano4.api.dastgen2.Peano4DoubleArray("v", "Dimensions")
 accelerator = peano4.api.dastgen2.Peano4DoubleArray("a", "Dimensions")
 enter_cell_kernel = enter_cell_kernel
tuple touch_particles_of_set_first_time_kernel
tuple touch_particles_of_set_last_time_kernel
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

Protected Member Functions

 _setup_algorithm_steps_dict (self)
 Create a repository of algorithmic steps which are then ordered into the actual time stepping sequence.
 _setup_algorithm_steps (self)
 Create algorithm steps behind leapfrog.
 _setup_initialisation_steps (self)
 Technically nothing really required, but.
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.

Protected Attributes

dict _algorithm_steps_dict
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 = []

Additional Inherited Members

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

Detailed Description

Leapfrog ODE integrator.

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:

  • 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.api.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.

Study exaparty.api.particle.ExplicitEulerFixedSearchRadius for further information including all parameter documentation.

Parameters
add_partidWhether to add a particle ID. Normally, that is done in the Particle super class if PeanoDebug > 0. For certain tests however, a particle ID is required even in release mode. So switch this on if you need it and are building release mode.

Definition at line 14 of file LeapfrogFixedSearchRadius.py.

Constructor & Destructor Documentation

◆ __init__()

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.__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,
add_partid = False )

Definition at line 48 of file LeapfrogFixedSearchRadius.py.

References __init__().

Referenced by __init__().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ _setup_algorithm_steps()

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._setup_algorithm_steps ( self)
protected

Create algorithm steps behind leapfrog.

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.

Definition at line 308 of file LeapfrogFixedSearchRadius.py.

References _algorithm_steps_dict.

Referenced by exaparty.api.particle.tests.testDensityCalculation.testDensityCalculation.__init__().

Here is the caller graph for this function:

◆ _setup_algorithm_steps_dict()

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._setup_algorithm_steps_dict ( self)
protected

Create a repository of algorithmic steps which are then ordered into the actual time stepping sequence.

Definition at line 143 of file LeapfrogFixedSearchRadius.py.

References exaparty.api.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.cfl_factor, exaparty.api.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cfl_factor, cfl_factor, exaparty.api.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.initial_time_step_size, exaparty.api.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.initial_time_step_size, initial_time_step_size, convert::data::Variable.name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling.name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling.name, exagrype.api.FOSOSolver.FOSOSolver.name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling.name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling.name, exahype2.api.dslhype2.AbstractSyntaxTree.Argument.name, exahype2.api.dslhype2.AbstractSyntaxTree.Function.name, exahype2.api.dslhype2.AbstractSyntaxTree.FunctionCall.name, exahype2.api.dslhype2.Expressions.Variable.name, exahype2.api.dslhype2.Types.TFunction.name, exahype2.api.dslhype2.Types.TStruct.name, exahype2.api.PDETerm.PDETerm.name, exahype2.api.Solver.Solver.Plotter.name, exaparty.api.particle.AlgorithmStep.AlgorithmStep.name, and peano4.api.datamodel.DoF.DoF.name.

◆ _setup_initialisation_steps()

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._setup_initialisation_steps ( self)
protected

Technically nothing really required, but.

Definition at line 335 of file LeapfrogFixedSearchRadius.py.

References _algorithm_steps_dict.

Referenced by exaparty.api.particle.tests.testDensityCalculation.testDensityCalculation.__init__().

Here is the caller graph for this function:

◆ add_to_reduction()

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.add_to_reduction ( self,
value )

Definition at line 130 of file LeapfrogFixedSearchRadius.py.

References _algorithm_steps_dict.

◆ algorithm_steps()

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.algorithm_steps ( self)

Return sequence of algorithm steps that have to be called per time step.

Reimplemented from exaparty.api.particle.Particle.Particle.

Definition at line 135 of file LeapfrogFixedSearchRadius.py.

References exaparty.api.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius._algorithm_steps, and _algorithm_steps.

Referenced by exaparty.api.particle.Particle.Particle._add_dependency_checks().

Here is the caller graph for this function:

◆ cell_kernel() [1/2]

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.cell_kernel ( self)

Definition at line 123 of file LeapfrogFixedSearchRadius.py.

References _algorithm_steps_dict.

◆ cell_kernel() [2/2]

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.cell_kernel ( self,
value )

Definition at line 127 of file LeapfrogFixedSearchRadius.py.

References _algorithm_steps_dict.

◆ initialisation_steps()

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.initialisation_steps ( self)

Return sequence of algorithm steps that have to be performed throughout initialisation.

Reimplemented from exaparty.api.particle.Particle.Particle.

Definition at line 139 of file LeapfrogFixedSearchRadius.py.

References _initialisation_steps.

◆ readme_descriptor()

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.readme_descriptor ( self)

◆ touch_particles_of_set_first_time_kernel() [1/2]

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_first_time_kernel ( self)

Definition at line 99 of file LeapfrogFixedSearchRadius.py.

References _algorithm_steps_dict.

◆ touch_particles_of_set_first_time_kernel() [2/2]

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_first_time_kernel ( self,
value )

Definition at line 105 of file LeapfrogFixedSearchRadius.py.

References _algorithm_steps_dict.

◆ touch_particles_of_set_last_time_kernel() [1/2]

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_last_time_kernel ( self)

Definition at line 111 of file LeapfrogFixedSearchRadius.py.

References _algorithm_steps_dict.

◆ touch_particles_of_set_last_time_kernel() [2/2]

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_last_time_kernel ( self,
value )

Definition at line 117 of file LeapfrogFixedSearchRadius.py.

References _algorithm_steps_dict.

Field Documentation

◆ _algorithm_steps_dict

◆ accelerator

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.accelerator = peano4.api.dastgen2.Peano4DoubleArray("a", "Dimensions")

Definition at line 73 of file LeapfrogFixedSearchRadius.py.

◆ cfl_factor

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.cfl_factor = cfl_factor

◆ enter_cell_kernel

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.enter_cell_kernel = enter_cell_kernel

Definition at line 85 of file LeapfrogFixedSearchRadius.py.

◆ initial_time_step_size

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.initial_time_step_size = initial_time_step_size

◆ touch_particles_of_set_first_time_kernel

tuple exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_first_time_kernel

◆ touch_particles_of_set_last_time_kernel

tuple exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.touch_particles_of_set_last_time_kernel

◆ velocity

exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.velocity = peano4.api.dastgen2.Peano4DoubleArray("v", "Dimensions")

Definition at line 72 of file LeapfrogFixedSearchRadius.py.


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