AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
GranularFields.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17# pragma once
18
19#include <agxModel/export.h>
20
21#include <agx/Frame.h>
23
24#include <agx/ref_ptr.h>
25
26namespace agxModel
27{
28 class GranularFieldPostProcessor;
29
30 typedef std::pair<agx::Physics::GranularBodyPtr, agx::Real> ParticleWeightPair;
32
38
39
139
141 {
142 public:
144
145 virtual bool addToField(agx::UInt index, ParticleWeightPair* pair);
146 virtual bool calculateFieldElement(agx::UInt index);
147
148 protected:
150
151 private:
152
153 };
154
156 {
157 public:
159
160 virtual bool addToField(agx::UInt index, ParticleWeightPair* pair);
161 virtual bool calculateFieldElement(agx::UInt index);
162
163 // Used for debugging mass conservation
165 protected:
167
168 private:
169
170 };
171
173 {
174 public:
176
177 virtual bool addToField(agx::UInt index, ParticleWeightPair* pair);
178 virtual bool calculateFieldElement(agx::UInt index);
179
180 protected:
182
183 private:
184 };
185
187 {
188 public:
194
195 virtual bool addToField(agx::UInt index, ParticleWeightPair* pair);
196 virtual bool calculateFieldElement(agx::UInt index);
197
198 protected:
200 };
201}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXMODEL_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition agx/Vector.h:34
GranularCustomBufferField(agx::String bufferName)
Custom buffer field.
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 th...
virtual bool calculateFieldElement(agx::UInt index)
Implement this method in derived class to do a final computation on the field when all the particles ...
Class for calculating different granular fields.
Base class for a GranularField.
agx::Vector< agx::Real > m_field
agx::Vector< agx::String > m_requiredFields
virtual ~GranularField()
Virtual destructor.
agx::Vec4u getFieldShape()
Get the shape of the field.
GranularField(agx::UInt dimensions, agx::String name)
GranularField base class.
const agx::Vector< agx::String > & getRequiredFields()
Get the names of the fields that this field depends on.
void setGranularFieldPostProcesser(agxModel::GranularFieldPostProcessor *pp)
Set GranularFieldPostProcessor.
void clearField()
Clear the field.
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 ...
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 th...
agxModel::GranularFieldPostProcessor * getGranularFieldPostProcessor()
Get the granular field post processor.
agx::String getName()
Get field name.
agx::UInt getFieldSize()
Get the field size.
agx::Real * getFieldData()
Get ptr to field data.
virtual bool calculateFieldElement(agx::UInt index)
Implement this method in derived class to do a final computation on the field when all the particles ...
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 th...
agx::Real calculateTotalMassInField()
virtual bool calculateFieldElement(agx::UInt index)
Implement this method in derived class to do a final computation on the field when all the particles ...
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 th...
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 th...
virtual bool calculateFieldElement(agx::UInt index)
Implement this method in derived class to do a final computation on the field when all the particles ...
Base class providing referencing counted objects.
Definition Referenced.h:120
A class holding 4 dimensional vectors and providing basic arithmetic.
Templated vector class.
Definition agx/Vector.h:53
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition FlowUnit.h:37
agx::Vector< ParticleWeightPair > ParticleWeightPairVector
std::pair< agx::Physics::GranularBodyPtr, agx::Real > ParticleWeightPair
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42