diff --git a/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/main_pm-mono-flux.cc b/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/main_pm-mono-flux.cc index e383d41997c0315f83b291b979a97bc2edbf8284..fedf3db6e1ad961f23c8611d04bcce30bc21733d 100644 --- a/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/main_pm-mono-flux.cc +++ b/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/main_pm-mono-flux.cc @@ -28,7 +28,6 @@ #include <iostream> #include <string> -bool printstuff = false; #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> @@ -54,243 +53,10 @@ bool printstuff = false; #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -#include "pmproblem-reversed.hh" - -#include "../../precice-adapter/include/preciceadapter.hh" - +#include "pmproblem-mono-flux.hh" #include "monolithicdata.hh" - /*! - * \brief Returns the pressure at the interface using Darcy's law for reconstruction - */ - template<class Problem, class Element, class FVElementGeometry, class ElementVolumeVariables, class SubControlVolumeFace> - auto pressureAtInterface(const Problem& problem, - const Element& element, - const FVElementGeometry& fvGeometry, - const ElementVolumeVariables& elemVolVars, - const SubControlVolumeFace& scvf) - { - using Scalar = typename ElementVolumeVariables::VolumeVariables::PrimaryVariables::value_type; - const auto& volVars = elemVolVars[scvf.insideScvIdx()]; - - const Scalar boundaryFlux = problem.neumann(element, fvGeometry, elemVolVars, scvf); - - const auto K = volVars.permeability(); - const Scalar ccPressure = volVars.pressure(); - const Scalar mobility = volVars.mobility(); - const Scalar density = volVars.density(); - - // v = -K/mu * (gradP + rho*g) - auto velocity = scvf.unitOuterNormal(); - velocity *= boundaryFlux; // TODO check sign - velocity /= density; - - // v = -kr/mu*K * (gradP + rho*g) = -mobility*K * (gradP + rho*g) - const auto alpha = Dumux::vtmv( scvf.unitOuterNormal(), K, problem.gravity() ); - - auto distanceVector = scvf.center() - element.geometry().center(); - distanceVector /= distanceVector.two_norm2(); - const Scalar ti = Dumux::vtmv(distanceVector, K, scvf.unitOuterNormal()); - -// return (1/mobility * (scvf.unitOuterNormal() * velocity) + density * alpha)/ti -// + ccPressure; - - const Scalar p = problem.dirichlet( element, scvf ); - return p; - } - - template<class Problem, class GridVariables, class SolutionVector> - void setInterfacePressures(const Problem& problem, - const GridVariables& gridVars, - const SolutionVector& sol) - { - const auto& fvGridGeometry = problem.fvGridGeometry(); - auto fvGeometry = localView(fvGridGeometry); - auto elemVolVars = localView(gridVars.curGridVolVars()); - - auto& couplingInterface = precice_adapter::PreciceAdapter::getInstance(); - const auto pressureId = couplingInterface.getIdFromName( "Pressure" ); - - for (const auto& element : elements(fvGridGeometry.gridView())) - { - fvGeometry.bindElement(element); - elemVolVars.bindElement(element, fvGeometry, sol); - - //sstd::cout << "Pressure by reconstruction" << std::endl; - for (const auto& scvf : scvfs(fvGeometry)) - { - - if ( couplingInterface.isCoupledEntity( scvf.index() ) ) - { - //TODO: What to do here? - const double p = pressureAtInterface(problem, element, fvGridGeometry, elemVolVars, scvf); - couplingInterface.writeScalarQuantityOnFace( pressureId, scvf.index(), p ); - } - } - } - } - - /*! - * \brief Returns the velocity at the interface using Darcy's law for reconstruction - */ - template<class FluxVariables, class Problem, class Element, class FVElementGeometry, - class ElementVolumeVariables, class SubControlVolumeFace, - class ElementFluxVariablesCache> - auto velocityAtInterface(const Problem& problem, - const Element& element, - const FVElementGeometry& fvGeometry, - const ElementVolumeVariables& elemVolVars, - const SubControlVolumeFace& scvf, - const ElementFluxVariablesCache& elemFluxVarsCache) - { - const int phaseIdx = 0; - FluxVariables fluxVars; - fluxVars.init(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache); - auto upwindTerm = [phaseIdx](const auto& volVars) { return volVars.mobility(phaseIdx); }; - const auto scalarVelocity = fluxVars.advectiveFlux(phaseIdx, upwindTerm)/scvf.area(); - return scalarVelocity; - } - - template<class FluxVariables, class Problem, class GridVariables, class SolutionVector> - void setInterfaceVelocities(const Problem& problem, - const GridVariables& gridVars, - const SolutionVector& sol) - { - const auto& fvGridGeometry = problem.fvGridGeometry(); - auto fvGeometry = localView(fvGridGeometry); - auto elemVolVars = localView(gridVars.curGridVolVars()); - auto elemFluxVarsCache = localView(gridVars.gridFluxVarsCache()); - - auto& couplingInterface = precice_adapter::PreciceAdapter::getInstance(); - const auto velocityId = couplingInterface.getIdFromName( "Velocity" ); - - - size_t i = 0; - for (const auto& element : elements(fvGridGeometry.gridView())) - { - fvGeometry.bind(element); - elemVolVars.bind(element, fvGeometry, sol); - elemFluxVarsCache.bind(element, fvGeometry, elemVolVars); - - for (const auto& scvf : scvfs(fvGeometry)) - { - - if ( couplingInterface.isCoupledEntity( scvf.index() ) ) - { - //TODO: What to do here? - //const double v = velocityAtInterface<FluxVariables>(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache); - const double v = MonolithicSolution::velocity[i]; - ++i; - couplingInterface.writeScalarQuantityOnFace( velocityId, scvf.index(), v ); - } - } - } - - } - - - template<class FluxVariables, class Problem, class GridVariables, class SolutionVector> - std::tuple<double,double,double> writeVelocitiesOnInterfaceToFile( const std::string& filename, - const Problem& problem, - const GridVariables& gridVars, - const SolutionVector& sol) - { - const auto& fvGridGeometry = problem.fvGridGeometry(); - auto fvGeometry = localView(fvGridGeometry); - auto elemVolVars = localView(gridVars.curGridVolVars()); - auto elemFluxVarsCache = localView(gridVars.gridFluxVarsCache()); - - const auto& couplingInterface = precice_adapter::PreciceAdapter::getInstance(); - - std::ofstream ofs( filename+".csv", std::ofstream::out | std::ofstream::trunc); - ofs << "x,y,"; - if ( couplingInterface.getDimensions() == 3 ) - ofs << "z,"; - ofs << "velocityY" << "\n"; - - double min = std::numeric_limits<double>::max(); - double max = std::numeric_limits<double>::min(); - double sum = 0.; - for (const auto& element : elements(fvGridGeometry.gridView())) - { - fvGeometry.bind(element); - elemVolVars.bind(element, fvGeometry, sol); - elemFluxVarsCache.bind(element, fvGeometry, elemVolVars); - - for (const auto& scvf : scvfs(fvGeometry)) - { - - if ( couplingInterface.isCoupledEntity( scvf.index() ) ) - { - const auto& pos = scvf.center(); - for (int i = 0; i < couplingInterface.getDimensions(); ++i ) - { - ofs << pos[i] << ","; - } - const double v = velocityAtInterface<FluxVariables>(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache); - max = std::max( v, max ); - min = std::min( v, min ); - sum += v; - const int prec = ofs.precision(); - ofs << std::setprecision(std::numeric_limits<double>::digits10 + 1) << v << "\n"; - ofs.precision( prec ); - } - } - } - - ofs.close(); - return std::make_tuple(min, max, sum); - } - - - - template<class Problem, class GridVariables, class SolutionVector> - void writePressuresOnInterfaceToFile( const std::string& filename, - const Problem& problem, - const GridVariables& gridVars, - const SolutionVector& sol) - { - const auto& fvGridGeometry = problem.fvGridGeometry(); - auto fvGeometry = localView(fvGridGeometry); - auto elemVolVars = localView(gridVars.curGridVolVars()); - auto elemFluxVarsCache = localView(gridVars.gridFluxVarsCache()); - - const auto& couplingInterface = precice_adapter::PreciceAdapter::getInstance(); - - std::ofstream ofs( filename+".csv", std::ofstream::out | std::ofstream::trunc); - ofs << "x,y,"; - if ( couplingInterface.getDimensions() == 3 ) - ofs << "z,"; - ofs << "pressure" << "\n"; - for (const auto& element : elements(fvGridGeometry.gridView())) - { - fvGeometry.bind(element); - elemVolVars.bind(element, fvGeometry, sol); - elemFluxVarsCache.bind(element, fvGeometry, elemVolVars); - - for (const auto& scvf : scvfs(fvGeometry)) - { - - if ( couplingInterface.isCoupledEntity( scvf.index() ) ) - { - const auto& pos = scvf.center(); - for (int i = 0; i < couplingInterface.getDimensions(); ++i ) - { - ofs << pos[i] << ","; - } - const double p = pressureAtInterface(problem, element, fvGridGeometry, elemVolVars, scvf); - const int prec = ofs.precision(); - ofs << std::setprecision(std::numeric_limits<double>::digits10 + 1); - ofs << p << "\n"; - ofs.precision( prec ); - } - } - } - - ofs.close(); - } - int main(int argc, char** argv) try { @@ -327,68 +93,7 @@ int main(int argc, char** argv) try GetPropType<DarcyTypeTag, Properties::SolutionVector> sol; sol.resize(darcyFvGridGeometry->numDofs()); - // Initialize preCICE.Tell preCICE about: - // - Name of solver - // - What rank of how many ranks this instance is - // Configure preCICE. For now the config file is hardcoded. - //couplingInterface.createInstance( "darcy", mpiHelper.rank(), mpiHelper.size() ); - std::string preciceConfigFilename = "precice-config.xml"; -// if (argc == 3) -// preciceConfigFilename = argv[2]; - if (argc > 2) - preciceConfigFilename = argv[argc-1]; - - auto& couplingInterface = - precice_adapter::PreciceAdapter::getInstance(); - couplingInterface.announceSolver( "Darcy", preciceConfigFilename, - mpiHelper.rank(), mpiHelper.size() ); - - const int dim = couplingInterface.getDimensions(); - std::cout << dim << " " << int(DarcyFVGridGeometry::GridView::dimension) << std::endl; - if (dim != int(DarcyFVGridGeometry::GridView::dimension)) - DUNE_THROW(Dune::InvalidStateException, "Dimensions do not match"); - - // GET mesh corodinates - const double xMin = getParamFromGroup<std::vector<double>>("Darcy", "Grid.Positions0")[0]; - const double xMax = getParamFromGroup<std::vector<double>>("Darcy", "Grid.Positions0").back(); - std::vector<double> coords; //( dim * vertexSize ); - std::vector<int> coupledScvfIndices; - - for (const auto& element : elements(darcyGridView)) - { - auto fvGeometry = localView(*darcyFvGridGeometry); - fvGeometry.bindElement(element); - - for (const auto& scvf : scvfs(fvGeometry)) - { - static constexpr auto eps = 1e-7; - const auto& pos = scvf.center(); - if (pos[1] > darcyFvGridGeometry->bBoxMax()[1] - eps) - { - if (pos[0] > xMin - eps && pos[0] < xMax + eps) - { - coupledScvfIndices.push_back(scvf.index()); - for (const auto p : pos) - coords.push_back(p); - } - } - } - } - - const auto numberOfPoints = coords.size() / dim; - const double preciceDt = couplingInterface.setMeshAndInitialize( "DarcyMesh", - numberOfPoints, - coords); - couplingInterface.createIndexMapping( coupledScvfIndices ); - - const auto velocityId = couplingInterface.announceQuantity( "Velocity" ); - const auto pressureId = couplingInterface.announceQuantity( "Pressure" ); - - darcyProblem->updatePreciceDataIds(); - - darcyProblem->applyInitialSolution(sol); - - // the grid variables + // the grid variables using DarcyGridVariables = GetPropType<DarcyTypeTag, Properties::GridVariables>; auto darcyGridVariables = std::make_shared<DarcyGridVariables>(darcyProblem, darcyFvGridGeometry); darcyGridVariables->init(sol); @@ -404,28 +109,7 @@ int main(int argc, char** argv) try - using FluxVariables = GetPropType<DarcyTypeTag, Properties::FluxVariables>; - if ( couplingInterface.hasToWriteInitialData() ) - { - //TODO - //couplingInterface.writeQuantityVector(velocityId); - 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; - } - } - couplingInterface.writeScalarQuantityToOtherSolver( velocityId ); - couplingInterface.announceInitialDataWritten(); - } - couplingInterface.initializeData(); + // the assembler for a stationary problem using Assembler = FVAssembler<DarcyTypeTag, DiffMethod::numeric>; @@ -439,164 +123,11 @@ int main(int argc, char** argv) try using NewtonSolver = Dumux::NewtonSolver<Assembler, LinearSolver>; NewtonSolver nonLinearSolver(assembler, linearSolver); - auto dt = preciceDt; - auto sol_checkpoint = sol; - - double vtkTime = 1.0; - size_t iter = 0; + // solve the non-linear system + nonLinearSolver.solve(sol); - while ( couplingInterface.isCouplingOngoing() ) - { - if ( couplingInterface.hasToWriteIterationCheckpoint() ) - { - //DO CHECKPOINTING - sol_checkpoint = sol; - couplingInterface.announceIterationCheckpointWritten(); - } - - // TODO - couplingInterface.readScalarQuantityFromOtherSolver( pressureId ); - // For testing - { - const auto p = couplingInterface.getQuantityVector( pressureId ); - for (size_t i = 0; i < p.size(); ++i) { - for (size_t d = 0; d < dim; ++d ) - { - std::cout << coords[i*dim+d] << " "; - } - std::cout << "| p[" << i << "]=" << p[i] << std::endl; - } - const double sum = std::accumulate( p.begin(), p.end(), 0. ); - std::cout << "Sum of pressures over boundary to ff: \n" << sum << std::endl; - std::cout << "Pressure received from ff" << std::endl; -// for (size_t i = 0; i < p.size(); ++i) { -// std::cout << "p[" << i << "]=" << p[i] << std::endl; -// } - } - - // solve the non-linear system - nonLinearSolver.solve(sol); - setInterfaceVelocities<FluxVariables>( *darcyProblem, *darcyGridVariables, sol ); - // For testing - { - const auto v = couplingInterface.getQuantityVector( velocityId ); - 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 double sum = std::accumulate( v.begin(), v.end(), 0. ); - std::cout << "Velocities to be sent to ff" << std::endl; -// for (size_t i = 0; i < v.size(); ++i) { -// std::cout << "v[" << i << "]=" << v[i] << std::endl; -// } - std::cout << "Sum of velocities over boundary to ff: \n" << sum << std::endl; - } - couplingInterface.writeScalarQuantityToOtherSolver( velocityId ); - - const double preciceDt = couplingInterface.advance( dt ); - dt = std::min( preciceDt, dt ); - - { - double min = std::numeric_limits<double>::max(); - double max = std::numeric_limits<double>::min(); - double sum = 0.; - const std::string filename = getParam<std::string>("Problem.Name") + "-" + darcyProblem->name() + "-interface-velocity-" + std::to_string(iter); - std::tie(min, max, sum) = writeVelocitiesOnInterfaceToFile<FluxVariables>( filename, - *darcyProblem, - *darcyGridVariables, - sol ); - const int prec = std::cout.precision(); - std::cout << "Velocity statistics:" << std::endl - << std::setprecision(std::numeric_limits<double>::digits10 + 1) - << " min: " << min << std::endl - << " max: " << max << std::endl - << " sum: " << sum << std::endl; - std::cout.precision( prec ); - { - const std::string filenameFlow="darcy-statistics-" + std::to_string(iter); - std::ofstream ofs( filenameFlow+".txt", std::ofstream::out | std::ofstream::trunc); - const auto prec = ofs.precision(); - ofs << "Velocity statistics (free flow):" << std::endl - << std::setprecision(std::numeric_limits<double>::digits10 + 1) - << " min: " << min << std::endl - << " max: " << max << std::endl - << " sum: " << sum << std::endl; - ofs.precision( prec ); - ofs.close(); - } - } - { - const std::string filename = getParam<std::string>("Problem.Name") + "-" + darcyProblem->name() + "-interface-pressure-" + std::to_string(iter); - writePressuresOnInterfaceToFile( filename, - *darcyProblem, - *darcyGridVariables, - sol ); - } - ++iter; - - if ( couplingInterface.hasToReadIterationCheckpoint() ) - { - //Read checkpoint - darcyVtkWriter.write(vtkTime); - vtkTime += 1.; - sol = sol_checkpoint; - darcyGridVariables->update(sol); - darcyGridVariables->advanceTimeStep(); - //darcyGridVariables->init(sol); - couplingInterface.announceIterationCheckpointRead(); - } - else // coupling successful - { - // write vtk output - darcyVtkWriter.write(vtkTime); - } - - } - // write vtk output darcyVtkWriter.write(1.0); - { - double min = std::numeric_limits<double>::max(); - double max = std::numeric_limits<double>::min(); - double sum = 0.; - const std::string filename = getParam<std::string>("Problem.Name") + "-" + darcyProblem->name() + "-interface-velocity"; - std::tie(min, max, sum) = writeVelocitiesOnInterfaceToFile<FluxVariables>( filename, - *darcyProblem, - *darcyGridVariables, - sol ); - const int prec = std::cout.precision(); - std::cout << "Velocity statistics:" << std::endl - << std::setprecision(std::numeric_limits<double>::digits10 + 1) - << " min: " << min << std::endl - << " max: " << max << std::endl - << " sum: " << sum << std::endl; - std::cout.precision( prec ); - { - const std::string filenameFlow="darcy-statistics"; - std::ofstream ofs( filenameFlow+".txt", std::ofstream::out | std::ofstream::trunc); - const auto prec = ofs.precision(); - ofs << "Velocity statistics (free flow):" << std::endl - << std::setprecision(std::numeric_limits<double>::digits10 + 1) - << " min: " << min << std::endl - << " max: " << max << std::endl - << " sum: " << sum << std::endl; - ofs.precision( prec ); - ofs.close(); - } - } - { - const std::string filename = getParam<std::string>("Problem.Name") + "-" + darcyProblem->name() + "-interface-pressure"; - writePressuresOnInterfaceToFile( filename, - *darcyProblem, - *darcyGridVariables, - sol ); - } - - couplingInterface.finalize(); //////////////////////////////////////////////////////////// // finalize, print dumux message to say goodbye diff --git a/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/monolithicdata.hh b/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/monolithicdata.hh index 65209ecbadc427f803f42605e9e2f1da965b75f9..8256c9d50890e9f25d3532cacc6ff36448915c46 100644 --- a/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/monolithicdata.hh +++ b/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/monolithicdata.hh @@ -75,6 +75,33 @@ static const std::array<double, 20> pressure = { 1.250022268842933e-10, 7.500458574671815e-11, 2.503251152768306e-11 }; + + +static const std::array<int, 20> pressureFaceIdx = + { + 1523, + 1527, + 1531, + 1535, + 1539, + 1543, + 1547, + 1551, + 1555, + 1559, + 1563, + 1567, + 1571, + 1575, + 1579, + 1583, + 1587, + 1591, + 1595, + 1599 +}; + } + #endif // MONOLITHICDATA_HH diff --git a/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/pmproblem-mono-flux.hh b/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/pmproblem-mono-flux.hh index ef1830459d9808f5f53d8c89b77e4f33b29ae960..043ddf9839ae3f95fc2b7620e17bb1302731f2d0 100644 --- a/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/pmproblem-mono-flux.hh +++ b/appl/coupling-ff-pm/iterative-reversed-mono-flux-no-precice/pmproblem-mono-flux.hh @@ -28,6 +28,8 @@ #define ENABLEMONOLITHIC 0 #endif +#include<algorithm> + #include <dune/grid/yaspgrid.hh> //****** uncomment for the last exercise *****// @@ -43,7 +45,7 @@ #include <dumux/material/components/simpleh2o.hh> #include <dumux/material/fluidsystems/1pliquid.hh> -#include "../../precice-adapter/include/preciceadapter.hh" +#include "monolithicdata.hh" namespace Dumux { @@ -126,11 +128,7 @@ public: : ParentType(fvGridGeometry, "Darcy"), eps_(1e-7), couplingManager_(couplingManager) #else DarcySubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) - : ParentType(fvGridGeometry, "Darcy"), eps_(1e-7), - couplingInterface_(precice_adapter::PreciceAdapter::getInstance() ), - pressureId_(0), - velocityId_(0), - dataIdsWereSet_(false) + : ParentType(fvGridGeometry, "Darcy"), eps_(1e-7) #endif {} @@ -172,7 +170,14 @@ DarcySubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) values.setAllCouplingNeumann(); #else const auto faceId = scvf.index(); - if ( couplingInterface_.isCoupledEntity(faceId) ) + + + const bool isCoupledEntity + = std::find( MonolithicSolution::pressureFaceIdx.begin(), + MonolithicSolution::pressureFaceIdx.end(), faceId ) + != MonolithicSolution::pressureFaceIdx.end(); + + if( isCoupledEntity ) values.setAllDirichlet(); #endif return values; @@ -193,8 +198,17 @@ DarcySubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) values = initial(element); const auto faceId = scvf.index(); - if ( couplingInterface_.isCoupledEntity(faceId) ) - values = couplingInterface_.getScalarQuantityOnFace( pressureId_, faceId ); + + const bool isCoupledEntity + = std::find( MonolithicSolution::pressureFaceIdx.begin(), + MonolithicSolution::pressureFaceIdx.end(), faceId ) + != MonolithicSolution::pressureFaceIdx.end(); + + if ( isCoupledEntity ) + { + const int arrayIdx = (faceId-1523) / 4; + values = MonolithicSolution::pressure[arrayIdx]; + } return values; } @@ -223,14 +237,7 @@ DarcySubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) if (couplingManager().isCoupledEntity(CouplingManager::darcyIdx, scvf)) values[Indices::conti0EqIdx] = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, scvf); #else -// assert( dataIdsWereSet_ ); -// const auto faceId = scvf.index(); -// if ( couplingInterface_.isCoupledEntity(faceId) ) -// { -// const Scalar density = 1000.; -// values[Indices::conti0EqIdx] = density * couplingInterface_.getScalarQuantityOnFace( velocityId_, faceId ); -// std::cout << "pm: values[Indices::conti0EqIdx] = " << values << std::endl; -// } + #endif return values; } @@ -275,15 +282,6 @@ DarcySubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) // \} -#if !ENABLEMONOLITHIC - void updatePreciceDataIds() - { - pressureId_ = couplingInterface_.getIdFromName( "Pressure" ); - velocityId_ = couplingInterface_.getIdFromName( "Velocity" ); - dataIdsWereSet_ = true; - } -#endif - #if ENABLEMONOLITHIC //! Get the coupling manager const CouplingManager& couplingManager() const @@ -308,10 +306,6 @@ private: #if ENABLEMONOLITHIC std::shared_ptr<CouplingManager> couplingManager_; #else - precice_adapter::PreciceAdapter& couplingInterface_; - size_t pressureId_; - size_t velocityId_; - bool dataIdsWereSet_; #endif };