diff --git a/Dockerfile b/Dockerfile index f47a4f9..955be66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ ENV SLEPC_ARCH linux_debug #Installing dependencies using aptitude RUN apt-get update \ && apt-get -y install git libopenmpi-dev build-essential cmake wget libssl-dev python3 python3-distutils python3-tk libpython3-dev libxmu-dev tk-dev tcl-dev g++ libglu1-mesa-dev liblapacke-dev libblas-dev liblapack-dev +#RUN apt-get update \ +# && apt-get -y install libocct-data-exchange-dev libocct-draw-dev occt-misc #Building cmake RUN cd ~ && wget https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6.tar.gz \ && tar -zxvf cmake-3.27.6.tar.gz \ @@ -57,7 +59,7 @@ RUN mkdir -p ~/ngsuite \ && mkdir ~/ngsuite/ngsolve-build \ && mkdir ~/ngsuite/ngsolve-install \ && cd ~/ngsuite/ngsolve-build \ - && cmake -DCMAKE_INSTALL_PREFIX=~/ngsuite/ngsolve-install ~/ngsuite/ngsolve-src -DUSE_MPI=ON -DBUILD_OCC=ON\ + && cmake -DCMAKE_INSTALL_PREFIX=~/ngsuite/ngsolve-install ~/ngsuite/ngsolve-src -DUSE_MPI=ON -DUSE_OCC=OFF \ && make && make install #Adding NGS to PYTHONPATH ENV PYTHONPATH /root/petsc/linux_debug/lib:/root/slepc/linux_debug/lib:/root/ngsuite/ngsolve-install/lib/python3.10/site-packages diff --git a/tests/test_snes.py b/tests/test_snes.py index f238591..2f7e9a8 100644 --- a/tests/test_snes.py +++ b/tests/test_snes.py @@ -58,16 +58,13 @@ def test_snes_elastic_beam_newtonls(): This test run only in serial becasue variational energy as objective only works in serial, please use objective=False in parallel. ''' - from netgen.occ import Rectangle, OCCGeometry, X, Y + from netgen.geom2d import SplineGeometry if COMM_WORLD.rank == 0: - shape = Rectangle(1,0.1).Face() - shape.edges.Min(X).name="left" - shape.edges.Min(X).maxh=0.01 - shape.edges.Max(X).name="right" - shape.edges.Min(Y).name="bot" - shape.edges.Max(Y).name="top" - geom = OCCGeometry(shape, dim=2) - mesh = Mesh(geom.GenerateMesh(maxh=0.05).Distribute(COMM_WORLD)) + geo = SplineGeometry() + pnums = [ geo.AddPoint (x,y,maxh=0.01) for x,y in [(0,0), (1,0), (1,0.1), (0,0.1)] ] + for p1,p2,bc in [(0,1,"bot"), (1,2,"right"), (2,3,"top"), (3,0,"left")]: + geo.Append(["line", pnums[p1], pnums[p2]], bc=bc) + mesh = Mesh(geo.GenerateMesh(maxh=0.05).Distribute(COMM_WORLD)) else: mesh = Mesh(ngm.Mesh.Receive(COMM_WORLD)) # E module and poisson number: