mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-30 22:30:33 +05:00
*** empty log message ***
This commit is contained in:
parent
df874fc3f9
commit
27aae352dc
@ -52,7 +52,7 @@ using namespace MED;
|
|||||||
|
|
||||||
void
|
void
|
||||||
DriverMED_R_SMESHDS_Mesh
|
DriverMED_R_SMESHDS_Mesh
|
||||||
::SetMeshName(string theMeshName)
|
::SetMeshName(std::string theMeshName)
|
||||||
{
|
{
|
||||||
myMeshName = theMeshName;
|
myMeshName = theMeshName;
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ static const SMDS_MeshNode*
|
|||||||
FindNode(const SMDS_Mesh* theMesh, TInt theId){
|
FindNode(const SMDS_Mesh* theMesh, TInt theId){
|
||||||
const SMDS_MeshNode* aNode = theMesh->FindNode(theId);
|
const SMDS_MeshNode* aNode = theMesh->FindNode(theId);
|
||||||
if(aNode) return aNode;
|
if(aNode) return aNode;
|
||||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindNode - cannot find a SMDS_MeshNode for ID = "<<theId);
|
EXCEPTION(std::runtime_error,"SMDS_Mesh::FindNode - cannot find a SMDS_MeshNode for ID = "<<theId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -84,9 +84,9 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
//---------------------
|
//---------------------
|
||||||
PMeshInfo aMeshInfo = aMed->GetPMeshInfo(iMesh+1);
|
PMeshInfo aMeshInfo = aMed->GetPMeshInfo(iMesh+1);
|
||||||
|
|
||||||
string aMeshName;
|
std::string aMeshName;
|
||||||
if (myMeshId != -1) {
|
if (myMeshId != -1) {
|
||||||
ostringstream aMeshNameStr;
|
std::ostringstream aMeshNameStr;
|
||||||
aMeshNameStr<<myMeshId;
|
aMeshNameStr<<myMeshId;
|
||||||
aMeshName = aMeshNameStr.str();
|
aMeshName = aMeshNameStr.str();
|
||||||
} else {
|
} else {
|
||||||
@ -114,7 +114,7 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
TInt aNbGrp = aFamilyInfo->GetNbGroup();
|
TInt aNbGrp = aFamilyInfo->GetNbGroup();
|
||||||
if(MYDEBUG) MESSAGE("belong to " << aNbGrp << " groups");
|
if(MYDEBUG) MESSAGE("belong to " << aNbGrp << " groups");
|
||||||
for (TInt iGr = 0; iGr < aNbGrp; iGr++) {
|
for (TInt iGr = 0; iGr < aNbGrp; iGr++) {
|
||||||
string aGroupName = aFamilyInfo->GetGroupName(iGr);
|
std::string aGroupName = aFamilyInfo->GetGroupName(iGr);
|
||||||
if(MYDEBUG) MESSAGE(aGroupName);
|
if(MYDEBUG) MESSAGE(aGroupName);
|
||||||
aFamily->AddGroupName(aGroupName);
|
aFamily->AddGroupName(aGroupName);
|
||||||
}
|
}
|
||||||
@ -348,7 +348,7 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
case ePOINT1: aNbNodes = 1; break;
|
case ePOINT1: aNbNodes = 1; break;
|
||||||
default:;
|
default:;
|
||||||
}
|
}
|
||||||
vector<TInt> aNodeIds(aNbNodes);
|
std::vector<TInt> aNodeIds(aNbNodes);
|
||||||
bool anIsValidConnect = false;
|
bool anIsValidConnect = false;
|
||||||
TCConnSlice aConnSlice = aCellInfo->GetConnSlice(iElem);
|
TCConnSlice aConnSlice = aCellInfo->GetConnSlice(iElem);
|
||||||
#ifndef _DEXCEPT_
|
#ifndef _DEXCEPT_
|
||||||
@ -721,9 +721,9 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
return aResult;
|
return aResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
list<string> DriverMED_R_SMESHDS_Mesh::GetMeshNames(Status& theStatus)
|
std::list<std::string> DriverMED_R_SMESHDS_Mesh::GetMeshNames(Status& theStatus)
|
||||||
{
|
{
|
||||||
list<string> aMeshNames;
|
std::list<std::string> aMeshNames;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(MYDEBUG) MESSAGE("GetMeshNames - myFile : " << myFile);
|
if(MYDEBUG) MESSAGE("GetMeshNames - myFile : " << myFile);
|
||||||
@ -749,17 +749,17 @@ list<string> DriverMED_R_SMESHDS_Mesh::GetMeshNames(Status& theStatus)
|
|||||||
return aMeshNames;
|
return aMeshNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
list<TNameAndType> DriverMED_R_SMESHDS_Mesh::GetGroupNamesAndTypes()
|
std::list<TNameAndType> DriverMED_R_SMESHDS_Mesh::GetGroupNamesAndTypes()
|
||||||
{
|
{
|
||||||
list<TNameAndType> aResult;
|
std::list<TNameAndType> aResult;
|
||||||
set<TNameAndType> aResGroupNames;
|
std::set<TNameAndType> aResGroupNames;
|
||||||
|
|
||||||
map<int, DriverMED_FamilyPtr>::iterator aFamsIter = myFamilies.begin();
|
std::map<int, DriverMED_FamilyPtr>::iterator aFamsIter = myFamilies.begin();
|
||||||
for (; aFamsIter != myFamilies.end(); aFamsIter++)
|
for (; aFamsIter != myFamilies.end(); aFamsIter++)
|
||||||
{
|
{
|
||||||
DriverMED_FamilyPtr aFamily = (*aFamsIter).second;
|
DriverMED_FamilyPtr aFamily = (*aFamsIter).second;
|
||||||
const MED::TStringSet& aGroupNames = aFamily->GetGroupNames();
|
const MED::TStringSet& aGroupNames = aFamily->GetGroupNames();
|
||||||
set<string>::const_iterator aGrNamesIter = aGroupNames.begin();
|
std::set<std::string>::const_iterator aGrNamesIter = aGroupNames.begin();
|
||||||
for (; aGrNamesIter != aGroupNames.end(); aGrNamesIter++)
|
for (; aGrNamesIter != aGroupNames.end(); aGrNamesIter++)
|
||||||
{
|
{
|
||||||
TNameAndType aNameAndType = make_pair( *aGrNamesIter, aFamily->GetType() );
|
TNameAndType aNameAndType = make_pair( *aGrNamesIter, aFamily->GetType() );
|
||||||
@ -777,17 +777,17 @@ list<TNameAndType> DriverMED_R_SMESHDS_Mesh::GetGroupNamesAndTypes()
|
|||||||
|
|
||||||
void DriverMED_R_SMESHDS_Mesh::GetGroup(SMESHDS_Group* theGroup)
|
void DriverMED_R_SMESHDS_Mesh::GetGroup(SMESHDS_Group* theGroup)
|
||||||
{
|
{
|
||||||
string aGroupName (theGroup->GetStoreName());
|
std::string aGroupName (theGroup->GetStoreName());
|
||||||
if(MYDEBUG) MESSAGE("Get Group " << aGroupName);
|
if(MYDEBUG) MESSAGE("Get Group " << aGroupName);
|
||||||
|
|
||||||
map<int, DriverMED_FamilyPtr>::iterator aFamsIter = myFamilies.begin();
|
std::map<int, DriverMED_FamilyPtr>::iterator aFamsIter = myFamilies.begin();
|
||||||
for (; aFamsIter != myFamilies.end(); aFamsIter++)
|
for (; aFamsIter != myFamilies.end(); aFamsIter++)
|
||||||
{
|
{
|
||||||
DriverMED_FamilyPtr aFamily = (*aFamsIter).second;
|
DriverMED_FamilyPtr aFamily = (*aFamsIter).second;
|
||||||
if (aFamily->GetType() == theGroup->GetType() && aFamily->MemberOf(aGroupName))
|
if (aFamily->GetType() == theGroup->GetType() && aFamily->MemberOf(aGroupName))
|
||||||
{
|
{
|
||||||
const set<const SMDS_MeshElement *>& anElements = aFamily->GetElements();
|
const std::set<const SMDS_MeshElement *>& anElements = aFamily->GetElements();
|
||||||
set<const SMDS_MeshElement *>::const_iterator anElemsIter = anElements.begin();
|
std::set<const SMDS_MeshElement *>::const_iterator anElemsIter = anElements.begin();
|
||||||
const SMDS_MeshElement * element = 0;
|
const SMDS_MeshElement * element = 0;
|
||||||
for (; anElemsIter != anElements.end(); anElemsIter++)
|
for (; anElemsIter != anElements.end(); anElemsIter++)
|
||||||
{
|
{
|
||||||
@ -805,15 +805,15 @@ void DriverMED_R_SMESHDS_Mesh::GetSubMesh (SMESHDS_SubMesh* theSubMesh,
|
|||||||
{
|
{
|
||||||
char submeshGrpName[ 30 ];
|
char submeshGrpName[ 30 ];
|
||||||
sprintf( submeshGrpName, "SubMesh %d", theId );
|
sprintf( submeshGrpName, "SubMesh %d", theId );
|
||||||
string aName (submeshGrpName);
|
std::string aName (submeshGrpName);
|
||||||
map<int, DriverMED_FamilyPtr>::iterator aFamsIter = myFamilies.begin();
|
std::map<int, DriverMED_FamilyPtr>::iterator aFamsIter = myFamilies.begin();
|
||||||
for (; aFamsIter != myFamilies.end(); aFamsIter++)
|
for (; aFamsIter != myFamilies.end(); aFamsIter++)
|
||||||
{
|
{
|
||||||
DriverMED_FamilyPtr aFamily = (*aFamsIter).second;
|
DriverMED_FamilyPtr aFamily = (*aFamsIter).second;
|
||||||
if (aFamily->MemberOf(aName))
|
if (aFamily->MemberOf(aName))
|
||||||
{
|
{
|
||||||
const set<const SMDS_MeshElement *>& anElements = aFamily->GetElements();
|
const std::set<const SMDS_MeshElement *>& anElements = aFamily->GetElements();
|
||||||
set<const SMDS_MeshElement *>::const_iterator anElemsIter = anElements.begin();
|
std::set<const SMDS_MeshElement *>::const_iterator anElemsIter = anElements.begin();
|
||||||
if (aFamily->GetType() == SMDSAbs_Node)
|
if (aFamily->GetType() == SMDSAbs_Node)
|
||||||
{
|
{
|
||||||
for (; anElemsIter != anElements.end(); anElemsIter++)
|
for (; anElemsIter != anElements.end(); anElemsIter++)
|
||||||
@ -835,21 +835,21 @@ void DriverMED_R_SMESHDS_Mesh::GetSubMesh (SMESHDS_SubMesh* theSubMesh,
|
|||||||
|
|
||||||
void DriverMED_R_SMESHDS_Mesh::CreateAllSubMeshes ()
|
void DriverMED_R_SMESHDS_Mesh::CreateAllSubMeshes ()
|
||||||
{
|
{
|
||||||
map<int, DriverMED_FamilyPtr>::iterator aFamsIter = myFamilies.begin();
|
std::map<int, DriverMED_FamilyPtr>::iterator aFamsIter = myFamilies.begin();
|
||||||
for (; aFamsIter != myFamilies.end(); aFamsIter++)
|
for (; aFamsIter != myFamilies.end(); aFamsIter++)
|
||||||
{
|
{
|
||||||
DriverMED_FamilyPtr aFamily = (*aFamsIter).second;
|
DriverMED_FamilyPtr aFamily = (*aFamsIter).second;
|
||||||
MED::TStringSet aGroupNames = aFamily->GetGroupNames();
|
MED::TStringSet aGroupNames = aFamily->GetGroupNames();
|
||||||
set<string>::iterator aGrNamesIter = aGroupNames.begin();
|
std::set<std::string>::iterator aGrNamesIter = aGroupNames.begin();
|
||||||
for (; aGrNamesIter != aGroupNames.end(); aGrNamesIter++)
|
for (; aGrNamesIter != aGroupNames.end(); aGrNamesIter++)
|
||||||
{
|
{
|
||||||
string aName = *aGrNamesIter;
|
std::string aName = *aGrNamesIter;
|
||||||
// Check, if this is a Group or SubMesh name
|
// Check, if this is a Group or SubMesh name
|
||||||
if (aName.substr(0, 7) == string("SubMesh"))
|
if (aName.substr(0, 7) == std::string("SubMesh"))
|
||||||
{
|
{
|
||||||
int Id = atoi(string(aName).substr(7).c_str());
|
int Id = atoi(std::string(aName).substr(7).c_str());
|
||||||
set<const SMDS_MeshElement *> anElements = aFamily->GetElements();
|
std::set<const SMDS_MeshElement *> anElements = aFamily->GetElements();
|
||||||
set<const SMDS_MeshElement *>::iterator anElemsIter = anElements.begin();
|
std::set<const SMDS_MeshElement *>::iterator anElemsIter = anElements.begin();
|
||||||
if (aFamily->GetType() == SMDSAbs_Node)
|
if (aFamily->GetType() == SMDSAbs_Node)
|
||||||
{
|
{
|
||||||
for (; anElemsIter != anElements.end(); anElemsIter++)
|
for (; anElemsIter != anElements.end(); anElemsIter++)
|
||||||
@ -891,7 +891,7 @@ void DriverMED_R_SMESHDS_Mesh::CreateAllSubMeshes ()
|
|||||||
bool DriverMED_R_SMESHDS_Mesh::checkFamilyID(DriverMED_FamilyPtr & aFamily, int anID) const
|
bool DriverMED_R_SMESHDS_Mesh::checkFamilyID(DriverMED_FamilyPtr & aFamily, int anID) const
|
||||||
{
|
{
|
||||||
if ( !aFamily || aFamily->GetId() != anID ) {
|
if ( !aFamily || aFamily->GetId() != anID ) {
|
||||||
map<int, DriverMED_FamilyPtr>::const_iterator i_fam = myFamilies.find(anID);
|
std::map<int, DriverMED_FamilyPtr>::const_iterator i_fam = myFamilies.find(anID);
|
||||||
if ( i_fam == myFamilies.end() )
|
if ( i_fam == myFamilies.end() )
|
||||||
return false;
|
return false;
|
||||||
aFamily = i_fam->second;
|
aFamily = i_fam->second;
|
||||||
@ -942,7 +942,7 @@ bool DriverMED_R_SMESHDS_Mesh::buildMeshGrille(const MED::PWrapper& theWrapper,
|
|||||||
case MED::eSEG2:
|
case MED::eSEG2:
|
||||||
if(aNodeIds.size() != 2){
|
if(aNodeIds.size() != 2){
|
||||||
res = false;
|
res = false;
|
||||||
EXCEPTION(runtime_error,"buildMeshGrille Error. Incorrect size of ids 2!="<<aNodeIds.size());
|
EXCEPTION(std::runtime_error,"buildMeshGrille Error. Incorrect size of ids 2!="<<aNodeIds.size());
|
||||||
}
|
}
|
||||||
anElement = myMesh->AddEdgeWithID(aNodeIds[0],
|
anElement = myMesh->AddEdgeWithID(aNodeIds[0],
|
||||||
aNodeIds[1],
|
aNodeIds[1],
|
||||||
@ -951,7 +951,7 @@ bool DriverMED_R_SMESHDS_Mesh::buildMeshGrille(const MED::PWrapper& theWrapper,
|
|||||||
case MED::eQUAD4:
|
case MED::eQUAD4:
|
||||||
if(aNodeIds.size() != 4){
|
if(aNodeIds.size() != 4){
|
||||||
res = false;
|
res = false;
|
||||||
EXCEPTION(runtime_error,"buildMeshGrille Error. Incorrect size of ids 4!="<<aNodeIds.size());
|
EXCEPTION(std::runtime_error,"buildMeshGrille Error. Incorrect size of ids 4!="<<aNodeIds.size());
|
||||||
}
|
}
|
||||||
anElement = myMesh->AddFaceWithID(aNodeIds[0],
|
anElement = myMesh->AddFaceWithID(aNodeIds[0],
|
||||||
aNodeIds[2],
|
aNodeIds[2],
|
||||||
@ -962,7 +962,7 @@ bool DriverMED_R_SMESHDS_Mesh::buildMeshGrille(const MED::PWrapper& theWrapper,
|
|||||||
case MED::eHEXA8:
|
case MED::eHEXA8:
|
||||||
if(aNodeIds.size() != 8){
|
if(aNodeIds.size() != 8){
|
||||||
res = false;
|
res = false;
|
||||||
EXCEPTION(runtime_error,"buildMeshGrille Error. Incorrect size of ids 8!="<<aNodeIds.size());
|
EXCEPTION(std::runtime_error,"buildMeshGrille Error. Incorrect size of ids 8!="<<aNodeIds.size());
|
||||||
}
|
}
|
||||||
anElement = myMesh->AddVolumeWithID(aNodeIds[0],
|
anElement = myMesh->AddVolumeWithID(aNodeIds[0],
|
||||||
aNodeIds[2],
|
aNodeIds[2],
|
||||||
|
Loading…
Reference in New Issue
Block a user