@@ -75,9 +75,10 @@ void ICavity::saveCavity(const std::string & fname) {
75
75
cnpy::custom::npz_save (fname, " normals" , elementNormal_);
76
76
for (PCMSolverIndex i = 0 ; i < nElements_; ++i) {
77
77
// Write vertices
78
- cnpy::custom::npz_save (fname, " vertices_" + std::to_string (i), elements_[i].vertices ());
78
+ cnpy::custom::npz_save (
79
+ fname, " vertices_" + pcm::to_string (i), elements_[i].vertices ());
79
80
// Write arcs
80
- cnpy::custom::npz_save (fname, " arcs_" + std ::to_string (i), elements_[i].arcs ());
81
+ cnpy::custom::npz_save (fname, " arcs_" + pcm ::to_string (i), elements_[i].arcs ());
81
82
}
82
83
}
83
84
@@ -130,14 +131,13 @@ void ICavity::loadCavity(const std::string & fname) {
130
131
Sphere sph (elementSphereCenter_.col (i), elementRadius_ (i));
131
132
Eigen::Matrix3Xd vertices, arcs;
132
133
// 6. Get vertices and arcs
133
- for (PCMSolverIndex i = 0 ; i < nElements_; ++i) {
134
- cnpy::NpyArray raw_vertices = loaded_cavity[" vertices_" + std::to_string (i)];
135
- vertices = cnpy::custom::npy_to_eigen<double >(raw_vertices);
136
- cnpy::NpyArray raw_arcs = loaded_cavity[" arcs_" + std::to_string (i)];
137
- arcs = cnpy::custom::npy_to_eigen<double >(raw_arcs);
138
- }
134
+ cnpy::NpyArray raw_vertices = loaded_cavity[" vertices_" + pcm::to_string (i)];
135
+ vertices = cnpy::custom::npy_to_eigen<double >(raw_vertices);
136
+ cnpy::NpyArray raw_arcs = loaded_cavity[" arcs_" + pcm::to_string (i)];
137
+ arcs = cnpy::custom::npy_to_eigen<double >(raw_arcs);
139
138
if (arcs.cols () != vertices.cols ())
140
- PCMSOLVER_ERROR (" Inconsistent number of vertices read from file for element " + to_string (i));
139
+ PCMSOLVER_ERROR (" Inconsistent number of vertices read from file for element " +
140
+ pcm::to_string (i));
141
141
int nv = vertices.cols ();
142
142
// Populate vertices and arcs
143
143
elements_.push_back (Element (nv,
0 commit comments