static int MYDEBUGWITHFILES = 0;
#endif
+#define _DEXCEPT_
namespace VISU
{
"; aNbGauss = "<<aNbGauss<<
endl);
- if(aNbComp == 4)
- aNbComp = 2;
-
+ int aNbComp2 = aNbComp;
switch(aNbComp){
case 1:
for(int iElem = 0; iElem < aNbElem; iElem++){
float aValue[] = {0.0, 0.0, 0.0};
TCValueSliceArr aValueSliceArr = aMeshValue.GetCompValueSliceArr(iElem);
- for(int iComp = 0; iComp < aNbComp; iComp++){
+ for(int iComp = 0; iComp < aNbComp2; iComp++){
const TCValueSlice& aValueSlice = aValueSliceArr[iComp];
for(int iGauss = 0; iGauss < aNbGauss; iGauss++){
aValue[iComp] += aValueSlice[iGauss];
aFloatArray->SetTuple1(aTupleId++,aValue[0]);
}
break;
+ case 4:
+ aNbComp2 = 2;
case 2:
for(int iElem = 0; iElem < aNbElem; iElem++){
float aValue[] = {0.0, 0.0, 0.0};
TCValueSliceArr aValueSliceArr = aMeshValue.GetCompValueSliceArr(iElem);
- for(int iComp = 0; iComp < aNbComp; iComp++){
+ for(int iComp = 0; iComp < aNbComp2; iComp++){
const TCValueSlice& aValueSlice = aValueSliceArr[iComp];
for(int iGauss = 0; iGauss < aNbGauss; iGauss++){
aValue[iComp] += aValueSlice[iGauss];
}
break;
default:
+ if(aNbComp > 3)
+ aNbComp2 = 3;
for(int iElem = 0; iElem < aNbElem; iElem++){
float aValue[] = {0.0, 0.0, 0.0};
TCValueSliceArr aValueSliceArr = aMeshValue.GetCompValueSliceArr(iElem);
- for(int iComp = 0; iComp < aNbComp; iComp++){
+ for(int iComp = 0; iComp < aNbComp2; iComp++){
const TCValueSlice& aValueSlice = aValueSliceArr[iComp];
for(int iGauss = 0; iGauss < aNbGauss; iGauss++){
aValue[iComp] += aValueSlice[iGauss];
"; aNbGauss = "<<aNbGauss<<
endl);
- if(aNbComp == 4)
- aNbComp = 2;
-
+ int aNbComp2 = aNbComp;
switch(aNbComp){
case 1:
for(int iElem = 0; iElem < aNbElem; iElem++){
TCValueSliceArr aValueSliceArr = aMeshValue.GetGaussValueSliceArr(iElem);
for(int iGauss = 0; iGauss < aNbGauss; iGauss++){
const TCValueSlice& aValueSlice = aValueSliceArr[iGauss];
- for(int iComp = 0; iComp < aNbComp; iComp++){
+ for(int iComp = 0; iComp < aNbComp2; iComp++){
aValue[iComp] += aValueSlice[iComp];
}
aFloatArray->SetTuple1(aTupleId++,aValue[0]);
}
}
break;
+ case 4:
+ aNbComp2 = 2;
case 2:
for(int iElem = 0; iElem < aNbElem; iElem++){
float aValue[] = {0.0, 0.0, 0.0};
TCValueSliceArr aValueSliceArr = aMeshValue.GetGaussValueSliceArr(iElem);
for(int iGauss = 0; iGauss < aNbGauss; iGauss++){
const TCValueSlice& aValueSlice = aValueSliceArr[iGauss];
- for(int iComp = 0; iComp < aNbComp; iComp++){
+ for(int iComp = 0; iComp < aNbComp2; iComp++){
aValue[iComp] += aValueSlice[iComp];
}
aFloatArray->SetTuple3(aTupleId++,aValue[0],aValue[1],0.0);
}
break;
default:
+ if(aNbComp > 3)
+ aNbComp2 = 3;
for(int iElem = 0; iElem < aNbElem; iElem++){
float aValue[] = {0.0, 0.0, 0.0};
TCValueSliceArr aValueSliceArr = aMeshValue.GetGaussValueSliceArr(iElem);
for(int iGauss = 0; iGauss < aNbGauss; iGauss++){
const TCValueSlice& aValueSlice = aValueSliceArr[iGauss];
- for(int iComp = 0; iComp < aNbComp; iComp++){
+ for(int iComp = 0; iComp < aNbComp2; iComp++){
aValue[iComp] += aValueSlice[iComp];
}
aFloatArray->SetTuple3(aTupleId++,aValue[0],aValue[1],aValue[2]);
//Main part of code
TVTKSource& aSource = aValForTime->mySource;
-#ifndef _DEBUG_
+#ifndef _DEXCEPT_
try{
#endif
if(!aValForTime->myIsVTKDone){
BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<float(aSource->GetActualMemorySize()*1000)<<endl);
}
}
-#ifndef _DEBUG_
+#ifndef _DEXCEPT_
}catch(std::exception& exc){
throw;
}catch(...){
#include <vtkCellType.h>
#define _EDF_NODE_IDS_
+//#define _DEXCEPT_
using namespace std;
using namespace VISU;
const MED::TGeom2Size& theGeom2Size,
VISU::TMEDValForTime& theValForTime)
{
- int MYDEBUG = true;
INITMSG(MYDEBUG,"GetGaussKey"<<endl);
PMEDProfile aProfile = theValForTime.myProfile;
INITMSG(MYDEBUG,"GetNbMeshes() = "<<aNbMeshes<<"\n");
for(TInt iMesh = 1; iMesh <= aNbMeshes; iMesh++){
+#ifndef _DEXCEPT_
try{
+#endif
MED::PMeshInfo aMeshInfo = aMed->GetPMeshInfo(iMesh);
MED::PNodeInfo aNodeInfo = aMed->GetPNodeInfo(aMeshInfo);
case MED::ePOLYGONE: {
MED::PPolygoneInfo aPolygoneInfo = aMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
TInt aNbElem = aPolygoneInfo->GetNbElem();
- MED::TElemNum aConn = aPolygoneInfo->GetConnectivite();
- MED::TElemNum aIndex = aPolygoneInfo->GetIndex();
- TInt aNbIndex = aIndex.size();
- TInt aNbConn = aConn.size();
-
- aMeshOnEntity->myNbCells += aNbElem;
-
- for (int ii = 0; ii<aNbElem ; ii++){
- int aNbConnii = aPolygoneInfo->GetNbConn(ii);
- aMeshOnEntity->myCellsSize += aNbConnii;
- }
-
+
INITMSG(MYDEBUG,
"- aMGeom = "<<aMGeom<<
"; aNbElem = "<<aNbElem<<
- "; aNbConn= "<<aNbConn<<
endl);
- for(TInt iElem = 0; iElem < aNbElem; iElem++){
- TInt aFamId = aPolygoneInfo->GetFamNum(iElem);
+ aMeshOnEntity->myNbCells += aNbElem;
+ for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
+ TInt aNbConn = aPolygoneInfo->GetNbConn(anElemId);
+ aMeshOnEntity->myCellsSize += aNbConn;
+ TInt aFamId = aPolygoneInfo->GetFamNum(anElemId);
if(aFamId != 0){
aFamilyNbCellsCounterMap[aFamId] += 1;
- aFamilyCellsSizeCounterMap[aFamId] += aPolygoneInfo->GetNbConn(iElem) + 1;
+ aFamilyCellsSizeCounterMap[aFamId] += aNbConn + 1;
}
}
break;
aGroupMap.insert(VISU::TGroupMap::value_type(aGroupName,aGroup));
}
}
-
- } catch(std::exception& exc){
+#ifndef _DEXCEPT_
+ }catch(std::exception& exc){
MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
- } catch(...){
+ }catch(...){
EXCEPTION(runtime_error,"Unknown exception !!!");
}
+#endif
}
+
return this;
}
aCoords.GetName(iDim) = aNodeInfo->GetCoordName(iDim);
for(int iElem = 0; iElem < aNbElem; iElem++){
- TCoordSlice aCoordSlice = aCoords.GetCoordSlice(iElem);
+ TCoordSlice aVCoordSlice = aCoords.GetCoordSlice(iElem);
+ MED::TCCoordSlice aMCoordSlice = aNodeInfo->GetCoordSlice(iElem);
for(int iDim = 0; iDim < aDim; iDim++)
- aCoordSlice[iDim] = aNodeInfo->GetNodeCoord(iElem,iDim);
+ aVCoordSlice[iDim] = aMCoordSlice[iDim];
}
TCell2Connect& aConnForCellType = aMeshOnEntity->myGeom2Cell2Connect[VTK_VERTEX];
VISU::PMEDMeshOnEntity theMeshOnEntity,
const string& theFamilyName)
{
+#ifndef _DEXCEPT_
try{
+#endif
+
//Check on existing family
PFamilyImpl aFamily = GetFamily(theMeshOnEntity,theFamilyName);
+
//Check on loading already done
bool isCellsLoaded = !theMeshOnEntity->myGeom2Cell2Connect.empty();
if(isCellsLoaded)
TCell2Connect& aCell2Connect = aGeom2Cell2Connect[aVGeom];
aCell2Connect.resize(aNbElem);
- const MED::TElemNum& aIndex = aPolygoneInfo->GetIndex();
- const MED::TElemNum& aConnect = aPolygoneInfo->GetConnectivite();
-
for(int iElem = 0; iElem < aNbElem; iElem++) {
- TConnect& anArray = aCell2Connect[iElem];
+ MED::TCConnSlice aConnSlice = aPolygoneInfo->GetConnSlice(iElem);
int aNbConn = aPolygoneInfo->GetNbConn(iElem);
+ TConnect& anArray = aCell2Connect[iElem];
anArray.resize(aNbConn);
- for(int i = 0; i < aNbConn; i++)
- anArray[i] = aConnect[aIndex[iElem]-1+i]-1;
+ for(int iConn = 0; iConn < aNbConn; iConn++)
+ anArray[iConn] = aConnSlice[iConn] - 1;
}
}
if(aFamily){
vector<TInt> aConnect(aMNbNodes);
for (int iElem = 0; iElem < aNbElem; iElem++) {
+ MED::TCConnSlice aConnSlice = aCellInfo->GetConnSlice(iElem);
TConnect& anArray = aConnForCellType[iElem];
anArray.resize(aVNbNodes);
if(anIsNodeNum){
- for(int i = 0; i < aMNbNodes; i++){
- aConnect[i] = aNodeIdMap[aCellInfo->GetConn(iElem,i)-1];
+ for(int iConn = 0; iConn < aMNbNodes; iConn++){
+ aConnect[iConn] = aNodeIdMap[aConnSlice[iConn] - 1];
}
}else{
- for(int i = 0; i < aMNbNodes; i++){
- aConnect[i] = aCellInfo->GetConn(iElem,i)-1;
+ for(int iConn = 0; iConn < aMNbNodes; iConn++){
+ aConnect[iConn] = aConnSlice[iConn] - 1;
}
}
}
}
return 1;
+
+#ifndef _DEXCEPT_
}catch(std::exception& exc){
theMeshOnEntity->myGeom2Cell2Connect.clear();
throw;
theMeshOnEntity->myGeom2Cell2Connect.clear();
EXCEPTION(runtime_error,"Unknown exception !!!");
}
+#endif
+
return 0;
}
VISU::TMEDValForTime& theValForTime,
VISU::TMEDMeshOnEntity& theMeshOnEntity)
{
- int MYDEBUG = true;
INITMSG(MYDEBUG,"LoadGaussMesh"<<endl);
PMEDGaussMesh aGaussMesh = theValForTime.myGaussMesh;