}
}
}
- //continue;
+ continue;
+
//Importing groups
const VISU::TGroupMap& aGroupMap = aMesh->myGroupMap;
VISU::TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin();
#include <stdio.h>
-#include <list>
#include <map>
#include <set>
#include <utility>
typedef SharedPtr<TMesh> PMesh;
typedef std::map<std::string,PMesh> TMeshMap;
+ struct TGaussSubMesh;
+ typedef SharedPtr<TGaussSubMesh> PGaussSubMesh;
+
+ struct TGaussMesh;
+ typedef SharedPtr<TGaussMesh> PGaussMesh;
+
struct TSubProfile;
typedef SharedPtr<TSubProfile> PSubProfile;
struct TValForTime;
typedef SharedPtr<TValForTime> PValForTime;
+ typedef std::vector<std::string> TNames;
+
//---------------------------------------------------------------
struct TBaseStructure
{}
};
- typedef std::vector<std::string> TNames;
+
+ //---------------------------------------------------------------
+ struct TIntId: virtual TBaseStructure
+ {
+ int myId;
+
+ TIntId(): myId(0)
+ {}
+ };
//---------------------------------------------------------------
bool
operator()(const PSubProfile& theLeft, const PSubProfile& theRight) const;
};
+
typedef std::set<PSubProfile,TSubProfileLess> TProfileKey;
+ typedef std::map<TProfileKey,PProfile> TProfileMap;
+
+
+ //---------------------------------------------------------------
+ struct TGauss: virtual TBaseStructure
+ {};
+
+
+ //---------------------------------------------------------------
+ struct TGaussSubMesh: virtual TBaseStructure
+ {
+ PSubProfile mySubProfile;
+ PGauss myGauss;
+ };
+
+
+ //---------------------------------------------------------------
+ struct TGaussMesh: virtual TBaseStructure
+ {};
+
+
+ //---------------------------------------------------------------
+ struct TGaussSubMeshLess
+ {
+ bool
+ operator()(const PGaussSubMesh& theLeft, const PGaussSubMesh& theRight) const;
+ };
+
+ typedef std::set<PGaussSubMesh,TGaussSubMeshLess> TGaussKey;
+ typedef std::map<TGaussKey,PGaussMesh> TGaussMeshMap;
//---------------------------------------------------------------
- typedef std::map<TProfileKey,PProfile> TProfileMap;
typedef std::map<std::string,PFamily> TFamilyMap;
typedef std::map<std::string,PField> TFieldMap;
struct TMeshOnEntity: virtual TBaseStructure
{
+ TGaussMeshMap myGaussMeshMap;
TProfileMap myProfileMap;
+
TFamilyMap myFamilyMap;
TFieldMap myFieldMap;
//---------------------------------------------------------------
typedef std::set<std::string> TBindGroups;
- struct TFamily: virtual TBaseStructure
+ struct TFamily: virtual TIntId
{
TBindGroups myGroups;
std::string myName;
//---------------------------------------------------------------
typedef std::map<int,PValForTime> TValField;
- struct TField: virtual TBaseStructure
+ struct TField: virtual TIntId
{
TEntity myEntity;
std::string myName;
};
- //---------------------------------------------------------------
- struct TGauss: virtual TBaseStructure
- {};
-
-
//---------------------------------------------------------------
typedef std::pair<double,std::string> TTime;
typedef std::map<int,PGauss> TGaussMap;
- struct TValForTime: virtual TBaseStructure
+ struct TValForTime: virtual TIntId
{
TEntity myEntity;
std::string myMeshName;
TTime myTime;
PProfile myProfile;
+ PGaussMesh myGaussMesh;
TGaussMap myGaussMap;
};
static int MYVTKDEBUG = 0;
#ifdef _DEBUG_
-static int MYDEBUG = 0;
+static int MYDEBUG = 1;
static int MYDEBUGWITHFILES = 1;
#else
static int MYDEBUG = 0;
}
+ bool
+ TGaussSubMeshLess::
+ operator()(const PGaussSubMesh& theLeft, const PGaussSubMesh& theRight) const
+ {
+ PGaussImpl aLeft(theLeft->myGauss), aRight(theRight->myGauss);
+
+ if(aLeft->myGeom != aRight->myGeom)
+ return aLeft->myGeom < aRight->myGeom;
+
+ if(aLeft->myName != aRight->myName)
+ return aLeft->myName < aRight->myName;
+
+ return TSubProfileLess()(theLeft->mySubProfile,theRight->mySubProfile);
+ }
+
+
bool
TSubProfileLess
::operator()(const PSubProfile& theLeft, const PSubProfile& theRight) const
}
+ TGaussSubMeshImpl::TGaussSubMeshImpl():
+ myStatus(eNone)
+ {}
+
+
pair<int,int>
TMeshOnEntityImpl
::GetCellsDims(const string& theFamilyName) const
TGaussMap::const_iterator anIter2 = myGaussMap.find(theGeom);
if(anIter2 != myGaussMap.end()){
PGaussImpl aGauss = anIter2->second;
- return aGauss->myNbPts;
+ return aGauss->myNbPoints;
}
return myNbGauss;
}
vtkIdType iEnd = theMesh->myPointsCoord.size();
vtkIdType aNbPoints = iEnd / theMesh->myDim;
aPoints->SetNumberOfPoints(aNbPoints);
+
INITMSG(MYDEBUG,"GetPoints - aNbPoints = "<<aNbPoints<<
- "; myDim = "<<theMesh->myDim<<
+ "; aDim = "<<theMesh->myDim<<
endl);
+
for(vtkIdType i = 0, j = 0; i < iEnd; i += theMesh->myDim, j++)
aPoints->SetPoint(j,
aCoordHelperPtr->GetCoord(i,eX),
VISU::TGeom2Cell2Connect::const_iterator aGeom2Cell2ConnectIter = aGeom2Cell2Connect.begin();
for(int i = 0, j = 0; aGeom2Cell2ConnectIter != aGeom2Cell2Connect.end(); aGeom2Cell2ConnectIter++){
const VISU::TCell2Connect& anArray = aGeom2Cell2ConnectIter->second;
- int aVtkType = aGeom2Cell2ConnectIter->first;
- INITMSG(MYDEBUG,"aVtkType = "<<aVtkType<<
+ vtkIdType aGeom = aGeom2Cell2ConnectIter->first;
+ INITMSG(MYDEBUG,"aGeom = "<<aGeom<<
"; anArray.size() = "<<anArray.size()<<
endl);
if(!aFamily)
for(int k = 0, kEnd = anArray.size(); k < kEnd; k++, i++){
PrintCells(i,aConnectivity,anArray[k]);
- aCellTypesArray->SetValue(j++,(unsigned char)aVtkType);
+ aCellTypesArray->SetValue(j++,(unsigned char)aGeom);
}
else{
const VISU::TGeom2SubMeshID& aGeom2SubMeshID = aFamily->myGeom2SubMeshID;
if(aGeom2SubMeshID.empty())
EXCEPTION(runtime_error,"GetCells >> There is no elements on the family !!!");
- VISU::TGeom2SubMeshID::const_iterator aGeom2SubMeshIDIter = aGeom2SubMeshID.find(aVtkType);
+ VISU::TGeom2SubMeshID::const_iterator aGeom2SubMeshIDIter = aGeom2SubMeshID.find(aGeom);
if(aGeom2SubMeshIDIter == aGeom2SubMeshID.end())
continue;
VISU::TSubMeshID::const_iterator aSubMeshIDIter = aSubMeshID.begin();
for(; aSubMeshIDIter != aSubMeshID.end(); aSubMeshIDIter++, i++){
PrintCells(i,aConnectivity,anArray[*aSubMeshIDIter]);
- aCellTypesArray->SetValue(j++,(unsigned char)aVtkType);
+ aCellTypesArray->SetValue(j++,(unsigned char)aGeom);
}
}
}
const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet)
{
//Calculate dimentions of the group
+ INITMSG(MYDEBUG,"GetCellsOnGroup\n");
int aNbCells = 0, aCellsSize = 0;
VISU::TFamilyAndEntitySet::const_iterator aFamilyAndEntitySetIter = theFamilyAndEntitySet.begin();
for(; aFamilyAndEntitySetIter != theFamilyAndEntitySet.end(); aFamilyAndEntitySetIter++){
VISU::TGeom2Cell2Connect::const_iterator aGeom2Cell2ConnectIter = aGeom2Cell2Connect.begin();
for(; aGeom2Cell2ConnectIter != aGeom2Cell2Connect.end(); aGeom2Cell2ConnectIter++){
const VISU::TCell2Connect& anArray = aGeom2Cell2ConnectIter->second;
- int aVtkType = aGeom2Cell2ConnectIter->first;
- MSG(MYDEBUG,"GetCellsOnGroup - aVtkType = "<<aVtkType<<"; anArray.size() = "<<anArray.size());
+ vtkIdType aGeom = aGeom2Cell2ConnectIter->first;
+ INITMSG(MYDEBUG,"aGeom = "<<aGeom<<"; anArray.size() = "<<anArray.size());
+
const VISU::TGeom2SubMeshID& aGeom2SubMeshID = aFamily->myGeom2SubMeshID;
if(aGeom2SubMeshID.empty())
EXCEPTION(runtime_error,"GetCells >> There is no elements on the family !!!");
- VISU::TGeom2SubMeshID::const_iterator aGeom2SubMeshIDIter = aGeom2SubMeshID.find(aVtkType);
- if(aGeom2SubMeshIDIter == aGeom2SubMeshID.end()) continue;
- const VISU::TSubMeshID& aSubMeshID = aGeom2SubMeshIDIter->second;
- MSG(MYDEBUG,"GetCellsOnGroup - aSubMeshID.size() = "<<aSubMeshID.size());
- VISU::TSubMeshID::const_iterator aSubMeshIDIter = aSubMeshID.begin();
- for(; aSubMeshIDIter != aSubMeshID.end(); aSubMeshIDIter++, i++){
- PrintCells(i,aConnectivity,anArray[*aSubMeshIDIter]);
- aCellTypesArray->SetValue(j++,(unsigned char)aVtkType);
+
+ VISU::TGeom2SubMeshID::const_iterator aGeom2SubMeshIDIter = aGeom2SubMeshID.find(aGeom);
+ if(aGeom2SubMeshIDIter != aGeom2SubMeshID.end()){
+ const VISU::TSubMeshID& aSubMeshID = aGeom2SubMeshIDIter->second;
+ INITMSG(MYDEBUG,"aSubMeshID.size() = "<<aSubMeshID.size());
+ VISU::TSubMeshID::const_iterator aSubMeshIDIter = aSubMeshID.begin();
+ for(; aSubMeshIDIter != aSubMeshID.end(); aSubMeshIDIter++, i++){
+ PrintCells(i,aConnectivity,anArray[*aSubMeshIDIter]);
+ aCellTypesArray->SetValue(j++,(unsigned char)aGeom);
+ }
}
}
}
const VISU::TValForCells& aValForCells = theValForTime->myValForCells;
VISU::TValForCells::const_iterator anIter = aValForCells.begin();
- for(int k = 0; anIter != aValForCells.end(); anIter++) {
+ for(int aTupleId = 0; anIter != aValForCells.end(); anIter++) {
int aGeom = anIter->first;
const VISU::TValForCellsWithType& anArray = anIter->second;
}else
aValue = anArray.at(aFirstId);
- theFloatArray->SetTuple1(k++,aValue);
+ theFloatArray->SetTuple1(aTupleId++,aValue);
}
}
break;
aValue[iComp] = anArray[aFirstId];
}
- theFloatArray->SetTuple3(k++,aValue[0],aValue[1],0.0);
+ theFloatArray->SetTuple3(aTupleId++,aValue[0],aValue[1],0.0);
}
break;
case 4:
aValue[iComp] = anArray[aFirstId];
}
- theFloatArray->SetTuple3(k++,aValue[0],aValue[1],0.0);
+ theFloatArray->SetTuple3(aTupleId++,aValue[0],aValue[1],0.0);
}
break;
default:
aValue[iComp] = anArray[aFirstId];
}
- theFloatArray->SetTuple3(k++,aValue[0],aValue[1],aValue[2]);
+ theFloatArray->SetTuple3(aTupleId++,aValue[0],aValue[1],aValue[2]);
}
else
EXCEPTION(runtime_error,"GetTimeStamp3 - There is no an algorithm for representation of the field !!!");
const VISU::PFieldImpl theField,
const VISU::PValForTimeImpl theValForTime)
{
- int aNumberOfTuples = theField->myDataSize/theField->myNbComp;
+ int aNbTuples = theField->myDataSize/theField->myNbComp;
string aFieldName = GenerateFieldName(theField,theValForTime);
- INITMSG(MYDEBUG,"GetTimeStamp2"<<
- "; aNumberOfTuples = "<<aNumberOfTuples<<
- endl);
+ INITMSG(MYDEBUG,"GetTimeStamp2 - aNbTuples = "<<aNbTuples<<endl);
vtkDataSetAttributes* aDataSetAttributes;
switch(theField->myEntity){
}
GetTimeStamp3(aFloatArray,
- aNumberOfTuples,
+ aNbTuples,
aFieldName,
theField,
theValForTime);
::GetMeshOnGroup(const string& theMeshName,
const string& theGroupName)
{
- MSG(MYDEBUG,"GetMeshOnGroup - theMeshName = '"<<theMeshName<<
- "'; theGroupName = '"<<theGroupName<<"'");
+ INITMSG(MYDEBUG,"GetMeshOnGroup\n");
+ INITMSGA(MYDEBUG,0,
+ "- theMeshName = '"<<theMeshName<<
+ "'; theGroupName = '"<<theGroupName<<"'"<<
+ endl);
+
//Cheching possibility do the query
TFindMeshOnGroup aFindMeshOnGroup = FindMeshOnGroup(theMeshName,theGroupName);
PMeshImpl aMesh = boost::get<0>(aFindMeshOnGroup);
PGroupImpl aGroup = boost::get<1>(aFindMeshOnGroup);
const VISU::TFamilyAndEntitySet& aFamilyAndEntitySet = aGroup->myFamilyAndEntitySet;
+
//Main part of code
TVTKSource& aSource = aGroup->mySource;
try{
{
vtkIdType aNbCells = theSubProfile->myNbCells;
vtkIdType aCellsSize = theSubProfile->myCellsSize;
- vtkIdType aVGeom = theSubProfile->myGeom;
- vtkIdType aNbNodes = VTKGeom2NbNodes(aVGeom);
+ vtkIdType aGeom = theSubProfile->myGeom;
+ vtkIdType aNbNodes = VTKGeom2NbNodes(aGeom);
const TSubMeshID& aSubMeshID = theSubProfile->mySubMeshID;
const TGeom2Cell2Connect& aGeom2Cell2Connect = theMeshOnEntity->myGeom2Cell2Connect;
- TGeom2Cell2Connect::const_iterator aConnectIter = aGeom2Cell2Connect.find(aVGeom);
+ TGeom2Cell2Connect::const_iterator aConnectIter = aGeom2Cell2Connect.find(aGeom);
if(aConnectIter == aGeom2Cell2Connect.end())
- EXCEPTION(runtime_error,"GetCells >> There is no elements for the GEOM("<<aVGeom<<")");
+ EXCEPTION(runtime_error,"GetCells >> There is no elements for the GEOM("<<aGeom<<")");
const TCell2Connect& aCell2Connect = aConnectIter->second;
for(vtkIdType anId = 0, aConnId = 0; anIter != aCell2Connect.end(); anIter++){
const TConnect& anArray = aCell2Connect[anId];
PrintCells(aConnId,aConnectivity,anArray);
- aCellTypesArray->SetValue(anId,(unsigned char)aVGeom);
+ aCellTypesArray->SetValue(anId,(unsigned char)aGeom);
aConnId += aNbNodes;
anId++;
}
vtkIdType aSubId = *anIter;
const TConnect& anArray = aCell2Connect[aSubId];
PrintCells(aConnId,aConnectivity,anArray);
- aCellTypesArray->SetValue(anId,(unsigned char)aVGeom);
+ aCellTypesArray->SetValue(anId,(unsigned char)aGeom);
aConnId += aNbNodes;
anId++;
}
PProfileImpl theProfile,
PSubProfileImpl theSubProfile)
{
- INITMSG(MYDEBUG,"GetMeshOnSubProfile"<<endl);
+ INITMSG(MYDEBUG,"GetMeshOnSubProfile - aGeom = "<<theSubProfile->myGeom<<endl);
TVTKSource& aSource = theSubProfile->mySource;
if(theSubProfile->myIsInitialized)
return;
GetPoints(aSource,theMesh);
- BEGMSG(MYDEBUG,"GetNumberOfPoints = "<<aSource->GetNumberOfPoints()<<endl);
+ INITMSGA(MYDEBUG,0,"GetNumberOfPoints - "<<aSource->GetNumberOfPoints()<<endl);
GetCells(aSource,theSubProfile,theMeshOnEntity);
BEGMSG(MYDEBUG,"GetNumberOfCells - "<<aSource->GetNumberOfCells()<<endl);
};
- struct TIntId: virtual TBaseStructure
- {
- vtkIdType myId;
-
- TIntId(): myId(0)
- {}
- };
-
-
//---------------------------------------------------------------
struct TMeshImpl: virtual TMesh
{
typedef SharedPtr<TProfileImpl> PProfileImpl;
+ //---------------------------------------------------------------
+ struct TGaussImpl: virtual TGauss
+ {
+ vtkIdType myGeom;
+ std::string myName;
+
+ vtkIdType myNbPoints;
+ };
+ typedef SharedPtr<TGaussImpl> PGaussImpl;
+
+
+ //---------------------------------------------------------------
+ struct TGaussSubMeshImpl: virtual TGaussSubMesh, virtual TSource
+ {
+ TGaussSubMeshImpl();
+
+ ESubMeshStatus myStatus;
+ };
+
+
+ //---------------------------------------------------------------
+ struct TGaussMeshImpl: virtual TGaussMesh
+ {};
+
+
//---------------------------------------------------------------
typedef std::vector<vtkIdType> TConnect;
typedef std::vector<TConnect> TCell2Connect;
//---------------------------------------------------------------
- struct TFamilyImpl: virtual TFamily, virtual TSource, virtual TIntId
+ struct TFamilyImpl: virtual TFamily, virtual TSource
{
TGeom2SubMeshID myGeom2SubMeshID;
};
//---------------------------------------------------------------
- struct TFieldImpl: virtual TField, virtual TIntId
+ struct TFieldImpl: virtual TField
{
vtkIdType myDataSize;
typedef SharedPtr<TFieldImpl> PFieldImpl;
- //---------------------------------------------------------------
- struct TGaussImpl: virtual TGauss
- {
- vtkIdType myNbPts;
- };
- typedef SharedPtr<TGaussImpl> PGaussImpl;
-
-
//---------------------------------------------------------------
typedef std::vector<float> TValForCellsWithType;
typedef std::map<vtkIdType,TValForCellsWithType> TValForCells;
- struct TValForTimeImpl: virtual TValForTime, virtual TSource, virtual TIntId
+ struct TValForTimeImpl: virtual TValForTime, virtual TSource
{
TValForCells myValForCells;
+ int myNbGauss;
+
int
GetNbGauss(vtkIdType theGeom) const;
- int myNbGauss;
};
typedef SharedPtr<TValForTimeImpl> PValForTimeImpl;
using namespace VISU;
#ifdef _DEBUG_
-static int MYDEBUG = 0;
+static int MYDEBUG = 1;
#else
static int MYDEBUG = 0;
#endif
using namespace VISU;
+ //---------------------------------------------------------------
int
MEDGeom2NbNodes(MED::EGeometrieElement theMEDGeomType)
{
}
+ //---------------------------------------------------------------
int
MEDGeomToVTK(MED::EGeometrieElement theMEDGeomType)
{
}
+ //---------------------------------------------------------------
MED::EGeometrieElement
VTKGeomToMED(int theVTKGeomType)
{
}
+ //---------------------------------------------------------------
TEntity
MEDEntityToVTK(MED::EEntiteMaillage theMEDEntity)
{
}
+ //---------------------------------------------------------------
MED::EEntiteMaillage
VTKEntityToMED(TEntity theVTKEntity)
{
}
- TProfileKey
- GetProfileKey(const MED::TTimeStampVal& theTimeStampVal,
- const VISU::TMEDMeshOnEntity& theMeshOnEntity,
- const MED::TGeom2Size& theGeom2Size)
+ //---------------------------------------------------------------
+ PMEDSubProfile
+ CrSubProfile(MED::EGeometrieElement theMGeom,
+ const MED::TGeom2Size& theGeom2Size,
+ const MED::TGeom2Profile& theGeom2Profile)
{
- INITMSG(MYDEBUG,"GetProfileKey"<<endl);
+ INITMSG(MYDEBUG,"CrSubProfile()"<<endl);
+
+ vtkIdType aVGeom = MEDGeomToVTK(theMGeom);
+ vtkIdType aVNbNodes = VTKGeom2NbNodes(aVGeom);
+
+ PMEDSubProfile aSubProfile(new TMEDSubProfile());
+ aSubProfile->myGeom = aVGeom;
+ aSubProfile->myStatus = eAddAll;
+
+ TGeom2Size::const_iterator aTimeStampIter = theGeom2Size.find(theMGeom);
+ if(aTimeStampIter == theGeom2Size.end())
+ aSubProfile->myStatus = eRemoveAll;
+ else{
+ aSubProfile->myNbCells = aTimeStampIter->second;
+ TGeom2Profile::const_iterator aProfileIter = theGeom2Profile.find(theMGeom);
+ if(aProfileIter != theGeom2Profile.end()){
+ PProfileInfo aProfileInfo = aProfileIter->second;
+ aSubProfile->myNbCells = aProfileInfo->myElemNum.size();
+ aSubProfile->myName = aProfileInfo->GetName();
+ aSubProfile->myStatus = eAddPart;
+ }
+ }
+ aSubProfile->myCellsSize = aSubProfile->myNbCells*aVNbNodes;
- TProfileKey aProfileKey;
+ INITMSGA(MYDEBUG,0,
+ "- aVGeom = "<<aVGeom<<
+ "; aName = '"<<aSubProfile->myName<<"'"<<
+ "; aStatus = "<<aSubProfile->myStatus<<
+ "; aNbCells = "<<aSubProfile->myNbCells<<
+ "; aCellsSize = "<<aSubProfile->myCellsSize<<
+ endl);
+
+ return aSubProfile;
+ }
+
+
+ //---------------------------------------------------------------
+ TGaussKey
+ GetGaussKey(const MED::TTimeStampVal& theTimeStampVal,
+ const VISU::TMEDMeshOnEntity& theMeshOnEntity,
+ const MED::TGeom2Size& theGeom2Size)
+ {
+ INITMSG(MYDEBUG,"GetGaussKey"<<endl);
+
+ TGaussKey aGaussKey;
const TGeom2Profile& aGeom2Profile = theTimeStampVal.GetGeom2Profile();
+ const TTimeStampInfo& aTimeStampInfo = theTimeStampVal.GetTimeStampInfo();
+ const TGeom2Gauss& aGeom2Gauss = aTimeStampInfo.GetGeom2Gauss();
const TGeom2Size& aGeom2Size = theMeshOnEntity.myGeom2Size;
TGeom2Size::const_iterator anIter = aGeom2Size.begin();
for(; anIter != aGeom2Size.end(); anIter++){
- MED::EGeometrieElement aMGeom = anIter->first;
+ EGeometrieElement aMGeom = anIter->first;
+ PMEDGaussSubMesh aGaussSubMesh(new TMEDGaussSubMesh());
+ aGaussSubMesh->myStatus = eAddAll;
+
+ PSubProfile aSubProfile = CrSubProfile(aMGeom,theGeom2Size,aGeom2Profile);
+ aGaussSubMesh->mySubProfile = aSubProfile;
+
+ PMEDGauss aGauss(new TMEDGauss());
+ aGaussSubMesh->myGauss = aGauss;
+
vtkIdType aVGeom = MEDGeomToVTK(aMGeom);
vtkIdType aVNbNodes = VTKGeom2NbNodes(aVGeom);
-
- PMEDSubProfile aSubProfile(new TMEDSubProfile());
- aSubProfile->myGeom = aVGeom;
- aSubProfile->myStatus = eAddAll;
- aSubProfile->myNbCells = 0;
-
- MED::TGeom2Size::const_iterator aTimeStampIter = theGeom2Size.find(aMGeom);
+ aGauss->myGeom = aVGeom;
+
+ std::string aName;
+ TInt aNbGauss = 0;
+
+ TGeom2Size::const_iterator aTimeStampIter = theGeom2Size.find(aMGeom);
if(aTimeStampIter == theGeom2Size.end())
- aSubProfile->myStatus = eRemoveAll;
+ aGaussSubMesh->myStatus = eRemoveAll;
else{
- aSubProfile->myNbCells = aTimeStampIter->second;
- MED::TGeom2Profile::const_iterator aProfileIter = aGeom2Profile.find(aMGeom);
- if(aProfileIter != aGeom2Profile.end()){
- MED::PProfileInfo aProfileInfo = aProfileIter->second;
- aSubProfile->myNbCells = aProfileInfo->myElemNum.size();
- aSubProfile->myName = aProfileInfo->GetName();
- aSubProfile->myStatus = eAddPart;
+ TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom);
+ TInt aNbCells = aTimeStampIter->second;
+ if(aGaussIter != aGeom2Gauss.end()){
+ PGaussInfo aGaussInfo = aGaussIter->second;
+
+ aName = aGaussInfo->GetName();
+ aGauss->myName = aName;
+
+ aNbGauss = aGaussInfo->GetNbGauss();
+ aGauss->myNbPoints = aNbGauss;
+
+ aGaussSubMesh->myNbCells = aNbCells*aNbGauss;
+ aGaussSubMesh->myCellsSize = aGaussSubMesh->myNbCells*2;
+
+ aGaussSubMesh->myStatus = eAddPart;
+ }else{
+ aGaussSubMesh->myNbCells = aNbCells;
+ aGaussSubMesh->myCellsSize = aGaussSubMesh->myNbCells*(aVNbNodes+1);
}
}
- aSubProfile->myCellsSize = aSubProfile->myNbCells*aVNbNodes;
-
- INITMSG(MYDEBUG,"aVGeom = "<<aVGeom<<
- "; aNbCells = "<<aSubProfile->myNbCells<<
- "; aCellsSize = "<<aSubProfile->myCellsSize<<
- "; aStatus = "<<aSubProfile->myStatus<<
- "; aName = '"<<aSubProfile->myName<<"'"<<
- endl);
-
+
+ INITMSGA(MYDEBUG,0,
+ "- aVGeom = "<<aVGeom<<
+ "; aName = '"<<aName<<"'"<<
+ "; aNbGauss = "<<aNbGauss<<
+ "; aStatus = "<<aGaussSubMesh->myStatus<<
+ "; aNbCells = "<<aGaussSubMesh->myNbCells<<
+ "; aCellsSize = "<<aGaussSubMesh->myCellsSize<<
+ endl);
+
+ aGaussKey.insert(aGaussSubMesh);
+ }
+
+ return aGaussKey;
+ }
+
+
+ //---------------------------------------------------------------
+ TProfileKey
+ GetProfileKey(const MED::TTimeStampVal& theTimeStampVal,
+ const VISU::TMEDMeshOnEntity& theMeshOnEntity,
+ const MED::TGeom2Size& theGeom2Size)
+ {
+ INITMSG(MYDEBUG,"GetProfileKey"<<endl);
+
+ TProfileKey aProfileKey;
+ const TGeom2Profile& aGeom2Profile = theTimeStampVal.GetGeom2Profile();
+
+ const TGeom2Size& aGeom2Size = theMeshOnEntity.myGeom2Size;
+ TGeom2Size::const_iterator anIter = aGeom2Size.begin();
+ for(; anIter != aGeom2Size.end(); anIter++){
+ EGeometrieElement aMGeom = anIter->first;
+ PSubProfile aSubProfile = CrSubProfile(aMGeom,theGeom2Size,aGeom2Profile);
aProfileKey.insert(aSubProfile);
}
}
+ //---------------------------------------------------------------
void
InitProfile(MED::TTimeStampVal& theTimeStampVal,
VISU::TMEDValForTime& theValForTime,
aMeshOnEntity->myCellsSize += aNbConnii;
}
- INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<
+ INITMSG(MYDEBUG,
+ "- aMGeom = "<<aMGeom<<
"; aNbElem = "<<aNbElem<<
"; aNbConn= "<<aNbConn<<
endl);
aFamilyCellsSizeCounterMap[aFamId] += aPolygoneInfo->GetNbConn(iElem) + 1;
}
}
- ADDMSG(MYDEBUG,endl);
break;
}
case ePOLYEDRE: {
int aNbConnii = aPolyedreInfo->GetNbConn(ii);
aMeshOnEntity->myCellsSize += aNbConnii;
}
- INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<
+
+ INITMSG(MYDEBUG,
+ "- aMGeom = "<<aMGeom<<
"; aNbElem = "<<aNbElem<<
"; aNbConn= "<<aNbConn<<
endl);
aFamilyCellsSizeCounterMap[aFamId] += aPolyedreInfo->GetNbConn(iElem) + 1;
}
}
- ADDMSG(MYDEBUG,endl);
break;
}
default: {
TInt aNbElem = aCellInfo->GetNbElem();
aMeshOnEntity->myNbCells += aNbElem;
aMeshOnEntity->myCellsSize += aNbElem*(aVNbNodes+1);
- INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<
+
+ INITMSG(MYDEBUG,
+ "- aMGeom = "<<aMGeom<<
"; aNbElem = "<<aNbElem<<
"; myNbCells = "<<aMeshOnEntity->myNbCells<<
"; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
aFamilyCellsSizeCounterMap[aFamId] += aVNbNodes + 1;
}
}
- ADDMSG(MYDEBUG,endl);
- }
- } // end switch(...)
+ }} // end switch(...)
}
}
}
}
}
- BEGMSG(MYDEBUG,"VISU::TGroup:\n");
+ BEGMSG(MYDEBUG,"TGroup:\n");
VISU::TGroupMap& aGroupMap = aMesh->myGroupMap;
TGroupInfo::const_iterator aGroupInfoIter = aGroupInfo.begin();
}
if(!aGroup->myFamilyAndEntitySet.empty() && aGroup->myNbCells > 0){
BEGMSG(MYDEBUG,"myNbCells = "<<aGroup->myNbCells<<
- "; myCellsSize = "<<aGroup->myCellsSize<<"\n\n");
+ "; myCellsSize = "<<aGroup->myCellsSize<<"\n");
aGroupMap.insert(VISU::TGroupMap::value_type(aGroupName,aGroup));
}
}
aValForTime->myNbGauss = aTimeStampInfo->GetNbGauss();
aValForTime->myTime = VISU::TTime(aDt,anUnitDt);
INITMSG(MYDEBUG,"aDt = "<<aDt<<", "<<anUnitDt<<"\n");
-
+
+ GetGaussKey(aTimeStampVal,
+ aMeshOnEntity,
+ aGeom2Size);
+
InitProfile(aTimeStampVal,
aValForTime,
aMeshOnEntity,
PGaussInfo aGaussInfo = anIter->second;
PMEDGauss aMEDGauss(new TMEDGauss());
aMEDGauss->myGaussInfo = aGaussInfo;
- aMEDGauss->myNbPts = aGaussInfo->GetNbGauss();
+ aMEDGauss->myNbPoints = aGaussInfo->GetNbGauss();
aGaussMap[MEDGeomToVTK(aMGeom)] = aMEDGauss;
}
}
const TGeom2Gauss& aGeom2Gauss = aTimeStampInfo->GetGeom2Gauss();
TInt aNbComp = theField->myNbComp;
- BEGMSG(MYDEBUG,"aMeshName = '"<<aMeshName<<"'"<<
- "; aFieldName = '"<<aFieldInfo->GetName()<<"'"<<
- "; aMEntity = "<<aMEntity<<
- "; aNbComp = "<<aNbComp<<
- endl);
+ INITMSGA(MYDEBUG,0,
+ "- aMeshName = '"<<aMeshName<<"'"<<
+ "; aFieldName = '"<<aFieldInfo->GetName()<<"'"<<
+ "; aMEntity = "<<aMEntity<<
+ "; aNbComp = "<<aNbComp<<
+ endl);
theField->myDataSize = 0;
TInt aNbElem = aSubProfile->myNbCells;
theField->myDataSize += aNbElem*aNbComp;
- MED::EGeometrieElement aMGeom = VTKGeomToMED(aVGeom);
- TInt aNbGauss = theValForTime->GetNbGauss(aMGeom);
+ TInt aNbGauss = theValForTime->GetNbGauss(aVGeom);
if(aSubProfile->myStatus != eRemoveAll){
- INITMSG(MYDEBUG,"aVGeom = "<<aVGeom<<
+ INITMSG(MYDEBUG,
+ "- aVGeom = "<<aVGeom<<
"; aNbElem = "<<aNbElem<<
"; aNbGauss = "<<aNbGauss<<
endl);
TValForCellsWithType& anArray = theValForTime->myValForCells[aVGeom];
+ MED::EGeometrieElement aMGeom = VTKGeomToMED(aVGeom);
anArray.resize(aNbComp*aNbElem*aNbGauss);
for(TInt iElem = 0, anId = 0; iElem < aNbElem; iElem++){
for(TInt iComp = 0; iComp < aNbComp; iComp++){
};
typedef SharedPtr<TMEDMesh> PMEDMesh;
+
+ //---------------------------------------------------------------
struct TMEDSubProfile: TSubProfileImpl
{};
typedef SharedPtr<TMEDSubProfile> PMEDSubProfile;
+
+ //---------------------------------------------------------------
struct TMEDProfile: TProfileImpl
{};
typedef SharedPtr<TMEDProfile> PMEDProfile;
+
+ //---------------------------------------------------------------
+ struct TMEDGauss: TGaussImpl
+ {
+ MED::PGaussInfo myGaussInfo;
+ };
+ typedef SharedPtr<TMEDGauss> PMEDGauss;
+
+
+ //---------------------------------------------------------------
+ struct TMEDGaussSubMesh: virtual TGaussSubMeshImpl
+ {};
+ typedef SharedPtr<TMEDGaussSubMesh> PMEDGaussSubMesh;
+
+
+ //---------------------------------------------------------------
+ struct TMEDGaussMesh: virtual TGaussMeshImpl
+ {};
+ typedef SharedPtr<TMEDGaussMesh> PMEDGaussMesh;
+
+
+ //---------------------------------------------------------------
struct TMEDMeshOnEntity: TMeshOnEntityImpl
{
MED::TGeom2Size myGeom2Size;
};
typedef SharedPtr<TMEDMeshOnEntity> PMEDMeshOnEntity;
+
+ //---------------------------------------------------------------
struct TMEDFamily: TFamilyImpl
{};
typedef SharedPtr<TMEDFamily> PMEDFamily;
+
+ //---------------------------------------------------------------
struct TMEDGroup: TGroupImpl
{};
typedef SharedPtr<TMEDGroup> PMEDGroup;
+
+ //---------------------------------------------------------------
struct TMEDField: TFieldImpl
{};
typedef SharedPtr<TMEDField> PMEDField;
- struct TMEDGauss: TGaussImpl
- {
- MED::PGaussInfo myGaussInfo;
- };
- typedef SharedPtr<TMEDGauss> PMEDGauss;
+ //---------------------------------------------------------------
struct TMEDValForTime: TValForTimeImpl
{};
typedef SharedPtr<TMEDValForTime> PMEDValForTime;