Skip to content

Commit

Permalink
Adding a surfing test with a restart capability
Browse files Browse the repository at this point in the history
  • Loading branch information
Mostafa Mollaali authored and endJunction committed Aug 22, 2024
1 parent dbc396f commit 13e9f47
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 4 deletions.
15 changes: 15 additions & 0 deletions ProcessLib/PhaseField/Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ AddTest(
expected_surfing_ts_20_t_1_000000_0.vtu surfing_ts_20_t_1.000000.vtu phasefield phasefield 1e-6 0
)

AddTest(
NAME PhaseField_2D_surfing_AT1_vd_restart
PATH PhaseField/surfing
EXECUTABLE ogs
EXECUTABLE_ARGS surfing_restart.xml
WRAPPER mpirun
WRAPPER_ARGS -np 1
TESTER vtkdiff
REQUIREMENTS OGS_USE_MPI
RUNTIME 18
DIFF_DATA
expected_surfing_ts_20_t_1_000000_0.vtu surfing_restart_ts_10_t_1.000000.vtu displacement displacement 1e-10 0
expected_surfing_ts_20_t_1_000000_0.vtu surfing_restart_ts_10_t_1.000000.vtu phasefield phasefield 1e-10 0
)

AddTest(
NAME PhaseField_2D_K_regime_HF_2cores
PATH PhaseField/k_regime_HF
Expand Down
4 changes: 0 additions & 4 deletions Tests/Data/PhaseField/surfing/surfing.prj
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@
</processes>
<output>
<variables>
<variable>displacement</variable>
<variable>phasefield</variable>
<variable>sigma</variable>
<variable>epsilon</variable>
</variables>
<type>VTK</type>
<prefix>surfing</prefix>
Expand Down
18 changes: 18 additions & 0 deletions Tests/Data/PhaseField/surfing/surfing_restart.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<OpenGeoSysProjectDiff base_file="surfing.prj">
<!-- Replace the mesh file -->
<replace sel="/*/meshes/mesh[1]/text()">surfing_ts_10_t_0.500000.vtu</replace>
<!-- Modify the displacement0 parameter -->
<replace sel="/*/parameters/parameter[name='displacement0']/type/text()">MeshNode</replace>
<remove sel="/*/parameters/parameter[name='displacement0']/values"/>
<add sel="/*/parameters/parameter[name='displacement0']">
<field_name>displacement</field_name>
</add>
<!-- Modify the phasefield_ic parameter -->
<replace sel="/*/parameters/parameter[name='phasefield_ic']/field_name/text()">phasefield</replace>
<!-- Modify the t_initial times:0 to 0.5 -->
<replace sel="/*/time_loop/processes/process[1]/time_stepping/t_initial/text()">0.5</replace>
<replace sel="/*/time_loop/processes/process[2]/time_stepping/t_initial/text()">0.5</replace>
<!-- Modify the output prefix -->
<replace sel="/*/time_loop/output/prefix/text()">surfing_restart</replace>
</OpenGeoSysProjectDiff>
34 changes: 34 additions & 0 deletions Tests/Data/PhaseField/surfing/surfing_ts_10_t_0.500000.vtu

Large diffs are not rendered by default.

0 comments on commit 13e9f47

Please sign in to comment.