diff --git a/dumux/common/fvproblem.hh b/dumux/common/fvproblem.hh index 807f4741c2830745ce615298e926a50b17ae0b15..cb8c6522bfc3261e841901b7fd87340fabe876c6 100644 --- a/dumux/common/fvproblem.hh +++ b/dumux/common/fvproblem.hh @@ -87,9 +87,6 @@ public: { // set a default name for the problem problemName_ = getParamFromGroup<std::string>(GET_PROP_VALUE(TypeTag, ModelParameterGroup), "Problem.Name"); - - // compute which scvs contain point sources - computePointSourceMap(); } /*! @@ -432,7 +429,11 @@ public: return source; } - //! Compute the point source map, i.e. which scvs have point source contributions + /*! + * \brief Compute the point source map, i.e. which scvs have point source contributions + * \note Call this on the problem before assembly if you want to enable point sources set + * via the addPointSources member function. + */ void computePointSourceMap() { // clear the given point source maps in case it's not empty diff --git a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc b/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc index 917f4da90d21d97cde9df036262e3bdfc383947a..d0e41825d536aba76e2d5f31dc2d3fecb4eb5174 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc +++ b/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc @@ -88,6 +88,7 @@ int main(int argc, char** argv) try // the problem (initial and boundary conditions) using Problem = typename GET_PROP_TYPE(TypeTag, Problem); auto problem = std::make_shared<Problem>(fvGridGeometry); + problem->computePointSourceMap(); // enable point sources // the solution vector using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); diff --git a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc b/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc index e07f665b9201ec60d067959152291a13be48e9ff..dabe20b67082ad8a1925b364f1a583669f7354f6 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc +++ b/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc @@ -88,6 +88,7 @@ int main(int argc, char** argv) try // the problem (initial and boundary conditions) using Problem = typename GET_PROP_TYPE(TypeTag, Problem); auto problem = std::make_shared<Problem>(fvGridGeometry); + problem->computePointSourceMap(); // enable point sources // the solution vector using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); diff --git a/test/porousmediumflow/2p/implicit/adaptive/test_2p_adaptive_fv.cc b/test/porousmediumflow/2p/implicit/adaptive/test_2p_adaptive_fv.cc index 3ee56a5758f9d409e630267626e5705d03033a39..161900bd12e03766656f8afd3284165573d8418f 100644 --- a/test/porousmediumflow/2p/implicit/adaptive/test_2p_adaptive_fv.cc +++ b/test/porousmediumflow/2p/implicit/adaptive/test_2p_adaptive_fv.cc @@ -112,6 +112,7 @@ int main(int argc, char** argv) try // the problem (initial and boundary conditions) using Problem = typename GET_PROP_TYPE(TypeTag, Problem); auto problem = std::make_shared<Problem>(fvGridGeometry); + problem->computePointSourceMap(); // enable point sources // the solution vector using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);