MCPcopy Create free account
hub / github.com/Kitware/VTK / GetNumberOfBoundaries

Method GetNumberOfBoundaries

Testing/GenericBridge/vtkBridgeCell.cxx:224–248  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Number of boundaries of dimension `dim' (or all dimensions less than GetDimension() if -1) of the cell. \pre valid_dim_range: (dim==-1) || ((dim>=0)&&(dim =0

Source from the content-addressed store, hash-verified

222// \pre valid_dim_range: (dim==-1) || ((dim>=0)&&(dim<GetDimension()))
223// \post positive_result: result>=0
224int vtkBridgeCell::GetNumberOfBoundaries(int dim)
225{
226 assert("pre: valid_dim_range" && ((dim == -1) || ((dim >= 0) && (dim < GetDimension()))));
227
228 int result = 0;
229 if ((dim == 0) && (this->GetDimension() > 1))
230 {
231 result += this->Cell->GetNumberOfPoints();
232 if (!this->Cell->IsLinear())
233 { // Old cell API treats mid-edge nodes as vertices; subtract those out:
234 result -= this->Cell->GetNumberOfEdges();
235 }
236 }
237 if (((dim == -1) && (this->GetDimension() > 1)) || (dim == 1))
238 {
239 result = result + this->Cell->GetNumberOfEdges();
240 }
241 if (((dim == -1) && (this->GetDimension() > 2)) || (dim == 2))
242 {
243 result = result + this->Cell->GetNumberOfFaces();
244 }
245
246 assert("post: positive_result" && result >= 0);
247 return result;
248}
249
250//------------------------------------------------------------------------------
251// Description:

Callers 10

GetNumberOfDOFNodesMethod · 0.95
GetPointIdsMethod · 0.95
GetFaceArrayMethod · 0.95
GetEdgeArrayMethod · 0.95
TessellateMethod · 0.80
TessellateFaceMethod · 0.80
TriangulateMethod · 0.80
TriangulateFaceMethod · 0.80
RequestDataMethod · 0.80

Calls 7

GetDimensionMethod · 0.95
assertFunction · 0.50
GetDimensionFunction · 0.50
GetNumberOfPointsMethod · 0.45
IsLinearMethod · 0.45
GetNumberOfEdgesMethod · 0.45
GetNumberOfFacesMethod · 0.45

Tested by

no test coverage detected