Skip to content

Commit

Permalink
Format preCICE config files
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisH committed Apr 5, 2024
1 parent 6715925 commit 99d1cf2
Show file tree
Hide file tree
Showing 6 changed files with 240 additions and 236 deletions.
86 changes: 50 additions & 36 deletions examples/dummysolver/precice-dummy-solver-config.xml
Original file line number Diff line number Diff line change
@@ -1,66 +1,80 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>

<log>
<sink type="stream" output="stdout" filter= "%Severity% > debug" format="preCICE:%ColorizedSeverity% %Message%" enabled="true" />
<sink
type="stream"
output="stdout"
filter="%Severity% > debug"
format="preCICE:%ColorizedSeverity% %Message%"
enabled="true" />
</log>
<data:scalar name="scalarDataOne" />
<data:scalar name="scalarDataTwo" />

<data:vector name="vectorDataOne" />
<data:vector name="vectorDataTwo" />
<data:scalar name="scalarDataOne" />
<data:scalar name="scalarDataTwo" />
<data:vector name="vectorDataOne" />
<data:vector name="vectorDataTwo" />

<mesh name="MeshOne" dimensions="3">
<use-data name="scalarDataOne" />
<use-data name="scalarDataTwo" />

<use-data name="vectorDataOne" />
<use-data name="vectorDataTwo" />
</mesh>

<mesh name="MeshTwo" dimensions="3">
<use-data name="scalarDataOne" />
<use-data name="scalarDataTwo" />

<use-data name="vectorDataOne" />
<use-data name="vectorDataTwo" />
</mesh>

<participant name="SolverOne">
<provide-mesh name="MeshOne"/>

<provide-mesh name="MeshOne" />
<write-data name="scalarDataOne" mesh="MeshOne" />
<write-data name="vectorDataOne" mesh="MeshOne" />
<read-data name="scalarDataTwo" mesh="MeshOne" />
<read-data name="vectorDataTwo" mesh="MeshOne" />
<read-data name="scalarDataTwo" mesh="MeshOne" />
<read-data name="vectorDataTwo" mesh="MeshOne" />
</participant>

<participant name="SolverTwo">
<receive-mesh name="MeshOne" from="SolverOne"/>
<provide-mesh name="MeshTwo"/>

<mapping:nearest-neighbor direction="write" from="MeshTwo" to="MeshOne" constraint="conservative"/>
<mapping:nearest-neighbor direction="read" from="MeshOne" to="MeshTwo" constraint="consistent" />

<receive-mesh name="MeshOne" from="SolverOne" />
<provide-mesh name="MeshTwo" />
<mapping:nearest-neighbor
direction="write"
from="MeshTwo"
to="MeshOne"
constraint="conservative" />
<mapping:nearest-neighbor
direction="read"
from="MeshOne"
to="MeshTwo"
constraint="consistent" />
<write-data name="scalarDataTwo" mesh="MeshTwo" />
<write-data name="vectorDataTwo" mesh="MeshTwo" />
<read-data name="scalarDataOne" mesh="MeshTwo" />
<read-data name="vectorDataOne" mesh="MeshTwo" />
<read-data name="scalarDataOne" mesh="MeshTwo" />
<read-data name="vectorDataOne" mesh="MeshTwo" />
</participant>

<m2n:sockets acceptor="SolverOne" connector="SolverTwo" exchange-directory="."/>

<coupling-scheme:serial-implicit>
<participants first="SolverOne" second="SolverTwo" />
<max-time-windows value="2" />
<time-window-size value="1.0" />
<max-iterations value="2" />

<exchange data="scalarDataOne" mesh="MeshOne" from="SolverOne" to="SolverTwo" />
<exchange data="vectorDataOne" mesh="MeshOne" from="SolverOne" to="SolverTwo" />

<exchange data="scalarDataTwo" mesh="MeshOne" from="SolverTwo" to="SolverOne" initialize="yes"/>
<exchange data="vectorDataTwo" mesh="MeshOne" from="SolverTwo" to="SolverOne" initialize="yes"/>
</coupling-scheme:serial-implicit>
<m2n:sockets acceptor="SolverOne" connector="SolverTwo" exchange-directory="." />

<coupling-scheme:serial-implicit>
<participants first="SolverOne" second="SolverTwo" />
<max-time-windows value="2" />
<time-window-size value="1.0" />
<max-iterations value="2" />
<exchange data="scalarDataOne" mesh="MeshOne" from="SolverOne" to="SolverTwo" />
<exchange data="vectorDataOne" mesh="MeshOne" from="SolverOne" to="SolverTwo" />
<exchange
data="scalarDataTwo"
mesh="MeshOne"
from="SolverTwo"
to="SolverOne"
initialize="yes" />
<exchange
data="vectorDataTwo"
mesh="MeshOne"
from="SolverTwo"
to="SolverOne"
initialize="yes" />
</coupling-scheme:serial-implicit>
</precice-configuration>
45 changes: 28 additions & 17 deletions examples/dummysolver/test.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>

<log>
<sink type="stream" output="stdout" filter= "%Severity% > debug" format="preCICE:%ColorizedSeverity% %Message%" enabled="true" />
<sink
type="stream"
output="stdout"
filter="%Severity% > debug"
format="preCICE:%ColorizedSeverity% %Message%"
enabled="true" />
</log>

<data:vector name="dataOne" />
<data:vector name="dataTwo" />
<data:vector name="dataOne" />
<data:vector name="dataTwo" />

<mesh name="MeshOne" dimensions="3">
<use-data name="dataOne" />
Expand All @@ -20,29 +23,37 @@
</mesh>

