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

Represents a particle set. More...

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

Public Member Functions

 __init__ (self, particle)
 Both the association and the namespace are not to be set directly, but through the operation configure().
 
 readme_descriptor (self)
 
 readme_package_descriptor (self)
 
 __str__ (self)
 
- Public Member Functions inherited from peano4.datamodel.DoF.DoF
 configure (self, namespace, association, subdirectory="")
 Typically called by model as soon as you add an object to it.
 
 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 (self)
 
 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

 particle_model
 
 generator
 
- Data Fields inherited from peano4.datamodel.DoF.DoF
 association
 
 name
 
 namespace
 
 subdirectory
 

Additional Inherited Members

- Protected Attributes inherited from peano4.datamodel.DoF.DoF
 _additional_load_and_store_arguments
 

Detailed Description

Represents a particle set.

A particle set is, in principle, a very simple container tied to a vertex. It allows each vertex to point to the particles around. While the realisation on the Python side is simple - after all, the Python model is solely the data model - interesting questions arise once we discuss how the data model is mapped onto C++. This information is not directly stored within the ParticleSet objects, i.e. this class is solely a presentation of the data topology.

The information how the association is mapped onto Peano's C++ code is held within the generator. By default, this generator maps each particle set onto a vector which in turn hosts particles on the heap. However, there are alternative implementations which you might want to pick by setting the generator attribute to a different value.

  • Study ParticleSetGenerator_ScatteredOnHeap_IndexByList to obtain some information about Peano's default storage scheme.
  • The generator ParticleSetGenerator_ScatteredOnHeap_IndexByVector is a slightly more memory-compact version.

Attributes

name: String Name of the particle. Has to be a valid C++ class name.

particle: Particle Link to particle definition

Definition at line 241 of file ParticleSet.py.

Constructor & Destructor Documentation

◆ __init__()

peano4.toolbox.particles.ParticleSet.ParticleSet.__init__ ( self,
name )

Both the association and the namespace are not to be set directly, but through the operation configure().

Additional store/load/send/receive arguments

  • The first entry of this triple is the expression that you want the observer to pass in.
  • The second one is the C++ type of this expression.
  • The third one is the name that you wanna use in the dof signatures for this argument.

    It is the responsibility of the DoF subclass to ensure that the second entry is properly used to initialise the store and load routines. Most define an additional setter for property.

Attributes

association: DoFAssociation

name: String Has to be a fit to the C++ naming conventions

namespace: [String] Sequence of namespaces.

additional_load_and_store_arguments: [(String,String,String)] This flag is, by default, an empty list. If you add an entry to this list, each store and load routine will get an additional parameter. Consult documentation above for the semantics of the list entries.

Reimplemented from peano4.datamodel.DoF.DoF.

Definition at line 276 of file ParticleSet.py.

Member Function Documentation

◆ __str__()

◆ readme_descriptor()

◆ readme_package_descriptor()

peano4.toolbox.particles.ParticleSet.ParticleSet.readme_package_descriptor ( self)

Definition at line 308 of file ParticleSet.py.

Field Documentation

◆ generator

◆ particle_model

peano4.toolbox.particles.ParticleSet.ParticleSet.particle_model

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