From: Charles Toulemonde Date: Fri, 7 Jan 2011 10:26:16 +0000 (+0000) Subject: debug for pygmee_v2 and fdvgrid with new interface X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1b5f97ff7b5039237e53e3f2f9b862abbf5f106e;p=tools%2Feficas.git debug for pygmee_v2 and fdvgrid with new interface --- diff --git a/InterfaceQT4/editor.py b/InterfaceQT4/editor.py index 6c5b7173..a39202a4 100644 --- a/InterfaceQT4/editor.py +++ b/InterfaceQT4/editor.py @@ -527,8 +527,9 @@ class JDCEditor(QSplitter): # Le generateur existe on l'utilise self.generator=generator.plugins[format]() self.textePython =self.generator.generRUN(self.jdc,format='beautifie',config=self.appliEficas.CONFIGURATION) + command="python -c "+self.textePython if execution=="oui" : - os.system(self.textePython) + os.system(command) else: return self.textePython @@ -607,7 +608,7 @@ class JDCEditor(QSplitter): bOK, fn=self.determineNomFichier(path,extension) if fn == "" : return - self.runYACS(execution="non",nomFichier=self.fichierYACS) + self.runYACS(execution="non",nomFichier=fn) #-----------------------------------------# diff --git a/MAP/Templates/s_polymers_st_1/s_polymers_st_1_YACS_nodes.py b/MAP/Templates/s_polymers_st_1/s_polymers_st_1_YACS_nodes.py index e4230768..aa3dafac 100644 --- a/MAP/Templates/s_polymers_st_1/s_polymers_st_1_YACS_nodes.py +++ b/MAP/Templates/s_polymers_st_1/s_polymers_st_1_YACS_nodes.py @@ -48,7 +48,7 @@ class component_pygmee_v2: parameter.add_parameter(composant, 'study_name', study_name) parameter.add_parameter(composant, 'file_result_inclusions', file_result_inclusions) parameter.add_parameter(composant, 'file_result_rve', file_result_rve) - parameter.write_for_shell(pygmee_v2_input) + parameter.write(pygmee_v2_input) commponent_dir= os.path.join(os.getenv('MAP_DIRECTORY'),'components/pygmee_v2/src') commande= "cd "+ commponent_dir +";" @@ -81,12 +81,38 @@ class component_fdvgrid: if (finesse < 32): finesse=32 fdvgrid_path=os.path.join(os.getenv('MAP_DIRECTORY'),'components/fdvgrid/bin') - commande = "cd "+fdvgrid_path+";\n" - commande+= "cp " + file_inclusions+" "+"inclusions.input"+";\n" - commande+= "./fdvgrid 3D 1.0 0.0 0.0 v t "+str(finesse)+" cross 1e-6 "+";\n" + + lambda_output='/local00/bin/MAP/studies/demonstrateur_s_polymers_st_1/lambda_x.output' + string='[fdvgrid]\n' + file_inclusions='/local00/bin/MAP/studies/demonstrateur_s_polymers_st_1/pygmee_v2_test_1.inclusions' + string+=' microstructure_file="'+file_inclusions+'";\n' + string+=' rve_size='+str(rve_size)+';\n' + string+=' grid_size='+str(finesse)+';\n' + string+=' contrast='+str(contrast)+';\n' + string+=' method_type="v";\n' + string+=' BC_type="t";\n' + string+=' lambda_output="'+lambda_output+'"\n' + print "***********************" + print "MAP_parameters input" + print string + print "***********************" + + + fdvgrid_input='/local00/bin/MAP/studies/demonstrateur_s_polymers_st_1/fdvgrid.input' + fd = open(fdvgrid_input, 'w') + fd.write(string) + fd.close() + + fdvgrid_path="/local00/bin/MAP/components/fdvgrid/bin" + + print "***********************" + commande= "cd "+fdvgrid_path+";\n" + commande+= "./fdvgrid "+fdvgrid_input + print "commande=", commande + os.system(commande) - fd = open(fdvgrid_path+"/"+"lambda_x.output", 'r') + fd = open(lambda_output, 'r') line=fd.readline() self.lambda_x=float(line) fd.close()