Commit 3aa1bb9a authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

validation

parent 45cb5578
Pipeline #4533 failed with stage
in 20 seconds
......@@ -25,6 +25,7 @@ mbtests :
- mkdir build
- cd build/
- cmake .. -DENABLE_PETSC=1 -DPETSC_DIR=/usr/lib/petscdir/petsc3.9/ -DPETSC_ARCH=x86_64-linux-gnu-real
- PPATH=$(pwd)
- make -j4
- cd ../validation
- ../build/migflow.sh mbtests.py
- PYTHONPATH=$PPATH:$PYTHONPATH python3 mbtests.py
......@@ -70,17 +70,15 @@ if(PETSC_VARIABLES)
${PETSC_PACKAGES_INCLUDES})
endif(PETSC_PACKAGES_INCLUDES)
if(PETSC_PACKAGES_INCLUDES)
if(PETSC_PACKAGES_INCLUDES)
string(REPLACE "-I" "" PETSC_PACKAGES_INCLUDES ${PETSC_PACKAGES_INCLUDES})
string(REPLACE " " ";" PETSC_PACKAGES_INCLUDES ${PETSC_PACKAGES_INCLUDES})
foreach(VAR ${PETSC_PACKAGES_INCLUDES})
# seem to include unexisting directories (/usr/include/lib64)
# check to avoid warnings
if(EXISTS ${VAR})
list(APPEND PETSC_INC ${VAR})
# check to avoid warnings
if(EXISTS ${VAR})
list(APPEND PETSC_INC ${VAR})
endif(EXISTS ${VAR})
endforeach(VAR)
endif(PETSC_PACKAGES_INCLUDES)
endif(PETSC_PACKAGES_INCLUDES)
string(REGEX MATCHALL "\nCC = [^\n\r]*" PETSC_CC ${PETSC_VARIABLES})
if(PETSC_CC)
......
......@@ -21,7 +21,6 @@
#!/usr/bin/env python
from migflow import fluid as mbfluid
from migflow import scontact2
import numpy as np
import os
......@@ -69,7 +68,7 @@ class Poiseuille(unittest.TestCase) :
#Object fluid creation + Boundary condition of the fluid (field 0 is horizontal velocity; field 1 is vertical velocity; field 2 is pressure)
#Format: strong_boundaries = [(Boundary tag, Fluid field, Value)
fluid = mbfluid.fluid_problem(g,nu*rho,rho)
fluid = mbfluid.FluidProblem(2,g,nu*rho,rho)
fluid.load_msh("mesh.msh")
fluid.set_strong_boundary("Top",0,vUp)
fluid.set_strong_boundary("Top",1,0.)
......
......@@ -21,3 +21,4 @@ Physical Line("Bottom") = {2};
Physical Line("Top") = {4};
Physical Surface("Domain") = {1};
Physical Point("PtFix") = {2};
Mesh.MshFileVersion = 2;
......@@ -20,3 +20,4 @@ Physical Line("Top") = {4};
Physical Line("Lateral") = {1,3};
Physical Surface("Domain") = {1};
Physical Point("PtFix") = {1};
Mesh.MshFileVersion = 2;
......@@ -21,7 +21,7 @@
#!/usr/bin/env python
from migflow import fluid as mbfluid
from migflow import scontact2
from migflow import scontact
import numpy as np
import os
......@@ -64,11 +64,11 @@ class Poiseuille(unittest.TestCase) :
dt = .01 # time step
shutil.copy("mesh.msh", outputdir +"/mesh.msh")
p = scontact2.ParticleProblem()
p = scontact.ParticleProblem(2)
p.load_msh_boundaries("mesh.msh", ["Top", "Bottom","Lateral"])
p.add_particle((0,4.5),r,r**2*np.pi*rhop)
p.write_vtk(outputdir,0,0)
p = scontact2.ParticleProblem()
p = scontact.ParticleProblem(2)
p.read_vtk("output",0)
p.write_vtk(outputdir, 0, 0)
print("r = %g, m = %g\n" % (p.r()[0], p.mass()[0]))
......@@ -76,7 +76,7 @@ class Poiseuille(unittest.TestCase) :
outf = 1 # number of iterations between output files
fluid = mbfluid.fluid_problem(g,nu*rho,rho)
fluid = mbfluid.FluidProblem(2,g,nu*rho,rho)
fluid.load_msh("mesh.msh")
fluid.set_strong_boundary("Top",2,0.)
fluid.set_weak_boundary("Bottom","Wall")
......
......@@ -27,3 +27,4 @@ Physical Line("Bottom") = {3};
Physical Line("Top") = {6};
Physical Surface("Domain") = {1};
Physical Point("PtFix") = {1};
Mesh.MshFileVersion = 2;
......@@ -21,7 +21,6 @@
#!/usr/bin/env python
from migflow import fluid as mbfluid
from migflow import scontact2
import numpy as np
import os
......@@ -65,7 +64,7 @@ class Poiseuille(unittest.TestCase) :
outf = 1 # number of iterations between output files
#Object fluid creation + Boundary condition of the fluid (field 0 is horizontal velocity; field 1 is vertical velocity; field 2 is pressure)
fluid = mbfluid.fluid_problem(g,nu*rho,rho)
fluid = mbfluid.FluidProblem(2,g,nu*rho,rho)
fluid.set_strong_boundary("RightUp",2,0.)
fluid.set_strong_boundary("RightDown",2,0.)
fluid.set_strong_boundary("Top",0,0)
......
Markdown is supported
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