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

Simple particle with fixed search radius subject to explicit Euler. More...

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

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)
 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.
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

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

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

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 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 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

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

Force calculation

There is a dedicated algorithmic step to do all the force calculation. This step can be tailored to your needs by setting the strings

  • enter_cell_kernel
  • touch_particles_of_set_first_time_kernel
  • touch_particles_of_set_last_time_kernel

Each of these is unset (None) by default, but you can make it hold any reasonable C++ string. The ExaPartyish 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

touch_vertex_first_time_kernel = "::exaparty::kernels::forAllParticles( marker, assignedParticles, numberOfCoalescedAssignedParticles, myFunctor );"

For the cell, it resembles

::exaparty::kernels::forAllParticlePairs( marker, localParticles, activeParticles, myFunction);

The documentation of the actual operators ParticleBinaryOperator and ParticleUnaryOperatorOnVertex for more documentation.

Attributes

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.

Attributes

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.

See also
peano4.datamanagement.CellMarker
peano4.datamanagement.VertexMarker
peano4.datamanagement.CellMarker
peano4.datamanagement.VertexMarker

Definition at line 11 of file ExplicitEulerFixedSearchRadius.py.

Constructor & Destructor Documentation

◆ __init__()

exaparty.api.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__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 )

Definition at line 95 of file ExplicitEulerFixedSearchRadius.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.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__setup_algorithm_steps ( self)
private

◆ add_to_reduction()

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

Definition at line 157 of file ExplicitEulerFixedSearchRadius.py.

References _algorithm_steps.

◆ algorithm_steps()

exaparty.api.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 exaparty.api.particle.Particle.Particle.

Definition at line 232 of file ExplicitEulerFixedSearchRadius.py.

References _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.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.cell_kernel ( self)

Definition at line 150 of file ExplicitEulerFixedSearchRadius.py.

References _algorithm_steps.

◆ cell_kernel() [2/2]

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

Definition at line 154 of file ExplicitEulerFixedSearchRadius.py.

References _algorithm_steps.

◆ initialisation_steps()

exaparty.api.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 exaparty.api.particle.Particle.Particle.

Definition at line 249 of file ExplicitEulerFixedSearchRadius.py.

References _algorithm_steps.

◆ readme_descriptor()

exaparty.api.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 exaparty.api.particle.Particle.Particle.

Definition at line 261 of file ExplicitEulerFixedSearchRadius.py.

References exaparty.api.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.cfl_factor, cfl_factor, exaparty.api.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.initial_time_step_size, and initial_time_step_size.

◆ touch_particles_of_set_first_time_kernel() [1/2]

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

Definition at line 134 of file ExplicitEulerFixedSearchRadius.py.

References _algorithm_steps.

◆ touch_particles_of_set_first_time_kernel() [2/2]

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

Definition at line 138 of file ExplicitEulerFixedSearchRadius.py.

References _algorithm_steps.

◆ touch_particles_of_set_last_time_kernel() [1/2]

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

Definition at line 142 of file ExplicitEulerFixedSearchRadius.py.

References _algorithm_steps.

◆ touch_particles_of_set_last_time_kernel() [2/2]

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

Definition at line 146 of file ExplicitEulerFixedSearchRadius.py.

References _algorithm_steps.

Field Documentation

◆ accelerator

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

Definition at line 115 of file ExplicitEulerFixedSearchRadius.py.

◆ cfl_factor

◆ enter_cell_kernel

exaparty.api.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.enter_cell_kernel = enter_cell_kernel

Definition at line 124 of file ExplicitEulerFixedSearchRadius.py.

◆ initial_time_step_size

◆ touch_particles_of_set_first_time_kernel

tuple exaparty.api.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_first_time_kernel

◆ touch_particles_of_set_last_time_kernel

tuple exaparty.api.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.touch_particles_of_set_last_time_kernel

◆ velocity

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

Definition at line 114 of file ExplicitEulerFixedSearchRadius.py.


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