* Maximal size of memory to be used by the algorithm (in Megabytes).
* Negative value means not to use this option
*/
- void SetMaximumMemory(in long MB) raises (SALOME::SALOME_Exception);
- long GetMaximumMemory();
+ void SetMaximumMemory(in float MB) raises (SALOME::SALOME_Exception);
+ float GetMaximumMemory();
/*!
* Initial size of memory to be used by the algorithm (in Megabytes) in
* automatic memory adjustment mode. Default is zero.
* Negative value means not to use this option
*/
- void SetInitialMemory(in long MB) raises (SALOME::SALOME_Exception);
- long GetInitialMemory();
+ void SetInitialMemory(in float MB) raises (SALOME::SALOME_Exception);
+ float GetInitialMemory();
/*!
* Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
*/
// MG-Tetra for domain indication
SMESH_ProxyMesh::Ptr proxyMesh( new SMESH_ProxyMesh( theMesh ));
- // make prisms on quadrangles
+ // make prisms on quadrangles and viscous layers
if ( theMesh.NbQuadrangles() > 0 || _viscousLayersHyp )
{
vector<SMESH_ProxyMesh::Ptr> components;
proxyMesh.reset( new SMESH_ProxyMesh( components ));
}
// build viscous layers
- else if ( _viscousLayersHyp )
- {
- proxyMesh = _viscousLayersHyp->Compute( theMesh, theShape );
- if ( !proxyMesh )
- return false;
- }
+ // else if ( _viscousLayersHyp )
+ // {
+ // proxyMesh = _viscousLayersHyp->Compute( theMesh, theShape );
+ // if ( !proxyMesh )
+ // return false;
+ // }
int anInvalidEnforcedFlags = 0;
Ok = writeGMFFile(&mgTetra,
//function : SetMaximumMemory
//=======================================================================
-void GHS3DPlugin_Hypothesis::SetMaximumMemory(long MB)
+void GHS3DPlugin_Hypothesis::SetMaximumMemory(float MB)
{
if ( myMaximumMemory != MB ) {
myMaximumMemory = MB;
// * automatic memory adjustment mode. Default is zero
//=======================================================================
-long GHS3DPlugin_Hypothesis::GetMaximumMemory() const
+float GHS3DPlugin_Hypothesis::GetMaximumMemory() const
{
return myMaximumMemory;
}
//function : SetInitialMemory
//=======================================================================
-void GHS3DPlugin_Hypothesis::SetInitialMemory(long MB)
+void GHS3DPlugin_Hypothesis::SetInitialMemory(float MB)
{
if ( myInitialMemory != MB ) {
myInitialMemory = MB;
//function : GetInitialMemory
//=======================================================================
-long GHS3DPlugin_Hypothesis::GetInitialMemory() const
+float GHS3DPlugin_Hypothesis::GetInitialMemory() const
{
return myInitialMemory;
}
#include <sys/sysinfo.h>
#endif
-long GHS3DPlugin_Hypothesis::DefaultMaximumMemory()
+float GHS3DPlugin_Hypothesis::DefaultMaximumMemory()
{
#if defined(WIN32)
// See http://msdn.microsoft.com/en-us/library/aa366589.aspx
long err = GlobalMemoryStatusEx (&statex);
if (err != 0) {
double totMB = (double)statex.ullAvailPhys / 1024. / 1024.;
- return (long)( 0.7 * totMB );
+ return (float)( 0.7 * totMB );
}
#elif !defined(__APPLE__)
struct sysinfo si;
//function : DefaultInitialMemory
//=======================================================================
-long GHS3DPlugin_Hypothesis::DefaultInitialMemory()
+float GHS3DPlugin_Hypothesis::DefaultInitialMemory()
{
return DefaultMaximumMemory();
}
//function : DefaultOptimizationLevel
//=======================================================================
-short GHS3DPlugin_Hypothesis::DefaultOptimizationLevel()
+short GHS3DPlugin_Hypothesis::DefaultOptimizationLevel()
{
return Medium;
}
// Default memory is defined at MG-Tetra installation but it may be not enough,
// so allow to use about all available memory
if ( max_memory ) {
- long aMaximumMemory = hyp ? hyp->myMaximumMemory : -1;
+ float aMaximumMemory = hyp ? hyp->myMaximumMemory : -1;
cmd += " --max_memory ";
if ( aMaximumMemory < 0 ) cmd += SMESH_Comment( DefaultMaximumMemory() );
else cmd += SMESH_Comment( aMaximumMemory );
}
if ( auto_memory && !useBndRecovery ) {
- long aInitialMemory = hyp ? hyp->myInitialMemory : -1;
+ float aInitialMemory = hyp ? hyp->myInitialMemory : -1;
cmd += " --automatic_memory ";
if ( aInitialMemory > 0 ) cmd += SMESH_Comment( aInitialMemory );
else cmd += "100";
/*!
* Maximal size of memory to be used by the algorithm (in Megabytes)
*/
- void SetMaximumMemory(long MB);
- long GetMaximumMemory() const;
+ void SetMaximumMemory(float MB);
+ float GetMaximumMemory() const;
/*!
* Initial size of memory to be used by the algorithm (in Megabytes) in
* automatic memory adjustment mode. Default is zero
*/
- void SetInitialMemory(long MB);
- long GetInitialMemory() const;
+ void SetInitialMemory(float MB);
+ float GetInitialMemory() const;
/*!
* Optimization level: 0-none, 1-light, 2-medium, 3-standard+, 4-strong. Default is medium
*/
static bool DefaultMeshHoles();
static bool DefaultToMakeGroupsOfDomains();
- static long DefaultMaximumMemory();
- static long DefaultInitialMemory();
+ static float DefaultMaximumMemory();
+ static float DefaultInitialMemory();
static short DefaultOptimizationLevel();
static std::string DefaultWorkingDirectory();
static bool DefaultKeepFiles();
bool myToMeshHoles;
bool myToMakeGroupsOfDomains;
- long myMaximumMemory;
- long myInitialMemory;
+ float myMaximumMemory;
+ float myInitialMemory;
short myOptimizationLevel;
bool myKeepFiles;
std::string myWorkingDirectory;
//function : SetMaximumMemory
//=======================================================================
-void GHS3DPlugin_Hypothesis_i::SetMaximumMemory(CORBA::Long MB)
+void GHS3DPlugin_Hypothesis_i::SetMaximumMemory(CORBA::Float MB)
throw ( SALOME::SALOME_Exception )
{
if ( MB == 0 )
//function : GetMaximumMemory
//=======================================================================
-CORBA::Long GHS3DPlugin_Hypothesis_i::GetMaximumMemory()
+CORBA::Float GHS3DPlugin_Hypothesis_i::GetMaximumMemory()
{
ASSERT(myBaseImpl);
return this->GetImpl()->GetMaximumMemory();
//function : SetInitialMemory
//=======================================================================
-void GHS3DPlugin_Hypothesis_i::SetInitialMemory(CORBA::Long MB)
+void GHS3DPlugin_Hypothesis_i::SetInitialMemory(CORBA::Float MB)
throw ( SALOME::SALOME_Exception )
{
if ( MB == 0 )
//function : GetInitialMemory
//=======================================================================
-CORBA::Long GHS3DPlugin_Hypothesis_i::GetInitialMemory()
+CORBA::Float GHS3DPlugin_Hypothesis_i::GetInitialMemory()
{
ASSERT(myBaseImpl);
return this->GetImpl()->GetInitialMemory();
/*!
* Maximal size of memory to be used by the algorithm (in Megabytes)
*/
- void SetMaximumMemory(CORBA::Long MB) throw ( SALOME::SALOME_Exception );
- CORBA::Long GetMaximumMemory();
+ void SetMaximumMemory(CORBA::Float MB) throw ( SALOME::SALOME_Exception );
+ CORBA::Float GetMaximumMemory();
/*!
* Initial size of memory to be used by the algorithm (in Megabytes) in
* automatic memory adjustment mode. Default is zero
*/
- void SetInitialMemory(CORBA::Long MB) throw ( SALOME::SALOME_Exception );
- CORBA::Long GetInitialMemory();
+ void SetInitialMemory(CORBA::Float MB) throw ( SALOME::SALOME_Exception );
+ CORBA::Float GetInitialMemory();
/*!
* Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
*/
<layout class="QGridLayout" name="gridLayout_3">
<item row="3" column="4">
<widget class="QLabel" name="maxMemoryLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>MB</string>
</property>
</item>
<item row="0" column="4">
<widget class="QLabel" name="initialMemoryLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>MB</string>
</property>
</widget>
</item>
<item row="0" column="2" colspan="2">
- <widget class="SalomeApp_IntSpinBox" name="initialMemorySpin">
+ <widget class="SMESHGUI_SpinBox" name="initialMemorySpin">
<property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>1</horstretch>
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximum" stdset="0">
- <number>999999999</number>
+ <property name="maximum">
+ <double>1000000.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>10.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="2" colspan="2">
- <widget class="SalomeApp_IntSpinBox" name="maxMemorySpin">
+ <widget class="SMESHGUI_SpinBox" name="maxMemorySpin">
<property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>1</horstretch>
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximum" stdset="0">
- <number>999999999</number>
+ <property name="maximum">
+ <double>1000000.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>10.000000000000000</double>
</property>
</widget>
</item>
<extends>QDoubleSpinBox</extends>
<header location="global">SMESHGUI_SpinBox.h</header>
</customwidget>
- <customwidget>
- <class>SalomeApp_IntSpinBox</class>
- <extends>QLineEdit</extends>
- <header location="global">SalomeApp_IntSpinBox.h</header>
- </customwidget>
<customwidget>
<class>SMESH_AdvOptionsWdg</class>
<extends>QWidget</extends>
myCreateNewNodesCheck ->setChecked ( data.myToCreateNewNodes );
myAdvWidget->maxMemoryCheck ->setChecked ( data.myMaximumMemory > 0 );
- myAdvWidget->maxMemorySpin ->setValue ( qMax( (int)data.myMaximumMemory,
- myAdvWidget->maxMemorySpin->minimum() ));
+ myAdvWidget->maxMemorySpin ->setValue ( qMax( data.myMaximumMemory,
+ (float)myAdvWidget->maxMemorySpin->minimum() ));
myAdvWidget->initialMemoryCheck ->setChecked ( data.myInitialMemory > 0 );
- myAdvWidget->initialMemorySpin ->setValue ( qMax( (int)data.myInitialMemory,
- myAdvWidget->initialMemorySpin->minimum() ));
+ myAdvWidget->initialMemorySpin ->setValue ( qMax( data.myInitialMemory,
+ (float)myAdvWidget->initialMemorySpin->minimum() ));
myAdvWidget->workingDirectoryLineEdit ->setText ( data.myWorkingDir );
myAdvWidget->keepWorkingFilesCheck ->setChecked ( data.myKeepFiles );
myAdvWidget->verboseLevelSpin ->setValue ( data.myVerboseLevel );
{
bool myToMeshHoles,myToMakeGroupsOfDomains,myKeepFiles,myToCreateNewNodes,myBoundaryRecovery,myFEMCorrection,myRemoveInitialCentralPoint,
myLogInStandardOutput, myRemoveLogOnSuccess;
- long myMaximumMemory;
- long myInitialMemory;
+ float myMaximumMemory;
+ float myInitialMemory;
int myOptimizationLevel;
QString myName,myWorkingDir,myTextOption;
double myGradation;