AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
agxTerrain::CompactionController Class Reference

Controller that handles compaction in the terrain from generated terrain contacts in TerrainContactGenerator The controller features two methods that calculate stress depth propagation in the terrain soil: BOUSSINESQ - Two part method that calculates the stress field by combining the calculated surface stress and subsoil stress based on the surface contact point loads. More...

#include <CompactionController.h>

+ Inheritance diagram for agxTerrain::CompactionController:

Public Types

enum  CompactionMethod { DENSITY_LOG10 , VOID_RATIO_LN }
 
enum  StressCalculationMethod { BOUSSINESQ , UNIFORM_DISK }
 

Public Member Functions

 CompactionController ()
 
 CompactionController (Terrain *terrain)
 Construct given terrain instance.
 
bool applyCompactionFromSurfaceForce (const agx::Vec2i &terrainIndex, agx::Real surfaceForce, agx::Real contactTime)
 Create compaction from an artificially applied surface force.
 
CompactionMethod getCompactionMethod () const
 Get the compaction method used when calculating compaction.
 
const agx::HashSet< agx::Vec2i > & getCompressedTerrainIndices () const
 Get the indices that has been compressed this time step after the post step of the compactionController.
 
agx::Real getStressInVoxel (const agx::Vec3i &voxelIndex) const
 Get the current active stress in the specified voxelIndex.
 
StressCalculationMethod getStressMethod () const
 Get the stress method used when calculating compaction.
 
void onPost ()
 The onPost function updates compaction from terrain contacts.
 
void setCompactionMethod (CompactionMethod compactionMethod)
 Set the compaction method used when calculating compaction.
 
void setStressMethod (StressCalculationMethod stressMethod)
 Set the stress method used when calculating compaction.
 
- 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 Member Functions

virtual ~CompactionController ()
 
agx::Real calculateTotalSubSoilStress (const agx::Vec3 &voxelPoint, bool voxelSurfacecIsInContactArea, const TerrainContact::SurfaceForceVector &pointForces) const
 
agx::Bool compactColumnWithPointForces (const agx::Vec2i &terrainIndex, const TerrainContact::SurfaceForceVector &pointForces, agx::Real surfaceStress, bool voxelSurfacecIsInContactArea, agx::Real minDepth, agx::Real maxDepth, agx::Real currentContactTime)
 
agx::Bool compactColumnWithPointForcesUniformDiskLoad (const agx::Vec2i &terrainIndex, agx::Real surfaceStress, agx::Real loadRadius, agx::Real currentContactTime)
 
void debugRenderStressInNode (const agx::Vec3 &position, agx::Real stress) const
 
bool doCompactionInVoxel (const agx::Vec3i &voxelIndex, agx::Real compactionStress, agx::Real timeFactor)
 
TerrainMassOccupancyController * getMassOccupancyController () const
 
void handleCompactionFromTerrainContactsBoussinesq (const TerrainContactRefVector &contacts)
 
void handleCompactionFromTerrainContactsUniformDisk (const TerrainContactRefVector &contacts)
 
void updateCompactionFromTerrainContacts (const TerrainContactRefVector &contacts)
 Update compaction from terrain contacts using the chosen stress method.
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Additional Inherited Members

- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- 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.
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Controller that handles compaction in the terrain from generated terrain contacts in TerrainContactGenerator The controller features two methods that calculate stress depth propagation in the terrain soil: BOUSSINESQ - Two part method that calculates the stress field by combining the calculated surface stress and subsoil stress based on the surface contact point loads.

UNIFORM_DISK - Simple method that approximates the stress propagation by assuming that the surface stress is applied by a circular uniform disk of voxel area in each voxel active in the terrain contact.

Definition at line 48 of file CompactionController.h.

Member Enumeration Documentation

◆ CompactionMethod

Enumerator
DENSITY_LOG10 
VOID_RATIO_LN 

Definition at line 57 of file CompactionController.h.

◆ StressCalculationMethod

Enumerator
BOUSSINESQ 
UNIFORM_DISK 

Definition at line 51 of file CompactionController.h.

Constructor & Destructor Documentation

◆ CompactionController() [1/2]

agxTerrain::CompactionController::CompactionController ( Terrain *  terrain)

Construct given terrain instance.

◆ CompactionController() [2/2]

agxTerrain::CompactionController::CompactionController ( )

◆ ~CompactionController()

