Skip to content
Snippets Groups Projects
Commit 66704482 authored by Tom Fischer's avatar Tom Fischer
Browse files

[MGT] size_t -> std::size_t.

parent 2fffd6ed
No related branches found
No related tags found
No related merge requests found
......@@ -35,9 +35,9 @@ MeshLib::Mesh* appendLinesAlongPolylines(const MeshLib::Mesh &mesh, const GeoLib
for (auto e : vec_new_eles)
max_matID = std::max(max_matID, e->getValue());
const size_t n_ply (ply_vec.size());
const std::size_t n_ply (ply_vec.size());
// for each polyline
for (size_t k(0); k < n_ply; k++)
for (std::size_t k(0); k < n_ply; k++)
{
const GeoLib::Polyline* ply = (*ply_vec.getVector())[k];
......@@ -52,7 +52,7 @@ MeshLib::Mesh* appendLinesAlongPolylines(const MeshLib::Mesh &mesh, const GeoLib
}
// add line elements
for (size_t i=0; i<vec_nodes_on_ply.size()-1; i++) {
for (std::size_t i=0; i<vec_nodes_on_ply.size()-1; i++) {
std::array<MeshLib::Node*, 2> element_nodes;
element_nodes[0] = vec_new_nodes[vec_nodes_on_ply[i]];
element_nodes[1] = vec_new_nodes[vec_nodes_on_ply[i+1]];
......
......@@ -36,8 +36,8 @@ BoundaryElementsOnSurface::BoundaryElementsOnSurface(MeshLib::Mesh const& mesh,
for (unsigned i=0; i<e->getNFaces(); i++) {
auto* face = e->getFace(i);
// check
size_t cnt_match = 0;
for (size_t j=0; j<face->getNBaseNodes(); j++) {
std::size_t cnt_match = 0;
for (std::size_t j=0; j<face->getNBaseNodes(); j++) {
if (std::find(node_ids_on_sfc.begin(), node_ids_on_sfc.end(), face->getNodeIndex(j)) != node_ids_on_sfc.end())
cnt_match++;
else
......
......@@ -112,7 +112,7 @@ void GeoMapper::mapData()
min_val = bounding_box.getMinPoint()[2];
max_val = bounding_box.getMaxPoint()[2];
}
size_t nPoints (points->size());
std::size_t nPoints (points->size());
if (!is_borehole)
{
......@@ -133,7 +133,7 @@ void GeoMapper::mapData()
GeoLib::StationBorehole* borehole = static_cast<GeoLib::StationBorehole*>(pnt);
const std::vector<GeoLib::Point*> layers = borehole->getProfile();
size_t nLayers = layers.size();
std::size_t nLayers = layers.size();
for (unsigned k=0; k<nLayers; ++k)
{
GeoLib::Point* layer_pnt = layers[k];
......@@ -204,7 +204,7 @@ void GeoMapper::advancedMapOnMesh(const MeshLib::Mesh* mesh, const std::string &
// copy geometry (and set z=0 for all points)
unsigned nGeoPoints ( points->size() );
std::vector<GeoLib::Point*> *new_points = new std::vector<GeoLib::Point*>(nGeoPoints);
for (size_t i=0; i<nGeoPoints; ++i)
for (std::size_t i=0; i<nGeoPoints; ++i)
(*new_points)[i] = new GeoLib::Point((*(*points)[i])[0],(*(*points)[i])[1],0.0);
std::vector<GeoLib::Polyline*> *new_lines (copyPolylinesVector(this->_geo_objects.getPolylineVec(this->_geo_name), new_points));
......@@ -215,7 +215,7 @@ void GeoMapper::advancedMapOnMesh(const MeshLib::Mesh* mesh, const std::string &
const unsigned nMeshNodes ( mesh->getNNodes() );
std::vector<int> closest_geo_point(nMeshNodes); // index of closest geo point for each mesh node in (x,y)-plane
std::vector<double> dist(nMeshNodes); // distance between geo points and mesh nodes in (x,y)-plane
for (size_t i=0; i<nMeshNodes; ++i)
for (std::size_t i=0; i<nMeshNodes; ++i)
{
const double zero_coords[3] = {(* mesh->getNode(i))[0], (* mesh->getNode(i))[1], 0.0};
GeoLib::Point* pnt = grid.getNearestPoint(zero_coords);
......@@ -224,7 +224,7 @@ void GeoMapper::advancedMapOnMesh(const MeshLib::Mesh* mesh, const std::string &
}
// store for each point the line segment to which it was added.
const size_t nLines (new_lines->size());
const std::size_t nLines (new_lines->size());
std::vector< std::vector<unsigned> > line_segment_map(nLines);
for (std::size_t i=0; i<nLines; ++i)
{
......
......@@ -33,7 +33,7 @@ MeshNodesAlongPolyline::MeshNodesAlongPolyline(
const std::size_t n_nodes (search_all_nodes ? _mesh.getNNodes() : _mesh.getNBaseNodes());
auto &mesh_nodes = _mesh.getNodes();
// loop over all nodes
for (size_t i = 0; i < n_nodes; i++) {
for (std::size_t i = 0; i < n_nodes; i++) {
double dist = _ply.getDistanceAlongPolyline(*mesh_nodes[i], epsilon_radius);
if (dist >= 0.0) {
_msh_node_ids.push_back(mesh_nodes[i]->getID());
......@@ -51,7 +51,7 @@ MeshLib::Mesh const& MeshNodesAlongPolyline::getMesh () const
return _mesh;
}
std::vector<size_t> const& MeshNodesAlongPolyline::getNodeIDs () const
std::vector<std::size_t> const& MeshNodesAlongPolyline::getNodeIDs () const
{
return _msh_node_ids;
}
......
......@@ -30,7 +30,7 @@ MeshNodesAlongSurface::MeshNodesAlongSurface(
auto& mesh_nodes = _mesh.getNodes();
const std::size_t n_nodes (search_all_nodes ? _mesh.getNNodes() : _mesh.getNBaseNodes());
// loop over all nodes
for (size_t i = 0; i < n_nodes; i++) {
for (std::size_t i = 0; i < n_nodes; i++) {
auto* node = mesh_nodes[i];
if (!sfc.isPntInBoundingVolume(node->getCoords()))
continue;
......
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