|
AGX Dynamics 2.42.3.1
|
Base class for a GranularField. More...
#include <GranularFields.h>
Inheritance diagram for agxModel::GranularField:Public Member Functions | |
| GranularField (agx::UInt dimensions, agx::String name) | |
| GranularField base class. | |
| virtual | ~GranularField () |
| Virtual destructor. | |
| virtual bool | addToField (agx::UInt index, ParticleWeightPair *pair) |
| Implement this method in derived classes to define how the particle weight pair should be added to the field element with index index. | |
| bool | allocateField () |
| Allocate memory for the field. | |
| virtual bool | calculateFieldElement (agx::UInt) |
| Implement this method in derived class to do a final computation on the field when all the particles have been added. | |
| void | clearField () |
| Clear the field. | |
| agx::Real * | getFieldData () |
| Get ptr to field data. | |
| agx::Vec4u | getFieldShape () |
| Get the shape of the field. | |
| agx::UInt | getFieldSize () |
| Get the field size. | |
| agxModel::GranularFieldPostProcessor * | getGranularFieldPostProcessor () |
| Get the granular field post processor. | |
| agx::String | getName () |
| Get field name. | |
| const agx::Vector< agx::String > & | getRequiredFields () |
| Get the names of the fields that this field depends on. | |
| void | setGranularFieldPostProcesser (agxModel::GranularFieldPostProcessor *pp) |
| Set GranularFieldPostProcessor. | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Protected Attributes | |
| agx::Vector< agx::Real > | m_field |
| agx::Vec4u | m_fieldShape |
| agx::String | m_name |
| agx::Vector< agx::String > | m_requiredFields |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Additional Inherited Members | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. | |
Base class for a GranularField.
Inherit from this when implementing new fields
Definition at line 44 of file GranularFields.h.
| agxModel::GranularField::GranularField | ( | agx::UInt | dimensions, |
| agx::String | name | ||
| ) |
GranularField base class.
| dimensions | - How many dimension the one field element has. Mass field has dimensions=1 and Velocity field dimensions=3 |
| name | - Field name |
|
virtual |
Virtual destructor.
|
virtual |
Implement this method in derived classes to define how the particle weight pair should be added to the field element with index index.
| index | - What voxel to add the particle field data to |
| pair | - The particle and the its weight |
Reimplemented in agxModel::GranularMomentumField, agxModel::GranularMassField, agxModel::GranularVelocityField, and agxModel::GranularCustomBufferField.
| bool agxModel::GranularField::allocateField | ( | ) |
Allocate memory for the field.
|
virtual |
Implement this method in derived class to do a final computation on the field when all the particles have been added.
Possible to use if the field depends on other fields to be computed first.
Reimplemented in agxModel::GranularMomentumField, agxModel::GranularMassField, agxModel::GranularVelocityField, and agxModel::GranularCustomBufferField.
| void agxModel::GranularField::clearField | ( | ) |
Clear the field.
| agx::Real * agxModel::GranularField::getFieldData | ( | ) |
Get ptr to field data.
| agx::Vec4u agxModel::GranularField::getFieldShape | ( | ) |
Get the shape of the field.
x, y, z is the number of voxels the fields granular postprocessor have. w is number of dimensions for the field.
| agx::UInt agxModel::GranularField::getFieldSize | ( | ) |
Get the field size.
That is, the number of voxels in the field times the number of field elements.
| agxModel::GranularFieldPostProcessor * agxModel::GranularField::getGranularFieldPostProcessor | ( | ) |
Get the granular field post processor.
| agx::String agxModel::GranularField::getName | ( | ) |
Get field name.
| const agx::Vector< agx::String > & agxModel::GranularField::getRequiredFields | ( | ) |
Get the names of the fields that this field depends on.
| void agxModel::GranularField::setGranularFieldPostProcesser | ( | agxModel::GranularFieldPostProcessor * | pp | ) |
Set GranularFieldPostProcessor.
| pp | - Set the granularFieldPostProcessor for this granularField |
|
protected |
Definition at line 132 of file GranularFields.h.
|
protected |
Definition at line 131 of file GranularFields.h.
|
protected |
Definition at line 134 of file GranularFields.h.
|
protected |
Definition at line 133 of file GranularFields.h.