Commit 4d40babd authored by Alexander Jaust's avatar Alexander Jaust
Browse files

Merge branch 'feature/update-to-preCICE-2.0' into 'develop'

Update to preCICE v2

See merge request !7
parents 52cfd681 fc3e05cd
Pipeline #9686 failed with stages
in 10 minutes and 55 seconds
#image: dumux-precice:3.3git-iterative-pr-2.2.0
image: dumux-precice:3.3git-iterative-pr-1.6.1
#image: dumux-precice:3.1-1.6.1
image: dumux-precice:3.3git-iterative-pr-2.2.0
stages:
- check
......@@ -50,7 +50,7 @@ build-iterative-coupling:3.3git-iterative-pr-1.6.1:
# <<: *build-iterative-coupling
build-iterative-coupling:3.3-1.6.1:
image: ub2004-dumux-precice:3.3-1.6.1
image: ub2004-dumux-precice:3.3-2.2.1
<<: *build-iterative-coupling
build-iterative-coupling:master-1.6.1:
......@@ -90,7 +90,7 @@ build-monolithic-coupling:3.3git-iterative-pr-1.6.1:
# <<: *build-monolithic-coupling
build-monolithic-coupling:3.3-1.6.1:
image: ub2004-dumux-precice:3.3-1.6.1
image: ub2004-dumux-precice:3.3-2.2.1
<<: *build-monolithic-coupling
build-monolithic-coupling:3.3git-iterative-pr-1.6.1:
......@@ -116,8 +116,8 @@ build-monolithic-coupling:master-1.6.1:
paths:
- build-cmake/appl/coupling-ff-pm/fvca-iterative/Testing/Temporary/LastTest.log
- build-cmake/appl/coupling-ff-pm/fvca-iterative/Testing/Temporary/LastTestsFailed.log
- "./build-cmake/appl/coupling-ff-pm/fvca-iterative/*.log"
- "./build-cmake/appl/coupling-ff-pm/fvca-iterative/*.txt"
- build-cmake/appl/coupling-ff-pm/fvca-iterative/*.log
- build-cmake/appl/coupling-ff-pm/fvca-iterative/*.txt
# needs:
# - build-iterative-coupling
......@@ -136,7 +136,7 @@ test-iterative-coupling:3.3git-iterative-pr-1.6.1:
# - build-iterative-coupling:3.3-1.6.1
test-iterative-coupling:3.3-1.6.1:
image: ub2004-dumux-precice:3.3-1.6.1
image: ub2004-dumux-precice:3.3-2.2.1
<<: *test-iterative-coupling
needs:
- build-iterative-coupling:3.3-1.6.1
......@@ -170,7 +170,7 @@ test-monolithic-coupling:3.3git-iterative-pr-1.6.1:
# - build-monolithic-coupling:3.3-1.6.1
test-monolithic-coupling:3.3-1.6.1:
image: ub2004-dumux-precice:3.3-1.6.1
image: ub2004-dumux-precice:3.3-2.2.1
<<: *test-monolithic-coupling
needs:
- build-monolithic-coupling:3.3-1.6.1
......@@ -206,7 +206,7 @@ build-monolithic-flow-over-step-2d:3.3git-iterative-pr-1.6.1:
# <<: *build-monolithic-flow-over-step-2d
build-monolithic-flow-over-step-2d:3.3-1.6.1:
image: ub2004-dumux-precice:3.3-1.6.1
image: ub2004-dumux-precice:3.3-2.2.1
<<: *build-monolithic-flow-over-step-2d
build-monolithic-flow-over-step-2d:master-1.6.1:
......@@ -241,7 +241,7 @@ test-monolithic-flow-over-step-2d:3.3git-iterative-pr-1.6.1:
# - build-monolithic-flow-over-step-2d:3.3-1.6.1
test-monolithic-flow-over-step-2d:3.3-1.6.1:
image: ub2004-dumux-precice:3.3-1.6.1
image: ub2004-dumux-precice:3.3-2.2.1
<<: *test-monolithic-flow-over-step-2d
needs:
- build-monolithic-flow-over-step-2d:3.3-1.6.1
......@@ -277,7 +277,7 @@ build-monolithic-ff-pm-3d:3.3git-iterative-pr-1.6.1:
# <<: *build-monolithic-ff-pm-3d
build-monolithic-ff-pm-3d:3.3-1.6.1:
image: ub2004-dumux-precice:3.3-1.6.1
image: ub2004-dumux-precice:3.3-2.2.1
<<: *build-monolithic-ff-pm-3d
build-monolithic-ff-pm-3d:master-1.6.1:
......@@ -316,7 +316,7 @@ test-monolithic-ff-pm-3d:3.3git-iterative-pr-1.6.1:
# - build-monolithic-ff-pm-3d:3.3-1.6.1
test-monolithic-ff-pm-3d:3.3-1.6.1:
image: ub2004-dumux-precice:3.3-1.6.1
image: ub2004-dumux-precice:3.3-2.2.1
<<: *test-monolithic-ff-pm-3d
needs:
- build-monolithic-ff-pm-3d:3.3-1.6.1
......
......@@ -5,8 +5,7 @@ This repository provides a DuMuX specific adapter to couple to other codes using
- DuMuX **newer** than 3.2
- Some of
- preCICE 1.6.X
- We are working on supporting newer versions of preCICE at the moment.
- preCICE >=2.0.0
## Running partitioned coupling
......
#! /usr/bin/env bash
rm -rf "precice-run/"
rm -f "${ff_solver}.log" "${pm_solver}.log"
rm -f precice-*.log
rm -f precice-*.json
rm -f *.vtu *.pvd *.log
\ No newline at end of file
......@@ -322,16 +322,16 @@ try {
setInterfaceVelocities<FluxVariables>(*darcyProblem,
*darcyGridVariables, sol);
// For testing
{
const auto v = couplingInterface.getQuantityVector(velocityId);
std::cout << "velocities to be sent to ff" << std::endl;
for (size_t i = 0; i < v.size(); ++i) {
for (size_t d = 0; d < dim; ++d) {
std::cout << coords[i * dim + d] << " ";
}
std::cout << "| v[" << i << "]=" << v[i] << std::endl;
}
}
// {
// const auto v = couplingInterface.getQuantityVector(velocityId);
// std::cout << "velocities to be sent to ff" << std::endl;
// for (size_t i = 0; i < v.size(); ++i) {
// for (size_t d = 0; d < dim; ++d) {
// std::cout << coords[i * dim + d] << " ";
// }
// std::cout << "| v[" << i << "]=" << v[i] << std::endl;
// }
// }
couplingInterface.writeScalarQuantityToOtherSolver(velocityId);
couplingInterface.announceInitialDataWritten();
}
......
......@@ -195,9 +195,11 @@ class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
values = initial(element);
const auto faceId = scvf.index();
if (couplingInterface_.isCoupledEntity(faceId))
if (couplingInterface_.isCoupledEntity(faceId)) {
values =
couplingInterface_.getScalarQuantityOnFace(pressureId_, faceId);
//std::cout << "Pressure on face " << faceId << " is " << couplingInterface_.getScalarQuantityOnFace(pressureId_, faceId) << std::endl;
}
return values;
}
......
......@@ -2,9 +2,9 @@
<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" />
</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" />
</log>
<solver-interface dimensions="2">
......@@ -28,52 +28,51 @@
<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"/>
<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">
<use-mesh name="DarcyMesh" provide="yes"/>
<read-data name="Pressure" mesh="DarcyMesh"/>
<write-data name="Velocity" mesh="DarcyMesh"/>
</participant>
<m2n:sockets from="FreeFlow" to="Darcy" distribution-type="gather-scatter" network="lo" />
<m2n:sockets from="FreeFlow" to="Darcy" network="lo" />
<coupling-scheme:parallel-implicit>
<max-time value="1"/>
<timestep-length value="1" />
<time-window-size value="1" />
<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="1.0e-2" data="Velocity" mesh="FreeFlowMesh"/>
-->
<relative-convergence-measure limit="1e-6" data="Pressure" mesh="DarcyMesh"/>
<relative-convergence-measure limit="1e-6" data="Velocity" mesh="DarcyMesh"/>
<!--
<absolute-convergence-measure limit="1e-13" data="Pressure" mesh="DarcyMesh"/>
<absolute-convergence-measure limit="1e-13" data="Velocity" mesh="DarcyMesh"/>
-->
<extrapolation-order value="0"/>
<extrapolation-order value="0"/>
<post-processing:IQN-ILS>
<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Pressure" />
<data mesh="DarcyMesh" name="Velocity" />
<preconditioner type="residual-sum"/>
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<timesteps-reused value="10" />
<time-windows-reused value="0" />
<filter type="QR2" limit="1e-3" />
</post-processing:IQN-ILS>
</acceleration:IQN-ILS>
</coupling-scheme:parallel-implicit>
</solver-interface>
</precice-configuration>
......
......@@ -2,9 +2,9 @@
<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" />
</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" />
</log>
<solver-interface dimensions="2">
......@@ -28,51 +28,51 @@
<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"/>
<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">
<use-mesh name="DarcyMesh" provide="yes"/>
<read-data name="Pressure" mesh="DarcyMesh"/>
<write-data name="Velocity" mesh="DarcyMesh"/>
</participant>
<m2n:sockets from="FreeFlow" to="Darcy" distribution-type="gather-scatter" network="lo" />
<m2n:sockets from="FreeFlow" to="Darcy" network="lo" />
<coupling-scheme:serial-implicit>
<max-time value="1"/>
<timestep-length value="1" />
<time-window-size value="1" />
<max-iterations value="100"/>
<participants first="Darcy" second="FreeFlow"/>
<exchange data="Pressure" mesh="DarcyMesh" from="FreeFlow" to="Darcy" initialize="true" />
<exchange data="Velocity" mesh="DarcyMesh" from="Darcy" to="FreeFlow" initialize="false" />
<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"/>
-->
<extrapolation-order value="0"/>
<post-processing:IQN-ILS>
<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Pressure" />
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<timesteps-reused value="10" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</post-processing:IQN-ILS>
</acceleration:IQN-ILS>
</coupling-scheme:serial-implicit>
</solver-interface>
</precice-configuration>
......
......@@ -2,9 +2,9 @@
<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" />
</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" />
</log>
<solver-interface dimensions="2">
......@@ -28,51 +28,51 @@
<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"/>
<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">
<use-mesh name="DarcyMesh" provide="yes"/>
<read-data name="Pressure" mesh="DarcyMesh"/>
<write-data name="Velocity" mesh="DarcyMesh"/>
</participant>
<m2n:sockets from="FreeFlow" to="Darcy" distribution-type="gather-scatter" network="lo" />
<m2n:sockets from="FreeFlow" to="Darcy" network="lo" />
<coupling-scheme:serial-implicit>
<max-time value="1"/>
<timestep-length value="1" />
<time-window-size value="1" />
<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="1.0e-2" data="Velocity" mesh="FreeFlowMesh"/>
-->
<extrapolation-order value="0"/>
<post-processing:IQN-ILS>
<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Velocity" />
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<timesteps-reused value="10" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</post-processing:IQN-ILS>
</acceleration:IQN-ILS>
</coupling-scheme:serial-implicit>
</solver-interface>
</precice-configuration>
......
......@@ -32,9 +32,9 @@ void PreciceAdapter::announceSolver(const std::string &name,
const int size)
{
assert(precice_ == nullptr);
precice_ = std::make_unique<precice::SolverInterface>(name, rank, size);
precice_ = std::make_unique<precice::SolverInterface>(
name, configurationFileName, rank, size);
wasCreated_ = true;
precice_->configure(configurationFileName);
}
size_t PreciceAdapter::announceQuantity(const std::string &name)
......@@ -272,7 +272,7 @@ bool PreciceAdapter::checkIfActionIsRequired(const std::string &condition)
void PreciceAdapter::actionIsFulfilled(const std::string &condition)
{
assert(wasCreated_);
precice_->fulfilledAction(condition);
precice_->markActionFulfilled(condition);
}
void PreciceAdapter::readBlockScalarDataFromPrecice(const int dataID,
......@@ -303,7 +303,7 @@ bool PreciceAdapter::hasToWriteInitialData()
void PreciceAdapter::announceInitialDataWritten()
{
assert(wasCreated_);
precice_->fulfilledAction(precice::constants::actionWriteInitialData());
precice_->markActionFulfilled(precice::constants::actionWriteInitialData());
}
bool PreciceAdapter::hasToReadIterationCheckpoint()
......
......@@ -40,12 +40,12 @@
<write-data name="Velocity" mesh="DarcyMesh"/>
</participant>
<m2n:sockets from="FreeFlow" to="Darcy" distribution-type="gather-scatter" network="lo" />
<m2n:sockets from="FreeFlow" to="Darcy" network="lo" />
<coupling-scheme:parallel-implicit>
<max-time value="1"/>
<timestep-length value="1" />
<time-window-size value="1" />
<max-iterations value="100"/>
......@@ -67,15 +67,15 @@
<extrapolation-order value="0"/>
<post-processing:IQN-ILS>
<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Pressure" />
<data mesh="DarcyMesh" name="Velocity" />
<preconditioner type="residual-sum"/>
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<timesteps-reused value="10" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</post-processing:IQN-ILS>
</acceleration:IQN-ILS>
</coupling-scheme:parallel-implicit>
......
......@@ -40,12 +40,12 @@
<write-data name="Velocity" mesh="DarcyMesh"/>
</participant>
<m2n:sockets from="FreeFlow" to="Darcy" distribution-type="gather-scatter" network="lo" />
<m2n:sockets from="FreeFlow" to="Darcy" network="lo" />
<coupling-scheme:serial-implicit>
<max-time value="1"/>
<timestep-length value="1" />
<time-window-size value="1" />
<max-iterations value="100"/>
......@@ -67,14 +67,14 @@
<extrapolation-order value="0"/>
<post-processing:IQN-ILS>
<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Velocity" />
<preconditioner type="residual-sum"/>
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<timesteps-reused value="10" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</post-processing:IQN-ILS>
</acceleration:IQN-ILS>
</coupling-scheme:serial-implicit>
......
......@@ -40,12 +40,12 @@
<write-data name="Velocity" mesh="DarcyMesh"/>
</participant>
<m2n:sockets from="FreeFlow" to="Darcy" distribution-type="gather-scatter" network="lo" />
<m2n:sockets from="FreeFlow" to="Darcy" network="lo" />
<coupling-scheme:serial-implicit>
<max-time value="1"/>
<timestep-length value="1" />
<time-window-size value="1" />
<max-iterations value="100"/>
......@@ -67,14 +67,14 @@
<extrapolation-order value="0"/>
<post-processing:IQN-ILS>
<acceleration:IQN-ILS>
<data mesh="DarcyMesh" name="Pressure" />
<preconditioner type="residual-sum"/>
<initial-relaxation value="0.1" />
<max-used-iterations value="40" />
<timesteps-reused value="10" />
<time-windows-reused value="10" />
<filter type="QR2" limit="1e-3" />
</post-processing:IQN-ILS>
</acceleration:IQN-ILS>
</coupling-scheme:serial-implicit>
......
Timesteps Total_Iterations Iterations Convergence avgConvRate(0) avgConvRate(1) avgConvRate(2) avgConvRate(3) deleted_Columns
1 5 5 1 0.0364956513966455 0.0530132049208886 0.0365565658952239 0.0530009039678227 0
\ No newline at end of file
TimeWindow TotalIterations Iterations Convergence QNColumns DeletedQNColumns DroppedQNColumns
1 5 5 1 4 0 0
\ No newline at end of file
Timesteps Total_Iterations Iterations Convergence
TimeWindow TotalIterations Iterations Convergence
1 5 5 1
\ No newline at end of file
Timesteps Total_Iterations Iterations Convergence
1 5 5 1
\ No newline at end of file
Timesteps Total_Iterations Iterations Convergence avgConvRate(0) avgConvRate(1) avgConvRate(2) avgConvRate(3) deleted_Columns
1 10 10 1 0.1841789403799067 0.0000000000000000 0.1843325818410788 inf 1
\ No newline at end of file
TimeWindow TotalIterations Iterations Convergence avgConvRate(0) avgConvRate(1) avgConvRate(2) avgConvRate(3) deleted_Columns
1 10 10 1 0.1841789403799067 0.0000000000000000 0.1843325818410788 inf 1
\ No newline at end of file
Timesteps Total_Iterations Iterations Convergence
TimeWindow TotalIterations Iterations Convergence
1 10 10 1
\ No newline at end of file
Timesteps Total_Iterations Iterations Convergence
1 10 10 1
\ No newline at end of file
Timesteps Total_Iterations Iterations Convergence
TimeWindow TotalIterations Iterations Convergence
1 6 6 1
\ No newline at end of file
Timesteps Total_Iterations Iterations Convergence avgConvRate(0) avgConvRate(1) avgConvRate(2) avgConvRate(3) deleted_Columns
1 6 6 1 0.0381780618831926 0.0000000000000000 0.0382311566559945 inf 0
\ No newline at end of file
TimeWindow TotalIterations Iterations Convergence QNColumns DeletedQNColumns DroppedQNColumns
1 6 6 1 5 0 0
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment