Commit d4bbdc9d authored by Matthieu Constant's avatar Matthieu Constant
Browse files

uniformisation 2d-3D

parent 53f9c8c6
......@@ -15,7 +15,7 @@ class StrongBoundary(Structure):
class fluid_problem :
def __init__(self, mesh_file_name, g, mu, rho, epsilon, strong_boundaries):
def __init__(self, mesh_file_name, g, mu, rho, epsilon, strong_boundaries, notComputeEpsilon):
nsb = len(strong_boundaries)
class Bnd :
def __init__(self, b) :
......@@ -31,7 +31,7 @@ class fluid_problem :
asb = (StrongBoundary*nsb)(*[StrongBoundary(i[0].encode(),i[1],BNDCB(Bnd(i[2]).apply)) for i in strong_boundaries])
self.asb = asb
lib.fluid_problem_new.restype = c_void_p
self._fp = c_void_p(lib.fluid_problem_new(mesh_file_name.encode(), c_double(g), c_double(mu), c_double(rho), c_double(epsilon), nsb, asb))
self._fp = c_void_p(lib.fluid_problem_new(mesh_file_name.encode(), c_double(g), c_double(mu), c_double(rho), c_double(epsilon), nsb, asb,c_int(notComputeEpsilon)))
if self._fp == None :
raise NameError("cannot create fluid problem")
......
......@@ -72,9 +72,9 @@ class ParticleProblem :
triangleTag = self._get_idx("TriangleTag")
triangles[triangleTag == tag, 9:12] = v
def iterate(self, dt, forces) :
def iterate(self, dt, forces,tol=1e-8) :
self._get_matrix("ExternalForces",3)[:] = forces
lib.particleProblemIterate(self._p, c_double(numpy.min(self.r())), c_double(dt), c_double(3e-8), c_int(-1))
lib.particleProblemIterate(self._p, c_double(numpy.min(self.r())), c_double(dt), c_double(tol), c_int(-1))
def write_vtk(self, odir, i, t) :
lib.particleProblemWriteVtk(self._p, odir.encode(), i)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment