diff --git a/appl/coupling-ff-pm/iterative/main_ff.cc b/appl/coupling-ff-pm/iterative/main_ff.cc index 30e58b7ebec75d4df75266f6f3a0e295bb30f8cf..7a86f385580f62cccbb3a5ae954ffd839f280fdf 100644 --- a/appl/coupling-ff-pm/iterative/main_ff.cc +++ b/appl/coupling-ff-pm/iterative/main_ff.cc @@ -88,7 +88,7 @@ void setInterfaceVelocities(const Problem& problem, { //TODO: What to do here? const auto v = velocityAtInterface(elemFaceVars, scvf)[scvf.directionIndex()]; - couplingInterface.writeQuantityOnFace( velocityId, scvf.index(), v ); + couplingInterface.writeScalarQuantityOnFace( velocityId, scvf.index(), v ); } } } @@ -184,8 +184,8 @@ int main(int argc, char** argv) try const auto numberOfPoints = coords.size() / dim; const double preciceDt = couplingInterface.setMeshAndInitialize( "FreeFlowMesh", numberOfPoints, - coords, - coupledScvfIndices ); + coords); + couplingInterface.createIndexMapping( coupledScvfIndices ); const auto velocityId = couplingInterface.announceQuantity( "Velocity" ); const auto pressureId = couplingInterface.announceQuantity( "Pressure" ); @@ -211,7 +211,7 @@ int main(int argc, char** argv) try //TODO // couplingInterface.writeQuantityVector( pressureId ); setInterfaceVelocities( *freeFlowProblem, *freeFlowGridVariables, sol ); - couplingInterface.writeQuantityToOtherSolver( velocityId ); + couplingInterface.writeScalarQuantityToOtherSolver( velocityId ); couplingInterface.announceInitialDataWritten(); } couplingInterface.initializeData(); @@ -242,14 +242,14 @@ int main(int argc, char** argv) try } // TODO - couplingInterface.readQuantityFromOtherSolver( pressureId ); + couplingInterface.readScalarQuantityFromOtherSolver( pressureId ); // solve the non-linear system nonLinearSolver.solve(sol); // TODO setInterfaceVelocities( *freeFlowProblem, *freeFlowGridVariables, sol ); - couplingInterface.writeQuantityToOtherSolver( velocityId ); + couplingInterface.writeScalarQuantityToOtherSolver( velocityId ); const double preciceDt = couplingInterface.advance( dt ); dt = std::min( preciceDt, dt ); diff --git a/appl/coupling-ff-pm/iterative/main_pm.cc b/appl/coupling-ff-pm/iterative/main_pm.cc index f96b9e14a76e09e79be8a0e4e0b949508a513c7a..ef5952e9b1e95d8c9b4c92adceaf65ca65ddfc31 100644 --- a/appl/coupling-ff-pm/iterative/main_pm.cc +++ b/appl/coupling-ff-pm/iterative/main_pm.cc @@ -113,7 +113,7 @@ { //TODO: What to do here? const double p = pressureAtInterface(problem, element, fvGridGeometry, elemVolVars, scvf); - couplingInterface.writeQuantityOnFace( pressureId, scvf.index(), p ); + couplingInterface.writeScalarQuantityOnFace( pressureId, scvf.index(), p ); } } } @@ -204,8 +204,8 @@ int main(int argc, char** argv) try const auto numberOfPoints = coords.size() / dim; const double preciceDt = couplingInterface.setMeshAndInitialize( "DarcyMesh", numberOfPoints, - coords, - coupledScvfIndices ); + coords); + couplingInterface.createIndexMapping( coupledScvfIndices ); const auto velocityId = couplingInterface.announceQuantity( "Velocity" ); const auto pressureId = couplingInterface.announceQuantity( "Pressure" ); @@ -234,7 +234,7 @@ int main(int argc, char** argv) try //TODO //couplingInterface.writeQuantityVector(velocityId); setInterfacePressures( *darcyProblem, *darcyGridVariables, sol ); - couplingInterface.writeQuantityToOtherSolver( pressureId ); + couplingInterface.writeScalarQuantityToOtherSolver( pressureId ); couplingInterface.announceInitialDataWritten(); } couplingInterface.initializeData(); @@ -264,12 +264,12 @@ int main(int argc, char** argv) try } // TODO - couplingInterface.readQuantityFromOtherSolver( velocityId ); + couplingInterface.readScalarQuantityFromOtherSolver( velocityId ); // solve the non-linear system nonLinearSolver.solve(sol); setInterfacePressures( *darcyProblem, *darcyGridVariables, sol ); - couplingInterface.writeQuantityToOtherSolver( pressureId ); + couplingInterface.writeScalarQuantityToOtherSolver( pressureId ); const double preciceDt = couplingInterface.advance( dt ); dt = std::min( preciceDt, dt ); diff --git a/appl/coupling-ff-pm/monolithic/ffproblem.hh b/appl/coupling-ff-pm/monolithic/ffproblem.hh index 1642fac74c63a4a019bf7862006a721298205ae4..f1b4c4a86954e053b94bf40a213a9d0a308eed5d 100644 --- a/appl/coupling-ff-pm/monolithic/ffproblem.hh +++ b/appl/coupling-ff-pm/monolithic/ffproblem.hh @@ -254,7 +254,7 @@ public: { const Scalar density = 1000; // TODO how to handle compressible fluids? values[Indices::conti0EqIdx] = elemFaceVars[scvf].velocitySelf() * scvf.directionSign() * density; - values[Indices::momentumYBalanceIdx] = scvf.directionSign() * (couplingInterface_.getQuantityOnFace( pressureId_, faceId ) - initialAtPos(scvf.center())[Indices::pressureIdx]) ; + values[Indices::momentumYBalanceIdx] = scvf.directionSign() * (couplingInterface_.getScalarQuantityOnFace( pressureId_, faceId ) - initialAtPos(scvf.center())[Indices::pressureIdx]) ; } #endif diff --git a/appl/coupling-ff-pm/monolithic/pmproblem.hh b/appl/coupling-ff-pm/monolithic/pmproblem.hh index c097246c1ce447ffc947d83b31d4f967f66f0919..56a1a4b9a0897c32bb75b905ee2962d407463075 100644 --- a/appl/coupling-ff-pm/monolithic/pmproblem.hh +++ b/appl/coupling-ff-pm/monolithic/pmproblem.hh @@ -220,7 +220,7 @@ DarcySubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) if ( couplingInterface_.isCoupledEntity(faceId) ) { const Scalar density = 1000.; - values[Indices::conti0EqIdx] = density * couplingInterface_.getQuantityOnFace( velocityId_, faceId ); + values[Indices::conti0EqIdx] = density * couplingInterface_.getScalarQuantityOnFace( velocityId_, faceId ); } #endif return values; diff --git a/appl/precice-adapter b/appl/precice-adapter index e3831bc787ebf9dfae27c88a7c0492af1ec1391b..51f724ee6cef653c99e99d78fa54066864a714a2 160000 --- a/appl/precice-adapter +++ b/appl/precice-adapter @@ -1 +1 @@ -Subproject commit e3831bc787ebf9dfae27c88a7c0492af1ec1391b +Subproject commit 51f724ee6cef653c99e99d78fa54066864a714a2