|
#!/bin/sh
|
|
#*********************************************
|
|
#* creation visualisation gmsh
|
|
#* plumer.e0800767@univ-ubs.fr
|
|
#* 24/03/2010
|
|
#*********************************************
|
|
|
|
LANG=C
|
|
LC_ALL=C
|
|
|
|
echo ""
|
|
echo "#############################################################################"
|
|
echo "# visu_gmsh #"
|
|
echo "#---------------------------------------------------------------------------#"
|
|
echo "# visu_gmsh est un programme permettant de créer une visualisation gmsh #"
|
|
echo "# à partir d'un maillage. #"
|
|
echo "#---------------------------------------------------------------------------#"
|
|
echo "# version 1.1 PLUMER Yohann #"
|
|
echo "#############################################################################"
|
|
echo ""
|
|
echo ""
|
|
|
|
#|tee -a $sortiefichier de suivi du programme
|
|
export sortie="trace.txt"
|
|
|
|
|
|
export finf="totoct.info"
|
|
|
|
#script fichier .info
|
|
echo " dimension 3">>$finf
|
|
echo "niveau_commentaire 3">>$finf
|
|
echo "TYPE_DE_CALCUL">>$finf
|
|
echo "non_dynamique avec plus lectureCommandesVisu">>$finf
|
|
echo "< stent.her">>$finf
|
|
echo "choix_materiaux">>$finf
|
|
echo "E_tout acier">>$finf
|
|
echo "materiaux">>$finf
|
|
echo "acier ISOELAS">>$finf
|
|
echo "210000. 0.3">>$finf
|
|
echo "masse_volumique">>$finf
|
|
echo "E_tout 1.">>$finf
|
|
echo "charges">>$finf
|
|
echo "controle">>$finf
|
|
echo "para_affichage">>$finf
|
|
echo "resultats">>$finf
|
|
echo "COPIE 0">>$finf
|
|
echo "POINTS_INTEGRATION E_tout">>$finf
|
|
echo "Green-Lagrange Almansi Cauchy_global Def_mixte_local Sigma_mixte_local">>$finf
|
|
echo " _fin_point_info_ ">>$finf
|
|
|
|
|
|
|
|
####### creation du fichier .Cvisu #########
|
|
|
|
export visu="totoct.CVisu"
|
|
echo " debut_fichier_commande_visu">>$visu
|
|
echo "debut_visualisation_Gmsh">>$visu
|
|
echo "debut_maillage_initial">>$visu
|
|
echo "actif 1">>$visu
|
|
echo "pseudo-homothetie_sur_les_maillages_ 0">>$visu
|
|
echo "fin_maillage_initial">>$visu
|
|
echo "debut_isovaleur_Gmsh">>$visu
|
|
echo "actif 0">>$visu
|
|
echo "1">>$visu
|
|
echo "debut_tableau_ddl_aux_noeuds fin_tableau_ddl_aux_noeuds">>$visu
|
|
echo "debut_tableau_choix_var_ddl_aux_noeuds fin_tableau_choix_var_ddl_aux_noeuds">>$visu
|
|
echo "debut_tableau_ddl_aux_elements fin_tableau_ddl_aux_elements">>$visu
|
|
echo "deb_list_GrandEvoluee_element fin_list_GrandEvoluee_element">>$visu
|
|
echo "deb_list_GrandParticuliere_element fin_list_GrandParticuliere_element">>$visu
|
|
echo "fin_isovaleur_Gmsh">>$visu
|
|
echo "debut_deformee">>$visu
|
|
echo "actif 0">>$visu
|
|
echo "deb_list_alerte">>$visu
|
|
echo "fin_list_alerte">>$visu
|
|
echo "fin_deformee">>$visu
|
|
echo "debut_list_increment">>$visu
|
|
echo "actif 1">>$visu
|
|
echo "0 dernier_increment fin_list_increment">>$visu
|
|
echo "debut_choix_maillage">>$visu
|
|
echo "actif 0">>$visu
|
|
echo "1 fin_choix_maillage ">>$visu
|
|
echo "fin_visualisation_Gmsh">>$visu
|
|
echo " fin_fichier_commande_visu">>$visu
|
|
|
|
#demande du nom du fichier de maillage pyformex
|
|
echo "Entez le nom du maillage Hérezh sans son extension (.her)" |tee -a $sortie
|
|
read nom >>$sortie
|
|
mail=$nom".her">>$sortie
|
|
|
|
|
|
|
|
#copie du fichier de maillage dans le fichier stent.her
|
|
cp $mail stent.her>>$sortie
|
|
|
|
# creation de la visualisation Gmsh
|
|
echo "">>$sortie
|
|
echo " --> Creation de la visualisation Gmsh" |tee -a $sortie
|
|
HZppfast -f totoct.info >>$sortie
|
|
|
|
#on remet le fichier de résultat obtenu dans le fichier qui porte le nom de départ
|
|
mv totoct_Gmsh.msh $nom.msh
|
|
|
|
|
|
#demande d'ouverture de gmsh
|
|
echo ""
|
|
echo "Voulez-vous ouvrir le maillage sous gmsh ? (rep:o/n)" |tee -a $sortie
|
|
read gms >>$sortie
|
|
#on lance gmsh si demandé
|
|
if [ $gms = o ] >>$sortie
|
|
then
|
|
gmsh $nom.msh & >>$sortie
|
|
fi
|
|
|
|
#on supprime les fichiers temporaires
|
|
rm -r totoct_Gmsh
|
|
rm totoct.res
|
|
rm totoct.BI
|
|
rm totoct.info
|
|
rm totoct.cont
|
|
rm totoct.Cvisu
|
|
rm totoct.PI
|
|
rm totoct1_cab.isoe
|
|
rm totoct.ddl
|
|
rm totoct.reac
|
|
rm totoct1_dpl.points
|
|
#rm totoct.her
|
|
rm trace.txt
|
|
rm stent.her
|
|
rm ancienNom
|
|
|
|
|
|
#on affiche les résultats obtenus
|
|
echo ""
|
|
echo "----------------------------------------------------------------------------"
|
|
echo "Données crées :"
|
|
echo "----------------------------------------------------------------------------"
|
|
echo ""
|
|
echo " => la visualisation gmsh crée est dans le fichier $nom.msh "
|
|
echo "----------------------------------------------------------------------------"
|
|
echo ""
|
|
|
|
|
|
exit 0;
|