Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.6.0
rev: v3.21.2
hooks:
- id: pyupgrade
- repo: https://github.com/PyCQA/flake8
Expand Down
5 changes: 4 additions & 1 deletion tests/Stokes_may_sinker_stepxy/Stokes_may_sinker_stepxy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
<owner userid="rhodrid"/>
<tags>flml</tags>
<problem_definition length="short" nprocs="1">
<command_line>export PETSC_OPTIONS='-log_view'; fluidity -v2 -l Stokes-may-sinker-stepxy-fs.flml; mv fluidity.log-0 log_fs; fluidity -v2 -l Stokes-may-sinker-stepxy-mg.flml; mv fluidity.log-0 log_mg; fluidity -v2 -l Stokes-may-sinker-stepxy-sor.flml; mv fluidity.log-0 log_sor</command_line>
<command_line>export PETSC_OPTIONS='-log_view'; fluidity -v2 -l Stokes-may-sinker-stepxy-gamg.flml; mv fluidity.log-0 log_gamg; fluidity -v2 -l Stokes-may-sinker-stepxy-fs.flml; mv fluidity.log-0 log_fs; fluidity -v2 -l Stokes-may-sinker-stepxy-mg.flml; mv fluidity.log-0 log_mg; fluidity -v2 -l Stokes-may-sinker-stepxy-sor.flml; mv fluidity.log-0 log_sor</command_line>
</problem_definition>
<variables>
<variable name="solvers_converged" language="python">import os
files = os.listdir("./")
solvers_converged = not "matrixdump" in files and not "matrixdump.info" in files</variable>
<variable name="DeltaU_iterations_GAMG" language="python">from check_iterations import *
DeltaU_iterations_GAMG = check_velocity_iterations('log_gamg')</variable>
<variable name="DeltaU_iterations_FS" language="python">from check_iterations import *
DeltaU_iterations_FS = check_velocity_iterations('log_fs')</variable>
<variable name="DeltaU_iterations_MG" language="python">from check_iterations import *
Expand All @@ -19,6 +21,7 @@ DeltaU_iterations_SOR = check_velocity_iterations('log_sor')</variable>
</variables>
<pass_tests>
<test name="Solvers converged" language="python">assert(solvers_converged)</test>
<test name="GAMG solver behaving as expected" language="python">assert(DeltaU_iterations_GAMG &lt; 14)</test>
<test name="Fieldsplit solver behaving as expected" language="python">assert(DeltaU_iterations_FS &lt; 17)</test>
<test name="MG solver behaving as expected" language="python">assert(abs(DeltaU_iterations_MG - 251) &lt; 5)</test>
<test name="SOR solver behaving as expected" language="python">assert(abs(DeltaU_iterations_SOR - 599) &lt; 5)</test>
Expand Down
11 changes: 10 additions & 1 deletion tests/Stokes_may_solcx_stepx/Stokes_may_solcx_stepx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<tags>flml</tags>

<problem_definition length="short" nprocs="1">
<command_line>fluidity -v2 -l Stokes-may-solcx-stepx-fs.flml; mv fluidity.log-0 log_fs; fluidity -v2 -l Stokes-may-solcx-stepx-mg.flml; mv fluidity.log-0 log_mg; fluidity -v2 -l Stokes-may-solcx-stepx-sor.flml; mv fluidity.log-0 log_sor</command_line>
<command_line>fluidity -v2 -l Stokes-may-solcx-stepx-gamg.flml; mv fluidity.log-0 log_gamg; fluidity -v2 -l Stokes-may-solcx-stepx-fs.flml; mv fluidity.log-0 log_fs; fluidity -v2 -l Stokes-may-solcx-stepx-mg.flml; mv fluidity.log-0 log_mg; fluidity -v2 -l Stokes-may-solcx-stepx-sor.flml; mv fluidity.log-0 log_sor</command_line>
</problem_definition>

<variables>
Expand All @@ -16,6 +16,11 @@ files = os.listdir("./")
solvers_converged = not "matrixdump" in files and not "matrixdump.info" in files
</variable>

<variable name="DeltaU_iterations_GAMG" language="python">
from check_iterations import *
DeltaU_iterations_GAMG = check_velocity_iterations('log_gamg')
</variable>

<variable name="DeltaU_iterations_FS" language="python">
from check_iterations import *
DeltaU_iterations_FS = check_velocity_iterations('log_fs')
Expand All @@ -39,6 +44,10 @@ DeltaU_iterations_SOR = check_velocity_iterations('log_sor')
assert(solvers_converged)
</test>

<test name="GAMG solver behaving as expected" language="python">
assert(DeltaU_iterations_GAMG &lt; 20)
</test>

<test name="Fieldsplit solver behaving as expected" language="python">
assert(abs(DeltaU_iterations_FS - 11) &lt; 2)
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<owner userid="rhodrid"/>
<tags>flml</tags>
<problem_definition length="short" nprocs="1">
<command_line>fluidity -v2 -l Stokes-may-solky-exponential-fs.flml; mv fluidity.log-0 log_fs; fluidity -v2 -l Stokes-may-solky-exponential-mg.flml; mv fluidity.log-0 log_mg; fluidity -v2 -l Stokes-may-solky-exponential-sor.flml; mv fluidity.log-0 log_sor</command_line>
<command_line>fluidity -v2 -l Stokes-may-solky-exponential-gamg.flml; mv fluidity.log-0 log_gamg; fluidity -v2 -l Stokes-may-solky-exponential-fs.flml; mv fluidity.log-0 log_fs; fluidity -v2 -l Stokes-may-solky-exponential-mg.flml; mv fluidity.log-0 log_mg; fluidity -v2 -l Stokes-may-solky-exponential-sor.flml; mv fluidity.log-0 log_sor</command_line>
</problem_definition>

<variables>
Expand All @@ -15,6 +15,11 @@ files = os.listdir("./")
solvers_converged = not "matrixdump" in files and not "matrixdump.info" in files
</variable>

<variable name="DeltaU_iterations_GAMG" language="python">
from check_iterations import *
DeltaU_iterations_GAMG = check_velocity_iterations('log_gamg')
</variable>

<variable name="DeltaU_iterations_FS" language="python">
from check_iterations import *
DeltaU_iterations_FS = check_velocity_iterations('log_fs')
Expand All @@ -38,6 +43,10 @@ DeltaU_iterations_SOR = check_velocity_iterations('log_sor')
assert(solvers_converged)
</test>

<test name="GAMG solver behaving as expected" language="python">
assert(DeltaU_iterations_GAMG &lt; 20)
</test>

<test name="Fieldsplit solver behaving as expected" language="python">
assert(abs(DeltaU_iterations_FS - 8) &lt; 2)
</test>
Expand Down
Loading