Skip to content

Commit

Permalink
Parallel Test utilises previous mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoresi committed Sep 4, 2024
1 parent f1e5dbd commit d564199
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/parallel/ptest_000c_uw_petsc4py_h5.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import petsc4py
from petsc4py import PETSc
import underworld3 as uw
import numpy as np
import sympy
Expand All @@ -9,7 +7,10 @@
comm = MPI.COMM_WORLD
rank = comm.Get_rank()

h5plex = PETSc.DMPlex().createFromFile("uw_annulus_test_mesh.h5")
import petsc4py
from petsc4py import PETSc

h5plex = PETSc.DMPlex().createFromFile(".meshes/uw_annulus_ro1.0_ri0.5_csize0.1.msh.h5")

print(f"{rank} - DM created from file - v1", flush=True)

Expand All @@ -21,9 +22,11 @@
h5plex.destroy()


## v2 - this is what we do in uw3
## v2 - this is what we might also do in uw3

viewer = PETSc.ViewerHDF5().create("uw_annulus_test_mesh.h5", "r")
viewer = PETSc.ViewerHDF5().create(
".meshes/uw_annulus_ro1.0_ri0.5_csize0.1.msh.h5", "r"
)
h5plex = PETSc.DMPlex().create()
sf0 = h5plex.topologyLoad(viewer)
h5plex.coordinatesLoad(viewer, sf0)
Expand Down

0 comments on commit d564199

Please sign in to comment.