diff --git a/ProcessLib/GroundwaterFlowProcess.h b/ProcessLib/GroundwaterFlowProcess.h index e049c284accdaa4bbb68374cab5e1a86ce66065d..2ab57aadc4ef998fd514334aa421ae364008566f 100644 --- a/ProcessLib/GroundwaterFlowProcess.h +++ b/ProcessLib/GroundwaterFlowProcess.h @@ -219,7 +219,7 @@ public: { DBUG("Initialize GroundwaterFlowProcess."); - setInitialConditions(*_hydraulic_head); + setInitialConditions(*_hydraulic_head, 0); if (this->_mesh.getDimension()==1) createLocalAssemblers<1>(); @@ -231,15 +231,17 @@ public: assert(false); } - void setInitialConditions(ProcessVariable const& variable) + void setInitialConditions(ProcessVariable const& variable, + int const component_id) { std::size_t const n = this->_mesh.getNNodes(); for (std::size_t i = 0; i < n; ++i) { MeshLib::Location const l(this->_mesh.getID(), MeshLib::MeshItemType::Node, i); - auto const global_index = // 0 is the component id. - std::abs(this->_local_to_global_index_map->getGlobalIndex(l, 0) ); + auto const global_index = // 0 is the component id. + std::abs(this->_local_to_global_index_map->getGlobalIndex( + l, component_id)); this->_x->set( global_index, variable.getInitialConditionValue(*this->_mesh.getNode(i)));