Skip to content

Commit

Permalink
fix BBBND warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JSchoeberl committed Sep 29, 2017
1 parent 2c34989 commit af17351
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
2 changes: 2 additions & 0 deletions comp/hcurlhofespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,8 @@ namespace ngcomp
hofe -> ComputeNDof();
return *hofe;
}
case BBBND:
return * new (lh) DummyFE<ET_POINT>;
}
}

Expand Down
1 change: 1 addition & 0 deletions comp/hdivhofespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ namespace ngcomp
case ET_SEGM: return * new (alloc) DummyFE<ET_SEGM>();
default:
__assume(false);
throw Exception("HDiv - impossible element");
}
}

Expand Down
24 changes: 10 additions & 14 deletions comp/l2hofespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,18 +812,8 @@ namespace ngcomp

FiniteElement & L2SurfaceHighOrderFESpace :: GetFE (ElementId ei, Allocator & lh) const
{
switch(ei.VB())
if (ei.VB() == BND)
{
case VOL:
// throw Exception ("Volume elements not available for L2SurfaceHighOrderFESpace");
return * SwitchET (ma->GetElement(ei).GetType(),
[&lh] (auto et) -> FiniteElement*
{
return new (lh) ScalarDummyFE<et.ElementType()>();
});

case BND:

if (ma->GetDimension() == 2)
{
DGFiniteElement<1> * fe1d = 0;
Expand Down Expand Up @@ -861,10 +851,16 @@ namespace ngcomp
fe2d -> ComputeNDof();
return *fe2d;
}

case BBND:
throw Exception ("BBND elements not available for L2SurfaceHighOrderFESpace");
}

else

return * SwitchET (ma->GetElement(ei).GetType(),
[&lh] (auto et) -> FiniteElement*
{
return new (lh) ScalarDummyFE<et.ElementType()>();
});

}
// const FiniteElement & L2SurfaceHighOrderFESpace :: GetFE (int elnr, LocalHeap & lh) const
// {
Expand Down
4 changes: 2 additions & 2 deletions comp/vectorfacetfespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ namespace ngcomp
return fe;
});
}
case BBND:
throw Exception ("VectorFacetFESpace::GetFE does not support BBND");
case BBND: case BBBND:
throw Exception ("VectorFacetFESpace::GetFE does not support BBND or BBBND");
}
}

Expand Down

0 comments on commit af17351

Please sign in to comment.