diff --git a/CMake/External/External_VegaFEM.cmake b/CMake/External/External_VegaFEM.cmake index 4c7ca6c596aafbf39644851608e9a55be2e2cd6f..a5e30bedc047eab7d110ad97d3de17a54b841e58 100644 --- a/CMake/External/External_VegaFEM.cmake +++ b/CMake/External/External_VegaFEM.cmake @@ -8,8 +8,8 @@ endif(WIN32) include(imstkAddExternalProject) imstk_add_external_project( VegaFEM - URL https://gitlab.kitware.com/iMSTK/VegaFEM-CMake/-/archive/iMSTK/VegaFEM-CMake-iMSTK.zip - URL_MD5 11d1f47599b6d70f9b6dc6391bed7a20 + GIT_REPOSITORY https://gitlab.kitware.com/iMSTK/vegafemv4.0 + GIT_TAG f9c96c4128437a559e5fb9a93830ef3c9a627d5e CMAKE_CACHE_ARGS -DVegaFEM_ENABLE_PTHREADS_SUPPORT:BOOL=ON -DVegaFEM_ENABLE_OpenGL_SUPPORT:BOOL=OFF diff --git a/Source/DynamicalModels/InternalForceModel/imstkCorotationalFEMForceModel.cpp b/Source/DynamicalModels/InternalForceModel/imstkCorotationalFEMForceModel.cpp index 9a24fac26bbc870f7603b8d8bf3df3b851c6f2ff..f0e6c5046cf91fc045bb9d3844e9f35194f20ec4 100644 --- a/Source/DynamicalModels/InternalForceModel/imstkCorotationalFEMForceModel.cpp +++ b/Source/DynamicalModels/InternalForceModel/imstkCorotationalFEMForceModel.cpp @@ -39,14 +39,14 @@ void CorotationalFEMForceModel::getInternalForce(const Vectord& u, Vectord& internalForce) { double* data = const_cast<double*>(u.data()); - m_corotationalLinearFEM->ComputeForceAndStiffnessMatrix(data, internalForce.data(), nullptr, m_warp); + m_corotationalLinearFEM->ComputeEnergyAndForceAndStiffnessMatrix(data, nullptr, internalForce.data(), nullptr, m_warp); } void CorotationalFEMForceModel::getTangentStiffnessMatrix(const Vectord& u, SparseMatrixd& tangentStiffnessMatrix) { double* data = const_cast<double*>(u.data()); - m_corotationalLinearFEM->ComputeForceAndStiffnessMatrix(data, nullptr, m_vegaTangentStiffnessMatrix.get(), m_warp); + m_corotationalLinearFEM->ComputeEnergyAndForceAndStiffnessMatrix(data, nullptr, nullptr, m_vegaTangentStiffnessMatrix.get(), m_warp); InternalForceModel::updateValuesFromMatrix(m_vegaTangentStiffnessMatrix, tangentStiffnessMatrix.valuePtr()); } @@ -60,7 +60,7 @@ void CorotationalFEMForceModel::getForceAndMatrix(const Vectord& u, Vectord& internalForce, SparseMatrixd& tangentStiffnessMatrix) { double* data = const_cast<double*>(u.data()); - m_corotationalLinearFEM->ComputeForceAndStiffnessMatrix(data, internalForce.data(), m_vegaTangentStiffnessMatrix.get(), m_warp); + m_corotationalLinearFEM->ComputeEnergyAndForceAndStiffnessMatrix(data, nullptr, internalForce.data(), m_vegaTangentStiffnessMatrix.get(), m_warp); InternalForceModel::updateValuesFromMatrix(m_vegaTangentStiffnessMatrix, tangentStiffnessMatrix.valuePtr()); } @@ -75,4 +75,4 @@ CorotationalFEMForceModel::setTangentStiffness(std::shared_ptr<vega::SparseMatri { m_vegaTangentStiffnessMatrix = K; } -} \ No newline at end of file +} diff --git a/Source/Geometry/Reader/imstkVegaMeshIO.cpp b/Source/Geometry/Reader/imstkVegaMeshIO.cpp index e32252024e31e184b8944b882c9a6e900e0774a8..77bdb4dff607042008450b584100e51ad31b085f 100644 --- a/Source/Geometry/Reader/imstkVegaMeshIO.cpp +++ b/Source/Geometry/Reader/imstkVegaMeshIO.cpp @@ -131,7 +131,7 @@ VegaMeshIO::copyVertices(std::shared_ptr<vega::VolumetricMesh> vegaMesh, { for (int i = 0; i < vegaMesh->getNumVertices(); ++i) { - auto pos = *vegaMesh->getVertex(i); + auto pos = vegaMesh->getVertex(i); vertices.emplace_back(pos[0], pos[1], pos[2]); } }