Skip to content
Snippets Groups Projects
Commit be8c3b3e authored by Peter Bastian's avatar Peter Bastian
Browse files

- correct determination if an element is copied to next finer level that

works also in parallel version. Do not use nSons==1 in that case.

[[Imported from SVN: r3000]]
parent f60508ff
No related branches found
No related tags found
No related merge requests found
......@@ -573,7 +573,7 @@ namespace Dune {
typename TargetType<0,dim>::T* father_ = UG_NS<dim>::EFather(target_);
while (father_!=0)
{
if (UG_NS<dim>::nSons(father_)!=1) break; // handle only copies
if (!UG_NS<dim>::hasCopy(father_)) break; // handle only copies
UG_NS<dim>::leafIndex(UG_NS<dim>::GetEdge(UG_NS<dim>::Corner(father_,renumberVertex(gt,a)),UG_NS<dim>::Corner(father_,renumberVertex(gt,b)))) = index;
father_ = UG_NS<dim>::EFather(father_);
}
......@@ -604,7 +604,7 @@ namespace Dune {
typename TargetType<0,dim>::T* father_ = UG_NS<dim>::EFather(target_);
while (father_!=0)
{
if (UG_NS<dim>::nSons(father_)!=1) break; // handle only copies
if (!UG_NS<dim>::hasCopy(father_)) break; // handle only copies
UG_NS<dim>::leafIndex(UG_NS<dim>::SideVector(father_,renumberFace(gt,i))) = index;
father_ = UG_NS<dim>::EFather(father_);
}
......
......@@ -11,7 +11,7 @@ inline typename TargetType<0,GridImp::dimensionworld>::T* UGGridIntersectionIter
typename TargetType<0,GridImp::dimensionworld>::T* father_ = UG_NS<GridImp::dimensionworld>::EFather(center_);
while (father_!=0)
{
if (UG_NS<GridImp::dimensionworld>::nSons(father_)!=1) break; // father must be a copy
if (!UG_NS<GridImp::dimensionworld>::hasCopy(father_)) break; // father must be a copy
if (UG_NS<GridImp::dimension>::NbElem(father_, neighborCount_)!=NULL) // check existence of neighbor
if (UG_NS<GridImp::dimension>::isLeaf(UG_NS<GridImp::dimension>::NbElem(father_, neighborCount_))) // check leafness
return UG_NS<GridImp::dimension>::NbElem(father_, neighborCount_);
......@@ -155,7 +155,7 @@ intersectionNeighborLocal() const
typename TargetType<0,GridImp::dimensionworld>::T* father_ = UG_NS<GridImp::dimensionworld>::EFather(center_);
while (father_!=0)
{
if (UG_NS<GridImp::dimensionworld>::nSons(father_)!=1)
if (!UG_NS<GridImp::dimensionworld>::hasCopy(father_))
DUNE_THROW(GridError,"no neighbor found");
if (UG_NS<GridImp::dimension>::NbElem(father_, neighborCount_)!=NULL) // check existence of neighbor
if (UG_NS<GridImp::dimension>::isLeaf(UG_NS<GridImp::dimension>::NbElem(father_, neighborCount_)))
......@@ -260,7 +260,7 @@ numberInNeighbor () const
typename TargetType<0,GridImp::dimensionworld>::T* father_ = UG_NS<GridImp::dimensionworld>::EFather(center_);
while (father_!=0)
{
if (UG_NS<GridImp::dimensionworld>::nSons(father_)!=1)
if (!UG_NS<GridImp::dimensionworld>::hasCopy(father_))
DUNE_THROW(GridError,"no neighbor found");
if (UG_NS<GridImp::dimension>::NbElem(father_, neighborCount_)!=NULL) // check existence of neighbor
if (UG_NS<GridImp::dimension>::isLeaf(UG_NS<GridImp::dimension>::NbElem(father_, neighborCount_)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment