Skip to content

Commit 3cccabe

Browse files
Making output directories for all FEniCS participants consistent (#256)
* Add PEP8 CI. * Format code-base. * Better formatting * Increase line length to 120. * Some more reformatting. * Minor reformatting. * More reformatting. * Cleanup perpendicular flap. * Partially update for turek-hron. BROKEN! #186 * Add missing file. * Remove turek-hron FEniCS solver. * Update broken run script for paritioned-heat-conduction-complex FEniCS case * Making output folder structure consistent for all FEniCS participants Co-authored-by: BenjaminRodenberg <[email protected]>
1 parent 88fb82e commit 3cccabe

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

flow-over-heated-plate/solid-fenics/solid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ def determine_heat_flux(V_g, u, k, flux):
141141
u_D.t = t + dt
142142

143143
# mark mesh w.r.t ranks
144-
ranks = File("Solid/VTK/ranks%s.pvd.pvd" % precice.get_participant_name())
144+
ranks = File("output/ranks%s.pvd.pvd" % precice.get_participant_name())
145145
mesh_rank = MeshFunction("size_t", mesh, mesh.topology().dim())
146146
mesh_rank.set_all(MPI.rank(MPI.comm_world))
147147
mesh_rank.rename("myRank", "")
148148
ranks << mesh_rank
149149

150150
# Create output file
151-
file_out = File("Solid/VTK/%s.pvd" % precice.get_participant_name())
151+
file_out = File("output/%s.pvd" % precice.get_participant_name())
152152
file_out << u_n
153153

154154
print("output vtk for time = {}".format(float(t)))

partitioned-heat-conduction-complex/fenics/heat.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ def determine_gradient(V_g, u, flux):
165165
mesh_rank.rename("myRank", "")
166166

167167
# Generating output files
168-
temperature_out = File("out/%s.pvd" % precice.get_participant_name())
169-
ref_out = File("out/ref%s.pvd" % precice.get_participant_name())
170-
error_out = File("out/error%s.pvd" % precice.get_participant_name())
171-
ranks = File("out/ranks%s.pvd" % precice.get_participant_name())
168+
temperature_out = File("output/%s.pvd" % precice.get_participant_name())
169+
ref_out = File("output/ref%s.pvd" % precice.get_participant_name())
170+
error_out = File("output/error%s.pvd" % precice.get_participant_name())
171+
ranks = File("output/ranks%s.pvd" % precice.get_participant_name())
172172

173173
# output solution and reference solution at t=0, n=0
174174
n = 0

partitioned-heat-conduction/fenics/heat.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ def determine_gradient(V_g, u, flux):
148148
mesh_rank.rename("myRank", "")
149149

150150
# Generating output files
151-
temperature_out = File("out/%s.pvd" % precice.get_participant_name())
152-
ref_out = File("out/ref%s.pvd" % precice.get_participant_name())
153-
error_out = File("out/error%s.pvd" % precice.get_participant_name())
154-
ranks = File("out/ranks%s.pvd" % precice.get_participant_name())
151+
temperature_out = File("output/%s.pvd" % precice.get_participant_name())
152+
ref_out = File("output/ref%s.pvd" % precice.get_participant_name())
153+
error_out = File("output/error%s.pvd" % precice.get_participant_name())
154+
ranks = File("output/ranks%s.pvd" % precice.get_participant_name())
155155

156156
# output solution and reference solution at t=0, n=0
157157
n = 0

perpendicular-flap/solid-fenics/solid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def avg(x_old, x_new, alpha):
170170
n = 0
171171
E_ext = 0
172172

173-
displacement_out = File("Solid/FSI-S/u_fsi.pvd")
173+
displacement_out = File("output/u_fsi.pvd")
174174

175175
u_n.rename("Displacement", "")
176176
u_np1.rename("Displacement", "")

tools/cleaning-tools.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ clean_fenics() {
7373
set -e -u
7474
cd "$1"
7575
echo "--- Cleaning up FEniCS case in $(pwd)"
76-
rm -fv ./*.pvd spooles.out FSI-S/*
77-
rm -rfv ./out/
76+
rm -fv spooles.out output/*
77+
rm -rfv ./output/
7878
rm -rfv ./preCICE-output/
7979
clean_precice_logs .
8080
)

volume-coupled-diffusion/fenics/volume-coupled-diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ def inside(self, x, on_boundary):
8181
mesh_rank.rename("myRank", "")
8282

8383
# Generating output files
84-
solution_out = File("out/%s.pvd" % precice.get_participant_name())
85-
ranks = File("out/ranks%s.pvd" % precice.get_participant_name())
84+
solution_out = File("output/%s.pvd" % precice.get_participant_name())
85+
ranks = File("output/ranks%s.pvd" % precice.get_participant_name())
8686

8787
# output solution and reference solution at t=0, n=0
8888
n = 0

0 commit comments

Comments
 (0)