Commit 52fc5ff7 authored by Christophe Geuzaine's avatar Christophe Geuzaine

Merge branch 'master' of https://gitlab.onelab.info/gmsh/gmsh

parents 3f306919 08e05825
Pipeline #2266 failed with stage
in 36 minutes 1 second
......@@ -5,6 +5,31 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
# KHModif -- 7 August 2018
# make sure that dynamic libraries can be found when installing/
# displacing the binaries
# from http://www.cmake.org/Wiki/CMake_RPATH_handling
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "\\\$ORIGIN/../lib")
ENDIF("${isSystemDir}" STREQUAL "-1")
# end KHModif
# do not warn about non-definition of WIN32 on Cygwin
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
......
......@@ -167,7 +167,7 @@ static void view_save_cb(Fl_Widget *w, void *data)
"*.txt" NN;
PView *view = PView::list[(intptr_t)data];
test:
test:
if(fileChooser(FILE_CHOOSER_CREATE, "Export", formats,
view->getData()->getFileName().c_str())) {
std::string name = fileChooserGetName(1);
......
......@@ -60,7 +60,7 @@ public: // these will become protected at some point
// corresponding principal vertices
std::map<GVertex *, GVertex *> vertexCounterparts;
// the physical entitites (if any) that contain this entity
std::vector<int> physicals;
......
......@@ -177,7 +177,7 @@ protected:
void
_storePhysicalTagsInEntities(int dim,
std::map<int, std::map<int, std::string> > &map);
public:
// region, face, edge and vertex iterators
typedef std::set<GRegion *, GEntityLessThan>::iterator riter;
......
......@@ -331,13 +331,6 @@ createElementMSH(GModel *m, int num, int typeMSH, int reg, int part,
default: Msg::Error("Wrong type of element"); return NULL;
}
/*
int dim = e->getDim();
if(physical && (!physicals[dim].count(reg) ||
!physicals[dim][reg].count(physical))) physicals[dim][reg][physical] =
"unnamed";
*/
// if(part) m->getMeshPartitions().insert(part);
return e;
}
......@@ -1261,7 +1254,7 @@ int GModel::_readCGNSUnstructured(const std::string &fileName)
// --- global containers and indices for points and elements
std::map<int, std::vector<MElement *> > eltMap[10];
std::vector<MVertex *> vertices;
std::vector<MVertex *> newVertices;
// --- keep connectivity information
......@@ -1358,7 +1351,7 @@ int GModel::_readCGNSUnstructured(const std::string &fileName)
for(int zoneIndex = 1; zoneIndex <= nbZones; zoneIndex++) {
// --- using an offset to translate zone local numbering to global numbering
int vtxOffset = vertices.size();
int vtxOffset = newVertices.size();
// --- check that this is an unstructured zone
// we can later add ijk here to allow for mixed meshes
......@@ -1401,7 +1394,7 @@ int GModel::_readCGNSUnstructured(const std::string &fileName)
}
char zoneFamilyName[maxLenCGNS];
int zoneFamilyIndex;
//int zoneFamilyIndex;
int ierr = cg_famname_read(zoneFamilyName);
......@@ -1414,18 +1407,17 @@ int GModel::_readCGNSUnstructured(const std::string &fileName)
if(ierr == CG_OK) {
Msg::Info("Zone %i has family name %s", zoneIndex, zoneFamilyName);
map<string, int>::iterator fIter = family.find(zoneFamilyName);
if(fIter != family.end())
zoneFamilyIndex = fIter->second;
else
// if(fIter != family.end()) zoneFamilyIndex = fIter->second;
if (fIter == family.end())
Msg::Error("%s (%i) : Error reading CGNS file %s : "
"cannot find CGNS family in available list",
"cannot find CGNS family in available list",
__FILE__, __LINE__, fileName.c_str());
}
// --- read coordinates and create vertices
addCGNSPoints(fileName, fileIndex, baseIndex, zoneIndex, nbPoints, meshDim,
scale, NULL, vtxIndex, vertices);
scale, NULL, vtxIndex, newVertices);
Msg::Info("Read %i points", nbPoints);
......@@ -1519,7 +1511,7 @@ int GModel::_readCGNSUnstructured(const std::string &fileName)
for(int iVtx = 0; iVtx < eltSize; iVtx++) {
int num = vtxOffset + pElt[renum[iVtx]] - 1;
vtcs.push_back(vertices[num]);
vtcs.push_back(newVertices[num]);
}
int topoIndex = zoneIndex;
......@@ -1574,7 +1566,7 @@ int GModel::_readCGNSUnstructured(const std::string &fileName)
}
_associateEntityWithMeshVertices();
_storeVerticesInEntities(vertices);
_storeVerticesInEntities(newVertices);
// add physical entities corresponding to the bc and zones
......@@ -2158,7 +2150,6 @@ int GModel::_readCGNSStructured(const std::string &name)
}
removeDuplicateMeshVertices(1e-8);
// createTopologyFromMesh();
if(cg_close(index_file)) {
Msg::Error("Couldn't close the file !");
......
This diff is collapsed.
......@@ -1254,14 +1254,14 @@ static void updatePeriodicEdgesAndFaces(GModel *m)
Msg::Info(
"Constructing high order periodicity for edge connection %d - %d",
tgt->tag(), src->tag());
tgt->tag(), src->tag());
std::map<MEdge, MLine *, Less_Edge> srcEdges;
for(unsigned int i = 0; i < src->getNumMeshElements(); i++) {
MLine *srcLine = dynamic_cast<MLine *>(src->getMeshElement(i));
if(!srcLine) {
Msg::Error("Master element %d is not an edge",
src->getMeshElement(i)->getNum());
src->getMeshElement(i)->getNum());
return;
}
srcEdges[MEdge(srcLine->getVertex(0), srcLine->getVertex(1))] = srcLine;
......@@ -1272,7 +1272,7 @@ static void updatePeriodicEdgesAndFaces(GModel *m)
MVertex *vtcs[2];
if(!tgtLine) {
Msg::Error("Slave element %d is not an edge",
tgt->getMeshElement(i)->getNum());
tgt->getMeshElement(i)->getNum());
return;
}
for(int iVtx = 0; iVtx < 2; iVtx++) {
......
......@@ -358,10 +358,10 @@ namespace onelab {
for(std::map<std::string, std::string>::const_iterator it =
_attributes.begin();
it != _attributes.end(); it++) {
if(it != _attributes.begin()) sstream << ", ";
if(it != _attributes.begin()) sstream << ", ";
sstream << "\"" << sanitizeJSON(it->first) << "\":\""
<< sanitizeJSON(it->second) << "\"";
}
}
sstream << " }";
}
if(getClients().size()) {
......@@ -369,7 +369,7 @@ namespace onelab {
for(std::map<std::string, int>::const_iterator it =
getClients().begin();
it != getClients().end(); it++) {
if(it != getClients().begin()) sstream << ", ";
if(it != getClients().begin()) sstream << ", ";
sstream << "\"" << sanitizeJSON(it->first) << "\":" << it->second;
}
sstream << " }";
......@@ -597,9 +597,9 @@ namespace onelab {
if(_choices.size()) {
sstream << ", \"choices\":[ ";
for(unsigned int i = 0; i < _choices.size(); i++) {
if(i) sstream << ", ";
sstream << _choices[i];
}
if(i) sstream << ", ";
sstream << _choices[i];
}
sstream << " ]";
}
if(_valueLabels.size()) {
......@@ -607,7 +607,7 @@ namespace onelab {
for(std::map<double, std::string>::const_iterator it =
_valueLabels.begin();
it != _valueLabels.end(); it++) {
if(it != _valueLabels.begin()) sstream << ", ";
if(it != _valueLabels.begin()) sstream << ", ";
sstream << "\"" << sanitizeJSON(it->second) << "\":" << it->first;
}
sstream << " }";
......@@ -776,7 +776,7 @@ namespace onelab {
if(_choices.size()) {
sstream << ", \"choices\":[ ";
for(unsigned int i = 0; i < _choices.size(); i++) {
if(i) sstream << ", ";
if(i) sstream << ", ";
sstream << "\"" << sanitizeJSON(_choices[i]) << "\"";
}
sstream << " ]";
......@@ -1078,8 +1078,8 @@ namespace onelab {
if(client.empty() || (*it)->hasClient(client)) {
if((*it)->getAttribute("NotInDb") != "True") {
json += " " + (*it)->toJSON();
}
}
}
}
}
json += "\n ] }\n}\n";
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment