Commit 0fa25818 authored by Alexis Girault's avatar Alexis Girault

ENH: Align Eigen matrix allocator for stl vectors

define "StdVectorOfxxx" for all eigen matrix structures
used in iMSTK within std::vector.

See http://eigen.tuxfamily.org/dox-devel/group__TopicStlContainers.html

Requires to update SCCD to commit 645508940
which also updates its vec3 structure.
parent 8827210f
......@@ -26,6 +26,7 @@
#include <Eigen/Geometry>
#include <Eigen/Sparse>
#include <Eigen/StdVector>
namespace imstk
{
......@@ -33,18 +34,26 @@ namespace imstk
// 2D vector
using Vec2f = Eigen::Vector2f;
using Vec2d = Eigen::Vector2d;
using StdVectorOfVec2f = std::vector<Vec2f, Eigen::aligned_allocator<Vec2f>>;
using StdVectorOfVec2d = std::vector<Vec2d, Eigen::aligned_allocator<Vec2d>>;
// 3D vector
using Vec3f = Eigen::Vector3f;
using Vec3d = Eigen::Vector3d;
using StdVectorOfVec3f = std::vector<Vec3f, Eigen::aligned_allocator<Vec3f>>;
using StdVectorOfVec3d = std::vector<Vec3d, Eigen::aligned_allocator<Vec3d>>;
// 4D vector
using Vec4f = Eigen::Vector4f;
using Vec4d = Eigen::Vector4d;
using StdVectorOfVec4f = std::vector<Vec4f, Eigen::aligned_allocator<Vec4f>>;
using StdVectorOfVec4d = std::vector<Vec4d, Eigen::aligned_allocator<Vec4d>>;
// Dynamic size vector
using Vectorf = Eigen::VectorXf;
using Vectord = Eigen::VectorXd;
using StdVectorOfVectorf = std::vector<Vectorf, Eigen::aligned_allocator<Vectorf>>;
using StdVectorOfVectord = std::vector<Vectord, Eigen::aligned_allocator<Vectord>>;
// Quaternion
using Quatf = Eigen::Quaternion<float,Eigen::DontAlign>;
......
......@@ -60,23 +60,23 @@ public:
///
/// \brief Returns the vector of current nodal positions
///
std::vector<Vec3d>& getPositions() { return m_pos; };
void setPositions(const std::vector<Vec3d>& p) { m_pos = p; };
StdVectorOfVec3d& getPositions() { return m_pos; };
void setPositions(const StdVectorOfVec3d& p) { m_pos = p; };
///
/// \brief Returns the vector of current nodal velocities
///
std::vector<Vec3d>& getVelocities() { return m_vel; };
StdVectorOfVec3d& getVelocities() { return m_vel; };
///
/// \brief Returns the vector of current nodal accelerations
///
std::vector<Vec3d>& getAccelerations() { return m_acc; };
StdVectorOfVec3d& getAccelerations() { return m_acc; };
private:
std::vector<Vec3d> m_pos; ///> Nodal positions
std::vector<Vec3d> m_vel; ///> Nodal velocities
std::vector<Vec3d> m_acc; ///> Nodal acelerations
StdVectorOfVec3d m_pos; ///> Nodal positions
StdVectorOfVec3d m_vel; ///> Nodal velocities
StdVectorOfVec3d m_acc; ///> Nodal acelerations
};
} // imstk
......
......@@ -25,7 +25,7 @@ namespace imstk
{
void
HexahedralMesh::initialize(const std::vector<Vec3d>& vertices,
HexahedralMesh::initialize(const StdVectorOfVec3d& vertices,
const std::vector<HexaArray>& hexahedra,
bool computeAttachedSurfaceMesh)
{
......
......@@ -54,7 +54,7 @@ public:
/// \brief Initializes the rest of the data structures given vertex positions and
/// hexahedra connectivity
///
void initialize(const std::vector<Vec3d>& vertices,
void initialize(const StdVectorOfVec3d& vertices,
const std::vector<HexaArray>& hexahedra,
bool computeAttachedSurfaceMesh = false);
......
......@@ -25,7 +25,7 @@ namespace imstk
{
void
Mesh::initialize(const std::vector<Vec3d>& vertices)
Mesh::initialize(const StdVectorOfVec3d& vertices)
{
this->setInitialVerticesPositions(vertices);
this->setVerticesPositions(vertices);
......@@ -79,13 +79,13 @@ Mesh::computeBoundingBox(Vec3d& min, Vec3d& max, const double percent) const
}
void
Mesh::setInitialVerticesPositions(const std::vector<Vec3d>& vertices)
Mesh::setInitialVerticesPositions(const StdVectorOfVec3d& vertices)
{
m_initialVerticesPositions = vertices;
m_verticesDisplacements= vertices;
}
const std::vector<Vec3d>&
const StdVectorOfVec3d&
Mesh::getInitialVerticesPositions() const
{
return m_initialVerticesPositions;
......@@ -98,12 +98,12 @@ Mesh::getInitialVertexPosition(const size_t& vertNum) const
}
void
Mesh::setVerticesPositions(const std::vector<Vec3d>& vertices)
Mesh::setVerticesPositions(const StdVectorOfVec3d& vertices)
{
m_verticesPositions = vertices;
}
const std::vector<Vec3d>&
const StdVectorOfVec3d&
Mesh::getVertexPositions() const
{
return m_verticesPositions;
......@@ -122,7 +122,7 @@ Mesh::getVertexPosition(const size_t& vertNum) const
}
void
Mesh::setVerticesDisplacements(const std::vector<Vec3d>& diff)
Mesh::setVerticesDisplacements(const StdVectorOfVec3d& diff)
{
m_verticesDisplacements = diff;
}
......@@ -143,7 +143,7 @@ Mesh::setVerticesDisplacements(const Vectord& u)
}
}
const std::vector<Vec3d>&
const StdVectorOfVec3d&
Mesh::getVerticesDisplacements() const
{
return m_verticesDisplacements;
......@@ -156,19 +156,19 @@ Mesh::getVerticeDisplacement(const size_t& vertNum) const
}
void
Mesh::setPointDataMap(const std::map<std::string, std::vector<Vectorf>>& pointData)
Mesh::setPointDataMap(const std::map<std::string, StdVectorOfVectorf>& pointData)
{
m_pointDataMap = pointData;
}
const std::map<std::string, std::vector<Vectorf>>&
const std::map<std::string, StdVectorOfVectorf>&
Mesh::getPointDataMap() const
{
return m_pointDataMap;
}
void
Mesh::setPointDataArray(const std::string& arrayName, const std::vector<Vectorf>& arrayData)
Mesh::setPointDataArray(const std::string& arrayName, const StdVectorOfVectorf& arrayData)
{
if ( arrayData.size() != this->getNumVertices())
{
......@@ -179,13 +179,13 @@ Mesh::setPointDataArray(const std::string& arrayName, const std::vector<Vectorf>
m_pointDataMap[arrayName] = arrayData;
}
const std::vector<Vectorf>&
const StdVectorOfVectorf&
Mesh::getPointDataArray(const std::string& arrayName) const
{
if (!m_pointDataMap.count(arrayName))
{
LOG(WARNING) << "No array with such name holds any point data.";
return std::vector<Vectorf>();
return StdVectorOfVectorf();
}
return m_pointDataMap.at(arrayName);
}
......
......@@ -44,7 +44,7 @@ public:
///
/// \brief Initializes the data structure given vertex positions
///
void initialize(const std::vector<Vec3d>& vertices);
void initialize(const StdVectorOfVec3d& vertices);
///
/// \brief Clears all the mesh data
......@@ -66,12 +66,12 @@ public:
///
/// \brief Sets initial positions from an array
///
void setInitialVerticesPositions(const std::vector<Vec3d>& vertices);
void setInitialVerticesPositions(const StdVectorOfVec3d& vertices);
///
/// \brief Returns the vector of initial positions of the mesh vertices
///
const std::vector<Vec3d>& getInitialVerticesPositions() const;
const StdVectorOfVec3d& getInitialVerticesPositions() const;
///
/// \brief Returns the initial position of a vertex given its index
......@@ -81,12 +81,12 @@ public:
///
/// \brief Sets current vertex positions of the mesh from an array
///
void setVerticesPositions(const std::vector<Vec3d>& vertices);
void setVerticesPositions(const StdVectorOfVec3d& vertices);
///
/// \brief Returns the vector of current positions of the mesh vertices
///
const std::vector<Vec3d>& getVertexPositions() const;
const StdVectorOfVec3d& getVertexPositions() const;
///
/// \brief Set the current position of a vertex given its index to certain position
......@@ -101,7 +101,7 @@ public:
///
/// \brief Sets the displacements of mesh vertices from an array
///
void setVerticesDisplacements(const std::vector<Vec3d>& diff);
void setVerticesDisplacements(const StdVectorOfVec3d& diff);
///
/// \brief Sets the displacements of mesh vertices from a linearized displacement vector
......@@ -111,7 +111,7 @@ public:
///
/// \brief Returns the vector displacements of mesh vertices
///
const std::vector<Vec3d>& getVerticesDisplacements() const;
const StdVectorOfVec3d& getVerticesDisplacements() const;
///
/// \brief Returns the displacement of a given vertex
......@@ -121,22 +121,22 @@ public:
///
/// \brief Sets the point data for all arrays at each vertice
///
void setPointDataMap(const std::map<std::string, std::vector<Vectorf>>& pointData);
void setPointDataMap(const std::map<std::string, StdVectorOfVectorf>& pointData);
///
/// \brief Get the map of the point data for all arrays at each vertice
///
const std::map<std::string, std::vector<Vectorf>>& getPointDataMap() const;
const std::map<std::string, StdVectorOfVectorf>& getPointDataMap() const;
///
/// \brief Set a data array holding some point data
///
void setPointDataArray(const std::string& arrayName, const std::vector<Vectorf>& arrayData);
void setPointDataArray(const std::string& arrayName, const StdVectorOfVectorf& arrayData);
///
/// \brief Get a specific data array
///
const std::vector<Vectorf>& getPointDataArray(const std::string& arrayName) const;
const StdVectorOfVectorf& getPointDataArray(const std::string& arrayName) const;
///
/// \brief Returns the number of total vertices in the mesh
......@@ -157,7 +157,7 @@ protected:
///
/// \brief Get vertices positions
///
std::vector<Vec3d>& getVerticesPositionsNotConst()
StdVectorOfVec3d& getVerticesPositionsNotConst()
{
return m_verticesPositions;
}
......@@ -166,11 +166,11 @@ protected:
// + Position (Initial translation)
// + verticesDisplacements
// = verticesPositions
std::vector<Vec3d> m_initialVerticesPositions; //> Initial positions of vertices
std::vector<Vec3d> m_verticesPositions; //> Current positions of vertices
std::vector<Vec3d> m_verticesDisplacements; //> Displacements of vertices
StdVectorOfVec3d m_initialVerticesPositions; //> Initial positions of vertices
StdVectorOfVec3d m_verticesPositions; //> Current positions of vertices
StdVectorOfVec3d m_verticesDisplacements; //> Displacements of vertices
std::map<std::string, std::vector<Vectorf>> m_pointDataMap; ///> vector of data arrays per vertice
std::map<std::string, StdVectorOfVectorf> m_pointDataMap; ///> vector of data arrays per vertice
};
} // imstk
......
......@@ -25,7 +25,7 @@ namespace imstk
{
void
SurfaceMesh::initialize(const std::vector<Vec3d>& vertices,
SurfaceMesh::initialize(const StdVectorOfVec3d& vertices,
const std::vector<TriangleArray>& triangles,
const bool computeDerivedData)
{
......@@ -236,7 +236,7 @@ SurfaceMesh::optimizeForDataLocality()
}
// C. Initialize this mesh with the newly computed ones
std::vector<Vec3d> optimallyOrderedNodalPos;
StdVectorOfVec3d optimallyOrderedNodalPos;
std::vector<TriangleArray> optConnectivityRenumbered;
// C.1 Get the positions
......@@ -276,7 +276,7 @@ SurfaceMesh::setTrianglesVertices(const std::vector<TriangleArray>& triangles)
m_trianglesVertices = triangles;
}
const std::vector<Vec3d>&
const StdVectorOfVec3d&
SurfaceMesh::getTrianglesNormals() const
{
return m_trianglesNormals;
......@@ -288,7 +288,7 @@ SurfaceMesh::getTriangleNormal(size_t i) const
return m_trianglesNormals.at(i);
}
const std::vector<Vec3d>&
const StdVectorOfVec3d&
SurfaceMesh::getVerticesNormals() const
{
return m_verticesNormals;
......@@ -358,4 +358,4 @@ SurfaceMesh::getTexture(std::string tCoordsName) const
return m_textureMap.at(tCoordsName);
}
} // imstk
\ No newline at end of file
} // imstk
......@@ -59,7 +59,7 @@ public:
/// \brief Initializes the rest of the data structures given vertex positions and
/// triangle connectivity and texture coordinates
///
void initialize(const std::vector<Vec3d>& vertices,
void initialize(const StdVectorOfVec3d& vertices,
const std::vector<TriangleArray>& triangles,
const bool computeDerivedData = false);
......@@ -116,7 +116,7 @@ public:
///
/// \brief Get vector of normals of all the triangles
///
const std::vector<Vec3d>& getTrianglesNormals() const;
const StdVectorOfVec3d& getTrianglesNormals() const;
///
/// \brief Get normal of a triangle given its index
......@@ -126,7 +126,7 @@ public:
///
/// \brief Get vector of normals of all the vertices
///
const std::vector<Vec3d>& getVerticesNormals() const;
const StdVectorOfVec3d& getVerticesNormals() const;
///
/// \brief Get normal of a vertex given its index
......@@ -158,8 +158,8 @@ protected:
std::vector<NeighborsType> m_verticesNeighborTriangles; ///> Neighbor triangles to vertices
std::vector<NeighborsType> m_verticesNeighborVertices; ///> Neighbor vertices to vertices
std::vector<Vec3d> m_trianglesNormals; ///> Normals to the triangles
std::vector<Vec3d> m_verticesNormals; ///> Normals of the vertices
StdVectorOfVec3d m_trianglesNormals; ///> Normals to the triangles
StdVectorOfVec3d m_verticesNormals; ///> Normals of the vertices
std::string m_defaultTCoords = ""; ///> Name of the array used as default texture coordinates
std::map<std::string, std::string> m_textureMap; ///> Mapping texture coordinates to texture
......
......@@ -25,7 +25,7 @@ namespace imstk
{
void
TetrahedralMesh::initialize(const std::vector<Vec3d>& vertices,
TetrahedralMesh::initialize(const StdVectorOfVec3d& vertices,
const std::vector<TetraArray>& tetrahedra,
bool computeAttachedSurfaceMesh)
{
......@@ -198,7 +198,7 @@ TetrahedralMesh::extractSurfaceMesh(std::shared_ptr<SurfaceMesh> surfaceMesh)
size_t vertId;
std::list<size_t>::iterator it;
std::vector<Vec3d> vertPositions;
StdVectorOfVec3d vertPositions;
for (vertId = 0, it = uniqueVertIdList.begin(); it != uniqueVertIdList.end(); ++vertId, it++)
{
vertPositions.push_back(this->getVertexPosition(*it));
......
......@@ -58,7 +58,7 @@ public:
/// \brief Initializes the rest of the data structures given vertex positions and
/// tetrahedra connectivity
///
void initialize(const std::vector<Vec3d>& vertices,
void initialize(const StdVectorOfVec3d& vertices,
const std::vector<TetraArray>& tetrahedra,
bool computeAttachedSurfaceMesh = false);
......
......@@ -134,7 +134,7 @@ VTKMeshReader::convertVtkPolyDataToSurfaceMesh(vtkPolyData* vtkMesh)
return nullptr;
}
std::vector<Vec3d> vertices;
StdVectorOfVec3d vertices;
VTKMeshReader::copyVertices(vtkMesh->GetPoints(), vertices);
std::vector<SurfaceMesh::TriangleArray> triangles;
......@@ -144,7 +144,7 @@ VTKMeshReader::convertVtkPolyDataToSurfaceMesh(vtkPolyData* vtkMesh)
mesh->initialize(vertices, triangles, true);
// Point Data
std::map<std::string, std::vector<Vectorf>> dataMap;
std::map<std::string, StdVectorOfVectorf> dataMap;
VTKMeshReader::copyPointData(vtkMesh->GetPointData(), dataMap);
if (!dataMap.empty())
{
......@@ -170,7 +170,7 @@ VTKMeshReader::convertVtkUnstructuredGridToVolumetricMesh(vtkUnstructuredGrid* v
return nullptr;
}
std::vector<Vec3d> vertices;
StdVectorOfVec3d vertices;
VTKMeshReader::copyVertices(vtkMesh->GetPoints(), vertices);
int cellType = vtkMesh->GetCellType(vtkMesh->GetNumberOfCells()-1);
......@@ -201,7 +201,7 @@ VTKMeshReader::convertVtkUnstructuredGridToVolumetricMesh(vtkUnstructuredGrid* v
}
void
VTKMeshReader::copyVertices(vtkPoints* points, std::vector<Vec3d>& vertices)
VTKMeshReader::copyVertices(vtkPoints* points, StdVectorOfVec3d& vertices)
{
if(!points)
{
......@@ -245,7 +245,7 @@ VTKMeshReader::copyCells(vtkCellArray* vtkCells, std::vector<std::array<size_t,d
}
void
VTKMeshReader::copyPointData(vtkPointData* pointData, std::map<std::string, std::vector<Vectorf>>& dataMap)
VTKMeshReader::copyPointData(vtkPointData* pointData, std::map<std::string, StdVectorOfVectorf>& dataMap)
{
if(!pointData)
{
......@@ -258,7 +258,7 @@ VTKMeshReader::copyPointData(vtkPointData* pointData, std::map<std::string, std:
std::string name = array->GetName();
int nbrOfComp = array->GetNumberOfComponents();
int nbrOfTuples = array->GetNumberOfTuples();
std::vector<Vectorf> data;
StdVectorOfVectorf data;
for(unsigned int j = 0; j < nbrOfTuples; ++j)
{
double* tupleData = new double [nbrOfComp];
......
......@@ -95,7 +95,7 @@ protected:
///
/// \brief
///
static void copyVertices(vtkPoints* points, std::vector<Vec3d>& vertices);
static void copyVertices(vtkPoints* points, StdVectorOfVec3d& vertices);
///
/// \brief
......@@ -106,7 +106,7 @@ protected:
///
/// \brief
///
static void copyPointData(vtkPointData* pointData, std::map<std::string, std::vector<Vectorf>>& dataMap);
static void copyPointData(vtkPointData* pointData, std::map<std::string, StdVectorOfVectorf>& dataMap);
};
......
......@@ -58,7 +58,7 @@ std::shared_ptr<imstk::VolumetricMesh>
VegaMeshReader::convertVegaMeshToVolumetricMesh(std::shared_ptr<vega::VolumetricMesh> vegaMesh)
{
// Copy vertices
std::vector<Vec3d> vertices;
StdVectorOfVec3d vertices;
VegaMeshReader::copyVertices(vegaMesh, vertices);
// Copy cells
......@@ -96,7 +96,7 @@ VegaMeshReader::convertVegaMeshToVolumetricMesh(std::shared_ptr<vega::Volumetric
void
VegaMeshReader::copyVertices(std::shared_ptr<vega::VolumetricMesh> vegaMesh,
std::vector<Vec3d>& vertices)
StdVectorOfVec3d& vertices)
{
for(size_t i = 0; i < vegaMesh->getNumVertices(); ++i)
{
......
......@@ -77,7 +77,7 @@ protected:
///
/// \brief
///
static void copyVertices(std::shared_ptr<vega::VolumetricMesh> vegaMesh, std::vector<Vec3d>& vertices);
static void copyVertices(std::shared_ptr<vega::VolumetricMesh> vegaMesh, StdVectorOfVec3d& vertices);
///
/// \brief
......
......@@ -42,7 +42,7 @@ VTKMappedVertexArray::PrintSelf(ostream &os, vtkIndent indent)
}
void
VTKMappedVertexArray::SetVertexArray(std::vector<Vec3d>& vertices)
VTKMappedVertexArray::SetVertexArray(StdVectorOfVec3d& vertices)
{
this->Initialize();
this->NumberOfComponents = 3;
......
......@@ -49,7 +49,7 @@ public:
// Description:
// Set the raw scalar arrays for the coordinate set. This class takes
// ownership of the arrays and deletes them with delete[].
void SetVertexArray(std::vector<Vec3d> &vertices);
void SetVertexArray(StdVectorOfVec3d &vertices);
// Reimplemented virtuals -- see superclasses for descriptions:
void Initialize();
......@@ -121,7 +121,7 @@ protected:
///
~VTKMappedVertexArray() {}
std::vector<Vec3d> *vertexArray; ///>
StdVectorOfVec3d *vertexArray; ///>
private:
VTKMappedVertexArray(const VTKMappedVertexArray &); // Not implemented.
......@@ -137,4 +137,4 @@ private:
} // imstk
#endif // ifndef imstkMappedVertexArray_h
\ No newline at end of file
#endif // ifndef imstkMappedVertexArray_h
......@@ -4,7 +4,7 @@
include(imstkAddExternalProject)
imstk_add_external_project( SCCD
GIT_REPOSITORY git@gitlab.kitware.com:iMSTK/SCCD.git
GIT_TAG 7145cc437ff9f9744a8363736590260e2e660bb6
GIT_TAG 64550894016d84e80939a1c51ef6df5307c54fae
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
CMAKE_ARGS
-DBUILD_SAMPLE_APP:BOOL=OFF
......
......@@ -806,7 +806,7 @@ void testTetraTriangleMap()
// Tetrahedral mesh
auto tetMesh = std::make_shared<imstk::TetrahedralMesh>();
std::vector<imstk::Vec3d> vertList;
imstk::StdVectorOfVec3d vertList;
vertList.push_back(imstk::Vec3d(0, 0, 0));
vertList.push_back(imstk::Vec3d(1.0, 0, 0));
vertList.push_back(imstk::Vec3d(0, 1.0, 0));
......@@ -821,7 +821,7 @@ void testTetraTriangleMap()
// Triangular mesh
auto triMesh = std::make_shared<imstk::SurfaceMesh>();
std::vector<imstk::Vec3d> SurfVertList;
imstk::StdVectorOfVec3d SurfVertList;
SurfVertList.push_back(imstk::Vec3d(0, 0, 1));// coincides with one vertex
SurfVertList.push_back(imstk::Vec3d(0.25, 0.25, 0.25));// centroid
SurfVertList.push_back(imstk::Vec3d(1.05, 0, 0));
......@@ -847,7 +847,7 @@ void testExtractSurfaceMesh()
// a.1 add vertex positions
auto tetMesh = std::make_shared<imstk::TetrahedralMesh>();
std::vector<imstk::Vec3d> vertList;
imstk::StdVectorOfVec3d vertList;
vertList.push_back(imstk::Vec3d(0, 0, 0));
vertList.push_back(imstk::Vec3d(1.0, 0, 0));
vertList.push_back(imstk::Vec3d(0, 1.0, 0));
......@@ -890,7 +890,7 @@ void testOneToOneNodalMap()
// a.1 add vertex positions
auto tetMesh = std::make_shared<imstk::TetrahedralMesh>();
std::vector<imstk::Vec3d> vertList;
imstk::StdVectorOfVec3d vertList;
vertList.push_back(imstk::Vec3d(0, 0, 0));
vertList.push_back(imstk::Vec3d(1.0, 0, 0));
vertList.push_back(imstk::Vec3d(0, 1.0, 0));
......@@ -905,7 +905,7 @@ void testOneToOneNodalMap()
auto triMesh = std::make_shared<imstk::SurfaceMesh>();
// b.1 Add vertex positions
std::vector<imstk::Vec3d> SurfVertList;
imstk::StdVectorOfVec3d SurfVertList;
SurfVertList.push_back(imstk::Vec3d(0, 0, 0));
SurfVertList.push_back(imstk::Vec3d(1.0, 0, 0));
SurfVertList.push_back(imstk::Vec3d(0, 1.0, 0));
......@@ -951,7 +951,7 @@ void testSurfaceMeshOptimizer()
// b. Add nodal data
auto surfMesh = std::make_shared<imstk::SurfaceMesh>();
std::vector<imstk::Vec3d> vertList;
imstk::StdVectorOfVec3d vertList;
vertList.push_back(imstk::Vec3d(0, 0, 0));
vertList.push_back(imstk::Vec3d(0.5, 0.5, 0));
vertList.push_back(imstk::Vec3d(1, 1, 0));
......@@ -1212,7 +1212,7 @@ void testPbdCloth()
// b. Add nodal data
auto surfMesh = std::make_shared<imstk::SurfaceMesh>();
std::vector<imstk::Vec3d> vertList;
imstk::StdVectorOfVec3d vertList;
const double width = 10.0;
const double height = 10.0;
const int nRows = 10;
......@@ -1344,7 +1344,7 @@ void testPbdCollision()
bool volumetric = !clothTest;
if (clothTest){
auto clothMesh = std::make_shared<imstk::SurfaceMesh>();
std::vector<imstk::Vec3d> vertList;
imstk::StdVectorOfVec3d vertList;
double width = 60.0;
double height = 60.0;
int nRows = 10;
......@@ -1497,7 +1497,7 @@ void testPbdCollision()
else{
// floor
std::vector<imstk::Vec3d> vertList;
imstk::StdVectorOfVec3d vertList;
double width = 100.0;
double height = 100.0;
int nRows = 2;
......@@ -1619,7 +1619,7 @@ void testLineMesh()
auto lineMeshVisual = std::make_shared<imstk::LineMesh>();
auto lineMeshPhysics = std::make_shared<imstk::LineMesh>();
std::vector<imstk::Vec3d> vertList;
imstk::StdVectorOfVec3d vertList;
vertList.resize(3);
vertList[0] = Vec3d(0.0, -10.0, -10.0);
vertList[1] = Vec3d(0.0, 0.0, -10.0);
......@@ -1735,7 +1735,7 @@ void testLineMesh()
if (clothTest){
std::vector<imstk::Vec3d> vertList;
imstk::StdVectorOfVec3d vertList;
double width = 60.0;
double height = 60.0;
int nRows = 20;
......
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