mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
TUI first dev
This commit is contained in:
parent
8b1d1d4dbc
commit
6e11711875
@ -24,11 +24,13 @@
|
|||||||
|
|
||||||
#include "SALOME_Component.idl"
|
#include "SALOME_Component.idl"
|
||||||
#include "SALOME_Exception.idl"
|
#include "SALOME_Exception.idl"
|
||||||
|
#include "SALOME_GenericObj.idl"
|
||||||
#include "SALOMEDS.idl"
|
#include "SALOMEDS.idl"
|
||||||
|
#include "SMESH_Mesh.idl"
|
||||||
|
|
||||||
module ADAPT{
|
module SMESH{
|
||||||
|
|
||||||
typedef sequence<string > string_array ;
|
typedef sequence<string> str_array ;
|
||||||
struct MgAdaptHypothesisData
|
struct MgAdaptHypothesisData
|
||||||
{
|
{
|
||||||
string myFileInDir, myMeshFileIn, myInMeshName, myMeshFileBackground, myOutMeshName,
|
string myFileInDir, myMeshFileIn, myInMeshName, myMeshFileBackground, myOutMeshName,
|
||||||
@ -46,10 +48,10 @@ module ADAPT{
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
interface MG_ADAPT : Engines::EngineComponent
|
interface MG_ADAPT : SALOME::GenericObj
|
||||||
{
|
{
|
||||||
|
//MG_ADAPT CreateMG_ADAPT(in PortableServer::POA_var poa);
|
||||||
void setData( in MgAdaptHypothesisData data);
|
void setData( inout MgAdaptHypothesisData data);
|
||||||
|
|
||||||
void setMedFileIn(in string MedFileIn );
|
void setMedFileIn(in string MedFileIn );
|
||||||
string getMedFileIn();
|
string getMedFileIn();
|
||||||
@ -77,6 +79,9 @@ module ADAPT{
|
|||||||
|
|
||||||
void setRankTimeStep(in long s, in long f);
|
void setRankTimeStep(in long s, in long f);
|
||||||
long getRank();
|
long getRank();
|
||||||
|
|
||||||
|
void setTimeStepRankLast();
|
||||||
|
void setNoTimeStep();
|
||||||
|
|
||||||
void setLogFile(in string f);
|
void setLogFile(in string f);
|
||||||
string getLogFile();
|
string getLogFile();
|
||||||
@ -119,12 +124,12 @@ module ADAPT{
|
|||||||
|
|
||||||
boolean setAll();
|
boolean setAll();
|
||||||
string getCommandToRun() ;
|
string getCommandToRun() ;
|
||||||
long compute(inout string errStr);
|
long compute(out string errStr);
|
||||||
string getFileName() ;
|
string getFileName() ;
|
||||||
string getExeName();
|
string getExeName();
|
||||||
void copyMgAdaptHypothesisData(in MgAdaptHypothesisData f ) ;
|
void copyMgAdaptHypothesisData(in MgAdaptHypothesisData f ) ;
|
||||||
|
|
||||||
void checkDirPath(in string f);
|
//void checkDirPath(inout string f);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -132,9 +137,9 @@ module ADAPT{
|
|||||||
void setOptionValue(in string optionName,
|
void setOptionValue(in string optionName,
|
||||||
in string optionValue) raises (SALOME::SALOME_Exception);
|
in string optionValue) raises (SALOME::SALOME_Exception);
|
||||||
string getOptionValue(in string optionName,
|
string getOptionValue(in string optionName,
|
||||||
in boolean isDefault) raises (SALOME::SALOME_Exception);
|
inout boolean isDefault) raises (SALOME::SALOME_Exception);
|
||||||
string_array getCustomOptionValuesStrVec() ;
|
str_array getCustomOptionValuesStrVec() ;
|
||||||
string_array getOptionValuesStrVec() ;
|
str_array getOptionValuesStrVec() ;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ module SMESH
|
|||||||
interface FilterManager;
|
interface FilterManager;
|
||||||
interface SMESH_Pattern;
|
interface SMESH_Pattern;
|
||||||
interface Measurements;
|
interface Measurements;
|
||||||
|
interface MG_ADAPT;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Tags definition
|
* Tags definition
|
||||||
@ -136,7 +137,6 @@ module SMESH
|
|||||||
SMESH_Pattern GetPattern();
|
SMESH_Pattern GetPattern();
|
||||||
|
|
||||||
Measurements CreateMeasurements();
|
Measurements CreateMeasurements();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Set the current mode
|
Set the current mode
|
||||||
*/
|
*/
|
||||||
@ -584,7 +584,8 @@ module SMESH
|
|||||||
in GEOM::GEOM_Object theGeom,
|
in GEOM::GEOM_Object theGeom,
|
||||||
in double theTolerance );
|
in double theTolerance );
|
||||||
|
|
||||||
|
|
||||||
|
MG_ADAPT CreateMG_ADAPT();
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -50,7 +50,7 @@ SET(ADAPTImpl_HEADERS
|
|||||||
HOMARD_YACS.hxx
|
HOMARD_YACS.hxx
|
||||||
HomardDriver.hxx
|
HomardDriver.hxx
|
||||||
YACSDriver.hxx
|
YACSDriver.hxx
|
||||||
MG_ADAPT.hxx
|
#~MG_ADAPT.hxx
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- sources ---
|
# --- sources ---
|
||||||
@ -67,7 +67,7 @@ SET(ADAPTImpl_SOURCES
|
|||||||
HOMARD_YACS.cxx
|
HOMARD_YACS.cxx
|
||||||
HomardDriver.cxx
|
HomardDriver.cxx
|
||||||
YACSDriver.cxx
|
YACSDriver.cxx
|
||||||
MG_ADAPT.cxx
|
#~MG_ADAPT.cxx
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- rules ---
|
# --- rules ---
|
||||||
|
@ -39,6 +39,8 @@ INCLUDE_DIRECTORIES(
|
|||||||
${PROJECT_BINARY_DIR}/adm_local/unix
|
${PROJECT_BINARY_DIR}/adm_local/unix
|
||||||
${PROJECT_SOURCE_DIR}/src/ADAPT
|
${PROJECT_SOURCE_DIR}/src/ADAPT
|
||||||
${PROJECT_SOURCE_DIR}/src/ADAPT_I
|
${PROJECT_SOURCE_DIR}/src/ADAPT_I
|
||||||
|
${PROJECT_SOURCE_DIR}/src/SMESH_I
|
||||||
|
${PROJECT_SOURCE_DIR}/src/SMESH
|
||||||
${MEDCOUPLING_INCLUDE_DIRS}
|
${MEDCOUPLING_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -56,8 +58,10 @@ SET(_link_LIBRARIES
|
|||||||
${KERNEL_SalomeDS}
|
${KERNEL_SalomeDS}
|
||||||
${GUI_SalomeApp}
|
${GUI_SalomeApp}
|
||||||
${SMESH_SalomeIDLSMESH}
|
${SMESH_SalomeIDLSMESH}
|
||||||
|
${SMESH_SMESHEngine}
|
||||||
ADAPTEngine
|
ADAPTEngine
|
||||||
${MEDCoupling_medloader}
|
${MEDCoupling_medloader}
|
||||||
|
SMESHimpl
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- resources ---
|
# --- resources ---
|
||||||
@ -114,7 +118,7 @@ SET(_moc_HEADERS
|
|||||||
MonCreateYACS.h
|
MonCreateYACS.h
|
||||||
MonEditYACS.h
|
MonEditYACS.h
|
||||||
MonEditFile.h
|
MonEditFile.h
|
||||||
MG_ADAPTGUI.hxx
|
#~MG_ADAPTGUI.hxx
|
||||||
)
|
)
|
||||||
|
|
||||||
# header files / uic wrappings
|
# header files / uic wrappings
|
||||||
@ -163,7 +167,7 @@ SET(_other_SOURCES
|
|||||||
MonEditYACS.cxx
|
MonEditYACS.cxx
|
||||||
MonEditFile.cxx
|
MonEditFile.cxx
|
||||||
HomardQtCommun.cxx
|
HomardQtCommun.cxx
|
||||||
MG_ADAPTGUI.cxx
|
#~MG_ADAPTGUI.cxx
|
||||||
)
|
)
|
||||||
|
|
||||||
# sources / to compile
|
# sources / to compile
|
||||||
|
@ -57,9 +57,9 @@ SET(_link_LIBRARIES
|
|||||||
${SMESH_SalomeIDLSMESH}
|
${SMESH_SalomeIDLSMESH}
|
||||||
${SMESH_SMESHEngine}
|
${SMESH_SMESHEngine}
|
||||||
${MEDCoupling_medloader}
|
${MEDCoupling_medloader}
|
||||||
|
SMESHimpl
|
||||||
ADAPTFrontTrack
|
ADAPTFrontTrack
|
||||||
ADAPTImpl
|
ADAPTImpl
|
||||||
SMESHimpl
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- headers ---
|
# --- headers ---
|
||||||
@ -75,7 +75,7 @@ SET(ADAPTEngine_HEADERS
|
|||||||
HOMARD_YACS_i.hxx
|
HOMARD_YACS_i.hxx
|
||||||
HomardMedCommun.h
|
HomardMedCommun.h
|
||||||
HOMARD_i.hxx
|
HOMARD_i.hxx
|
||||||
MG_ADAPT_i.cxx
|
#~MG_ADAPT_i.hxx
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- sources ---
|
# --- sources ---
|
||||||
@ -90,7 +90,7 @@ SET(ADAPTEngine_SOURCES
|
|||||||
HOMARD_Boundary_i.cxx
|
HOMARD_Boundary_i.cxx
|
||||||
HOMARD_YACS_i.cxx
|
HOMARD_YACS_i.cxx
|
||||||
HomardMedCommun.cxx
|
HomardMedCommun.cxx
|
||||||
MG_ADAPT_i.cxx
|
#~MG_ADAPT_i.cxx
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- rules ---
|
# --- rules ---
|
||||||
|
@ -1,302 +0,0 @@
|
|||||||
// Copyright (C) 2011-2020 CEA/DEN, EDF R&D
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
|
||||||
// License as published by the Free Software Foundation; either
|
|
||||||
// version 2.1 of the License, or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// 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.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
|
||||||
// License along with this library; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
|
||||||
//
|
|
||||||
|
|
||||||
// Remarques :
|
|
||||||
// L'ordre de description des fonctions est le meme dans tous les fichiers
|
|
||||||
// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
|
|
||||||
// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
|
|
||||||
// 2. Les caracteristiques
|
|
||||||
// 3. Le lien avec les autres structures
|
|
||||||
//
|
|
||||||
// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "MG_ADAPT_i.hxx"
|
|
||||||
#include "ADAPT_Gen_i.hxx"
|
|
||||||
#include "MG_ADAPT.hxx"
|
|
||||||
#include "string.h"
|
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
* standard constructor
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
MG_ADAPT_i::MG_ADAPT_i()
|
|
||||||
{
|
|
||||||
MESSAGE( "Default constructor, not for use" );
|
|
||||||
ASSERT( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
* standard constructor
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
MG_ADAPT_i::MG_ADAPT_i( CORBA::ORB_ptr orb,
|
|
||||||
ADAPT::ADAPT_Gen_var engine )
|
|
||||||
{
|
|
||||||
|
|
||||||
_gen_i = engine;
|
|
||||||
_orb = orb;
|
|
||||||
myMgAdapt = new MgAdapt();
|
|
||||||
//~ASSERT( myHomardCas );
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
* standard destructor
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
MG_ADAPT_i::~MG_ADAPT_i()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setData( MgAdaptHypothesisData* data)
|
|
||||||
{
|
|
||||||
myMgAdapt->setData(data);
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setMedFileIn(char* str)
|
|
||||||
{
|
|
||||||
myMgAdapt->setMedFileIn(str);
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getMedFileIn()
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getMedFileIn().c_str());
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setMedFileOut(char* str)
|
|
||||||
{
|
|
||||||
myMgAdapt->setMedFileOut(str);
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getMedFileOut()
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getMedFileOut().c_str());
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setMeshName(char* str)
|
|
||||||
{
|
|
||||||
myMgAdapt->setMeshName(str);
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getMeshName()
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getMeshName().c_str());
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setMeshNameOut(char* str)
|
|
||||||
{
|
|
||||||
myMgAdapt->setMeshNameOut(str);
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getMeshNameOut()
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getMeshNameOut().c_str());
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setMeshOutMed(bool mybool)
|
|
||||||
{
|
|
||||||
myMgAdapt->setMeshOutMed(mybool);
|
|
||||||
}
|
|
||||||
bool MG_ADAPT_i::getMeshOutMed()
|
|
||||||
{
|
|
||||||
return myMgAdapt->getMeshOutMed();
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setPublish(bool mybool)
|
|
||||||
{
|
|
||||||
myMgAdapt->setPublish(mybool);
|
|
||||||
}
|
|
||||||
bool MG_ADAPT_i::getPublish()
|
|
||||||
{
|
|
||||||
return myMgAdapt->getPublish();
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setFieldName(char* str)
|
|
||||||
{
|
|
||||||
myMgAdapt->setFieldName(str);
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getFieldName()
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getFieldName().c_str());
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setTimeStep(CORBA::Long t)
|
|
||||||
{
|
|
||||||
myMgAdapt->setTimeStep(t);
|
|
||||||
}
|
|
||||||
CORBA::Long MG_ADAPT_i::getTimeStep() const
|
|
||||||
{
|
|
||||||
return myMgAdapt->getTimeStep();
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setRankTimeStep(CORBA::Long t, CORBA::Long r)
|
|
||||||
{
|
|
||||||
myMgAdapt->setRankTimeStep(t, r);
|
|
||||||
}
|
|
||||||
CORBA::Long MG_ADAPT_i::getRank()
|
|
||||||
{
|
|
||||||
return myMgAdapt->getRank();
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setLogFile(char* str)
|
|
||||||
{
|
|
||||||
myMgAdapt->setLogFile(str);
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getLogFile()
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getLogFile().c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
void MG_ADAPT_i::setVerbosityLevel(CORBA::Long v)
|
|
||||||
{
|
|
||||||
myMgAdapt->setVerbosityLevel(v);
|
|
||||||
}
|
|
||||||
CORBA::Long MG_ADAPT_i::getVerbosityLevel()
|
|
||||||
{
|
|
||||||
return myMgAdapt->getVerbosityLevel();
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setRemoveOnSuccess(bool mybool)
|
|
||||||
{
|
|
||||||
myMgAdapt->setRemoveOnSuccess(mybool);
|
|
||||||
}
|
|
||||||
bool MG_ADAPT_i::getRemoveOnSuccess()
|
|
||||||
{
|
|
||||||
myMgAdapt->getRemoveOnSuccess();
|
|
||||||
}
|
|
||||||
MgAdaptHypothesisData* MG_ADAPT_i::getData() const
|
|
||||||
{
|
|
||||||
return myMgAdapt->getData();
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setUseLocalMap(bool mybool)
|
|
||||||
{
|
|
||||||
myMgAdapt->setUseLocalMap(mybool);
|
|
||||||
}
|
|
||||||
bool MG_ADAPT_i::getUseLocalMap()
|
|
||||||
{
|
|
||||||
return myMgAdapt->getUseLocalMap();
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setUseBackgroundMap(bool mybool)
|
|
||||||
{
|
|
||||||
myMgAdapt->setUseBackgroundMap(mybool);
|
|
||||||
}
|
|
||||||
bool MG_ADAPT_i::getUseBackgroundMap()
|
|
||||||
{
|
|
||||||
return myMgAdapt->getUseBackgroundMap();
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setUseConstantValue(bool mybool)
|
|
||||||
{
|
|
||||||
myMgAdapt->setUseConstantValue(mybool);
|
|
||||||
}
|
|
||||||
bool MG_ADAPT_i::getUseConstantValue()
|
|
||||||
{
|
|
||||||
return myMgAdapt->getUseConstantValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MG_ADAPT_i::setConstantValue(double value)
|
|
||||||
{
|
|
||||||
myMgAdapt->setConstantValue(value);
|
|
||||||
}
|
|
||||||
double MG_ADAPT_i::getConstantValue() const
|
|
||||||
{
|
|
||||||
return myMgAdapt->getConstantValue();
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setSizeMapFile(char* str)
|
|
||||||
{
|
|
||||||
myMgAdapt->setSizeMapFile(str);
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getSizeMapFile()
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getSizeMapFile().c_str());
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setFromMedFile(bool mybool)
|
|
||||||
{
|
|
||||||
myMgAdapt->setFromMedFile(mybool);
|
|
||||||
}
|
|
||||||
bool MG_ADAPT_i::isFromMedFile()
|
|
||||||
{
|
|
||||||
return myMgAdapt->isFromMedFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MG_ADAPT_i::setKeepWorkingFiles(bool mybool)
|
|
||||||
{
|
|
||||||
myMgAdapt->setKeepWorkingFiles(mybool);
|
|
||||||
}
|
|
||||||
bool MG_ADAPT_i::getKeepWorkingFiles()
|
|
||||||
{
|
|
||||||
return myMgAdapt->getKeepWorkingFiles();
|
|
||||||
}
|
|
||||||
|
|
||||||
//~void MG_ADAPT_i::setPrCORBA::LongLogInFile(bool);
|
|
||||||
//~bool MG_ADAPT_i::getPrCORBA::LongLogInFile();
|
|
||||||
|
|
||||||
void MG_ADAPT_i::setWorkingDir(char* dir)
|
|
||||||
{
|
|
||||||
myMgAdapt->setWorkingDir(dir);
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getWorkingDir() const
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getWorkingDir().c_str());
|
|
||||||
}
|
|
||||||
bool MG_ADAPT_i::setAll()
|
|
||||||
{
|
|
||||||
return myMgAdapt->setAll();
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getCommandToRun()
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getCommandToRun().c_str());
|
|
||||||
}
|
|
||||||
CORBA::Long MG_ADAPT_i::compute(char* errStr)
|
|
||||||
{
|
|
||||||
std::string err("");
|
|
||||||
CORBA::Long ret = myMgAdapt->compute(err);
|
|
||||||
strcpy(errStr, err.c_str());
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getFileName() const
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getFileName().c_str());
|
|
||||||
}
|
|
||||||
char* MG_ADAPT_i::getExeName()
|
|
||||||
{
|
|
||||||
return CORBA::string_dup(myMgAdapt->getExeName().c_str());
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::copyMgAdaptHypothesisData( MgAdaptHypothesisData* data)
|
|
||||||
{
|
|
||||||
myMgAdapt->copyMgAdaptHypothesisData(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MG_ADAPT_i::checkDirPath(std::string& str)
|
|
||||||
{
|
|
||||||
myMgAdapt->checkDirPath(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MG_ADAPT_i::hasOptionDefined( const char* optionName ) const
|
|
||||||
{
|
|
||||||
return myMgAdapt->hasOptionDefined(optionName);
|
|
||||||
}
|
|
||||||
void MG_ADAPT_i::setOptionValue(const char* optionName,
|
|
||||||
const char* optionValue) throw (std::invalid_argument)
|
|
||||||
{
|
|
||||||
myMgAdapt->setOptionValue(optionName, optionValue);
|
|
||||||
}
|
|
||||||
std::string MG_ADAPT_i::getOptionValue(const char* optionName,
|
|
||||||
bool* isDefault) const throw (std::invalid_argument)
|
|
||||||
{
|
|
||||||
return myMgAdapt->getOptionValue(optionName, isDefault);
|
|
||||||
}
|
|
||||||
std::vector <std::string> MG_ADAPT_i::getCustomOptionValuesStrVec() const
|
|
||||||
{
|
|
||||||
return myMgAdapt->getCustomOptionValuesStrVec();
|
|
||||||
}
|
|
||||||
std::vector <std::string> MG_ADAPT_i::getOptionValuesStrVec() const
|
|
||||||
{
|
|
||||||
return myMgAdapt->getOptionValuesStrVec();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//~TOptionValues MG_ADAPT_i::getOptionValues() const;
|
|
||||||
//~const TOptionValues& MG_ADAPT_i::getCustomOptionValues() const ;
|
|
@ -1,123 +0,0 @@
|
|||||||
#ifndef MG_ADAPT_I_HXX
|
|
||||||
#define MG_ADAPT_I_HXX
|
|
||||||
|
|
||||||
#include <SALOMEconfig.h>
|
|
||||||
#include CORBA_SERVER_HEADER(ADAPT_Gen)
|
|
||||||
#include CORBA_SERVER_HEADER(MG_ADAPT)
|
|
||||||
|
|
||||||
#include "SALOME_Component_i.hxx"
|
|
||||||
#include "SALOME_NamingService.hxx"
|
|
||||||
#include "Utils_CorbaException.hxx"
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
struct MgAdaptHypothesisData;
|
|
||||||
class MgAdapt;
|
|
||||||
|
|
||||||
class MG_ADAPT_i :
|
|
||||||
public virtual Engines_Component_i,
|
|
||||||
public virtual POA_ADAPT::MG_ADAPT,
|
|
||||||
public virtual PortableServer::ServantBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
MG_ADAPT_i( CORBA::ORB_ptr orb, ADAPT::ADAPT_Gen_var gen_i );
|
|
||||||
MG_ADAPT_i();
|
|
||||||
virtual ~MG_ADAPT_i();
|
|
||||||
void setData( MgAdaptHypothesisData*);
|
|
||||||
|
|
||||||
void setMedFileIn(char* str);
|
|
||||||
char* getMedFileIn();
|
|
||||||
|
|
||||||
void setMedFileOut(char* str);
|
|
||||||
char* getMedFileOut();
|
|
||||||
|
|
||||||
void setMeshName(char* str);
|
|
||||||
char* getMeshName();
|
|
||||||
|
|
||||||
void setMeshNameOut(char* str);
|
|
||||||
char* getMeshNameOut();
|
|
||||||
|
|
||||||
void setMeshOutMed(bool mybool);
|
|
||||||
bool getMeshOutMed();
|
|
||||||
|
|
||||||
void setPublish(bool mybool);
|
|
||||||
bool getPublish();
|
|
||||||
|
|
||||||
void setFieldName(char* str);
|
|
||||||
char* getFieldName();
|
|
||||||
|
|
||||||
void setTimeStep(CORBA::Long t);
|
|
||||||
CORBA::Long getTimeStep() const;
|
|
||||||
|
|
||||||
void setRankTimeStep(CORBA::Long t, CORBA::Long r );
|
|
||||||
CORBA::Long getRank();
|
|
||||||
|
|
||||||
void setLogFile(char* str);
|
|
||||||
char* getLogFile();
|
|
||||||
|
|
||||||
void setVerbosityLevel(CORBA::Long v);
|
|
||||||
CORBA::Long getVerbosityLevel();
|
|
||||||
|
|
||||||
void setRemoveOnSuccess(bool mybool);
|
|
||||||
bool getRemoveOnSuccess();
|
|
||||||
|
|
||||||
MgAdaptHypothesisData* getData() const;
|
|
||||||
|
|
||||||
void setUseLocalMap(bool mybool);
|
|
||||||
bool getUseLocalMap();
|
|
||||||
|
|
||||||
void setUseBackgroundMap(bool mybool);
|
|
||||||
bool getUseBackgroundMap();
|
|
||||||
|
|
||||||
void setUseConstantValue(bool mybool);
|
|
||||||
bool getUseConstantValue();
|
|
||||||
|
|
||||||
void setConstantValue(double value);
|
|
||||||
double getConstantValue() const;
|
|
||||||
|
|
||||||
void setSizeMapFile(char* str);
|
|
||||||
char* getSizeMapFile();
|
|
||||||
|
|
||||||
void setFromMedFile(bool mybool);
|
|
||||||
bool isFromMedFile();
|
|
||||||
|
|
||||||
void setKeepWorkingFiles(bool mybool);
|
|
||||||
bool getKeepWorkingFiles();
|
|
||||||
|
|
||||||
//~void setPrCORBA::LongLogInFile(bool);
|
|
||||||
//~bool getPrCORBA::LongLogInFile();
|
|
||||||
|
|
||||||
void setWorkingDir(char* str);
|
|
||||||
char* getWorkingDir() const;
|
|
||||||
|
|
||||||
|
|
||||||
bool setAll();
|
|
||||||
char* getCommandToRun() ;
|
|
||||||
CORBA::Long compute(char* errStr);
|
|
||||||
char* getFileName() const;
|
|
||||||
char* getExeName();
|
|
||||||
void copyMgAdaptHypothesisData( MgAdaptHypothesisData* data ) ;
|
|
||||||
|
|
||||||
void checkDirPath(std::string& str);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool hasOptionDefined( const char* optionName ) const;
|
|
||||||
void setOptionValue(const char* optionName,
|
|
||||||
const char* optionValue) throw (std::invalid_argument);
|
|
||||||
std::string getOptionValue(const char* optionName,
|
|
||||||
bool* isDefault=0) const throw (std::invalid_argument);
|
|
||||||
std::vector <std::string> getCustomOptionValuesStrVec() const;
|
|
||||||
std::vector <std::string> getOptionValuesStrVec() const;
|
|
||||||
|
|
||||||
|
|
||||||
//~TOptionValues getOptionValues() const;
|
|
||||||
//~const TOptionValues& getCustomOptionValues() const ;
|
|
||||||
private:
|
|
||||||
MgAdapt* myMgAdapt;
|
|
||||||
|
|
||||||
CORBA::ORB_ptr _orb;
|
|
||||||
ADAPT::ADAPT_Gen_var _gen_i;
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif // MG_ADAPT_I_HXX
|
|
@ -38,6 +38,7 @@ INCLUDE_DIRECTORIES(
|
|||||||
${PROJECT_SOURCE_DIR}/src/SMDS
|
${PROJECT_SOURCE_DIR}/src/SMDS
|
||||||
${PROJECT_SOURCE_DIR}/src/SMESHDS
|
${PROJECT_SOURCE_DIR}/src/SMESHDS
|
||||||
${PROJECT_SOURCE_DIR}/src/SMESHUtils
|
${PROJECT_SOURCE_DIR}/src/SMESHUtils
|
||||||
|
${MEDCOUPLING_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
# additional preprocessor / compiler flags
|
# additional preprocessor / compiler flags
|
||||||
@ -67,6 +68,7 @@ SET(_link_LIBRARIES
|
|||||||
MeshDriverUNV
|
MeshDriverUNV
|
||||||
MeshDriverGMF
|
MeshDriverGMF
|
||||||
${DriverCGNS_LIB}
|
${DriverCGNS_LIB}
|
||||||
|
${MEDCoupling_medloader}
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- headers ---
|
# --- headers ---
|
||||||
@ -86,6 +88,7 @@ SET(SMESHimpl_HEADERS
|
|||||||
SMESH_MesherHelper.hxx
|
SMESH_MesherHelper.hxx
|
||||||
SMESH_ProxyMesh.hxx
|
SMESH_ProxyMesh.hxx
|
||||||
SMESH_SMESH.hxx
|
SMESH_SMESH.hxx
|
||||||
|
MG_ADAPT.hxx
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- sources ---
|
# --- sources ---
|
||||||
@ -104,6 +107,7 @@ SET(SMESHimpl_SOURCES
|
|||||||
SMESH_HypoFilter.cxx
|
SMESH_HypoFilter.cxx
|
||||||
SMESH_ProxyMesh.cxx
|
SMESH_ProxyMesh.cxx
|
||||||
SMESH_MesherHelper.cxx
|
SMESH_MesherHelper.cxx
|
||||||
|
MG_ADAPT.cxx
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- rules ---
|
# --- rules ---
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
|
using namespace MG_ADAPT;
|
||||||
static std::string removeFile(std::string fileName, int& notOk)
|
static std::string removeFile(std::string fileName, int& notOk)
|
||||||
{
|
{
|
||||||
std::string errStr;
|
std::string errStr;
|
||||||
@ -280,11 +281,24 @@ int MgAdapt::getRank()
|
|||||||
{
|
{
|
||||||
return rank;
|
return rank;
|
||||||
}
|
}
|
||||||
|
void MgAdapt::setTimeStepRankLast()
|
||||||
|
{
|
||||||
|
med_int aRank, tmst;
|
||||||
|
std::string fieldFile = useBackgroundMap ? sizeMapFile : medFileIn;
|
||||||
|
getTimeStepInfos(fieldFile, tmst, aRank);
|
||||||
|
setRankTimeStep((int) tmst, (int) aRank);
|
||||||
|
}
|
||||||
|
void MgAdapt::setNoTimeStep()
|
||||||
|
{
|
||||||
|
int aRank = (int)MED_NO_IT;
|
||||||
|
int tmst = (int)MED_NO_DT ;
|
||||||
|
setRankTimeStep(tmst, aRank);
|
||||||
|
}
|
||||||
void MgAdapt::setUseLocalMap(bool myLocal)
|
void MgAdapt::setUseLocalMap(bool myLocal)
|
||||||
{
|
{
|
||||||
useLocalMap = myLocal;
|
useLocalMap = myLocal;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MgAdapt::getUseLocalMap()
|
bool MgAdapt::getUseLocalMap()
|
||||||
{
|
{
|
||||||
return useLocalMap;
|
return useLocalMap;
|
||||||
@ -293,8 +307,8 @@ bool MgAdapt::getUseLocalMap()
|
|||||||
void MgAdapt::setUseBackgroundMap(bool bckg)
|
void MgAdapt::setUseBackgroundMap(bool bckg)
|
||||||
{
|
{
|
||||||
useBackgroundMap = bckg;
|
useBackgroundMap = bckg;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MgAdapt::getUseBackgroundMap()
|
bool MgAdapt::getUseBackgroundMap()
|
||||||
{
|
{
|
||||||
return useBackgroundMap;
|
return useBackgroundMap;
|
||||||
@ -303,7 +317,6 @@ bool MgAdapt::getUseBackgroundMap()
|
|||||||
void MgAdapt::setUseConstantValue(bool cnst)
|
void MgAdapt::setUseConstantValue(bool cnst)
|
||||||
{
|
{
|
||||||
useConstantValue = cnst;
|
useConstantValue = cnst;
|
||||||
|
|
||||||
}
|
}
|
||||||
bool MgAdapt::getUseConstantValue()
|
bool MgAdapt::getUseConstantValue()
|
||||||
{
|
{
|
||||||
@ -400,6 +413,7 @@ bool MgAdapt::getPrintLogInFile()
|
|||||||
return printLogInFile;
|
return printLogInFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool MgAdapt::setAll()
|
bool MgAdapt::setAll()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1068,7 +1082,7 @@ std::string MgAdapt::getExeName()
|
|||||||
{
|
{
|
||||||
return "mg-adapt.exe";
|
return "mg-adapt.exe";
|
||||||
}
|
}
|
||||||
void MgAdapt::copyMgAdaptHypothesisData( MgAdaptHypothesisData* from)
|
void MgAdapt::copyMgAdaptHypothesisData( const MgAdaptHypothesisData* from)
|
||||||
{
|
{
|
||||||
|
|
||||||
data->myFileInDir = from->myFileInDir;
|
data->myFileInDir = from->myFileInDir;
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
//~#include <med.h>
|
//~#include <med.h>
|
||||||
|
|
||||||
|
namespace MG_ADAPT{
|
||||||
class MgAdapt;
|
class MgAdapt;
|
||||||
|
|
||||||
typedef std::map< std::string, std::string > TOptionValues;
|
typedef std::map< std::string, std::string > TOptionValues;
|
||||||
@ -118,7 +118,7 @@ public:
|
|||||||
MgAdapt(const MgAdapt&);
|
MgAdapt(const MgAdapt&);
|
||||||
~MgAdapt();
|
~MgAdapt();
|
||||||
void buildModel();
|
void buildModel();
|
||||||
void setData( MgAdaptHypothesisData*);
|
void setData( MgAdaptHypothesisData* data);
|
||||||
|
|
||||||
void setMedFileIn(std::string fileName);
|
void setMedFileIn(std::string fileName);
|
||||||
std::string getMedFileIn();
|
std::string getMedFileIn();
|
||||||
@ -142,11 +142,14 @@ public:
|
|||||||
std::string getFieldName();
|
std::string getFieldName();
|
||||||
|
|
||||||
void setTimeStep(int time);
|
void setTimeStep(int time);
|
||||||
int getTimeStep() const;
|
int getTimeStep() const;
|
||||||
|
|
||||||
void setRankTimeStep(int time, int myRank);
|
void setRankTimeStep(int time, int myRank);
|
||||||
int getRank();
|
int getRank();
|
||||||
|
|
||||||
|
void setTimeStepRankLast();
|
||||||
|
void setNoTimeStep();
|
||||||
|
|
||||||
void setLogFile(std::string);
|
void setLogFile(std::string);
|
||||||
std::string getLogFile();
|
std::string getLogFile();
|
||||||
|
|
||||||
@ -192,12 +195,10 @@ public:
|
|||||||
int compute(std::string& errStr);
|
int compute(std::string& errStr);
|
||||||
std::string getFileName() const;
|
std::string getFileName() const;
|
||||||
static std::string getExeName();
|
static std::string getExeName();
|
||||||
void copyMgAdaptHypothesisData( MgAdaptHypothesisData* from) ;
|
void copyMgAdaptHypothesisData( const MgAdaptHypothesisData* from) ;
|
||||||
|
|
||||||
void checkDirPath(std::string& dirPath);
|
void checkDirPath(std::string& dirPath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool hasOptionDefined( const std::string& optionName ) const;
|
bool hasOptionDefined( const std::string& optionName ) const;
|
||||||
void setOptionValue(const std::string& optionName,
|
void setOptionValue(const std::string& optionName,
|
||||||
const std::string& optionValue) throw (std::invalid_argument);
|
const std::string& optionValue) throw (std::invalid_argument);
|
||||||
@ -332,6 +333,6 @@ private :
|
|||||||
void appendMsgToLogFile(std::string& msg);
|
void appendMsgToLogFile(std::string& msg);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif // MG_ADAPT_HXX
|
#endif // MG_ADAPT_HXX
|
@ -43,11 +43,12 @@ INCLUDE_DIRECTORIES(
|
|||||||
${PROJECT_SOURCE_DIR}/src/SMESHClient
|
${PROJECT_SOURCE_DIR}/src/SMESHClient
|
||||||
${PROJECT_SOURCE_DIR}/src/MEDWrapper
|
${PROJECT_SOURCE_DIR}/src/MEDWrapper
|
||||||
${PROJECT_SOURCE_DIR}/src/ADAPT
|
${PROJECT_SOURCE_DIR}/src/ADAPT
|
||||||
|
${PROJECT_SOURCE_DIR}/src/ADAPT_I
|
||||||
${PROJECT_SOURCE_DIR}/src/ADAPTGUI
|
${PROJECT_SOURCE_DIR}/src/ADAPTGUI
|
||||||
${PROJECT_BINARY_DIR}
|
${PROJECT_BINARY_DIR}
|
||||||
${PROJECT_BINARY_DIR}/idl
|
${PROJECT_BINARY_DIR}/idl
|
||||||
${PROJECT_BINARY_DIR}/src/ADAPTGUI
|
${PROJECT_BINARY_DIR}/src/ADAPTGUI
|
||||||
${PROJECT_BINARY_DIR}/src/ADAPT
|
${PROJECT_BINARY_DIR}/src/ADAPT_I
|
||||||
${MEDCOUPLING_INCLUDE_DIRS}
|
${MEDCOUPLING_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -156,7 +157,7 @@ SET(_moc_HEADERS
|
|||||||
SMESHGUI_PreVisualObj.h
|
SMESHGUI_PreVisualObj.h
|
||||||
SMESHGUI_AdaptDlg.h
|
SMESHGUI_AdaptDlg.h
|
||||||
SMESHGUI_MG_ADAPTDRIVER.h
|
SMESHGUI_MG_ADAPTDRIVER.h
|
||||||
#~MG_ADAPTGUI.hxx # to replace in ../ADAPTGUI/
|
MG_ADAPTGUI.hxx # to replace in ../ADAPTGUI/
|
||||||
)
|
)
|
||||||
|
|
||||||
# header files / no moc processing
|
# header files / no moc processing
|
||||||
@ -275,7 +276,7 @@ SET(_other_SOURCES
|
|||||||
SMESHGUI_IdPreview.cxx
|
SMESHGUI_IdPreview.cxx
|
||||||
SMESHGUI_AdaptDlg.cxx
|
SMESHGUI_AdaptDlg.cxx
|
||||||
SMESHGUI_MG_ADAPTDRIVER.cxx
|
SMESHGUI_MG_ADAPTDRIVER.cxx
|
||||||
#~MG_ADAPTGUI.cxx # to replace in ../ADAPTGUI/
|
MG_ADAPTGUI.cxx # to replace in ../ADAPTGUI/
|
||||||
#MG_ADAPT.cxx
|
#MG_ADAPT.cxx
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -98,10 +98,11 @@ const int MARGIN = 9; // layout margin
|
|||||||
// function : SMESHGUI_MgAdaptDlg()
|
// function : SMESHGUI_MgAdaptDlg()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
SMESHGUI_MgAdaptDlg::SMESHGUI_MgAdaptDlg( SalomeApp_Module* theModule, MgAdapt* myModel, QWidget* parent, bool isCreation )
|
SMESHGUI_MgAdaptDlg::SMESHGUI_MgAdaptDlg( SalomeApp_Module* theModule, SMESH::MG_ADAPT_ptr myModel, QWidget* parent, bool isCreation )
|
||||||
: mySMESHGUI( theModule ), QDialog(parent)
|
: mySMESHGUI( theModule ), QDialog(parent)
|
||||||
{
|
{
|
||||||
model = new MgAdapt(*myModel);
|
//~model = new MgAdapt(*myModel);
|
||||||
|
model = SMESH::MG_ADAPT::_duplicate(myModel);
|
||||||
myData = model->getData();
|
myData = model->getData();
|
||||||
buildDlg();
|
buildDlg();
|
||||||
if (!isCreation) readParamsFromHypo();
|
if (!isCreation) readParamsFromHypo();
|
||||||
@ -120,11 +121,15 @@ void SMESHGUI_MgAdaptDlg::buildDlg()
|
|||||||
// Arguments
|
// Arguments
|
||||||
|
|
||||||
myArgs = new SMESHGUI_MgAdaptArguments( myTabWidget );
|
myArgs = new SMESHGUI_MgAdaptArguments( myTabWidget );
|
||||||
std::vector <std::string> str = model->getOptionValuesStrVec();
|
SMESH::str_array* str = model->getOptionValuesStrVec();
|
||||||
std::vector <std::string> str2 = model->getCustomOptionValuesStrVec();
|
SMESH::str_array* str2 = model->getCustomOptionValuesStrVec();
|
||||||
str.insert( str.end(), str2.begin(), str2.end() );
|
std::vector<std::string> s;
|
||||||
|
for (int i = 0; i< str->length(); i++) s.push_back( (*str)[i].in());
|
||||||
|
for (int j = str->length(); j< str2->length(); j++) s.push_back((*str2)[ j - str->length() ].in() );
|
||||||
|
//~str.insert( str.end(), str2.begin(), str2.end() );
|
||||||
|
|
||||||
myAdvOpt = new MgAdaptAdvWidget(myTabWidget, &str);
|
myAdvOpt = new MgAdaptAdvWidget(myTabWidget, &s);
|
||||||
|
|
||||||
int argsTab = myTabWidget->addTab( myArgs, tr( "Args" ) );
|
int argsTab = myTabWidget->addTab( myArgs, tr( "Args" ) );
|
||||||
int advTab = myTabWidget->addTab( myAdvOpt, tr( "ADVOP" ) );
|
int advTab = myTabWidget->addTab( myAdvOpt, tr( "ADVOP" ) );
|
||||||
|
|
||||||
@ -187,14 +192,14 @@ void SMESHGUI_MgAdaptDlg::buildDlg()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
SMESHGUI_MgAdaptDlg::~SMESHGUI_MgAdaptDlg()
|
SMESHGUI_MgAdaptDlg::~SMESHGUI_MgAdaptDlg()
|
||||||
{
|
{
|
||||||
delete model;
|
//~delete model;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMESHGUI_MgAdaptDlg::setModel(MgAdapt* mg)
|
//~void SMESHGUI_MgAdaptDlg::setModel(MgAdapt* mg)
|
||||||
{
|
//~{
|
||||||
model = mg;
|
//~model = mg;
|
||||||
}
|
//~}
|
||||||
MgAdapt* SMESHGUI_MgAdaptDlg::getModel() const
|
SMESH::MG_ADAPT_ptr SMESHGUI_MgAdaptDlg::getModel() const
|
||||||
{
|
{
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
@ -222,24 +227,24 @@ bool SMESHGUI_MgAdaptDlg::readParamsFromHypo( ) const
|
|||||||
if (myData->fromMedFile)
|
if (myData->fromMedFile)
|
||||||
{
|
{
|
||||||
|
|
||||||
*(myArgs->myFileInDir) = QString(myData->myFileInDir.c_str()) ;
|
*(myArgs->myFileInDir) = QString(myData->myFileInDir) ;
|
||||||
myArgs->selectMedFileLineEdit->setText(myData->myMeshFileIn.c_str()) ;
|
myArgs->selectMedFileLineEdit->setText(QString(myData->myMeshFileIn)) ;
|
||||||
// myData->myInMeshName = // TODO
|
// myData->myInMeshName = // TODO
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
myArgs->aBrowserObject->setText(myData->myInMeshName.c_str());
|
myArgs->aBrowserObject->setText(QString(myData->myInMeshName));
|
||||||
//~ myArgs->myFileInDir =""; // TODO
|
//~ myArgs->myFileInDir =""; // TODO
|
||||||
//~ myArgs->selectMedFileLineEdit->setText(); // TODO
|
//~ myArgs->selectMedFileLineEdit->setText(); // TODO
|
||||||
}
|
}
|
||||||
myArgs->meshNameLineEdit->setText(myData->myOutMeshName.c_str());
|
myArgs->meshNameLineEdit->setText(QString(myData->myOutMeshName));
|
||||||
myArgs->medFileCheckBox->setChecked(myData->myMeshOutMed);
|
myArgs->medFileCheckBox->setChecked(myData->myMeshOutMed);
|
||||||
|
|
||||||
if(myData->myMeshOutMed)
|
if(myData->myMeshOutMed)
|
||||||
{
|
{
|
||||||
*(myArgs->myFileOutDir) = QString(myData->myFileOutDir.c_str());
|
*(myArgs->myFileOutDir) = QString(myData->myFileOutDir);
|
||||||
myArgs->selectOutMedFileLineEdit->setText(myData->myMeshFileOut.c_str());
|
myArgs->selectOutMedFileLineEdit->setText(QString(myData->myMeshFileOut));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -265,8 +270,8 @@ bool SMESHGUI_MgAdaptDlg::readParamsFromHypo( ) const
|
|||||||
if (myData->myUseBackgroundMap)
|
if (myData->myUseBackgroundMap)
|
||||||
{
|
{
|
||||||
|
|
||||||
*(myArgs->myFileSizeMapDir) = QString(myData->myFileSizeMapDir.c_str()) ;
|
*(myArgs->myFileSizeMapDir) = QString(myData->myFileSizeMapDir) ;
|
||||||
myArgs->selectMedFileBackgroundLineEdit->setText(myData->myMeshFileBackground.c_str());
|
myArgs->selectMedFileBackgroundLineEdit->setText(QString(myData->myMeshFileBackground));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -274,7 +279,7 @@ bool SMESHGUI_MgAdaptDlg::readParamsFromHypo( ) const
|
|||||||
myArgs->selectMedFileBackgroundLineEdit->setText(""); //TODO
|
myArgs->selectMedFileBackgroundLineEdit->setText(""); //TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
myArgs->fieldNameCmb->setCurrentText(myData->myFieldName.c_str());
|
myArgs->fieldNameCmb->setCurrentText(QString(myData->myFieldName));
|
||||||
myArgs->noTimeStep->setChecked(myData->myUseNoTimeStep);
|
myArgs->noTimeStep->setChecked(myData->myUseNoTimeStep);
|
||||||
myArgs->lastTimeStep->setChecked( myData->myUseLastTimeStep);
|
myArgs->lastTimeStep->setChecked( myData->myUseLastTimeStep);
|
||||||
myArgs->chosenTimeStep->setChecked(myData->myUseChosenTimeStep);
|
myArgs->chosenTimeStep->setChecked(myData->myUseChosenTimeStep);
|
||||||
@ -284,7 +289,7 @@ bool SMESHGUI_MgAdaptDlg::readParamsFromHypo( ) const
|
|||||||
myArgs->timeStep->setValue(myData->myTimeStep);
|
myArgs->timeStep->setValue(myData->myTimeStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
myAdvOpt->workingDirectoryLineEdit->setText(myData->myWorkingDir.c_str());
|
myAdvOpt->workingDirectoryLineEdit->setText(QString(myData->myWorkingDir));
|
||||||
myAdvOpt->logInFileCheck->setChecked(myData->myPrintLogInFile);
|
myAdvOpt->logInFileCheck->setChecked(myData->myPrintLogInFile);
|
||||||
|
|
||||||
myAdvOpt->verboseLevelSpin->setValue(myData->myVerboseLevel);
|
myAdvOpt->verboseLevelSpin->setValue(myData->myVerboseLevel);
|
||||||
@ -299,21 +304,21 @@ bool SMESHGUI_MgAdaptDlg::readParamsFromHypo( ) const
|
|||||||
bool SMESHGUI_MgAdaptDlg::readParamsFromWidgets()
|
bool SMESHGUI_MgAdaptDlg::readParamsFromWidgets()
|
||||||
{
|
{
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
MgAdaptHypothesisData* aData = new MgAdaptHypothesisData();
|
SMESH::MgAdaptHypothesisData* aData = new SMESH::MgAdaptHypothesisData();
|
||||||
aData->fromMedFile = myArgs->aMedfile->isChecked();
|
aData->fromMedFile = myArgs->aMedfile->isChecked();
|
||||||
if (aData->fromMedFile)
|
if (aData->fromMedFile)
|
||||||
{
|
{
|
||||||
|
|
||||||
aData->myFileInDir = myArgs->myFileInDir->toStdString();
|
aData->myFileInDir = CORBA::string_dup(myArgs->myFileInDir->toStdString().c_str());
|
||||||
aData->myMeshFileIn = myArgs->selectMedFileLineEdit->text().toStdString();
|
aData->myMeshFileIn = CORBA::string_dup(myArgs->selectMedFileLineEdit->text().toStdString().c_str());
|
||||||
// aData->myInMeshName = // TODO
|
// aData->myInMeshName = // TODO
|
||||||
}
|
}
|
||||||
else // TODO browser
|
else // TODO browser
|
||||||
{
|
{
|
||||||
aData->myInMeshName = myArgs->aBrowserObject->text().toStdString();
|
aData->myInMeshName = CORBA::string_dup(myArgs->aBrowserObject->text().toStdString().c_str());
|
||||||
aData->myFileInDir = myAdvOpt->workingDirectoryLineEdit->text().toStdString();
|
aData->myFileInDir = CORBA::string_dup(myAdvOpt->workingDirectoryLineEdit->text().toStdString().c_str());
|
||||||
|
|
||||||
TCollection_AsciiString aGenericName = (char*)aData->myFileInDir.c_str();
|
TCollection_AsciiString aGenericName = (char*)aData->myFileInDir;
|
||||||
TCollection_AsciiString aGenericName2 = "MgAdapt_";
|
TCollection_AsciiString aGenericName2 = "MgAdapt_";
|
||||||
aGenericName2 += getpid();
|
aGenericName2 += getpid();
|
||||||
aGenericName2 += "_";
|
aGenericName2 += "_";
|
||||||
@ -323,12 +328,12 @@ bool SMESHGUI_MgAdaptDlg::readParamsFromWidgets()
|
|||||||
emit myArgs->toExportMED(aGenericName.ToCString());
|
emit myArgs->toExportMED(aGenericName.ToCString());
|
||||||
aData->myMeshFileIn = aGenericName2.ToCString();
|
aData->myMeshFileIn = aGenericName2.ToCString();
|
||||||
}
|
}
|
||||||
aData->myOutMeshName = myArgs->meshNameLineEdit->text().toStdString();
|
aData->myOutMeshName = CORBA::string_dup(myArgs->meshNameLineEdit->text().toStdString().c_str());
|
||||||
aData->myMeshOutMed = myArgs->medFileCheckBox->isChecked();
|
aData->myMeshOutMed = myArgs->medFileCheckBox->isChecked();
|
||||||
if(aData->myMeshOutMed)
|
if(aData->myMeshOutMed)
|
||||||
{
|
{
|
||||||
aData->myFileOutDir = myArgs->myFileOutDir->toStdString();
|
aData->myFileOutDir = CORBA::string_dup(myArgs->myFileOutDir->toStdString().c_str());
|
||||||
aData->myMeshFileOut = myArgs->selectOutMedFileLineEdit->text().toStdString();
|
aData->myMeshFileOut = CORBA::string_dup(myArgs->selectOutMedFileLineEdit->text().toStdString().c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -352,15 +357,15 @@ bool SMESHGUI_MgAdaptDlg::readParamsFromWidgets()
|
|||||||
}
|
}
|
||||||
if (aData->myUseBackgroundMap)
|
if (aData->myUseBackgroundMap)
|
||||||
{
|
{
|
||||||
aData->myFileSizeMapDir = myArgs->myFileSizeMapDir->toStdString();
|
aData->myFileSizeMapDir = CORBA::string_dup(myArgs->myFileSizeMapDir->toStdString().c_str());
|
||||||
aData->myMeshFileBackground = myArgs->selectMedFileBackgroundLineEdit->text().toStdString();
|
aData->myMeshFileBackground = CORBA::string_dup(myArgs->selectMedFileBackgroundLineEdit->text().toStdString().c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aData->myMeshFileBackground = "";
|
aData->myMeshFileBackground = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
aData->myFieldName = myArgs->fieldNameCmb->currentText().toStdString();
|
aData->myFieldName = CORBA::string_dup(myArgs->fieldNameCmb->currentText().toStdString().c_str());
|
||||||
aData->myUseNoTimeStep = myArgs->noTimeStep->isChecked();
|
aData->myUseNoTimeStep = myArgs->noTimeStep->isChecked();
|
||||||
aData->myUseLastTimeStep = myArgs->lastTimeStep->isChecked();
|
aData->myUseLastTimeStep = myArgs->lastTimeStep->isChecked();
|
||||||
aData->myUseChosenTimeStep = myArgs->chosenTimeStep->isChecked();
|
aData->myUseChosenTimeStep = myArgs->chosenTimeStep->isChecked();
|
||||||
@ -372,18 +377,18 @@ bool SMESHGUI_MgAdaptDlg::readParamsFromWidgets()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
aData->myWorkingDir = myAdvOpt->workingDirectoryLineEdit->text().toStdString();
|
aData->myWorkingDir = CORBA::string_dup(myAdvOpt->workingDirectoryLineEdit->text().toStdString().c_str());
|
||||||
aData->myPrintLogInFile = myAdvOpt->logInFileCheck->isChecked();
|
aData->myPrintLogInFile = myAdvOpt->logInFileCheck->isChecked();
|
||||||
aData->myVerboseLevel = myAdvOpt->verboseLevelSpin->value();
|
aData->myVerboseLevel = myAdvOpt->verboseLevelSpin->value();
|
||||||
aData->myRemoveLogOnSuccess = myAdvOpt->removeLogOnSuccessCheck->isChecked();
|
aData->myRemoveLogOnSuccess = myAdvOpt->removeLogOnSuccessCheck->isChecked();
|
||||||
aData->myKeepFiles = myAdvOpt->keepWorkingFilesCheck->isChecked();
|
aData->myKeepFiles = myAdvOpt->keepWorkingFilesCheck->isChecked();
|
||||||
model->setData(aData);
|
model->setData(*aData);
|
||||||
QString msg;
|
QString msg;
|
||||||
checkParams(msg);
|
checkParams(msg);
|
||||||
delete aData;
|
delete aData;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
bool SMESHGUI_MgAdaptDlg::storeParamsToHypo( const MgAdaptHypothesisData& ) const
|
bool SMESHGUI_MgAdaptDlg::storeParamsToHypo( const SMESH::MgAdaptHypothesisData& ) const
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
@ -44,7 +44,9 @@
|
|||||||
// model
|
// model
|
||||||
|
|
||||||
|
|
||||||
#include "MG_ADAPT.hxx"
|
//~#include "MG_ADAPT.hxx"
|
||||||
|
|
||||||
|
#include CORBA_SERVER_HEADER(MG_ADAPT)
|
||||||
|
|
||||||
class SUIT_ViewWindow;
|
class SUIT_ViewWindow;
|
||||||
class SUIT_Desktop;
|
class SUIT_Desktop;
|
||||||
@ -88,7 +90,7 @@ class SMESHGUI_MgAdaptArguments;
|
|||||||
class SMESHGUI_SpinBox;
|
class SMESHGUI_SpinBox;
|
||||||
class MgAdaptAdvWidgetTreeWidget;
|
class MgAdaptAdvWidgetTreeWidget;
|
||||||
class MgAdaptAdvWidget;
|
class MgAdaptAdvWidget;
|
||||||
class MgAdapt;
|
//~class MgAdapt;
|
||||||
class QHeaderView;
|
class QHeaderView;
|
||||||
class QFileDialog;
|
class QFileDialog;
|
||||||
|
|
||||||
@ -115,14 +117,14 @@ class SMESHGUI_MgAdaptDlg : public QDialog
|
|||||||
public:
|
public:
|
||||||
//! Property type
|
//! Property type
|
||||||
enum Mode { Arguments, AdvancedOptions};
|
enum Mode { Arguments, AdvancedOptions};
|
||||||
SMESHGUI_MgAdaptDlg( SalomeApp_Module*, MgAdapt*, QWidget* parent= 0,bool isCreation = true );
|
SMESHGUI_MgAdaptDlg( SalomeApp_Module*, SMESH::MG_ADAPT_ptr, QWidget* parent= 0,bool isCreation = true );
|
||||||
~SMESHGUI_MgAdaptDlg();
|
~SMESHGUI_MgAdaptDlg();
|
||||||
|
|
||||||
void buildDlg();
|
void buildDlg();
|
||||||
void reject();
|
void reject();
|
||||||
bool checkParams(QString& msg) ;
|
bool checkParams(QString& msg) ;
|
||||||
void setModel(MgAdapt*);
|
//~void setModel(MgAdapt*);
|
||||||
MgAdapt* getModel() const;
|
SMESH::MG_ADAPT_ptr getModel() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
@ -138,7 +140,7 @@ protected :
|
|||||||
MgAdaptAdvWidget* myAdvOpt;
|
MgAdaptAdvWidget* myAdvOpt;
|
||||||
bool readParamsFromHypo( ) const ;
|
bool readParamsFromHypo( ) const ;
|
||||||
bool readParamsFromWidgets( ) ;
|
bool readParamsFromWidgets( ) ;
|
||||||
bool storeParamsToHypo( const MgAdaptHypothesisData& ) const;
|
bool storeParamsToHypo( const SMESH::MgAdaptHypothesisData & ) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -147,8 +149,8 @@ private:
|
|||||||
QTabWidget* myTabWidget;
|
QTabWidget* myTabWidget;
|
||||||
|
|
||||||
|
|
||||||
MgAdaptHypothesisData* myData;
|
SMESH::MgAdaptHypothesisData* myData;
|
||||||
MgAdapt* model;
|
SMESH::MG_ADAPT_ptr model;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
@ -25,7 +25,8 @@
|
|||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
#include "SMESHGUI_AdaptDlg.h"
|
#include "SMESHGUI_AdaptDlg.h"
|
||||||
#include "SMESHGUI_MG_ADAPTDRIVER.h"
|
#include "SMESHGUI_MG_ADAPTDRIVER.h"
|
||||||
#include "MG_ADAPT.hxx"
|
//~#include "MG_ADAPT_i.hxx"
|
||||||
|
//~#include "MG_ADAPT.hxx"
|
||||||
|
|
||||||
// SALOME GUI includes
|
// SALOME GUI includes
|
||||||
#include <SUIT_Desktop.h>
|
#include <SUIT_Desktop.h>
|
||||||
@ -225,13 +226,14 @@ bool SMESHGUI_AdaptDlg::OnGUIEvent (int theCommandID)
|
|||||||
INFOS("Interface avec MG-Adapt" );
|
INFOS("Interface avec MG-Adapt" );
|
||||||
// A faire
|
// A faire
|
||||||
|
|
||||||
MgAdapt* model = new MgAdapt();
|
SMESH::MG_ADAPT_ptr model = SMESHGUI::GetSMESHGen()->CreateMG_ADAPT();// = new SMESH::MG_ADAPT_var();
|
||||||
|
//~SMESH::MG_ADAPT_ptr model = SMESH::MG_ADAPT_i::CreateMG_ADAPT();
|
||||||
bool isCreation = false;
|
bool isCreation = false;
|
||||||
if (mySMESHGUI->isStudyLocked()) break;
|
if (mySMESHGUI->isStudyLocked()) break;
|
||||||
mySMESHGUI->EmitSignalDeactivateDialog();
|
mySMESHGUI->EmitSignalDeactivateDialog();
|
||||||
SMESHGUI_MG_ADAPTDRIVER *mgAdapt = new SMESHGUI_MG_ADAPTDRIVER(mySMESHGUI, model, isCreation);
|
SMESHGUI_MG_ADAPTDRIVER *mgAdapt = new SMESHGUI_MG_ADAPTDRIVER(mySMESHGUI, model, isCreation);
|
||||||
mgAdapt->show();
|
mgAdapt->show();
|
||||||
delete model;
|
//~delete model;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,33 +233,8 @@ int IObjectCount()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SMESHGUI_MG_AdaptComputeDlg_QThread::SMESHGUI_MG_AdaptComputeDlg_QThread(MgAdapt* aModel)
|
|
||||||
{
|
|
||||||
model = aModel;
|
|
||||||
myResult = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SMESHGUI_MG_AdaptComputeDlg_QThread::run()
|
SMESHGUI_MG_ADAPTDRIVER::SMESHGUI_MG_ADAPTDRIVER( SMESHGUI* theModule, SMESH::MG_ADAPT_ptr myModel, bool isCreation )
|
||||||
{
|
|
||||||
|
|
||||||
int err;
|
|
||||||
std::string errStr;
|
|
||||||
errStr = model->compute(errStr);
|
|
||||||
std::string msg = err == 0 ? " ok" : std::string("Not ok \n")+ errStr;
|
|
||||||
exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
int SMESHGUI_MG_AdaptComputeDlg_QThread::result()
|
|
||||||
{
|
|
||||||
return myResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SMESHGUI_MG_AdaptComputeDlg_QThread::cancel()
|
|
||||||
{
|
|
||||||
//~model->cancel();
|
|
||||||
}
|
|
||||||
|
|
||||||
SMESHGUI_MG_ADAPTDRIVER::SMESHGUI_MG_ADAPTDRIVER( SMESHGUI* theModule, MgAdapt* myModel, bool isCreation )
|
|
||||||
: mySMESHGUI( theModule ),
|
: mySMESHGUI( theModule ),
|
||||||
myFilterDlg(0),
|
myFilterDlg(0),
|
||||||
myIsApplyAndClose( false ),
|
myIsApplyAndClose( false ),
|
||||||
@ -397,11 +372,12 @@ bool SMESHGUI_MG_ADAPTDRIVER::execute()
|
|||||||
{
|
{
|
||||||
|
|
||||||
int err;
|
int err;
|
||||||
std::string errStr;
|
//~std::string errStr;
|
||||||
|
char* errStr;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
err = getModel()->compute(errStr);
|
err = getModel()->compute(errStr);
|
||||||
std::string msg = err == 0 ? " ok" : std::string("Not ok \n")+errStr ;
|
std::string msg = err == 0 ? " ok" : std::string("Not ok \n")+CORBA::string_dup(errStr) ;
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
@ -611,7 +587,7 @@ bool SMESHGUI_MG_ADAPTDRIVER::isValid()
|
|||||||
|
|
||||||
bool SMESHGUI_MG_ADAPTDRIVER::createMeshInObjectBrowser()
|
bool SMESHGUI_MG_ADAPTDRIVER::createMeshInObjectBrowser()
|
||||||
{
|
{
|
||||||
QString filename(getModel()->getMedFileOut().c_str());
|
QString filename(getModel()->getMedFileOut());
|
||||||
QStringList errors;
|
QStringList errors;
|
||||||
QStringList anEntryList;
|
QStringList anEntryList;
|
||||||
bool isEmpty = false;
|
bool isEmpty = false;
|
||||||
|
@ -45,8 +45,9 @@
|
|||||||
// model
|
// model
|
||||||
//~#include "MG_ADAPT.h"
|
//~#include "MG_ADAPT.h"
|
||||||
#include "MG_ADAPTGUI.hxx"
|
#include "MG_ADAPTGUI.hxx"
|
||||||
#include "MG_ADAPT.hxx"
|
//~#include "MG_ADAPT.hxx"
|
||||||
|
|
||||||
|
#include CORBA_SERVER_HEADER(MG_ADAPT)
|
||||||
|
|
||||||
class SUIT_ViewWindow;
|
class SUIT_ViewWindow;
|
||||||
class SUIT_Desktop;
|
class SUIT_Desktop;
|
||||||
@ -103,29 +104,13 @@ Handle(SALOME_InteractiveObject) firstIObject();
|
|||||||
bool createAndPublishMed(QString fileName);
|
bool createAndPublishMed(QString fileName);
|
||||||
bool createMgAdaptObject(MgAdapt* myMgAdapt = 0);
|
bool createMgAdaptObject(MgAdapt* myMgAdapt = 0);
|
||||||
|
|
||||||
class SMESHGUI_EXPORT SMESHGUI_MG_AdaptComputeDlg_QThread : public QThread
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
SMESHGUI_MG_AdaptComputeDlg_QThread(MgAdapt* model);
|
|
||||||
int result();
|
|
||||||
void cancel();
|
|
||||||
protected:
|
|
||||||
void run();
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
MgAdapt* model;
|
|
||||||
int myResult;
|
|
||||||
};
|
|
||||||
|
|
||||||
class SMESHGUI_MG_ADAPTDRIVER : public SMESHGUI_MgAdaptDlg
|
class SMESHGUI_MG_ADAPTDRIVER : public SMESHGUI_MgAdaptDlg
|
||||||
{
|
{
|
||||||
Q_OBJECT;
|
Q_OBJECT;
|
||||||
|
|
||||||
public :
|
public :
|
||||||
SMESHGUI_MG_ADAPTDRIVER( SMESHGUI*, MgAdapt*, bool isCreation = true );
|
SMESHGUI_MG_ADAPTDRIVER( SMESHGUI*, SMESH::MG_ADAPT_ptr, bool isCreation = true );
|
||||||
void setMyMesh(SMESH::SMESH_Mesh_var);
|
void setMyMesh(SMESH::SMESH_Mesh_var);
|
||||||
SMESH::SMESH_Mesh_var getMyMesh() ;
|
SMESH::SMESH_Mesh_var getMyMesh() ;
|
||||||
|
|
||||||
|
@ -37,8 +37,11 @@ INCLUDE_DIRECTORIES(
|
|||||||
${PROJECT_SOURCE_DIR}/src/DriverCGNS
|
${PROJECT_SOURCE_DIR}/src/DriverCGNS
|
||||||
${PROJECT_SOURCE_DIR}/src/SMESH
|
${PROJECT_SOURCE_DIR}/src/SMESH
|
||||||
${PROJECT_SOURCE_DIR}/src/SMESHUtils
|
${PROJECT_SOURCE_DIR}/src/SMESHUtils
|
||||||
|
#~${PROJECT_SOURCE_DIR}/src/ADAPT
|
||||||
${PROJECT_BINARY_DIR}
|
${PROJECT_BINARY_DIR}
|
||||||
${PROJECT_BINARY_DIR}/idl
|
${PROJECT_BINARY_DIR}/idl
|
||||||
|
#~${PROJECT_BINARY_DIR}/ADAPT
|
||||||
|
${MEDCOUPLING_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
# additional preprocessor / compiler flags
|
# additional preprocessor / compiler flags
|
||||||
@ -81,6 +84,7 @@ SET(_link_LIBRARIES
|
|||||||
SMESHDS
|
SMESHDS
|
||||||
SMESHControls
|
SMESHControls
|
||||||
MeshDriverMED
|
MeshDriverMED
|
||||||
|
${MEDCoupling_medloader}
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- headers ---
|
# --- headers ---
|
||||||
@ -107,6 +111,7 @@ SET(SMESHEngine_HEADERS
|
|||||||
SMESH_PreMeshInfo.hxx
|
SMESH_PreMeshInfo.hxx
|
||||||
SMESH_MeshPartDS.hxx
|
SMESH_MeshPartDS.hxx
|
||||||
SMESH.hxx
|
SMESH.hxx
|
||||||
|
MG_ADAPT_i.hxx
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- sources ---
|
# --- sources ---
|
||||||
@ -132,6 +137,7 @@ SET(SMESHEngine_SOURCES
|
|||||||
SMESH_NoteBook.cxx
|
SMESH_NoteBook.cxx
|
||||||
SMESH_Measurements_i.cxx
|
SMESH_Measurements_i.cxx
|
||||||
SMESH_PreMeshInfo.cxx
|
SMESH_PreMeshInfo.cxx
|
||||||
|
MG_ADAPT_i.cxx
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- rules ---
|
# --- rules ---
|
||||||
|
427
src/SMESH_I/MG_ADAPT_i.cxx
Normal file
427
src/SMESH_I/MG_ADAPT_i.cxx
Normal file
@ -0,0 +1,427 @@
|
|||||||
|
// Copyright (C) 2011-2020 CEA/DEN, EDF R&D
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// 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.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
//
|
||||||
|
|
||||||
|
// Remarques :
|
||||||
|
// L'ordre de description des fonctions est le meme dans tous les fichiers
|
||||||
|
// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
|
||||||
|
// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
|
||||||
|
// 2. Les caracteristiques
|
||||||
|
// 3. Le lien avec les autres structures
|
||||||
|
//
|
||||||
|
// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "MG_ADAPT_i.hxx"
|
||||||
|
//~#include "ADAPT_Gen_i.hxx"
|
||||||
|
#include "string.h"
|
||||||
|
#include "SMESH_Gen_i.hxx"
|
||||||
|
#include <SMESH_Gen.hxx>
|
||||||
|
#include <SALOMEconfig.h>
|
||||||
|
#include CORBA_CLIENT_HEADER(SALOMEDS)
|
||||||
|
//~#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
|
||||||
|
//~#include CORBA_CLIENT_HEADER(SMESH_Gen)
|
||||||
|
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* SMESH_Gen_i::CreateMG_ADAPT
|
||||||
|
*
|
||||||
|
* Create measurement instance
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
using namespace SMESH;
|
||||||
|
void MG_ADAPT_i::copyHypothesisDataToImpl(const SMESH::MgAdaptHypothesisData& from, ::MG_ADAPT::MgAdaptHypothesisData* to) const
|
||||||
|
{
|
||||||
|
to->myFileInDir = from.myFileInDir;
|
||||||
|
to->myMeshFileIn = from.myMeshFileIn;
|
||||||
|
to->myMeshFileBackground = from.myMeshFileBackground;
|
||||||
|
to->myOutMeshName = from.myOutMeshName;
|
||||||
|
to->myMeshFileOut = from.myMeshFileOut;
|
||||||
|
to->myFileOutDir = from.myFileOutDir;
|
||||||
|
to->myFileSizeMapDir = from.myFileSizeMapDir;
|
||||||
|
to->myFieldName = from.myFieldName;
|
||||||
|
to->fromMedFile = from.fromMedFile;
|
||||||
|
to->myPublish = from.myPublish;
|
||||||
|
to->myMeshOutMed = from.myMeshOutMed;
|
||||||
|
to->myUseLocalMap = from.myUseLocalMap;
|
||||||
|
to->myUseBackgroundMap = from.myUseBackgroundMap;
|
||||||
|
to->myUseConstantValue = from.myUseConstantValue;
|
||||||
|
to->myConstantValue = from.myConstantValue;
|
||||||
|
to->myTimeStep = from.myTimeStep;
|
||||||
|
to->myRank = from.myRank;
|
||||||
|
to->myUseNoTimeStep = from.myUseNoTimeStep;
|
||||||
|
to->myUseLastTimeStep = from.myUseLastTimeStep;
|
||||||
|
to->myUseChosenTimeStep = from.myUseChosenTimeStep;
|
||||||
|
to->myWorkingDir = from.myWorkingDir;
|
||||||
|
to->myLogFile = from.myLogFile;
|
||||||
|
to->myPrintLogInFile = from.myPrintLogInFile;
|
||||||
|
to->myKeepFiles = from.myKeepFiles;
|
||||||
|
to->myRemoveLogOnSuccess = from.myRemoveLogOnSuccess;
|
||||||
|
to->myVerboseLevel = from.myVerboseLevel;
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::copyHypothesisDataFromImpl(const ::MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData* to) const
|
||||||
|
{
|
||||||
|
to->myFileInDir = CORBA::string_dup(from->myFileInDir.c_str());
|
||||||
|
to->myMeshFileIn = CORBA::string_dup(from->myMeshFileIn.c_str());
|
||||||
|
to->myMeshFileBackground = CORBA::string_dup(from->myMeshFileBackground.c_str());
|
||||||
|
to->myOutMeshName = CORBA::string_dup(from->myOutMeshName.c_str());
|
||||||
|
to->myMeshFileOut = CORBA::string_dup(from->myMeshFileOut.c_str());
|
||||||
|
to->myFileOutDir = CORBA::string_dup(from->myFileOutDir.c_str());
|
||||||
|
to->myFileSizeMapDir = CORBA::string_dup(from->myFileSizeMapDir.c_str());
|
||||||
|
to->myFieldName = CORBA::string_dup(from->myFieldName.c_str());
|
||||||
|
to->fromMedFile = from->fromMedFile;
|
||||||
|
to->myPublish = from->myPublish;
|
||||||
|
to->myMeshOutMed = from->myMeshOutMed;
|
||||||
|
to->myUseLocalMap = from->myUseLocalMap;
|
||||||
|
to->myUseBackgroundMap = from->myUseBackgroundMap;
|
||||||
|
to->myUseConstantValue = from->myUseConstantValue;
|
||||||
|
to->myConstantValue = from->myConstantValue;
|
||||||
|
to->myTimeStep = from->myTimeStep;
|
||||||
|
to->myRank = from->myRank;
|
||||||
|
to->myUseNoTimeStep = from->myUseNoTimeStep;
|
||||||
|
to->myUseLastTimeStep = from->myUseLastTimeStep;
|
||||||
|
to->myUseChosenTimeStep = from->myUseChosenTimeStep;
|
||||||
|
to->myWorkingDir = CORBA::string_dup(from->myWorkingDir.c_str());
|
||||||
|
to->myLogFile = CORBA::string_dup(from->myLogFile.c_str());
|
||||||
|
to->myPrintLogInFile = from->myPrintLogInFile;
|
||||||
|
to->myKeepFiles = from->myKeepFiles;
|
||||||
|
to->myRemoveLogOnSuccess = from->myRemoveLogOnSuccess;
|
||||||
|
to->myVerboseLevel = from->myVerboseLevel;
|
||||||
|
}
|
||||||
|
SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateMG_ADAPT()
|
||||||
|
{
|
||||||
|
SMESH::MG_ADAPT_i* aMGadapt = new SMESH::MG_ADAPT_i();
|
||||||
|
SMESH::MG_ADAPT_var anObj = aMGadapt->_this();
|
||||||
|
return anObj._retn();
|
||||||
|
}
|
||||||
|
//~SMESH::MG_ADAPT_ptr MG_ADAPT_i::CreateMG_ADAPT()
|
||||||
|
//~{
|
||||||
|
|
||||||
|
//~SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen();
|
||||||
|
//~SMESH::MG_ADAPT_i* aMGadapt = new SMESH::MG_ADAPT_i(smeshGen_i->GetPOA());
|
||||||
|
//~SMESH::MG_ADAPT_var anObj = aMGadapt->_this();
|
||||||
|
//~return anObj._retn();
|
||||||
|
//~}
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* standard constructor
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
MG_ADAPT_i::MG_ADAPT_i(): SALOME::GenericObj_i( SMESH_Gen_i::GetPOA() )
|
||||||
|
{
|
||||||
|
myMgAdapt = new ::MG_ADAPT::MgAdapt();
|
||||||
|
}
|
||||||
|
//~MG_ADAPT_i::MG_ADAPT_i(PortableServer::POA_var myPoa): SALOME::GenericObj_i( myPoa )
|
||||||
|
//~{
|
||||||
|
//~myMgAdapt = new ::MG_ADAPT::MgAdapt();
|
||||||
|
//~}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* standard constructor
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
//~MG_ADAPT_i::MG_ADAPT_i( CORBA::ORB_ptr orb,
|
||||||
|
//~ADAPT::ADAPT_Gen_var engine )
|
||||||
|
//~{
|
||||||
|
|
||||||
|
//~_gen_i = engine;
|
||||||
|
//~_orb = orb;
|
||||||
|
//~myMgAdapt = new MgAdapt();
|
||||||
|
//~}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* standard destructor
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
MG_ADAPT_i::~MG_ADAPT_i()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setData( SMESH::MgAdaptHypothesisData& data)
|
||||||
|
{
|
||||||
|
::MG_ADAPT::MgAdaptHypothesisData* baseData = new ::MG_ADAPT::MgAdaptHypothesisData();
|
||||||
|
copyHypothesisDataToImpl(data, baseData);
|
||||||
|
myMgAdapt->setData(baseData);
|
||||||
|
delete baseData;
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setMedFileIn(const char* str)
|
||||||
|
{
|
||||||
|
myMgAdapt->setMedFileIn(str);
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getMedFileIn()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getMedFileIn().c_str());
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setMedFileOut(const char* str)
|
||||||
|
{
|
||||||
|
myMgAdapt->setMedFileOut(str);
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getMedFileOut()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getMedFileOut().c_str());
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setMeshName(const char* str)
|
||||||
|
{
|
||||||
|
myMgAdapt->setMeshName(str);
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getMeshName()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getMeshName().c_str());
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setMeshNameOut(const char* str)
|
||||||
|
{
|
||||||
|
myMgAdapt->setMeshNameOut(str);
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getMeshNameOut()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getMeshNameOut().c_str());
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setMeshOutMed(bool mybool)
|
||||||
|
{
|
||||||
|
myMgAdapt->setMeshOutMed(mybool);
|
||||||
|
}
|
||||||
|
bool MG_ADAPT_i::getMeshOutMed()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getMeshOutMed();
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setPublish(bool mybool)
|
||||||
|
{
|
||||||
|
myMgAdapt->setPublish(mybool);
|
||||||
|
}
|
||||||
|
bool MG_ADAPT_i::getPublish()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getPublish();
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setFieldName(const char* str)
|
||||||
|
{
|
||||||
|
myMgAdapt->setFieldName(str);
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getFieldName()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getFieldName().c_str());
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setTimeStep(CORBA::Long t)
|
||||||
|
{
|
||||||
|
myMgAdapt->setTimeStep(t);
|
||||||
|
}
|
||||||
|
CORBA::Long MG_ADAPT_i::getTimeStep()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getTimeStep();
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setRankTimeStep(CORBA::Long t, CORBA::Long r)
|
||||||
|
{
|
||||||
|
myMgAdapt->setRankTimeStep(t, r);
|
||||||
|
}
|
||||||
|
CORBA::Long MG_ADAPT_i::getRank()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getRank();
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setTimeStepRankLast()
|
||||||
|
{
|
||||||
|
myMgAdapt->setTimeStepRankLast();
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setNoTimeStep()
|
||||||
|
{
|
||||||
|
myMgAdapt->setNoTimeStep();
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setLogFile(const char* str)
|
||||||
|
{
|
||||||
|
myMgAdapt->setLogFile(str);
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getLogFile()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getLogFile().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
void MG_ADAPT_i::setVerbosityLevel(CORBA::Long v)
|
||||||
|
{
|
||||||
|
myMgAdapt->setVerbosityLevel(v);
|
||||||
|
}
|
||||||
|
CORBA::Long MG_ADAPT_i::getVerbosityLevel()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getVerbosityLevel();
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setRemoveOnSuccess(bool mybool)
|
||||||
|
{
|
||||||
|
myMgAdapt->setRemoveOnSuccess(mybool);
|
||||||
|
}
|
||||||
|
bool MG_ADAPT_i::getRemoveOnSuccess()
|
||||||
|
{
|
||||||
|
myMgAdapt->getRemoveOnSuccess();
|
||||||
|
}
|
||||||
|
SMESH::MgAdaptHypothesisData* MG_ADAPT_i::getData()
|
||||||
|
{
|
||||||
|
SMESH::MgAdaptHypothesisData* result = new SMESH::MgAdaptHypothesisData();
|
||||||
|
::MG_ADAPT::MgAdaptHypothesisData* from = myMgAdapt->getData();
|
||||||
|
copyHypothesisDataFromImpl(from, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setUseLocalMap(bool mybool)
|
||||||
|
{
|
||||||
|
myMgAdapt->setUseLocalMap(mybool);
|
||||||
|
}
|
||||||
|
bool MG_ADAPT_i::getUseLocalMap()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getUseLocalMap();
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setUseBackgroundMap(bool mybool)
|
||||||
|
{
|
||||||
|
myMgAdapt->setUseBackgroundMap(mybool);
|
||||||
|
}
|
||||||
|
bool MG_ADAPT_i::getUseBackgroundMap()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getUseBackgroundMap();
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setUseConstantValue(bool mybool)
|
||||||
|
{
|
||||||
|
myMgAdapt->setUseConstantValue(mybool);
|
||||||
|
}
|
||||||
|
bool MG_ADAPT_i::getUseConstantValue()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getUseConstantValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MG_ADAPT_i::setConstantValue(double value)
|
||||||
|
{
|
||||||
|
myMgAdapt->setConstantValue(value);
|
||||||
|
}
|
||||||
|
double MG_ADAPT_i::getConstantValue()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getConstantValue();
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setSizeMapFile(const char* str)
|
||||||
|
{
|
||||||
|
myMgAdapt->setSizeMapFile(str);
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getSizeMapFile()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getSizeMapFile().c_str());
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setFromMedFile(bool mybool)
|
||||||
|
{
|
||||||
|
myMgAdapt->setFromMedFile(mybool);
|
||||||
|
}
|
||||||
|
bool MG_ADAPT_i::isFromMedFile()
|
||||||
|
{
|
||||||
|
return myMgAdapt->isFromMedFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MG_ADAPT_i::setKeepWorkingFiles(bool mybool)
|
||||||
|
{
|
||||||
|
myMgAdapt->setKeepWorkingFiles(mybool);
|
||||||
|
}
|
||||||
|
bool MG_ADAPT_i::getKeepWorkingFiles()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getKeepWorkingFiles();
|
||||||
|
}
|
||||||
|
|
||||||
|
//~void MG_ADAPT_i::setPrCORBA::LongLogInFile(bool);
|
||||||
|
//~bool MG_ADAPT_i::getPrCORBA::LongLogInFile();
|
||||||
|
|
||||||
|
void MG_ADAPT_i::setWorkingDir(const char* dir)
|
||||||
|
{
|
||||||
|
myMgAdapt->setWorkingDir(dir);
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getWorkingDir()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getWorkingDir().c_str());
|
||||||
|
}
|
||||||
|
bool MG_ADAPT_i::setAll()
|
||||||
|
{
|
||||||
|
return myMgAdapt->setAll();
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getCommandToRun()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getCommandToRun().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
CORBA::Long MG_ADAPT_i::compute(::CORBA::String_out errStr)
|
||||||
|
{
|
||||||
|
std::string err("");
|
||||||
|
CORBA::Long ret = myMgAdapt->compute(err);
|
||||||
|
errStr = err.c_str();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getFileName()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getFileName().c_str());
|
||||||
|
}
|
||||||
|
char* MG_ADAPT_i::getExeName()
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getExeName().c_str());
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data)
|
||||||
|
{
|
||||||
|
::MG_ADAPT::MgAdaptHypothesisData* baseData = new ::MG_ADAPT::MgAdaptHypothesisData();
|
||||||
|
copyHypothesisDataToImpl(data, baseData);
|
||||||
|
myMgAdapt->copyMgAdaptHypothesisData(baseData);
|
||||||
|
delete baseData;
|
||||||
|
}
|
||||||
|
|
||||||
|
//~void MG_ADAPT_i::checkDirPath(char*& str)
|
||||||
|
//~{
|
||||||
|
//~myMgAdapt->checkDirPath(str);
|
||||||
|
//~}
|
||||||
|
|
||||||
|
bool MG_ADAPT_i::hasOptionDefined( const char* optionName )
|
||||||
|
{
|
||||||
|
return myMgAdapt->hasOptionDefined(optionName);
|
||||||
|
}
|
||||||
|
void MG_ADAPT_i::setOptionValue(const char* optionName,
|
||||||
|
const char* optionValue) throw (std::invalid_argument)
|
||||||
|
{
|
||||||
|
myMgAdapt->setOptionValue(optionName, optionValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
char* MG_ADAPT_i::getOptionValue(const char* optionName,
|
||||||
|
bool& isDefault) throw (std::invalid_argument)
|
||||||
|
{
|
||||||
|
return CORBA::string_dup(myMgAdapt->getOptionValue(optionName, &isDefault).c_str());
|
||||||
|
}
|
||||||
|
str_array* MG_ADAPT_i::getCustomOptionValuesStrVec()
|
||||||
|
{
|
||||||
|
SMESH::str_array_var result = new SMESH::str_array();
|
||||||
|
std::vector <std::string> vals = myMgAdapt->getCustomOptionValuesStrVec();
|
||||||
|
result->length(vals.size());
|
||||||
|
for (int i = 0; i<vals.size(); i++) result[i] = CORBA::string_dup(vals[i].c_str());
|
||||||
|
return result._retn();
|
||||||
|
}
|
||||||
|
str_array* MG_ADAPT_i::getOptionValuesStrVec()
|
||||||
|
{
|
||||||
|
|
||||||
|
SMESH::str_array_var result = new SMESH::str_array();
|
||||||
|
std::vector <std::string> vals = myMgAdapt->getOptionValuesStrVec();
|
||||||
|
result->length(vals.size());
|
||||||
|
for (int i = 0; i<vals.size(); i++) result[i] = CORBA::string_dup(vals[i].c_str());
|
||||||
|
return result._retn();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MG_ADAPT_i::setPrintLogInFile(bool mybool)
|
||||||
|
{
|
||||||
|
myMgAdapt->setPrintLogInFile(mybool);
|
||||||
|
}
|
||||||
|
bool MG_ADAPT_i::getPrintLogInFile()
|
||||||
|
{
|
||||||
|
return myMgAdapt->getPrintLogInFile();
|
||||||
|
}
|
||||||
|
//~TOptionValues MG_ADAPT_i::getOptionValues() const;
|
||||||
|
//~const TOptionValues& MG_ADAPT_i::getCustomOptionValues() const ;
|
138
src/SMESH_I/MG_ADAPT_i.hxx
Normal file
138
src/SMESH_I/MG_ADAPT_i.hxx
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
#ifndef MG_ADAPT_I_HXX
|
||||||
|
#define MG_ADAPT_I_HXX
|
||||||
|
|
||||||
|
#include "MG_ADAPT.hxx"
|
||||||
|
#include "SMESH.hxx"
|
||||||
|
#include <SALOMEconfig.h>
|
||||||
|
//~#include CORBA_SERVER_HEADER(ADAPT_Gen)
|
||||||
|
#include CORBA_SERVER_HEADER(MG_ADAPT)
|
||||||
|
|
||||||
|
#include "SALOME_GenericObj_i.hh"
|
||||||
|
#include "SALOME_Component_i.hxx"
|
||||||
|
#include "SALOME_NamingService.hxx"
|
||||||
|
#include "Utils_CorbaException.hxx"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
//~struct MgAdaptHypothesisData;
|
||||||
|
//~static void copyHypothesisDataToImpl(SMESH::MgAdaptHypothesisData& from, MG_ADAPT::MgAdaptHypothesisData* to);
|
||||||
|
//~static void copyHypothesisDataFromImpl(MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData& to);
|
||||||
|
//~class MgAdapt;
|
||||||
|
namespace SMESH
|
||||||
|
{
|
||||||
|
class SMESH_I_EXPORT MG_ADAPT_i :
|
||||||
|
public virtual SALOME::GenericObj_i,
|
||||||
|
public virtual POA_SMESH::MG_ADAPT
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
//~MG_ADAPT_i( CORBA::ORB_ptr orb, ADAPT::ADAPT_Gen_var gen_i );
|
||||||
|
//~static SMESH::MG_ADAPT_ptr CreateMG_ADAPT();
|
||||||
|
//~MG_ADAPT_i(PortableServer::POA_var poa);
|
||||||
|
MG_ADAPT_i();
|
||||||
|
virtual ~MG_ADAPT_i();
|
||||||
|
//~void setData( SMESH::MgAdaptHypothesisData* data);
|
||||||
|
void setData( SMESH::MgAdaptHypothesisData& data);
|
||||||
|
|
||||||
|
void setMedFileIn(const char* str);
|
||||||
|
char* getMedFileIn();
|
||||||
|
|
||||||
|
void setMedFileOut(const char* str);
|
||||||
|
char* getMedFileOut();
|
||||||
|
|
||||||
|
void setMeshName(const char* str);
|
||||||
|
char* getMeshName();
|
||||||
|
|
||||||
|
void setMeshNameOut(const char* str);
|
||||||
|
char* getMeshNameOut();
|
||||||
|
|
||||||
|
void setMeshOutMed(bool mybool);
|
||||||
|
bool getMeshOutMed();
|
||||||
|
|
||||||
|
void setPublish(bool mybool);
|
||||||
|
bool getPublish();
|
||||||
|
|
||||||
|
void setFieldName(const char* str);
|
||||||
|
char* getFieldName();
|
||||||
|
|
||||||
|
void setTimeStep(CORBA::Long t);
|
||||||
|
CORBA::Long getTimeStep() ;
|
||||||
|
|
||||||
|
void setRankTimeStep(CORBA::Long t, CORBA::Long r );
|
||||||
|
CORBA::Long getRank();
|
||||||
|
|
||||||
|
void setTimeStepRankLast();
|
||||||
|
void setNoTimeStep();
|
||||||
|
|
||||||
|
void setLogFile(const char* str);
|
||||||
|
char* getLogFile();
|
||||||
|
|
||||||
|
void setVerbosityLevel(CORBA::Long v);
|
||||||
|
CORBA::Long getVerbosityLevel();
|
||||||
|
|
||||||
|
void setRemoveOnSuccess(bool mybool);
|
||||||
|
bool getRemoveOnSuccess();
|
||||||
|
|
||||||
|
SMESH::MgAdaptHypothesisData* getData() ;
|
||||||
|
|
||||||
|
void setUseLocalMap(bool mybool);
|
||||||
|
bool getUseLocalMap();
|
||||||
|
|
||||||
|
void setUseBackgroundMap(bool mybool);
|
||||||
|
bool getUseBackgroundMap();
|
||||||
|
|
||||||
|
void setUseConstantValue(bool mybool);
|
||||||
|
bool getUseConstantValue();
|
||||||
|
|
||||||
|
void setConstantValue(double value);
|
||||||
|
double getConstantValue();
|
||||||
|
|
||||||
|
void setSizeMapFile(const char* str);
|
||||||
|
char* getSizeMapFile();
|
||||||
|
|
||||||
|
void setFromMedFile(bool mybool);
|
||||||
|
bool isFromMedFile();
|
||||||
|
|
||||||
|
void setKeepWorkingFiles(bool mybool);
|
||||||
|
bool getKeepWorkingFiles();
|
||||||
|
|
||||||
|
//~void setPrCORBA::LongLogInFile(bool);
|
||||||
|
//~bool getPrCORBA::LongLogInFile();
|
||||||
|
|
||||||
|
void setWorkingDir(const char* str);
|
||||||
|
char* getWorkingDir() ;
|
||||||
|
|
||||||
|
void setPrintLogInFile(bool mybool);
|
||||||
|
bool getPrintLogInFile();
|
||||||
|
|
||||||
|
bool setAll();
|
||||||
|
char* getCommandToRun() ;
|
||||||
|
CORBA::Long compute(::CORBA::String_out errStr);
|
||||||
|
char* getFileName();
|
||||||
|
char* getExeName();
|
||||||
|
void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) ;
|
||||||
|
//~void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) {
|
||||||
|
//~copyMgAdaptHypothesisData(&data);
|
||||||
|
//~}
|
||||||
|
|
||||||
|
//~void checkDirPath(char*& str);
|
||||||
|
|
||||||
|
bool hasOptionDefined( const char* optionName ) ;
|
||||||
|
void setOptionValue(const char* optionName,
|
||||||
|
const char* optionValue) throw (std::invalid_argument);
|
||||||
|
char* getOptionValue(const char* optionName,
|
||||||
|
bool& isDefault) throw (std::invalid_argument);
|
||||||
|
str_array* getCustomOptionValuesStrVec() ;
|
||||||
|
str_array* getOptionValuesStrVec() ;
|
||||||
|
void copyHypothesisDataFromImpl(const ::MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData* to) const;
|
||||||
|
void copyHypothesisDataToImpl(const SMESH::MgAdaptHypothesisData& from, ::MG_ADAPT::MgAdaptHypothesisData* to) const;
|
||||||
|
//~TOptionValues getOptionValues() const;
|
||||||
|
//~const TOptionValues& getCustomOptionValues() const ;
|
||||||
|
private:
|
||||||
|
::MG_ADAPT::MgAdapt* myMgAdapt;
|
||||||
|
|
||||||
|
//~CORBA::ORB_ptr _orb;
|
||||||
|
//~ADAPT::ADAPT_Gen_var _gen_i;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#endif // MG_ADAPT_I_HXX
|
@ -469,6 +469,7 @@ public:
|
|||||||
void CleanPythonTrace();
|
void CleanPythonTrace();
|
||||||
|
|
||||||
static int CountInPyDump(const TCollection_AsciiString& text);
|
static int CountInPyDump(const TCollection_AsciiString& text);
|
||||||
|
SMESH::MG_ADAPT_ptr CreateMG_ADAPT();
|
||||||
|
|
||||||
// *****************************************
|
// *****************************************
|
||||||
// Internal methods
|
// Internal methods
|
||||||
|
Loading…
Reference in New Issue
Block a user