Skip to content

Commit

Permalink
Remove XML tag solver-interface (precice#1662)
Browse files Browse the repository at this point in the history
Merge Configuration and SolverInterfaceConfiguration classes
Remove SolverInterfaceConfiguration files
Remove solver-interface tag from all XML files
Update formatter to version 3 and reformat everything

Co-authored-by: Frédéric Simonis <simonisfrederic@gmail.com>
  • Loading branch information
MakisH and fsimonis authored May 17, 2023
1 parent d6fd9cc commit 590865f
Show file tree
Hide file tree
Showing 193 changed files with 6,887 additions and 7,573 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
- id: end-of-file-fixer
# Custom repo for the preCICE configuration formatter
- repo: https://github.com/precice/precice-pre-commit-hooks
rev: 'v2.1'
rev: 'v3.1'
hooks:
- id: format-precice-config
- repo: https://github.com/codespell-project/codespell
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/1662.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Removed the XML configuration tag `<solver-interface>` and moved all attributes to the parent `<precice-configuration>` tag.
86 changes: 42 additions & 44 deletions examples/solverdummies/precice-config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>
<precice-configuration dimensions="3">
<log>
<sink
type="stream"
Expand All @@ -9,53 +9,51 @@
enabled="true" />
</log>

<solver-interface dimensions="3">
<data:vector name="Data-One" />
<data:vector name="Data-Two" />
<data:vector name="Data-One" />
<data:vector name="Data-Two" />

<mesh name="SolverOne-Mesh">
<use-data name="Data-One" />
<use-data name="Data-Two" />
</mesh>
<mesh name="SolverOne-Mesh">
<use-data name="Data-One" />
<use-data name="Data-Two" />
</mesh>

<mesh name="SolverTwo-Mesh">
<use-data name="Data-One" />
<use-data name="Data-Two" />
</mesh>
<mesh name="SolverTwo-Mesh">
<use-data name="Data-One" />
<use-data name="Data-Two" />
</mesh>

<participant name="SolverOne">
<provide-mesh name="SolverOne-Mesh" />
<write-data name="Data-One" mesh="SolverOne-Mesh" />
<read-data name="Data-Two" mesh="SolverOne-Mesh" />
</participant>
<participant name="SolverOne">
<provide-mesh name="SolverOne-Mesh" />
<write-data name="Data-One" mesh="SolverOne-Mesh" />
<read-data name="Data-Two" mesh="SolverOne-Mesh" />
</participant>

<participant name="SolverTwo">
<receive-mesh name="SolverOne-Mesh" from="SolverOne" />
<provide-mesh name="SolverTwo-Mesh" />
<mapping:nearest-neighbor
direction="write"
from="SolverTwo-Mesh"
to="SolverOne-Mesh"
constraint="conservative" />
<mapping:nearest-neighbor
direction="read"
from="SolverOne-Mesh"
to="SolverTwo-Mesh"
constraint="consistent" />
<write-data name="Data-Two" mesh="SolverTwo-Mesh" />
<read-data name="Data-One" mesh="SolverTwo-Mesh" />
</participant>
<participant name="SolverTwo">
<receive-mesh name="SolverOne-Mesh" from="SolverOne" />
<provide-mesh name="SolverTwo-Mesh" />
<mapping:nearest-neighbor
direction="write"
from="SolverTwo-Mesh"
to="SolverOne-Mesh"
constraint="conservative" />
<mapping:nearest-neighbor
direction="read"
from="SolverOne-Mesh"
to="SolverTwo-Mesh"
constraint="consistent" />
<write-data name="Data-Two" mesh="SolverTwo-Mesh" />
<read-data name="Data-One" mesh="SolverTwo-Mesh" />
</participant>

<m2n:sockets from="SolverOne" to="SolverTwo" />
<m2n:sockets from="SolverOne" to="SolverTwo" />

<coupling-scheme:serial-implicit>
<participants first="SolverOne" second="SolverTwo" />
<max-time-windows value="2" />
<time-window-size value="1.0" />
<max-iterations value="2" />
<min-iteration-convergence-measure min-iterations="5" data="Data-One" mesh="SolverOne-Mesh" />
<exchange data="Data-One" mesh="SolverOne-Mesh" from="SolverOne" to="SolverTwo" />
<exchange data="Data-Two" mesh="SolverOne-Mesh" from="SolverTwo" to="SolverOne" />
</coupling-scheme:serial-implicit>
</solver-interface>
<coupling-scheme:serial-implicit>
<participants first="SolverOne" second="SolverTwo" />
<max-time-windows value="2" />
<time-window-size value="1.0" />
<max-iterations value="2" />
<min-iteration-convergence-measure min-iterations="5" data="Data-One" mesh="SolverOne-Mesh" />
<exchange data="Data-One" mesh="SolverOne-Mesh" from="SolverOne" to="SolverTwo" />
<exchange data="Data-Two" mesh="SolverOne-Mesh" from="SolverTwo" to="SolverOne" />
</coupling-scheme:serial-implicit>
</precice-configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<source-data name="SourceData1" />
<source-data name="SourceData2" />
<source-data name="SourceData3" />

<target-data name="TargetData" />
</action:summation>
</configuration>
8 changes: 0 additions & 8 deletions src/cplscheme/tests/explicit-coupling-scheme-1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,21 @@

<participant name="Participant0">
<provide-mesh name="Mesh" />

<write-data name="Data0" mesh="Mesh" />

<read-data name="Data1" mesh="Mesh" />
</participant>

<participant name="Participant1">
<provide-mesh name="Mesh" />

<write-data name="Data1" mesh="Mesh" />

<read-data name="Data0" mesh="Mesh" />
</participant>

<coupling-scheme:serial-explicit>
<participants first="Participant0" second="Participant1" />

<time-window-size value="0.1" method="fixed" />

<max-time value="1.0" />

<max-time-windows value="10" />

<exchange data="Data0" mesh="Mesh" from="Participant0" to="Participant1" />
<exchange data="Data1" mesh="Mesh" from="Participant1" to="Participant0" />
</coupling-scheme:serial-explicit>
Expand Down
7 changes: 0 additions & 7 deletions src/cplscheme/tests/explicit-coupling-scheme-2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,20 @@

<participant name="Participant0">
<provide-mesh name="Mesh" />

<write-data name="Data0" mesh="Mesh" />

<read-data name="Data1" mesh="Mesh" />
</participant>

<participant name="Participant1">
<provide-mesh name="Mesh" />

<write-data name="Data1" mesh="Mesh" />

<read-data name="Data0" mesh="Mesh" />
</participant>

<coupling-scheme:serial-explicit>
<participants first="Participant0" second="Participant1" />

<time-window-size method="first-participant" />

<max-time value="1.0" />

<exchange data="Data0" mesh="Mesh" from="Participant0" to="Participant1" />
<exchange data="Data1" mesh="Mesh" from="Participant1" to="Participant0" />
</coupling-scheme:serial-explicit>
Expand Down
14 changes: 0 additions & 14 deletions src/cplscheme/tests/multi-solver-coupling-1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,20 @@

<participant name="Participant0">
<provide-mesh name="Mesh" />

<write-data name="Data0" mesh="Mesh" />

<read-data name="Data1" mesh="Mesh" />
</participant>

<participant name="Participant1">
<provide-mesh name="Mesh" />

<write-data name="Data1" mesh="Mesh" />

<read-data name="Data0" mesh="Mesh" />
<read-data name="Data2" mesh="Mesh" />
</participant>

<participant name="Participant2">
<provide-mesh name="Mesh" />

<write-data name="Data2" mesh="Mesh" />

<read-data name="Data1" mesh="Mesh" />
</participant>

Expand All @@ -40,26 +34,18 @@

<coupling-scheme:serial-explicit>
<participants first="Participant0" second="Participant1" />

<time-window-size value="0.1" method="fixed" />

<max-time value="1.0" />

<max-time-windows value="10" />

<exchange data="Data0" mesh="Mesh" from="Participant0" to="Participant1" />
<exchange data="Data1" mesh="Mesh" from="Participant1" to="Participant0" />
</coupling-scheme:serial-explicit>

<coupling-scheme:serial-explicit>
<participants first="Participant1" second="Participant2" />

<time-window-size value="0.1" method="fixed" />

<max-time value="1.0" />

<max-time-windows value="10" />

<exchange data="Data1" mesh="Mesh" from="Participant1" to="Participant2" />
<exchange data="Data2" mesh="Mesh" from="Participant2" to="Participant1" />
</coupling-scheme:serial-explicit>
Expand Down
18 changes: 0 additions & 18 deletions src/cplscheme/tests/multi-solver-coupling-2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,20 @@

<participant name="Participant0">
<provide-mesh name="Mesh" />

<write-data name="Data0" mesh="Mesh" />

<read-data name="Data1" mesh="Mesh" />
</participant>

<participant name="Participant1">
<provide-mesh name="Mesh" />

<write-data name="Data1" mesh="Mesh" />

<read-data name="Data0" mesh="Mesh" />
<read-data name="Data2" mesh="Mesh" />
</participant>

<participant name="Participant2">
<provide-mesh name="Mesh" />

<write-data name="Data2" mesh="Mesh" />

<read-data name="Data1" mesh="Mesh" />
</participant>

Expand All @@ -40,34 +34,22 @@

<coupling-scheme:serial-implicit>
<participants first="Participant0" second="Participant1" />

<time-window-size value="0.1" method="fixed" />

<max-time value="1.0" />

<max-time-windows value="10" />

<max-iterations value="10" />

<min-iteration-convergence-measure min-iterations="3" data="Data1" mesh="Mesh" />

<exchange data="Data0" mesh="Mesh" from="Participant0" to="Participant1" />
<exchange data="Data1" mesh="Mesh" from="Participant1" to="Participant0" />
</coupling-scheme:serial-implicit>

<coupling-scheme:serial-implicit>
<participants first="Participant1" second="Participant2" />

<time-window-size value="0.1" method="fixed" />

<max-time value="1.0" />

<max-time-windows value="10" />

<max-iterations value="10" />

<min-iteration-convergence-measure min-iterations="3" data="Data2" mesh="Mesh" />

<exchange data="Data1" mesh="Mesh" from="Participant1" to="Participant2" />
<exchange data="Data2" mesh="Mesh" from="Participant2" to="Participant1" />
</coupling-scheme:serial-implicit>
Expand Down
16 changes: 0 additions & 16 deletions src/cplscheme/tests/multi-solver-coupling-3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,20 @@

<participant name="Participant0">
<provide-mesh name="Mesh" />

<write-data name="Data0" mesh="Mesh" />

<read-data name="Data1" mesh="Mesh" />
</participant>

<participant name="Participant1">
<provide-mesh name="Mesh" />

<write-data name="Data1" mesh="Mesh" />

<read-data name="Data0" mesh="Mesh" />
<read-data name="Data2" mesh="Mesh" />
</participant>

<participant name="Participant2">
<provide-mesh name="Mesh" />

<write-data name="Data2" mesh="Mesh" />

<read-data name="Data1" mesh="Mesh" />
</participant>

Expand All @@ -40,30 +34,20 @@

<coupling-scheme:serial-implicit>
<participants first="Participant0" second="Participant1" />

<time-window-size value="0.1" method="fixed" />

<max-time value="1.0" />

<max-time-windows value="10" />

<max-iterations value="10" />

<min-iteration-convergence-measure min-iterations="3" data="Data1" mesh="Mesh" />

<exchange data="Data0" mesh="Mesh" from="Participant0" to="Participant1" />
<exchange data="Data1" mesh="Mesh" from="Participant1" to="Participant0" />
</coupling-scheme:serial-implicit>

<coupling-scheme:serial-explicit>
<participants first="Participant1" second="Participant2" />

<time-window-size value="0.1" method="fixed" />

<max-time value="1.0" />

<max-time-windows value="10" />

<exchange data="Data1" mesh="Mesh" from="Participant1" to="Participant2" />
<exchange data="Data2" mesh="Mesh" from="Participant2" to="Participant1" />
</coupling-scheme:serial-explicit>
Expand Down
Loading

0 comments on commit 590865f

Please sign in to comment.