Skip to content
Snippets Groups Projects
Commit be0380ba authored by Francois Henrotte's avatar Francois Henrotte
Browse files

test for onelab-py

parent ff63a1ec
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,6 @@ class client :
print "python launch : "+ command + " -onelab "+ msg
os.system(command + " -onelab " + name + " " + msg)
def merge_file(self, filename) :
if not self.socket :
return
......
DefineConstant[ refine = {0.1,
Path "Parameters/Geometry",
Label "Refinement at corner"} ] ;
lc = 0.1;
a = 1.0;
b = 1.0;
h = 1.0;
Point(1) = {0, 0, 0, lc*refine};
Point(2) = {a, 0, 0, lc} ;
Point(3) = {0, b, 0, lc} ;
Point(4) = {a, -h, 0, lc} ;
Point(5) = {-h, b, 0, lc} ;
Point(6) = {-h, -h, 0, lc} ;
Line(1) = {1,3} ;
Line(2) = {3,5} ;
Line(3) = {5,6} ;
Line(4) = {6,4} ;
Line(5) = {4,2} ;
Line(6) = {2,1} ;
Line Loop(1) = {1,2,3,4,5,6} ;
Plane Surface(1) = {1};
Native.register(native, ./test.py);
Native.run();
......@@ -13,9 +13,15 @@ D = oc.get_number('Group/D', 2, labels = {0:'zero', 1:'un', 2:'deux', 3:'trois'}
#utf-8 are allowed everywhere (should be prefixed by 'u' in python 2, not required in python 3)
#Omega = oc.get_string(u'Ω', u'∫(∂φ/∂α)³dx', help=u'ask someone@universe.org', choices = ['oui', 'non', u'peut-être'])
modelName = 'coin'
oc.merge_file(modelName + '.geo')
print('Action=%s pour %s' %(oc.action,'python'))
if oc.action != 'compute' :
exit(0)
#this is the solver code
#print (A, B, C, str(Omega))
print (A, B, C)
oc.sub_client('gmsh', 'gmsh ' + modelName + '.geo -2')
oc.merge_file(modelName + '.msh')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment