Peano
Loading...
Searching...
No Matches
peano4.toolbox.particles.Particle.Particle Class Reference

Single particle. More...

Inheritance diagram for peano4.toolbox.particles.Particle.Particle:
Collaboration diagram for peano4.toolbox.particles.Particle.Particle:

Public Member Functions

 __init__ (self, name)
 Constructor.
 
- Public Member Functions inherited from peano4.datamodel.DaStGen2.DaStGen2
 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)
 
- Public Member Functions inherited from peano4.datamodel.DoF.DoF
 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

 name
 
 partid
 
- Data Fields inherited from peano4.datamodel.DaStGen2.DaStGen2
 generator
 
 data
 
 peano4_mpi_and_storage_aspect
 
- Data Fields inherited from peano4.datamodel.DoF.DoF
 association
 
 name
 
 namespace
 
 subdirectory
 

Additional Inherited Members

- Static Public Attributes inherited from peano4.datamodel.DaStGen2.DaStGen2
str readme_descriptor
 
str readme_package_descriptor
 
- Protected Attributes inherited from peano4.datamodel.DaStGen2.DaStGen2
 _additional_load_and_store_arguments
 
- Protected Attributes inherited from peano4.datamodel.DoF.DoF
 _additional_load_and_store_arguments
 

Detailed Description

Single particle.

Represent a single particle. This is a DaStGen2 wrapper, i.e. I define a DaStGen object and add some particular fields that I always need to administer the particles.

Usage

If you use these particles, please do not add them to your use definitions of the actions/observers. For pidt, you need a second ParticleSet and this one is used by the observers.

You have to add the particle to your project though via

    my_project.add_global_object

If you want to attributes to a particle, use the data subattribute. An all-time classic is the call

   add_attribute( peano4.dastgen2.Peano4DoubleArray("v","Dimensions") )

Pre-defined fields

I actually need only very few fields in Peano's particle toolbox:

  • A position x. You can change this position in your code, but please invoke a particle re-sort once you change a particle's position. Usually, I employ the pidt (particle in dual tree) scheme, i.e. particles are always stored in the closest vertex. If you alter the position of a particle, you might destroy this association and have to re-assign the object to another vertex.
  • A search radius. Every particle in Peano has a search radius, i.e. a maximal interaction radius. As I only compare particles stored in one vertex to particles stored in a cell-connected vertex, the search radius also implicitly determines the tree grid level that I use to hold a particle. The bigger the search, the higher up in the mesh I have to store a particle.
  • A state. This state should not be manipulated by the user. A tree owns the particles that are contained within its local tree cells. Furthermore, a tree knows about the particles which are associated to a vertex that's adjacent to a local mesh. The latter particles are virtual. We effectively work with a halo of h/2 per mesh level.

The only action set that should alter the state is UpdateParallelState.

State updates

If a particle moves, we have to update its state, and we might have to update its vertex association. This discussion focuses on the state update.

Details can be found in UpdateParallelState.

Definition at line 10 of file Particle.py.

Constructor & Destructor Documentation

◆ __init__()

Field Documentation

◆ name

◆ partid

peano4.toolbox.particles.Particle.Particle.partid

Definition at line 91 of file Particle.py.


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