FEM: abaqus writer, use better names for elementsets

This commit is contained in:
Bernd Hahnebach
2017-06-06 16:56:00 +01:00
committed by Yorik van Havre
parent 564c30a471
commit 634987bc0f
4 changed files with 27 additions and 9 deletions

View File

@@ -1244,7 +1244,7 @@ void FemMesh::writeABAQUS(const std::string &Filename) const
for (ElementsMap::iterator it = elementsMap.begin(); it != elementsMap.end(); ++it) {
anABAQUS_Output << "** Volume elements" << std::endl;
anABAQUS_Output << "*Element, TYPE=" << it->first << ", ELSET=Eall" << std::endl;
anABAQUS_Output << "*Element, TYPE=" << it->first << ", ELSET=Evolumes" << std::endl;
for (NodesMap::iterator jt = it->second.begin(); jt != it->second.end(); ++jt) {
anABAQUS_Output << jt->first;
// Calculix allows max 16 enntries in one line, an hexa20 has more !
@@ -1264,10 +1264,13 @@ void FemMesh::writeABAQUS(const std::string &Filename) const
}
anABAQUS_Output << std::endl;
}
}
anABAQUS_Output << std::endl;
}
if (!elementsMap.empty()) {
anABAQUS_Output << "** Define element set Eall" << std::endl;
anABAQUS_Output << "*ELSET, ELSET=Eall" << std::endl;
anABAQUS_Output << "Evolumes" << std::endl;
anABAQUS_Output.close();
return; // done
}
@@ -1293,7 +1296,7 @@ void FemMesh::writeABAQUS(const std::string &Filename) const
for (ElementsMap::iterator it = elementsMap.begin(); it != elementsMap.end(); ++it) {
anABAQUS_Output << "** Face elements" << std::endl;
anABAQUS_Output << "*Element, TYPE=" << it->first << ", ELSET=Eall" << std::endl;
anABAQUS_Output << "*Element, TYPE=" << it->first << ", ELSET=Efaces" << std::endl;
for (NodesMap::iterator jt = it->second.begin(); jt != it->second.end(); ++jt) {
anABAQUS_Output << jt->first;
for (std::vector<int>::iterator kt = jt->second.begin(); kt != jt->second.end(); ++kt) {
@@ -1301,10 +1304,13 @@ void FemMesh::writeABAQUS(const std::string &Filename) const
}
anABAQUS_Output << std::endl;
}
}
anABAQUS_Output << std::endl;
}
if (!elementsMap.empty()) {
anABAQUS_Output << "** Define element set Eall" << std::endl;
anABAQUS_Output << "*ELSET, ELSET=Eall" << std::endl;
anABAQUS_Output << "Efaces" << std::endl;
anABAQUS_Output.close();
return; // done
}
@@ -1330,7 +1336,7 @@ void FemMesh::writeABAQUS(const std::string &Filename) const
for (ElementsMap::iterator it = elementsMap.begin(); it != elementsMap.end(); ++it) {
anABAQUS_Output << "** Edge elements" << std::endl;
anABAQUS_Output << "*Element, TYPE=" << it->first << ", ELSET=Eall" << std::endl;
anABAQUS_Output << "*Element, TYPE=" << it->first << ", ELSET=Eedges" << std::endl;
for (NodesMap::iterator jt = it->second.begin(); jt != it->second.end(); ++jt) {
anABAQUS_Output << jt->first;
for (std::vector<int>::iterator kt = jt->second.begin(); kt != jt->second.end(); ++kt) {
@@ -1338,10 +1344,13 @@ void FemMesh::writeABAQUS(const std::string &Filename) const
}
anABAQUS_Output << std::endl;
}
}
anABAQUS_Output << std::endl;
}
elementsMap.clear();
anABAQUS_Output << "** Define element set Eall" << std::endl;
anABAQUS_Output << "*ELSET, ELSET=Eall" << std::endl;
anABAQUS_Output << "Eedges" << std::endl;
anABAQUS_Output.close();
}