# 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
bOK, fn=self.determineNomFichier(path,extension)
if fn == "" : return
- self.runYACS(execution="non",nomFichier=self.fichierYACS)
+ self.runYACS(execution="non",nomFichier=fn)
#-----------------------------------------#
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 +";"
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()