 |
AGXDynamics
2.35.0.2
|
Go to the documentation of this file.
18 #ifndef AGX_GRANULARDATAEXPORTER_H
19 #define AGX_GRANULARDATAEXPORTER_H
72 static agx::String convertExportDataTypeToFilename(ExporterDataType exportDataType);
110 void setExporterType(ExporterDataType type);
115 void finalizeAfterSimulation();
120 virtual void onParticleCreated(
agx::Index id)
override;
122 virtual void onParticleDestroyed(
agx::Index id)
override;
124 void updateStartingContactIds();
144 return m_startingParticleGeometryImpactContacts;
149 return m_startingParticlePairImpactContacts;
173 void exportPreStep(
const IndexHashSet& destroyedParticles);
179 void exportPostStep(
const IndexHashSet& destroyedParticles);
185 virtual void handleParticleDestroyed(
agx::Index particleId);
197 virtual void createExportFile(
const agx::String& filename) = 0;
207 virtual ~IDataExporter();
211 virtual void _exportPreStep(
const IndexHashSet& destroyedParticles) = 0;
213 virtual void _exportPostStep(
const IndexHashSet& destroyedParticles) = 0;
216 bool hasAnalysisBox()
const;
237 class
AGXPHYSICS_EXPORT GranularDataExporter::ContactDataExporter : public GranularDataExporter::IDataExporter
244 virtual void handleParticleDestroyed(
agx::Index particleId)
override;
250 virtual void createExportFile(
const agx::String& filename)
override;
260 void exportContactInformation(
const detail::ParticlePairContactInformation& information);
262 void exportContactInformation(
const detail::ParticleGeometryContactInformation& information);
265 virtual ~ContactDataExporter();
267 virtual void _finalizeExport(GranularDataExporter * exporter)
override;
269 virtual void _exportPreStep(
const IndexHashSet& destroyedParticles)
override;
271 virtual void _exportPostStep(
const IndexHashSet& destroyedParticles)
override;
287 virtual void handleParticleDestroyed(
agx::Index particleId)
override;
293 virtual void createExportFile(
const agx::String& filename)
override;
303 virtual ~ParticleDataExporter();
307 virtual void _finalizeExport(GranularDataExporter * exporter)
override;
309 virtual void _exportPreStep(
const IndexHashSet& destroyedParticles)
override;
311 virtual void _exportPostStep(
const IndexHashSet& destroyedParticles)
override;
313 void writeParticleInformation(
const detail::ParticleInformation& information);
315 void updateParticleEnergyTable();
341 virtual ~IDataFileWriter();
345 void generateFileNames();
385 virtual ~ParticleDataWriter();
410 void writeContact(
const detail::ParticleGeometryContactInformation& contact);
416 void writeContact(
const detail::ParticlePairContactInformation& contact);
419 virtual ~ContactDataWriter();
IndexHashSet getStartingParticleGeometryImpacts()
Returns the indices for the particle-geometry impact contacts currently stored in the storage.
IDataExporter(agx::Physics::GranularBodySystem *system)
Constructor.
IndexHashSet m_exportedParticles
Derive from this class to implement a listener for simulation step events.
AGXCORE_EXPORT Type * getType(const agx::String &name)
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
Particle EventListener that can be inherited and overridden in order to listen to particle events.
Class that can be used to extract data from elements in a simulation within a specified bound.
Data storage for a collection of entity instances of a specified EntityModel.
IDataFileWriter(const agx::String &filePrefix, const agx::String &postFix, const agx::String &separator)
Constructor for creating the file writer.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGXPHYSICS_EXPORT
ExporterDataType
Export Data Type.
AGXPHYSICS_EXPORT agx::Physics::ParticleGeometryContactData * getParticleGeometryImpacts(agx::Physics::GranularBodySystem *system)
AGXPHYSICS_EXPORT agxData::EntityStorage * getParticleGeometryImpactsStorage(agx::Physics::GranularBodySystem *system)
IndexHashSet m_startingParticlePairImpactContacts
A basic particle system that contains all the storages and buffers required for basic operation and a...
IndexHashSet m_startingParticleGeometryImpactContacts
Class used to extract data from a granular journal, in the form of writing contact and particle data ...
AGXPHYSICS_EXPORT agx::Physics::ParticlePairContactData * getParticlePairImpacts(agx::Physics::GranularBodySystem *system)
Inheritance with partial specialization due to bug with ref_ptr containers.
IndexHashSet getStartingParticlePairImpacts()
Returns the indices for the particle-particle impact contacts currently stored in the storage.
agx::Physics::GranularBodySystem * m_system
AGXPHYSICS_EXPORT void addGranularImpactCustomBuffers(agx::ParticleSystem *system)
ParticleImpactDataTable m_particleImpactDataTable
Base class providing referencing counted objects.
#define AGX_DECLARE_POINTER_TYPES(type)
IDataFileWriterRef m_fileWriter
std::ofstream m_outStream
void AGXPHYSICS_EXPORT init()
Initialize agx.
agx::AnalysisBox * m_analysisBox
IDataExporterRef m_dataExporter
AGXPHYSICS_EXPORT agxData::EntityStorage * getParticlePairImpactsStorage(agx::Physics::GranularBodySystem *system)
agx::HashSet< agx::Index > IndexHashSet
agx::String m_completeName