diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index 20735008423bc320d8aa0339a70907df4fd543b9..63710b1108518a1d9f2051a71a5d23dac78769b1 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -1336,6 +1336,39 @@ namespace AMDiS { rhs->getDOFVector(row)->getBoundaryManager()->addBoundaryCondition(robin); } + void ProblemVec::addRobinBC(BoundaryType type, int row, int col, + DOFVector<double> *n, + DOFVector<double> *r) + { + FUNCNAME("ProblemVec::addRobinBC()"); + + boundaryConditionSet = true; + + RobinBC *robin = + new RobinBC(type, n, r, componentSpaces[row], componentSpaces[col]); + + if (systemMatrix && (*systemMatrix)[row][col]) + (*systemMatrix)[row][col]->getBoundaryManager()->addBoundaryCondition(robin); + if (rhs) + rhs->getDOFVector(row)->getBoundaryManager()->addBoundaryCondition(robin); + } + + void ProblemVec::addRobinBC(BoundaryType type, int row, int col, + Operator *n, + Operator *r) + { + FUNCNAME("ProblemVec::addRobinBC()"); + + boundaryConditionSet = true; + + RobinBC *robin = + new RobinBC(type, n, r, componentSpaces[row], componentSpaces[col]); + + if (systemMatrix && (*systemMatrix)[row][col]) + (*systemMatrix)[row][col]->getBoundaryManager()->addBoundaryCondition(robin); + if (rhs) + rhs->getDOFVector(row)->getBoundaryManager()->addBoundaryCondition(robin); + } void ProblemVec::addPeriodicBC(BoundaryType type, int row, int col) { diff --git a/AMDiS/src/ProblemVec.h b/AMDiS/src/ProblemVec.h index 3f00a348b8a41e1de3e0fccfa6a85822b6237746..a4bf93ff8c27c79c702c1f6c3ce15a1c426415de 100644 --- a/AMDiS/src/ProblemVec.h +++ b/AMDiS/src/ProblemVec.h @@ -261,6 +261,16 @@ namespace AMDiS { AbstractFunction<double, WorldVector<double> > *n, AbstractFunction<double, WorldVector<double> > *r); + /// Adds Robin boundary condition. + virtual void addRobinBC(BoundaryType type, int row, int col, + DOFVector<double> *n, + DOFVector<double> *r); + + /// Adds Robin boundary condition. + virtual void addRobinBC(BoundaryType type, int row, int col, + Operator *n, + Operator *r); + /// Adds a periodic boundary condition. virtual void addPeriodicBC(BoundaryType type, int row, int col);