virtual agxTerrain::CompactionController::~CompactionController ( )
protectedvirtual

Member Function Documentation

◆ applyCompactionFromSurfaceForce()

bool agxTerrain::CompactionController::applyCompactionFromSurfaceForce ( const agx::Vec2i &  terrainIndex,
agx::Real  surfaceForce,
agx::Real  contactTime 
)

Create compaction from an artificially applied surface force.

Parameters
terrainIndex- The 2D terrain coordinate in voxel space
surfaceForce- The surface force to apply on the surface
contactTime- The contact time that should be used when calculating the relaxation time factor
Returns
True if the terrain was compacted from the applied force

◆ calculateTotalSubSoilStress()

agx::Real agxTerrain::CompactionController::calculateTotalSubSoilStress ( const agx::Vec3 &  voxelPoint,
bool  voxelSurfacecIsInContactArea,
const TerrainContact::SurfaceForceVector &  pointForces 
) const
protected

◆ compactColumnWithPointForces()

agx::Bool agxTerrain::CompactionController::compactColumnWithPointForces ( const agx::Vec2i &  terrainIndex,
const TerrainContact::SurfaceForceVector &  pointForces,
agx::Real  surfaceStress,
bool  voxelSurfacecIsInContactArea,
agx::Real  minDepth,
agx::Real  maxDepth,
agx::Real  currentContactTime 
)
protected

◆ compactColumnWithPointForcesUniformDiskLoad()

agx::Bool agxTerrain::CompactionController::compactColumnWithPointForcesUniformDiskLoad ( const agx::Vec2i &  terrainIndex,
agx::Real  surfaceStress,
agx::Real  loadRadius,
agx::Real  currentContactTime 
)
protected

◆ debugRenderStressInNode()

void agxTerrain::CompactionController::debugRenderStressInNode ( const agx::Vec3 &  position,
agx::Real  stress 
) const
protected

◆ doCompactionInVoxel()

bool agxTerrain::CompactionController::doCompactionInVoxel ( const agx::Vec3i &  voxelIndex,
agx::Real  compactionStress,
agx::Real  timeFactor 
)
protected

◆ getCompactionMethod()

CompactionMethod agxTerrain::CompactionController::getCompactionMethod ( ) const

Get the compaction method used when calculating compaction.

◆ getCompressedTerrainIndices()

const agx::HashSet< agx::Vec2i > & agxTerrain::CompactionController::getCompressedTerrainIndices ( ) const

Get the indices that has been compressed this time step after the post step of the compactionController.

◆ getMassOccupancyController()

TerrainMassOccupancyController * agxTerrain::CompactionController::getMassOccupancyController ( ) const
protected

◆ getStressInVoxel()

agx::Real agxTerrain::CompactionController::getStressInVoxel ( const agx::Vec3i &  voxelIndex) const

Get the current active stress in the specified voxelIndex.

Parameters
voxelIndex- The specified voxel index.
Returns
The current stress active in the voxel given by the specified voxel index.

◆ getStressMethod()

StressCalculationMethod agxTerrain::CompactionController::getStressMethod ( ) const

Get the stress method used when calculating compaction.

◆ handleCompactionFromTerrainContactsBoussinesq()

void agxTerrain::CompactionController::handleCompactionFromTerrainContactsBoussinesq ( const TerrainContactRefVector &  contacts)
protected

◆ handleCompactionFromTerrainContactsUniformDisk()

void agxTerrain::CompactionController::handleCompactionFromTerrainContactsUniformDisk ( const TerrainContactRefVector &  contacts)
protected

◆ onPost()

void agxTerrain::CompactionController::onPost ( )

The onPost function updates compaction from terrain contacts.

◆ setCompactionMethod()

void agxTerrain::CompactionController::setCompactionMethod ( CompactionMethod  compactionMethod)

Set the compaction method used when calculating compaction.

◆ setStressMethod()

void agxTerrain::CompactionController::setStressMethod ( StressCalculationMethod  stressMethod)

Set the stress method used when calculating compaction.

Parameters
stressMethod- The stress method to used when calculating compaction

◆ updateCompactionFromTerrainContacts()

void agxTerrain::CompactionController::updateCompactionFromTerrainContacts ( const TerrainContactRefVector &  contacts)
protected

Update compaction from terrain contacts using the chosen stress method.

Triggered in onPost.


The documentation for this class was generated from the following file: