Skip to content
Snippets Groups Projects
Commit 5843adad authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

Merge branch 'upgrade_to_vega4.0' into 'master'

REFAC: upgrade to vega-4.0

See merge request iMSTK/iMSTK!452
parents 0bf7f2a2 3ed08354
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
}
......@@ -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]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment