88 lastPointIndex_(
"lastPointIndex",
"lastPointIndex"),
89 lastVertexIndex_(
"lastVertexIndex",
"lastVertexIndex"),
90 surfaceNames_(
"surfaceNames",
"surfaceNames")
102 const auto& newPoints = tSurf.
points();
103 const auto& newVertices = tSurf.
vertices();
104 const auto& newAreas = tSurf.
area();
109 points_.
append(newPoints);
113 auto vOldSize = vertices_.size();
114 auto vNewSize = vOldSize + newVertices.size();
115 vertices_.resize(vNewSize);
116 area_.resize(vNewSize);
118 auto verVec = vertices_.deviceVectorAll();
119 auto areaVec = area_.deviceVectorAll();
121 auto newVerVec = newVertices.deviceVectorAll();
122 auto newArea = newAreas.deviceVectorAll();
124 auto maxIdx = maxIndex();
126 Kokkos::parallel_for(
127 "multiTriSurface::addTriSurface",
130 verVec[vOldSize+i] = newVerVec[i]+(maxIdx+1);
131 areaVec[vOldSize+i] = newArea[i];
139 "the indices and number of points do not match. \n";
143 lastPointIndex_.push_back(points_.size()-1);
144 lastPointIndex_.syncViews();
146 lastVertexIndex_.push_back(vertices_.size()-1);
147 lastVertexIndex_.syncViews();
149 surfaceNames_.push_back(name);
165 return addTriSurface(name, newSurf);
215 if( !readTriSurface(is) )
return false;
217 is >> lastPointIndex_;
220 is >> lastVertexIndex_;
236 if(!writeTriSurface(os))
return false;
238 os << lastPointIndex_;
239 os << lastVertexIndex_;