Fix a bug in LimitStencilTableFactory

If the input cv stencil is given and it includes the local point
stencils for endcaps, LimitStencilTableFactory::Create failed
because of incorrect sanity checking.
This commit is contained in:
Takahito Tejima 2015-06-11 13:41:20 -07:00
parent a21cd1560b
commit 12f3e5a384

View File

@ -353,7 +353,10 @@ LimitStencilTableFactory::Create(TopologyRefiner const & refiner,
cvstencils = StencilTableFactory::Create(refiner, options);
} else {
// Sanity checks
if (cvstencils->GetNumStencils() != (uniform ?
//
// Note that the input cvStencils could be larger than the number of
// refiner's vertices, due to the existence of the end cap stencils.
if (cvstencils->GetNumStencils() < (uniform ?
refiner.GetLevel(maxlevel).GetNumVertices() :
refiner.GetNumVerticesTotal())) {
return 0;