Salome HOME
#16479 [CEA 12950] ViscousLayers hypothesis and periodic condition
[modules/smesh.git] / src / StdMeshers / StdMeshers_ImportSource.cxx
index de6bfc0471f68744834cfde562434ab52d970448..29ac06ec0b3e1af06e18ca682b3cb479d93f1497 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019  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
@@ -20,7 +20,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  SMESH StdMeshers_ImportSource1D : implementaion of SMESH idl descriptions
+//  SMESH StdMeshers_ImportSource1D : implementation of SMESH idl descriptions
 //  File   : StdMeshers_ImportSource1D.cxx
 //  Module : SMESH
 //
@@ -49,9 +49,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(int         hypId,
-                                                     int         studyId,
                                                      SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen),
+  :SMESH_Hypothesis(hypId, gen),
    _toCopyMesh(false),
    _toCopyGroups(false)
 {
@@ -66,9 +65,8 @@ StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(int         hypId,
 //=============================================================================
 
 StdMeshers_ImportSource2D::StdMeshers_ImportSource2D(int         hypId,
-                                                     int         studyId,
                                                      SMESH_Gen * gen)
-  :StdMeshers_ImportSource1D(hypId, studyId, gen)
+  :StdMeshers_ImportSource1D(hypId, gen)
 {
   _name = "ImportSource2D";
   _param_algo_dim = 2; // is used by StdMeshers_Import_2D;
@@ -206,7 +204,7 @@ const std::vector<SMESH_Group*>&  StdMeshers_ImportSource1D::GetGroups(bool load
 {
   // filter off deleted groups
   vector<SMESH_Group*> okGroups = getValidGroups( _groups,
-                                                  _gen->GetStudyContext(_studyId),
+                                                  _gen->GetStudyContext(),
                                                   loaded);
   if ( okGroups.size() != _groups.size() )
     ((StdMeshers_ImportSource1D*)this)->_groups = okGroups;
@@ -247,7 +245,7 @@ std::vector<SMESH_Mesh*> StdMeshers_ImportSource1D::GetSourceMeshes() const
   vector<SMESH_Mesh*> meshes;
   if ( !meshIDs.empty() )
   {
-    StudyContextStruct* studyContext = _gen->GetStudyContext(_studyId);
+    StudyContextStruct* studyContext = _gen->GetStudyContext();
     for ( set<int>::iterator id = meshIDs.begin(); id != meshIDs.end(); ++id )
     {
       map<int, SMESH_Mesh*>::iterator itm = studyContext->mapMesh.begin();
@@ -400,7 +398,7 @@ void StdMeshers_ImportSource1D::RestoreGroups(const std::vector<SMESH_Group*>& g
     int key1 = _resultGroupsStorage[i++];
     int key2 = _resultGroupsStorage[i++];
     pair<int, int> resMapKey( key1, key2 );
-    SMESH_Mesh* mesh = getTgtMeshByKey( resMapKey, _gen->GetStudyContext(_studyId));
+    SMESH_Mesh* mesh = getTgtMeshByKey( resMapKey, _gen->GetStudyContext());
     // restore mesh ids at least
     _resultGroups.insert( make_pair (resMapKey,vector<SMESH_Group*>() )); 
 
@@ -463,7 +461,7 @@ StdMeshers_ImportSource1D::GetResultGroups(const SMESHDS_Mesh& srcMesh,
   if ( key2groups == _resultGroups.end() )
     return 0;
   vector<SMESH_Group*> vec = getValidGroups((*key2groups).second,
-                                            _gen->GetStudyContext(_studyId) );
+                                            _gen->GetStudyContext() );
   if ( vec.size() != key2groups->second.size())
     key2groups->second = vec;