Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge from V6_main_20120808 08Aug12
[modules/smesh.git]
/
src
/
DriverUNV
/
UNV2417_Structure.cxx
diff --git
a/src/DriverUNV/UNV2417_Structure.cxx
b/src/DriverUNV/UNV2417_Structure.cxx
index a9da97d62fc8c3328de6e857772632694960d5b0..781d5991407c525716c7055305b7116f32060886 100644
(file)
--- a/
src/DriverUNV/UNV2417_Structure.cxx
+++ b/
src/DriverUNV/UNV2417_Structure.cxx
@@
-1,4
+1,6
@@
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
@@
-6,7
+8,7
@@
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful
+// This library is distributed in the hope that it will be useful
,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
@@
-17,25
+19,19
@@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "UNV2417_Structure.hxx"
#include "UNV_Utilities.hxx"
#include "UNV2417_Structure.hxx"
#include "UNV_Utilities.hxx"
-#include <fstream>
+#include <fstream>
#include <iomanip>
using namespace std;
using namespace UNV;
using namespace UNV2417;
#include <iomanip>
using namespace std;
using namespace UNV;
using namespace UNV2417;
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-
static string _group_labels[] = {"2417", "2429", "2430", "2432",
static string _group_labels[] = {"2417", "2429", "2430", "2432",
- "2435", "2452", "2467", "2477"};
+
"2435", "2452", "2467", "2477"};
#define NBGROUP 8
static string _label_dataset = "2467";
#define NBGROUP 8
static string _label_dataset = "2467";
@@
-53,7
+49,7
@@
void UNV2417::Read(std::ifstream& in_stream, TDataSet& theDataSet)
* a "-1" followed by a number means the beginning of a dataset
* stop combing at the end of the file
*/
* a "-1" followed by a number means the beginning of a dataset
* stop combing at the end of the file
*/
- while( ((olds != "-1") || (news == "-1") ) && !in_stream.eof() ){
+ while( ((olds != "-1") || (news == "-1") ) && !in_stream.eof() ){
olds = news;
in_stream >> news;
}
olds = news;
in_stream >> news;
}
@@
-61,7
+57,7
@@
void UNV2417::Read(std::ifstream& in_stream, TDataSet& theDataSet)
return;
for (int i = 0; i < NBGROUP; i++) {
if (news == _group_labels[i]) {
return;
for (int i = 0; i < NBGROUP; i++) {
if (news == _group_labels[i]) {
- ReadGroup(news, in_stream, theDataSet);
+
ReadGroup(news, in_stream, theDataSet);
}
}
}
}
}
}
@@
-92,7
+88,7
@@
void UNV2417::ReadGroup(const std::string& myGroupLabel, std::ifstream& in_strea
std::getline(in_stream, aRec.GroupName, '\n'); // Finalise previous reading
std::getline(in_stream, aRec.GroupName, '\n');
std::getline(in_stream, aRec.GroupName, '\n'); // Finalise previous reading
std::getline(in_stream, aRec.GroupName, '\n');
-
+
int aElType;
int aElId;
int aNum;
int aElType;
int aElId;
int aNum;
@@
-100,23
+96,23
@@
void UNV2417::ReadGroup(const std::string& myGroupLabel, std::ifstream& in_strea
in_stream>>aElType;
in_stream>>aElId;
if ((myGroupLabel.compare("2435") == 0) ||
in_stream>>aElType;
in_stream>>aElId;
if ((myGroupLabel.compare("2435") == 0) ||
- (myGroupLabel.compare("2452") == 0) ||
- (myGroupLabel.compare("2467") == 0) ||
- (myGroupLabel.compare("2477") == 0)) {
- in_stream>>aTmp;
- in_stream>>aTmp;
+
(myGroupLabel.compare("2452") == 0) ||
+
(myGroupLabel.compare("2467") == 0) ||
+
(myGroupLabel.compare("2477") == 0)) {
+
in_stream>>aTmp;
+
in_stream>>aTmp;
}
switch (aElType) {
case 7: // Nodes
}
switch (aElType) {
case 7: // Nodes
- aNum = aRec.NodeList.size();
- aRec.NodeList.resize(aNum + 1);
- aRec.NodeList[aNum] = aElId;
- break;
+
aNum = aRec.NodeList.size();
+
aRec.NodeList.resize(aNum + 1);
+
aRec.NodeList[aNum] = aElId;
+
break;
case 8: // Elements
case 8: // Elements
- aNum = aRec.ElementList.size();
- aRec.ElementList.resize(aNum + 1);
- aRec.ElementList[aNum] = aElId;
- break;
+
aNum = aRec.ElementList.size();
+
aRec.ElementList.resize(aNum + 1);
+
aRec.ElementList[aNum] = aElId;
+
break;
}
}
theDataSet.insert(TDataSet::value_type(aId,aRec));
}
}
theDataSet.insert(TDataSet::value_type(aId,aRec));
@@
-158,8
+154,8
@@
void UNV2417::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
int i;
for (i = 0; i < aNbNodes; i++) {
if (aRow == 2) {
int i;
for (i = 0; i < aNbNodes; i++) {
if (aRow == 2) {
- out_stream<<std::endl;
- aRow = 0;
+
out_stream<<std::endl;
+
aRow = 0;
}
out_stream<<std::setw(10)<<7;
out_stream<<std::setw(10)<<aRec.NodeList[i];
}
out_stream<<std::setw(10)<<7;
out_stream<<std::setw(10)<<aRec.NodeList[i];
@@
-169,8
+165,8
@@
void UNV2417::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
}
for (i = 0; i < aNbElements; i++) {
if (aRow == 2) {
}
for (i = 0; i < aNbElements; i++) {
if (aRow == 2) {
- out_stream<<std::endl;
- aRow = 0;
+
out_stream<<std::endl;
+
aRow = 0;
}
out_stream<<std::setw(10)<<8;
out_stream<<std::setw(10)<<aRec.ElementList[i];
}
out_stream<<std::setw(10)<<8;
out_stream<<std::setw(10)<<aRec.ElementList[i];