Commit 0fcb18b3 authored by Timo Koch's avatar Timo Koch
Browse files

[pointsources] Do not enable by default

The point source computation in FVProblem uses the problem implementation to compute the point source map.
However it is executed in the constructor where the problem implemenation is not fully instatiated yet as it
derives from FVProblem. This patch disables point source computation by default. If you want to specify point
sources you have to manually call problem->computePointSourceMap() now.
parent 601bfa74
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
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