Complément de documentation.
The licence for this module is the GNU Lesser General Public License (Lesser GPL), as stated here and in the source files.
-.. literalinclude:: ../licence.txt
+.. literalinclude:: ../files/licence.en.txt
In addition, we expect that all publications describing work using this software, or all commercial products using it, quote at least one of the references given below:
+ * G. Nicolas and T. Fouquet, Adaptive Mesh Refinement for Conformal Hexahedral Meshes, *Finite
+ Elements in Analysis and Design*, Vol. 67, pp. 1-12, 2013, doi:10.1016/j.finel.2012.11.008
+
* *HOMARD, a SALOME module for Mesh Adaptation*,
http://www.salome-platform.org/
* *SALOME The Open Source Integration Platform for Numerical Simulation*,
http://www.salome-platform.org/
- * G. Nicolas and T. Fouquet, Adaptive Mesh Refinement for Conformal Hexahedral Meshes, *Finite
- Elements in Analysis and Design*, Vol. 67, pp. 1-12, 2013, doi:10.1016/j.finel.2012.11.008
-
The documentation of the module is also covered by the licence and the requirement of quoting.
Index and tables
--- /dev/null
+ <HOMARD, a SALOME module for Mesh Adaptation>
+
+ Copyright (C) 1996-2013 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
+
--- /dev/null
+ <HOMARD, a SALOME module for Mesh Adaptation>
+
+ Copyright (C) 1996-2013 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
+
"""
Lancement d'un calcul ASTER
"""
-__revision__ = "V5.3"
+__revision__ = "V5.4"
#
import sys
import os
Arguments optionnels :
---wait=attente : temps d'attente en secondes entre deux examens de l'etat d'un calcul batch ; si absent, on prend 10.
+--wait=wait : temps d'attente en secondes entre deux examens de l'etat d'un calcul batch ; si absent, on prend 10.
-dump : produit le fichier dump du fichier med de resultats ; par defaut, pas de dump.
chaine = "V_TEST"
nuocc = 1
erreur, message_erreur, info = self.post_aster_1 ( nomfic, chaine, nuocc )
- if erreur :
+ if ( erreur > 0 ) :
break
self.message_info += info[:-1]
#
# 1.2. Details
#
- info = info.replace(chaine, " ")
- laux = info[:-1].split()
- aux = laux[0]
- if ( "D" in aux ) :
- aux = aux.replace("D", "E")
- dico_resu[chaine] = float(aux)
+ if ( erreur == 0 ) :
+ info = info.replace(chaine, " ")
+ laux = info[:-1].split()
+ aux = laux[0]
+ if ( "D" in aux ) :
+ aux = aux.replace("D", "E")
+ dico_resu[chaine] = float(aux)
+ else :
+ erreur = 0
#
# 2. Exploration du fichier mess
# 2.1. Que chercher ?
else :
nuocc = 1
erreur, message_erreur, info = self.post_aster_1 ( nomfic, chaine, nuocc )
- if erreur :
+ if ( erreur > 0 ) :
break
self.message_info += info[:-1]
#
# 2.3. Details
#
- if chaine == "INSTANT" :
- l_aux = info[:-1].split()
- lg_aux = len(l_aux)
- for iaux in range(lg_aux) :
- if ( "ORDRE" in l_aux[iaux] ) :
- if l_aux[iaux+1] == ":" :
- jaux = iaux+2
- else :
- jaux = iaux+1
- ordre = int(l_aux[jaux])
- dico_resu["ORDRE"] = ordre
- dico_resu["PAS_DE_TEMPS"] = ordre
- elif chaine in ( "NOMBRE DE NOEUDS", "NOMBRE DE MAILLES" ) :
- l_aux = info[:-1].split(chaine)
- dico_resu[chaine] = int(l_aux[1])
+ if ( erreur == 0 ) :
+ if chaine == "INSTANT" :
+ l_aux = info[:-1].split()
+ lg_aux = len(l_aux)
+ for iaux in range(lg_aux) :
+ if ( "ORDRE" in l_aux[iaux] ) :
+ if l_aux[iaux+1] == ":" :
+ jaux = iaux+2
+ else :
+ jaux = iaux+1
+ ordre = int(l_aux[jaux])
+ dico_resu["ORDRE"] = ordre
+ dico_resu["PAS_DE_TEMPS"] = ordre
+ elif chaine in ( "NOMBRE DE NOEUDS", "NOMBRE DE MAILLES" ) :
+ l_aux = info[:-1].split(chaine)
+ dico_resu[chaine] = int(l_aux[1])
+ else :
+ erreur = 0
#
if erreur :
break
nomfic = nom du fichier a decoder
chaine = chaine a chercher
nuocc = numero de l'occurence a chercher, 0 si toutes
+Retour :
+codret = 0 : tout va bien
+ 1 : le fichier de resultats est absent
+ -1 : la chaine est absente
+message_erreur = "" : tout va bien
+ != "" si probleme
+info = la ou les lignes recherchees
"""
#
messages_erreur = { 0 : None,
+ -1 : "La chaine est absente.",
1 : "Ce fichier est inconnu." }
#
nom_fonction = __name__ + "/post_aster_1"
if self.verbose_max :
print blabla, "chaine =", chaine, ", nuocc =", nuocc
#
- erreur = 0
+ erreur = -1
message_erreur = " "
info = ""
#
iaux += 1
if ( ( nuocc == 0 ) or ( iaux == nuocc ) ) :
info += ligne
+ erreur = 0
#
break
#
- if self.verbose_max :
- print blabla
- print ". erreur :", erreur
+ if ( self.verbose_max or ( erreur>0 ) ) :
+ print blabla, "chaine =", chaine, ", nuocc =", nuocc
+ print ". erreur =", erreur
#
if erreur :
message_erreur = messages_erreur[erreur]
La licence pour ce module est la GNU Lesser General Public License (Lesser GPL), tel qu'il est déclaré ici et dans les fichiers source.
-.. literalinclude:: ../licence.txt
+.. literalinclude:: ../files/licence.fr.txt
En complément, nous souhaitons que toute publication décrivant un travail utilisant ce module, ou tout produit commercial l'utilisant, cite au moins l'une des références ci-dessous :
+ * G. Nicolas and T. Fouquet, Adaptive Mesh Refinement for Conformal Hexahedral Meshes, *Finite
+ Elements in Analysis and Design*, Vol. 67, pp. 1-12, 2013, doi:10.1016/j.finel.2012.11.008
+
* *HOMARD, a SALOME module for Mesh Adaptation*,
http://www.salome-platform.org/
* *SALOME The Open Source Integration Platform for Numerical Simulation*,
http://www.salome-platform.org/
- * G. Nicolas and T. Fouquet, Adaptive Mesh Refinement for Conformal Hexahedral Meshes, *Finite
- Elements in Analysis and Design*, Vol. 67, pp. 1-12, 2013, doi:10.1016/j.finel.2012.11.008
-
La documentation de ce module est aussi couverte par la licence et l'obligation de citation.
Index et tables
+++ /dev/null
- <HOMARD, a SALOME module for Mesh Adaptation>
-
- Copyright (C) 1996-2013 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
-
// Le type de schema
aScript << "\t" << _Name << ".SetType(" << _Type << ")\n";
-// L'ecriture eventuelle du schema
- aScript << "\t#" << _Name << ".Write()\n";
+// L'ecriture du schema
+ aScript << "\tcodret = " << _Name << ".Write()\n";
MESSAGE (". Fin de l ecriture du schema " << _Name );
/********************************************************************************
** Form generated from reading UI file 'CreateHypothesis.ui'
**
-** Created: Tue Sep 17 14:10:20 2013
+** Created: Tue Sep 24 14:35:06 2013
** by: Qt User Interface Compiler version 4.6.3
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
doubleSpinBoxDiamMin = new QDoubleSpinBox(GBAdvancedOptions);
doubleSpinBoxDiamMin->setObjectName(QString::fromUtf8("doubleSpinBoxDiamMin"));
- doubleSpinBoxDiamMin->setDecimals(5);
+ doubleSpinBoxDiamMin->setDecimals(7);
gridLayout_1->addWidget(doubleSpinBoxDiamMin, 0, 1, 1, 1);
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxDiamMin">
<property name="decimals">
- <number>5</number>
+ <number>7</number>
</property>
</widget>
</item>
_aCaseName(CaseName),
_aScriptFile(""),
_aDirName(""),
- _aMeshFile("")
+ _aMeshFile(""),
+ _Type(1)
+ // La valeur de _Type doit etre la meme que celle dans HOMARD_Gen_i::CreateYACSSchema
+ // et doit correspondre aux defauts des boutons
{
// MESSAGE("Debut du constructeur de MonCreateYACS");
myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
connect( PBDir, SIGNAL(pressed()), this, SLOT(SetDirName()));
connect( PBMeshFile, SIGNAL(pressed()), this, SLOT(SetMeshFile()));
- connect( RBConstant, SIGNAL(clicked()), this, SLOT(SetType(1)));
- connect( RBVariable, SIGNAL(clicked()), this, SLOT(SetType(2)));
+ connect( RBConstant, SIGNAL(clicked()), this, SLOT(SetConstant()));
+ connect( RBVariable, SIGNAL(clicked()), this, SLOT(SetVariable()));
connect( buttonOk, SIGNAL(pressed()), this, SLOT(PushOnOK()));
connect( buttonApply, SIGNAL(pressed()), this, SLOT(PushOnApply()));
// Ecriture du fichier
if ( bOK )
- { aYACS->Write() ; }
+ {
+ int codret = aYACS->Write() ;
+ if ( codret != 0 ) { bOK = false ; }
+ }
return bOK;
}
LEMeshFile->setText(fileName);
}
// ------------------------------------------------------------------------
-void MonCreateYACS::SetType(int Type)
+void MonCreateYACS::SetConstant()
+// ------------------------------------------------------------------------
+{
+ _Type = 1 ;
+}
+// ------------------------------------------------------------------------
+void MonCreateYACS::SetVariable()
// ------------------------------------------------------------------------
{
- _Type=Type;
+ _Type = 2 ;
}
virtual void SetScriptFile();
virtual void SetMeshFile();
- virtual void SetType(int Type);
+// virtual void SetType(int Type);
+ virtual void SetConstant();
+ virtual void SetVariable();
virtual void PushOnOK();
virtual bool PushOnApply();
std::string Iter1Name = std::string((*maListe)[0]);
MESSAGE ("... Iter1Name = " << Iter1Name);
HOMARD::HOMARD_Iteration_var Iter1 = GetIteration(Iter1Name.c_str()) ;
- MESSAGE (". Iter1 = " << Iter1);
// E. L'hypothese pour passer de l'iteration initiale a la suivante
// E.1. La structure
ScriptFile = os.path.normpath(ScriptFile)
DirName = Rep_Test_Resu
YACS_2 = Case_2.CreateYACSSchema("YACS_2", ScriptFile, DirName, MeshFile)
+ YACS_2.SetType(1)
filexml = os.path.join(Rep_Test_Resu, 'YACS_2.xml')
error = YACS_2.WriteOnFile(filexml)
if error :
Copyright EDF-R&D 2011, 2013
Test test_3
"""
-__revision__ = "V1.9"
+__revision__ = "V1.10"
#========================================================================
Test_Name = "test_3"
YACSName = "YACS_3"
print "-------- Creation of the schema", YACSName
YACS_3 = Case_3.CreateYACSSchema(YACSName, ScriptFile, DirName, MeshFile)
+ YACS_3.SetType(2)
error = YACS_3.Write()
if error :
error = 10*num + 5