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

Method GetHasInterface

Filters/HyperTree/vtkHyperTreeGridGeometry3DImpl.cxx:925–955  ·  view source on GitHub ↗

----------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

923
924//----------------------------------------------------------------------------------------------
925bool vtkHyperTreeGridGeometry3DImpl::GetHasInterface(vtkIdType cellId) const
926{
927 // Only useful in 3D, this method makes it possible to know if the neighboring cell
928 // of _inputCellIndex offset is pure or describes an interface.
929 // It is pure if:
930 // - there is no defined interface (m_hasInterface);
931 // - there is no description of the interfaces (m_inputIntercepts);
932 // - there is a description of the interfaces but the mixed cell type is not 2
933 // (pure cell) (m_inputIntercepts[2]); -1 and 1 describes a case of a mixed
934 // cell of a material with a single interface, 0 a case of a mixed cell of a
935 // material with a double interface;
936 // - there is no description of the normals (m_inputNormals);
937 // - there is a description of the normals but not zero.
938 if (cellId < 0)
939 {
940 return false;
941 }
942 if (!this->HasInterface)
943 {
944 return false;
945 }
946
947 bool ret =
948 (this->InIntercepts && ((this->InIntercepts->GetTuple(cellId))[2] < 2) && this->InNormals);
949 if (ret)
950 {
951 double* normal = this->InNormals->GetTuple(cellId);
952 ret = !(normal[0] == 0. && normal[1] == 0. && normal[2] == 0.);
953 }
954 return ret;
955}
956
957VTK_ABI_NAMESPACE_END

Callers 12

GenerateCellSurfaceMethod · 0.95
ExecuteMethod · 0.80
ProcessHTGMethod · 0.80
ProcessHtgMethod · 0.80
ExchangeHTGMetadataMethod · 0.80
ProcessTreesMethod · 0.80
ProcessTreesMethod · 0.80
ProcessTreesMethod · 0.80
ProcessTreesMethod · 0.80
ExchangeHTGMetadataMethod · 0.80

Calls 1

GetTupleMethod · 0.45

Tested by 1

ExecuteMethod · 0.64