Skip to content
Snippets Groups Projects
Commit f075e5ea authored by Adrien Crovato's avatar Adrien Crovato
Browse files

Fix compilation linux

parent 035acd9b
No related branches found
No related tags found
1 merge request!1USCSDPM v1.0
Pipeline #11025 passed
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
......@@ -55,7 +55,7 @@ sdpmMatrixXd Builder::gatherCoords(bool symy, Element const *ej)
// Get coordinates
Eigen::MatrixXd coords(3, nV);
for (int j = 0; j < nV; ++j)
for (size_t j = 0; j < nV; ++j)
coords.col(j) = nods[nV - 1 - j]->getCoords();
if (symy)
coords.row(1) = -coords.row(1);
......
......@@ -90,7 +90,7 @@ void GmshImport::readPhysicalTags(FILE *file)
{
Tag *tag = new Tag(no, name, dim);
_tagMap[no] = tag;
_msh.addTag(static_cast<std::string>(name), tag);
_msh.addTag(name, tag);
}
}
}
......@@ -150,7 +150,7 @@ void GmshImport::readElements(FILE *file)
if (nbtags > 1)
{
size_t idx;
for (size_t itag = 1; itag < nbtags; ++itag)
for (int itag = 1; itag < nbtags; ++itag)
if (fscanf(file, "%zu", &idx) != 1)
throw std::runtime_error("GmshImport::readElements: error reading tags!\n");
}
......
......@@ -50,10 +50,10 @@ public:
std::map<std::string, Tag *> const &getTags() const { return _tags; }
#ifndef SWIG
// Setters
void setName(std::string &n) { _name = n; }
void setName(std::string const &n) { _name = n; }
void addNode(Node *n) { _nodes.push_back(n); }
void addElement(Element *e) { _elements.push_back(e); }
void addTag(std::string &n, Tag *t) { _tags[n] = t; }
void addTag(std::string const &n, Tag *t) { _tags[n] = t; }
void reserveNodes(size_t n) { _nodes.reserve(n); }
void reserveElements(size_t n) { _elements.reserve(n); }
#endif
......
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