21#ifndef GENERATED_AGX_PHYSICS_BULKMATERIAL_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_BULKMATERIAL_H_PLUGIN
24#define AGX_ENTITY_WRAPPER 1
30# pragma warning( disable : 4505 )
32# pragma warning( disable : 4251 )
34# pragma warning( disable : 4355 )
36# pragma warning( disable: 4714 )
57 class BulkMaterialModel;
58 class BulkMaterialData;
59 class BulkMaterialPtr;
60 class BulkMaterialInstance;
61 class BulkMaterialSemantics;
102 virtual void configure(agx::TiXmlElement* eEntity)
override;
110 #ifndef AGX_PHYSICS_BULKMATERIAL_DATA_SET_OVERRIDE
111 #define AGX_PHYSICS_BULKMATERIAL_DATA_SET
115 BulkMaterialInstance operator[] (
size_t index);
132 typedef agx::Real minElasticRestLengthType;
133 typedef agx::Real maxElasticRestLengthType;
141 virtual ~BulkMaterialData() {}
142 virtual void setNumElements(
agx::Index numElements)
override;
145 BulkMaterialData& operator= (
const BulkMaterialData&) {
return *
this; }
159 agx::Real const& getYoungsModulus()
const;
162 agx::Real const& getMinElasticRestLength()
const;
163 agx::Real const& getMaxElasticRestLength()
const;
170 void setYoungsModulus(
agx::Real const& value);
171 void setViscosity(
agx::Real const& value);
173 void setMinElasticRestLength(
agx::Real const& value);
174 void setMaxElasticRestLength(
agx::Real const& value);
179 friend class BulkMaterialPtr;
180 friend class BulkMaterialInstance;
181 BulkMaterialSemantics();
258 BulkMaterialInstance();
259 BulkMaterialInstance(BulkMaterialData* data,
agx::Index index);
264 BulkMaterialData* getData();
265 const BulkMaterialData* getData()
const;
291 agx::Real const& minElasticRestLength()
const;
296 agx::Real const& maxElasticRestLength()
const;
317 inline BulkMaterialInstance
agx::Physics::BulkMaterialData::operator[] (
size_t index) {
return BulkMaterialInstance(
this, (
agx::Index)index); }
324 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
331 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
339 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
340 EntityPtr::getModel()->fullPath().c_str(), BulkMaterialModel::instance()->fullPath().c_str());
348 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
349 EntityPtr::getModel()->fullPath().c_str(), BulkMaterialModel::instance()->fullPath().c_str());
355 AGX_FORCE_INLINE BulkMaterialSemantics* BulkMaterialPtr::operator->() {
return (BulkMaterialSemantics* )
this; }
356 AGX_FORCE_INLINE const BulkMaterialSemantics* BulkMaterialPtr::operator->()
const {
return (
const BulkMaterialSemantics* )
this; }
361 AGX_FORCE_INLINE agx::Real const& BulkMaterialPtr::density()
const { verifyIndex();
return getData()->density[calculateIndex()]; }
363 AGX_FORCE_INLINE agx::Real& BulkMaterialPtr::youngsModulus() { verifyIndex();
return getData()->youngsModulus[calculateIndex()]; }
364 AGX_FORCE_INLINE agx::Real const& BulkMaterialPtr::youngsModulus()
const { verifyIndex();
return getData()->youngsModulus[calculateIndex()]; }
366 AGX_FORCE_INLINE agx::Real& BulkMaterialPtr::viscosity() { verifyIndex();
return getData()->viscosity[calculateIndex()]; }
367 AGX_FORCE_INLINE agx::Real const& BulkMaterialPtr::viscosity()
const { verifyIndex();
return getData()->viscosity[calculateIndex()]; }
370 AGX_FORCE_INLINE agx::Real const& BulkMaterialPtr::damping()
const { verifyIndex();
return getData()->damping[calculateIndex()]; }
372 AGX_FORCE_INLINE agx::Real& BulkMaterialPtr::minElasticRestLength() { verifyIndex();
return getData()->minElasticRestLength[calculateIndex()]; }
373 AGX_FORCE_INLINE agx::Real const& BulkMaterialPtr::minElasticRestLength()
const { verifyIndex();
return getData()->minElasticRestLength[calculateIndex()]; }
375 AGX_FORCE_INLINE agx::Real& BulkMaterialPtr::maxElasticRestLength() { verifyIndex();
return getData()->maxElasticRestLength[calculateIndex()]; }
376 AGX_FORCE_INLINE agx::Real const& BulkMaterialPtr::maxElasticRestLength()
const { verifyIndex();
return getData()->maxElasticRestLength[calculateIndex()]; }
379 AGX_FORCE_INLINE agx::Bool const& BulkMaterialPtr::dirty()
const { verifyIndex();
return getData()->dirty[calculateIndex()]; }
383 AGX_FORCE_INLINE BulkMaterialInstance::BulkMaterialInstance(BulkMaterialData* data,
agx::Index index) :
agx::ReferencedInstance(data, index) {}
388 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
395 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
404 AGX_FORCE_INLINE agx::Real const& BulkMaterialInstance::density()
const { verifyIndex();
return getData()->density[getIndex()]; }
406 AGX_FORCE_INLINE agx::Real& BulkMaterialInstance::youngsModulus() { verifyIndex();
return getData()->youngsModulus[getIndex()]; }
407 AGX_FORCE_INLINE agx::Real const& BulkMaterialInstance::youngsModulus()
const { verifyIndex();
return getData()->youngsModulus[getIndex()]; }
409 AGX_FORCE_INLINE agx::Real& BulkMaterialInstance::viscosity() { verifyIndex();
return getData()->viscosity[getIndex()]; }
410 AGX_FORCE_INLINE agx::Real const& BulkMaterialInstance::viscosity()
const { verifyIndex();
return getData()->viscosity[getIndex()]; }
413 AGX_FORCE_INLINE agx::Real const& BulkMaterialInstance::damping()
const { verifyIndex();
return getData()->damping[getIndex()]; }
415 AGX_FORCE_INLINE agx::Real& BulkMaterialInstance::minElasticRestLength() { verifyIndex();
return getData()->minElasticRestLength[getIndex()]; }
416 AGX_FORCE_INLINE agx::Real const& BulkMaterialInstance::minElasticRestLength()
const { verifyIndex();
return getData()->minElasticRestLength[getIndex()]; }
418 AGX_FORCE_INLINE agx::Real& BulkMaterialInstance::maxElasticRestLength() { verifyIndex();
return getData()->maxElasticRestLength[getIndex()]; }
419 AGX_FORCE_INLINE agx::Real const& BulkMaterialInstance::maxElasticRestLength()
const { verifyIndex();
return getData()->maxElasticRestLength[getIndex()]; }
422 AGX_FORCE_INLINE agx::Bool const& BulkMaterialInstance::dirty()
const { verifyIndex();
return getData()->dirty[getIndex()]; }
438#undef AGX_ENTITY_WRAPPER
439#undef AGX_ENTITY_NAMESPACE
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGX_TYPE_BINDING(_Type, _Name)
#define AGXPHYSICS_EXPORT
Type-specific Array used for fast access into the data held by a Buffer.
Entity instance provides access to a single instance in an EntityStorage.
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
EntityPtr & operator=(const EntityPtr &other)=default
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
Data storage for a collection of entity instances of a specified EntityModel.
agx::String fullPath() const
Abstract description of the data attributes for the Physics.BulkMaterial entity.
BulkMaterialModel(const agx::String &name="BulkMaterial")
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static BulkMaterialModel * instance()
static BulkMaterialPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ScalarAttributeT< agx::Real > * viscosityAttribute
void construct(agx::Physics::BulkMaterialPtr bulkMaterial)
static agxData::ScalarAttributeT< agx::Real > * maxElasticRestLengthAttribute
virtual void construct(agxData::EntityPtr instance) override
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
virtual void configure(agx::TiXmlElement *eEntity) override
virtual ~BulkMaterialModel()
static agxData::ScalarAttributeT< agx::Real > * minElasticRestLengthAttribute
static agxData::ScalarAttributeT< agx::Real > * dampingAttribute
static agxData::ScalarAttributeT< agx::Real > * densityAttribute
static agxData::EntityStorage * defaultStorage()
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::Real > * youngsModulusAttribute
static agxData::ScalarAttributeT< agx::Bool > * dirtyAttribute
Pointer to a entity instance of type Physics.BulkMaterial.
AGXPHYSICS_EXPORT const BulkMaterialInstance instance() const
AGXPHYSICS_EXPORT BulkMaterialSemantics * operator->()
AGXPHYSICS_EXPORT agx::Real & minElasticRestLength()
AGXPHYSICS_EXPORT agx::Bool const & dirty() const
AGXPHYSICS_EXPORT agx::Real & damping()
AGXPHYSICS_EXPORT agx::Real & maxElasticRestLength()
AGXPHYSICS_EXPORT agx::Bool & dirty()
AGXPHYSICS_EXPORT BulkMaterialPtr()
BulkMaterialData DataType
AGXPHYSICS_EXPORT agx::Real const & density() const
AGXPHYSICS_EXPORT BulkMaterialPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT BulkMaterialInstance instance()
AGXPHYSICS_EXPORT const BulkMaterialSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Real const & damping() const
AGXPHYSICS_EXPORT agx::Real & viscosity()
AGXPHYSICS_EXPORT BulkMaterialPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Real const & viscosity() const
BulkMaterialModel ModelType
AGXPHYSICS_EXPORT BulkMaterialPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::Real & density()
BulkMaterialData * getData()
BulkMaterialInstance InstanceType
AGXPHYSICS_EXPORT agx::Real const & maxElasticRestLength() const
AGXPHYSICS_EXPORT agx::Real const & youngsModulus() const
AGXPHYSICS_EXPORT agx::Real & youngsModulus()
const BulkMaterialData * getData() const
AGXPHYSICS_EXPORT agx::Real const & minElasticRestLength() const
Abstract description of the data attributes for the Referenced entity.
Pointer to a entity instance of type Referenced.
Vector containing 'raw' data.
#define agxAssertN(expr, format,...)
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
Contains classes for low level data storage for AGX.
AGXFMI_EXPORT InputVariable_Real * setDamping(agx::Constraint *constraint)
agxData::EntityRef< BulkMaterialPtr > BulkMaterialRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.