Commit 0200cdd2 authored by Timo Koch's avatar Timo Koch
Browse files

[tests] Add fvGeometry.hasBoundaryScvf() to the fvgeometry tests

parent c6873cc4
......@@ -98,12 +98,21 @@ int main (int argc, char *argv[]) try
if(0 != testForwardIterator(range2.begin(), range2.end(), op2))
DUNE_THROW(Dune::Exception, "Iterator does not fulfill the forward iterator concept");
std::size_t boundaryCount = 0;
for (auto&& scvf : scvfs(fvGeometry))
{
std::cout << "-- scvf " << scvf.index() << " ip at: " << scvf.ipGlobal() << " normal: " << scvf.unitOuterNormal();
if (scvf.boundary()) std::cout << " (on boundary).";
if (scvf.boundary())
{
++boundaryCount;
std::cout << " (on boundary).";
}
std::cout << std::endl;
}
if ((boundaryCount>0) != fvGeometry.hasBoundaryScvf())
DUNE_THROW(Dune::InvalidStateException, "fvGeometry.hasBoundaryScvf() reports " << fvGeometry.hasBoundaryScvf()
<< " but the number of boundary scvfs is " << boundaryCount);
}
}
// //////////////////////////////////
......
......@@ -99,12 +99,21 @@ int main (int argc, char *argv[]) try
if(0 != testForwardIterator(range2.begin(), range2.end(), op2))
DUNE_THROW(Dune::Exception, "Iterator does not fulfill the forward iterator concept");
std::size_t boundaryCount = 0;
for (auto&& scvf : scvfs(fvGeometry))
{
std::cout << "-- scvf " << scvf.index() << " ip at: " << scvf.ipGlobal();
if (scvf.boundary()) std::cout << " (on boundary).";
if (scvf.boundary())
{
++boundaryCount;
std::cout << " (on boundary).";
}
std::cout << std::endl;
}
if ((boundaryCount>0) != fvGeometry.hasBoundaryScvf())
DUNE_THROW(Dune::InvalidStateException, "fvGeometry.hasBoundaryScvf() reports " << fvGeometry.hasBoundaryScvf()
<< " but the number of boundary scvfs is " << boundaryCount);
}
}
// //////////////////////////////////
......
......@@ -133,12 +133,21 @@ int main (int argc, char *argv[]) try
if(0 != testForwardIterator(range2.begin(), range2.end(), op2))
DUNE_THROW(Dune::Exception, "Iterator does not fulfill the forward iterator concept");
std::size_t boundaryCount = 0;
for (auto&& scvf : scvfs(fvGeometry))
{
std::cout << "-- scvf " << scvf.index() << " ip at: " << scvf.ipGlobal() << " normal: " << scvf.unitOuterNormal();
if (scvf.boundary()) std::cout << " (on boundary).";
if (scvf.boundary())
{
++boundaryCount;
std::cout << " (on boundary).";
}
std::cout << std::endl;
}
if ((boundaryCount>0) != fvGeometry.hasBoundaryScvf())
DUNE_THROW(Dune::InvalidStateException, "fvGeometry.hasBoundaryScvf() reports " << fvGeometry.hasBoundaryScvf()
<< " but the number of boundary scvfs is " << boundaryCount);
}
}
// //////////////////////////////////
......
Supports Markdown
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