Skip to content
Snippets Groups Projects
Commit 844579b7 authored by Oliver Sander's avatar Oliver Sander
Browse files

Guard a few things by #ifndef NDEBUG that are only used within assertions

This silences a few warnings when compiling with -DNDEBUG.
parent f8cfc225
No related branches found
No related tags found
No related merge requests found
......@@ -540,8 +540,10 @@ void Dune::FoamGrid<dimgrid, dimworld>::refineSimplexElement(FoamGridEntityImp<2
array<FoamGridEntityImp<1, dimgrid, dimworld>*, 9> nextLevelFacets;
std::size_t facetIndex=0;
#ifndef NDEBUG
const Dune::ReferenceElement<double, dimgrid>& refElement
= Dune::ReferenceElements<double, dimgrid>::general(element.type());
#endif
// I am just to dumb for a general facet to vertice mapping.
// Therefore we just store it here
......@@ -552,9 +554,11 @@ void Dune::FoamGrid<dimgrid, dimworld>::refineSimplexElement(FoamGridEntityImp<2
for(FacetIterator facet=element.facet_.begin(); facet != element.facet_.end(); ++facet)
{
#ifndef NDEBUG
typedef FoamGridEntityImp<0, dimgrid, dimworld> FoamGridVertex;
const FoamGridVertex* v0 = element.vertex_[refElement.subEntity(facetIndex/2, 1, 0, 2)];
const FoamGridVertex* v1 = element.vertex_[refElement.subEntity(facetIndex/2, 1, 1, 2)];
#endif
if(!(*facet)->nSons_)
{
......
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