<participant name="SolverOne">
<provide-mesh name="MeshOne"/>
<provide-mesh name="MeshOne" />
<write-data name="dataOne" mesh="MeshOne" />
<read-data name="dataTwo" mesh="MeshOne" />
<read-data name="dataTwo" mesh="MeshOne" />
</participant>

<participant name="SolverTwo">
<receive-mesh name="MeshOne" from="SolverOne"/>
<provide-mesh name="MeshTwo"/>
<mapping:nearest-neighbor direction="write" from="MeshTwo" to="MeshOne" constraint="conservative"/>
<mapping:nearest-neighbor direction="read" from="MeshOne" to="MeshTwo" constraint="consistent" />
<receive-mesh name="MeshOne" from="SolverOne" />
<provide-mesh name="MeshTwo" />
<mapping:nearest-neighbor
direction="write"
from="MeshTwo"
to="MeshOne"
constraint="conservative" />
<mapping:nearest-neighbor
direction="read"
from="MeshOne"
to="MeshTwo"
constraint="consistent" />
<write-data name="dataTwo" mesh="MeshTwo" />
<read-data name="dataOne" mesh="MeshTwo" />
<read-data name="dataOne" mesh="MeshTwo" />
</participant>

<m2n:sockets acceptor="SolverOne" connector="SolverTwo" exchange-directory=".."/>
<m2n:sockets acceptor="SolverOne" connector="SolverTwo" exchange-directory=".." />

<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="dataOne" mesh="MeshOne"/>
<min-iteration-convergence-measure min-iterations="5" data="dataOne" mesh="MeshOne" />
<exchange data="dataOne" mesh="MeshOne" from="SolverOne" to="SolverTwo" />
<exchange data="dataTwo" mesh="MeshOne" from="SolverTwo" to="SolverOne"/>
<exchange data="dataTwo" mesh="MeshOne" from="SolverTwo" to="SolverOne" />
</coupling-scheme:serial-implicit>
</precice-configuration>
82 changes: 39 additions & 43 deletions examples/ff-pm/flow-over-cube-3d/precice-config.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>
<log>
<sink type="stream" output="stdout" filter= "(%Severity% > debug) or (%Severity% >= trace and %Module% contains SolverInterfaceImpl)" enabled="false" />
<sink type="stream" output="stdout" enabled="false" />
<sink
type="stream"
output="stdout"
filter="(%Severity% > debug) or (%Severity% >= trace and %Module% contains SolverInterfaceImpl)"
enabled="false" />
<sink type="stream" output="stdout" enabled="false" />
</log>


<data:scalar name="Velocity"/>
<data:scalar name="Pressure"/>
<data:scalar name="Velocity" />
<data:scalar name="Pressure" />

<mesh name="FreeFlowMesh" dimensions="3">
<use-data name="Velocity" />
Expand All @@ -21,54 +23,48 @@
</mesh>

<participant name="FreeFlow">
<provide-mesh name="FreeFlowMesh"/>
<receive-mesh name="DarcyMesh" from="Darcy"/>

<read-data name="Velocity" mesh="FreeFlowMesh"/>
<write-data name="Pressure" mesh="FreeFlowMesh"/>

<mapping:nearest-neighbor direction="write" from="FreeFlowMesh" to="DarcyMesh" constraint="consistent"/>
<mapping:nearest-neighbor direction="read" from="DarcyMesh" to="FreeFlowMesh" constraint="consistent"/>
<provide-mesh name="FreeFlowMesh" />
<receive-mesh name="DarcyMesh" from="Darcy" />
<read-data name="Velocity" mesh="FreeFlowMesh" />
<write-data name="Pressure" mesh="FreeFlowMesh" />
<mapping:nearest-neighbor
direction="write"
from="FreeFlowMesh"
to="DarcyMesh"
constraint="consistent" />
<mapping:nearest-neighbor
direction="read"
from="DarcyMesh"
to="FreeFlowMesh"
constraint="consistent" />
</participant>

<participant name="Darcy">
<provide-mesh name="DarcyMesh"/>

<read-data name="Pressure" mesh="DarcyMesh"/>
<write-data name="Velocity" mesh="DarcyMesh"/>
<provide-mesh name="DarcyMesh" />
<read-data name="Pressure" mesh="DarcyMesh" />
<write-data name="Velocity" mesh="DarcyMesh" />
</participant>

<m2n:sockets acceptor="FreeFlow" connector="Darcy" network="lo" />


<coupling-scheme:serial-implicit>
<max-time value="1"/>
<max-time value="1" />
<time-window-size value="1" />
<max-iterations value="100"/>


<participants first="FreeFlow" second="Darcy"/>
<max-iterations value="100" />
<participants first="FreeFlow" second="Darcy" />
<exchange data="Pressure" mesh="DarcyMesh" from="FreeFlow" to="Darcy" initialize="false" />
<exchange data="Velocity" mesh="DarcyMesh" from="Darcy" to="FreeFlow" initialize="true" />

<relative-convergence-measure limit="1e-8" data="Pressure" mesh="DarcyMesh"/>
<relative-convergence-measure limit="1e-8" data="Velocity" mesh="DarcyMesh"/>


<!--
<relative-convergence-measure limit="1e-8" data="Pressure" mesh="DarcyMesh" />
<relative-convergence-measure limit="1e-8" data="Velocity" mesh="DarcyMesh" />
<!--
<relative-convergence-measure limit="1.0e-2" data="Velocity" mesh="FreeFlowMesh"/>
-->


<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Velocity" />
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</acceleration:IQN-ILS>


<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Velocity" />
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</acceleration:IQN-ILS>
</coupling-scheme:serial-implicit>
</precice-configuration>

Loading

0 comments on commit 99d1cf2

Please sign in to comment.