AGXDynamics
2.31.1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
GranularFields.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2021. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
# pragma once
18
19
#include <
agxModel/export.h
>
20
21
#include <
agx/Frame.h
>
22
#include <
agx/Physics/GranularBodySystem.h
>
23
24
#include <
agx/ref_ptr.h
>
25
26
namespace
agxModel
27
{
28
class
GranularFieldPostProcessor;
29
30
typedef
std::pair<agx::Physics::GranularBodyPtr, agx::Real>
ParticleWeightPair
;
31
typedef
agx::Vector<ParticleWeightPair>
ParticleWeightPairVector
;
32
33
AGX_DECLARE_POINTER_TYPES
(
GranularField
);
34
AGX_DECLARE_POINTER_TYPES
(
GranularMassField
);
35
AGX_DECLARE_POINTER_TYPES
(
GranularMomentumField
);
36
AGX_DECLARE_POINTER_TYPES
(
GranularVelocityField
);
37
AGX_DECLARE_POINTER_TYPES
(
GranularCustomBufferField
);
38
39
40
AGX_DECLARE_VECTOR_TYPES
(
GranularField
);
44
class
AGXMODEL_EXPORT
GranularField
:
public
agx::Referenced
45
{
46
public
:
52
GranularField
(
agx::UInt
dimensions,
agx::String
name);
53
61
virtual
bool
addToField(
agx::UInt
index,
ParticleWeightPair
* pair);
62
69
virtual
bool
calculateFieldElement(
agx::UInt
/* index */
);
70
74
virtual
~
GranularField
();
75
80
agx::Real
* getFieldData();
81
85
void
clearField();
86
91
bool
allocateField();
92
97
agx::UInt
getFieldSize();
98
103
agx::Vec4u
getFieldShape();
104
109
agxModel::GranularFieldPostProcessor
* getGranularFieldPostProcessor();
110
115
agx::String
getName();
116
121
void
setGranularFieldPostProcesser(
agxModel::GranularFieldPostProcessor
* pp);
122
127
const
agx::Vector<agx::String>
getRequiredFields();
128
129
130
protected
:
131
agx::Vec4u
m_fieldShape
;
132
agx::Vector<agx::Real>
m_field
;
133
agx::Vector<agx::String>
m_requiredFields
;
134
agx::String
m_name
;
135
136
private
:
137
agxModel::GranularFieldPostProcessor
* m_granularFieldPostProcessor;
138
};
139
140
class
AGXMODEL_EXPORT
GranularMomentumField
:
public
GranularField
141
{
142
public
:
143
GranularMomentumField
();
144
145
virtual
bool
addToField(
agx::UInt
index,
ParticleWeightPair
* pair);
146
virtual
bool
calculateFieldElement(
agx::UInt
index);
147
148
protected
:
149
~
GranularMomentumField
();
150
151
private
:
152
153
};
154
155
class
AGXMODEL_EXPORT
GranularMassField
:
public
GranularField
156
{
157
public
:
158
GranularMassField
();
159
160
virtual
bool
addToField(
agx::UInt
index,
ParticleWeightPair
* pair);
161
virtual
bool
calculateFieldElement(
agx::UInt
index);
162
163
// Used for debugging mass conservation
164
agx::Real
calculateTotalMassInField();
165
protected
:
166
~
GranularMassField
();
167
168
private
:
169
170
};
171
172
class
AGXMODEL_EXPORT
GranularVelocityField
:
public
GranularField
173
{
174
public
:
175
GranularVelocityField
();
176
177
virtual
bool
addToField(
agx::UInt
index,
ParticleWeightPair
* pair);
178
virtual
bool
calculateFieldElement(
agx::UInt
index);
179
180
protected
:
181
~
GranularVelocityField
();
182
183
private
:
184
};
185
186
class
AGXMODEL_EXPORT
GranularCustomBufferField
:
public
GranularField
187
{
188
public
:
193
GranularCustomBufferField
(
agx::String
bufferName);
194
195
virtual
bool
addToField(
agx::UInt
index,
ParticleWeightPair
* pair);
196
virtual
bool
calculateFieldElement(
agx::UInt
index);
197
198
protected
:
199
~
GranularCustomBufferField
();
200
};
201
}
agxModel::GranularCustomBufferField
Definition:
GranularFields.h:186
agx::Vec4T
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition:
Vec4Template.h:34
agxModel::ParticleWeightPair
std::pair< agx::Physics::GranularBodyPtr, agx::Real > ParticleWeightPair
Definition:
GranularFieldPostProcessor.h:29
agx::AgXString< std::string >
agxModel::GranularField::m_requiredFields
agx::Vector< agx::String > m_requiredFields
Definition:
GranularFields.h:133
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:248
ref_ptr.h
agx::Referenced
Base class providing referencing counted objects.
Definition:
Referenced.h:113
agx::Vector< ParticleWeightPair >
agxModel::AGX_DECLARE_VECTOR_TYPES
AGX_DECLARE_VECTOR_TYPES(Deformable1DComponent)
Frame.h
agx::UInt
uint32_t UInt
Definition:
Integer.h:34
agxModel::GranularMassField
Definition:
GranularFields.h:155
agxModel::GranularField::m_name
agx::String m_name
Definition:
GranularFields.h:134
agxModel::GranularFieldPostProcessor
Class for calculating different granular fields.
Definition:
GranularFieldPostProcessor.h:42
agxModel::GranularVelocityField
Definition:
GranularFields.h:172
GranularBodySystem.h
agxModel::GranularMomentumField
Definition:
GranularFields.h:140
export.h
agxModel::ParticleWeightPairVector
agx::Vector< ParticleWeightPair > ParticleWeightPairVector
Definition:
GranularFieldPostProcessor.h:32
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition:
agxModel/export.h:42
agx::Real
double Real
Definition:
Real.h:42
agxModel::GranularField::m_fieldShape
agx::Vec4u m_fieldShape
Definition:
GranularFields.h:131
agxModel::GranularField
Base class for a GranularField.
Definition:
GranularFields.h:44
agxModel::GranularField::m_field
agx::Vector< agx::Real > m_field
Definition:
GranularFields.h:132
include
agxModel
GranularFields.h
Generated on Mon Mar 21 2022 11:53:01 for AGXDynamics by
1.8.5