Commit f4ebaaf1 authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

BUG: Fix bugs from rebase

parent e710770a
......@@ -25,7 +25,7 @@
#include "imstkTetrahedralMesh.h"
#include "imstkMeshIO.h"
#include "imstkOneToOneMap.h"
#include "imstkMeshToMeshBruteForceCD.h"
#include "imstkMeshToMeshBruteforceCD.h"
#include "imstkPBDCollisionHandling.h"
using namespace imstk;
......
......@@ -25,7 +25,7 @@
#include "imstkPbdSolver.h"
#include "imstkOneToOneMap.h"
#include "imstkAPIUtilities.h"
#include "imstkMeshToMeshBruteForceCD.h"
#include "imstkMeshToMeshBruteforceCD.h"
#include "imstkPBDCollisionHandling.h"
using namespace imstk;
......
......@@ -41,7 +41,7 @@ void SPHCollisionHandling::setBoundaryFriction(const Real friction)
}
}
void SPHCollisionHandling::computeContactForces()
void SPHCollisionHandling::processCollisionData()
{
const auto& SPHModel = m_SPHObject->getSPHModel();
#if defined(DEBUG) || defined(_DEBUG) || !defined(NDEBUG)
......@@ -49,7 +49,7 @@ void SPHCollisionHandling::computeContactForces()
#endif
auto& state = SPHModel->getState();
for(const auto& cd : m_colData.MAColData)
for(const auto& cd : m_colData->MAColData)
{
const auto pidx = cd.nodeId; // Fluid particle index
auto n = cd.penetrationVector; // This vector should point into solid object
......
......@@ -28,7 +28,7 @@ namespace imstk
class SPHCollisionHandling : public CollisionHandling
{
public:
SPHCollisionHandling(const Side& side, const CollisionData& colData, const std::shared_ptr<CollidingObject>& obj) :
SPHCollisionHandling(const Side& side, const std::shared_ptr < CollisionData>& colData, const std::shared_ptr<CollidingObject>& obj) :
CollisionHandling(Type::SPH, side, colData), m_SPHObject(std::dynamic_pointer_cast<SPHObject>(obj)) {}
SPHCollisionHandling() = delete;
......@@ -37,7 +37,7 @@ public:
///
/// \brief Compute forces based on collision data
///
virtual void computeContactForces() override;
virtual void processCollisionData() override;
///
/// \brief Set the friction coefficient
......
......@@ -31,6 +31,8 @@ InteractionPair::InteractionPair(std::shared_ptr<CollidingObject> A,
CollisionHandling::Type CHAType,
CollisionHandling::Type CHBType)
{
m_colData = std::make_shared<CollisionData>();
m_valid = false;
// Check that objects exist
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment