Made the WellNode be aware of their own index

This commit is contained in:
Kjetil Olsen Lye
2012-04-12 14:25:39 +02:00
parent 9511d8dce2
commit 77dc0991cf
7 changed files with 68 additions and 2 deletions

View File

@@ -40,6 +40,7 @@ namespace Opm
return false;
}
WellsGroupInterface* WellsGroup::findGroup(std::string name_of_node)
{
if (name() == name_of_node) {
@@ -56,6 +57,12 @@ namespace Opm
return NULL;
}
}
bool WellsGroup::conditionsMet(const std::vector<double> pressure, const UnstructuredGrid& grid)
{
return true;
}
void WellsGroup::addChild(std::tr1::shared_ptr<WellsGroupInterface> child)
{
@@ -68,6 +75,11 @@ namespace Opm
: WellsGroupInterface(myname, prod_spec, inj_spec)
{
}
bool WellNode::conditionsMet(const std::vector<double> pressure, const UnstructuredGrid& grid)
{
return true;
}
WellsGroupInterface* WellNode::findGroup(std::string name_of_node)
{
@@ -83,7 +95,12 @@ namespace Opm
{
return true;
}
void WellNode::setWellsPointer(const struct Wells* wells, int self_index) {
wells_ = wells;
self_index_ = self_index;
}
namespace
{