Commit b868697c authored by Lukas Riedel's avatar Lukas Riedel

Merge branch '34-west-boundary-condition-only-reads-first-entry' into 'master'

Resolve "West boundary condition only reads first entry"

Closes #34

See merge request !24
parents af162122 86709156
......@@ -308,14 +308,21 @@ namespace Dorie{
unsigned int index = 0;
if(dim==2){
const unsigned int xGlobalIndex=(int)((bcSide-eps)/2);
// determine along which axis spatial resoultion applies
unsigned int xGlobalIndex;
if (bcSide == BC::North || bcSide == BC::South)
xGlobalIndex = 0;
else if (bcSide == BC::West || bcSide == BC::East)
xGlobalIndex = 1;
// run along axis
auto it=spatialResolution[bcSide].begin();
while(*it<xGlobal[xGlobalIndex]){
it++; index++;
if(it==spatialResolution[bcSide].end())
DUNE_THROW(Exception,"BC spatial query exceeds the last segment!");
}
}
} // dim == 2
else{
unsigned int x0,x1,sr0,sr1;
if(bcSide==BC::North){
......
Markdown is supported
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