Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PointCloud
VTK
提交
c604b9a4
V
VTK
项目概览
PointCloud
/
VTK
8 个月 前同步成功
通知
8
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VTK
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c604b9a4
编写于
9月 12, 2023
作者:
M
Mathieu Westphal
2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
DataModel: Add SupportsGhostArray methods and testing
上级
120b2d9d
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
243 addition
and
48 deletion
+243
-48
Common/DataModel/Testing/Cxx/CMakeLists.txt
Common/DataModel/Testing/Cxx/CMakeLists.txt
+2
-0
Common/DataModel/Testing/Cxx/TestCompositeDataSets.cxx
Common/DataModel/Testing/Cxx/TestCompositeDataSets.cxx
+9
-12
Common/DataModel/Testing/Cxx/TestDataObject.cxx
Common/DataModel/Testing/Cxx/TestDataObject.cxx
+59
-28
Common/DataModel/Testing/Cxx/otherCellGrid.cxx
Common/DataModel/Testing/Cxx/otherCellGrid.cxx
+21
-0
Common/DataModel/Testing/Cxx/otherHyperTreeGrid.cxx
Common/DataModel/Testing/Cxx/otherHyperTreeGrid.cxx
+22
-0
Common/DataModel/Testing/Cxx/otherImageData.cxx
Common/DataModel/Testing/Cxx/otherImageData.cxx
+7
-0
Common/DataModel/Testing/Cxx/otherPolyData.cxx
Common/DataModel/Testing/Cxx/otherPolyData.cxx
+16
-8
Common/DataModel/Testing/Cxx/otherRectilinearGrid.cxx
Common/DataModel/Testing/Cxx/otherRectilinearGrid.cxx
+7
-0
Common/DataModel/Testing/Cxx/otherStructuredGrid.cxx
Common/DataModel/Testing/Cxx/otherStructuredGrid.cxx
+7
-0
Common/DataModel/Testing/Cxx/otherUniformGrid.cxx
Common/DataModel/Testing/Cxx/otherUniformGrid.cxx
+7
-0
Common/DataModel/Testing/Cxx/otherUnstructuredGrid.cxx
Common/DataModel/Testing/Cxx/otherUnstructuredGrid.cxx
+6
-0
Common/DataModel/vtkCellGrid.cxx
Common/DataModel/vtkCellGrid.cxx
+10
-0
Common/DataModel/vtkCellGrid.h
Common/DataModel/vtkCellGrid.h
+5
-0
Common/DataModel/vtkCompositeDataSet.cxx
Common/DataModel/vtkCompositeDataSet.cxx
+10
-0
Common/DataModel/vtkCompositeDataSet.h
Common/DataModel/vtkCompositeDataSet.h
+5
-0
Common/DataModel/vtkDataObject.cxx
Common/DataModel/vtkDataObject.cxx
+6
-0
Common/DataModel/vtkDataObject.h
Common/DataModel/vtkDataObject.h
+14
-0
Common/DataModel/vtkDataSet.cxx
Common/DataModel/vtkDataSet.cxx
+10
-0
Common/DataModel/vtkDataSet.h
Common/DataModel/vtkDataSet.h
+5
-0
Common/DataModel/vtkHyperTreeGrid.cxx
Common/DataModel/vtkHyperTreeGrid.cxx
+10
-0
Common/DataModel/vtkHyperTreeGrid.h
Common/DataModel/vtkHyperTreeGrid.h
+5
-0
未找到文件。
Common/DataModel/Testing/Cxx/CMakeLists.txt
浏览文件 @
c604b9a4
...
...
@@ -83,9 +83,11 @@ vtk_add_test_cxx(vtkCommonDataModelCxxTests tests
otherCellBoundaries.cxx
otherCellPosition.cxx
otherCellTypes.cxx
otherCellGrid.cxx
otherColorTransferFunction.cxx
otherEmptyCell.cxx
otherFieldData.cxx
otherHyperTreeGrid.cxx
otherImageData.cxx
otherPolyData.cxx
otherRectilinearGrid.cxx
...
...
Common/DataModel/Testing/Cxx/TestCompositeDataSets.cxx
浏览文件 @
c604b9a4
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
// SPDX-License-Identifier: BSD-3-Clause
#include "vtkCompositeDataIterator.h"
#include "vtkDataObjectTree.h"
#include "vtkDataObjectTreeIterator.h"
#include "vtkInformation.h"
#include "vtkLogger.h"
#include "vtkMultiBlockDataSet.h"
#include "vtkNew.h"
#include "vtkSmartPointer.h"
#include "vtkUniformGrid.h"
#include "vtkUniformGridAMR.h"
#include <iostream>
#include <vector>
//------------------------------------------------------------------------------
int
TestCompositeDataSets
(
int
,
char
*
[])
{
int
errors
=
0
;
vtkNew
<
vtkMultiBlockDataSet
>
mb
;
if
(
!
mb
->
SupportsGhostArray
(
vtkDataObject
::
POINT
)
||
!
mb
->
SupportsGhostArray
(
vtkDataObject
::
CELL
))
{
vtkLog
(
ERROR
,
"Unexpected results on SupportsGhostArray"
);
return
EXIT_FAILURE
;
}
return
(
errors
)
;
return
EXIT_SUCCESS
;
}
Common/DataModel/Testing/Cxx/TestDataObject.cxx
浏览文件 @
c604b9a4
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
// SPDX-License-Identifier: BSD-3-Clause
#include <cassert>
#include "vtkDataObject.h"
#include "vtkLogger.h"
#include "vtkNew.h"
#include "vtkPolyData.h"
#include <vtkDataObject.h>
int
TestGetAssociationTypeFromString
()
bool
TestGetAssociationTypeFromString
()
{
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_POINTS"
)
==
bool
ret
=
true
;
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_POINTS"
)
==
vtkDataObject
::
FIELD_ASSOCIATION_POINTS
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_CELLS"
)
==
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_CELLS"
)
==
vtkDataObject
::
FIELD_ASSOCIATION_CELLS
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_NONE"
)
==
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_NONE"
)
==
vtkDataObject
::
FIELD_ASSOCIATION_NONE
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_POINTS_THEN_CELLS"
)
==
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_POINTS_THEN_CELLS"
)
==
vtkDataObject
::
FIELD_ASSOCIATION_POINTS_THEN_CELLS
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_VERTICES"
)
==
vtkDataObject
::
FIELD_ASSOCIATION_VERTICES
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_EDGES"
)
==
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_VERTICES"
)
==
vtkDataObject
::
FIELD_ASSOCIATION_VERTICES
);
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_EDGES"
)
==
vtkDataObject
::
FIELD_ASSOCIATION_EDGES
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_ROWS"
)
==
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD_ASSOCIATION_ROWS"
)
==
vtkDataObject
::
FIELD_ASSOCIATION_ROWS
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::POINT"
)
==
vtkDataObject
::
POINT
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::CELL"
)
==
vtkDataObject
::
CELL
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD"
)
==
vtkDataObject
::
FIELD
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::POINT_THEN_CELL"
)
==
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::POINT"
)
==
vtkDataObject
::
POINT
);
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::CELL"
)
==
vtkDataObject
::
CELL
);
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::FIELD"
)
==
vtkDataObject
::
FIELD
);
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::POINT_THEN_CELL"
)
==
vtkDataObject
::
POINT_THEN_CELL
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::VERTEX"
)
==
vtkDataObject
::
VERTEX
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::EDGE"
)
==
vtkDataObject
::
EDGE
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::ROW"
)
==
vtkDataObject
::
ROW
);
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::VERTEX"
)
==
vtkDataObject
::
VERTEX
);
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::EDGE"
)
==
vtkDataObject
::
EDGE
);
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"vtkDataObject::ROW"
)
==
vtkDataObject
::
ROW
);
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
nullptr
)
==
-
1
);
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
""
)
==
-
1
);
ret
&=
(
vtkDataObject
::
GetAssociationTypeFromString
(
"INVALID"
)
==
-
1
);
if
(
!
ret
)
{
vtkLog
(
ERROR
,
"Unexpected GetAssociationTypeFromString result."
);
}
return
ret
;
}
bool
TestGhostArray
()
{
bool
ret
=
true
;
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
nullptr
)
==
-
1
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
""
)
==
-
1
);
assert
(
vtkDataObject
::
GetAssociationTypeFromString
(
"INVALID"
)
==
-
1
);
// Test using a concret vtkPolyData instance
vtkNew
<
vtkPolyData
>
pd
;
for
(
int
type
=
0
;
type
<
vtkDataObject
::
NUMBER_OF_ATTRIBUTE_TYPES
;
type
++
)
{
ret
&=
(
!
pd
->
vtkDataObject
::
SupportsGhostArray
(
type
));
ret
&=
(
pd
->
vtkDataObject
::
GetGhostArray
(
type
)
==
nullptr
);
}
return
0
;
if
(
!
ret
)
{
vtkLog
(
ERROR
,
"Unexpected ghost array result."
);
}
return
ret
;
}
int
TestDataObject
(
int
,
char
*
[])
{
return
TestGetAssociationTypeFromString
();
bool
ret
=
true
;
ret
&=
TestGetAssociationTypeFromString
();
ret
&=
TestGhostArray
();
return
ret
?
EXIT_SUCCESS
:
EXIT_FAILURE
;
}
Common/DataModel/Testing/Cxx/otherCellGrid.cxx
0 → 100644
浏览文件 @
c604b9a4
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
// SPDX-License-Identifier: BSD-3-Clause
// .NAME
// .SECTION Description
// this program tests vtkCellGrid
#include "vtkCellGrid.h"
#include "vtkLogger.h"
#include "vtkNew.h"
int
otherCellGrid
(
int
,
char
*
[])
{
vtkNew
<
vtkCellGrid
>
cg
;
if
(
cg
->
SupportsGhostArray
(
vtkDataObject
::
POINT
)
||
!
cg
->
SupportsGhostArray
(
vtkDataObject
::
CELL
))
{
vtkLog
(
ERROR
,
"Unexpected results on SupportsGhostArray"
);
return
EXIT_FAILURE
;
}
return
EXIT_SUCCESS
;
}
Common/DataModel/Testing/Cxx/otherHyperTreeGrid.cxx
0 → 100644
浏览文件 @
c604b9a4
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
// SPDX-License-Identifier: BSD-3-Clause
// .NAME
// .SECTION Description
// this program tests vtkHyperTreeGrid
#include "vtkHyperTreeGrid.h"
#include "vtkLogger.h"
#include "vtkNew.h"
int
otherHyperTreeGrid
(
int
,
char
*
[])
{
vtkNew
<
vtkHyperTreeGrid
>
htg
;
if
(
htg
->
SupportsGhostArray
(
vtkDataObject
::
POINT
)
||
!
htg
->
SupportsGhostArray
(
vtkDataObject
::
CELL
))
{
vtkLog
(
ERROR
,
"Unexpected results on SupportsGhostArray"
);
return
EXIT_FAILURE
;
}
return
EXIT_SUCCESS
;
}
Common/DataModel/Testing/Cxx/otherImageData.cxx
浏览文件 @
c604b9a4
...
...
@@ -27,6 +27,13 @@ int TestOID(ostream& strm)
vtkImageData
*
id2Dyz
=
vtkImageData
::
New
();
vtkImageData
*
id3D
=
vtkImageData
::
New
();
if
(
!
id0D
->
SupportsGhostArray
(
vtkDataObject
::
POINT
)
||
!
id0D
->
SupportsGhostArray
(
vtkDataObject
::
CELL
))
{
std
::
cerr
<<
"Unexpected results on SupportsGhostArray
\n
"
;
return
1
;
}
id3D
->
SetDimensions
(
20
,
20
,
20
);
if
(
id3D
->
GetCellSize
(
0
)
!=
8
)
...
...
Common/DataModel/Testing/Cxx/otherPolyData.cxx
浏览文件 @
c604b9a4
...
...
@@ -19,6 +19,18 @@
namespace
{
//------------------------------------------------------------------------------
bool
TestSupportsGhostArray
()
{
vtkNew
<
vtkPolyData
>
pd
;
if
(
!
pd
->
SupportsGhostArray
(
vtkDataObject
::
POINT
)
||
!
pd
->
SupportsGhostArray
(
vtkDataObject
::
CELL
))
{
vtkLog
(
ERROR
,
"Unexpected results on SupportsGhostArray"
);
return
false
;
}
return
true
;
}
//------------------------------------------------------------------------------
bool
TestRemoveGhostCells
()
{
...
...
@@ -168,12 +180,8 @@ bool TestRemoveGhostCells()
//------------------------------------------------------------------------------
int
otherPolyData
(
int
,
char
*
[])
{
int
retVal
=
EXIT_SUCCESS
;
if
(
!::
TestRemoveGhostCells
())
{
retVal
=
EXIT_FAILURE
;
}
return
retVal
;
bool
status
=
true
;
status
&=
TestSupportsGhostArray
();
status
&=
TestRemoveGhostCells
();
return
status
?
EXIT_SUCCESS
:
EXIT_FAILURE
;
}
Common/DataModel/Testing/Cxx/otherRectilinearGrid.cxx
浏览文件 @
c604b9a4
...
...
@@ -26,6 +26,13 @@ int test_rg3d(ostream& strm)
strm
<<
"Testing vtkRectilinearGrid 3D"
<<
endl
;
vtkNew
<
vtkRectilinearGrid
>
rg3D
;
if
(
!
rg3D
->
SupportsGhostArray
(
vtkDataObject
::
POINT
)
||
!
rg3D
->
SupportsGhostArray
(
vtkDataObject
::
CELL
))
{
std
::
cerr
<<
"Unexpected results on SupportsGhostArray
\n
"
;
return
1
;
}
vtkNew
<
vtkDoubleArray
>
xdata
;
vtkNew
<
vtkDoubleArray
>
ydata
;
vtkNew
<
vtkDoubleArray
>
zdata
;
...
...
Common/DataModel/Testing/Cxx/otherStructuredGrid.cxx
浏览文件 @
c604b9a4
...
...
@@ -26,6 +26,13 @@ int TestOSG_0d(ostream& strm)
int
i
,
k
;
vtkNew
<
vtkStructuredGrid
>
sg0D
;
if
(
!
sg0D
->
SupportsGhostArray
(
vtkDataObject
::
POINT
)
||
!
sg0D
->
SupportsGhostArray
(
vtkDataObject
::
CELL
))
{
std
::
cerr
<<
"Unexpected results on SupportsGhostArray
\n
"
;
return
1
;
}
vtkNew
<
vtkPoints
>
onepoints
;
for
(
k
=
0
;
k
<
1
;
k
++
)
{
...
...
Common/DataModel/Testing/Cxx/otherUniformGrid.cxx
浏览文件 @
c604b9a4
...
...
@@ -22,6 +22,13 @@ int TestOUG_0d(ostream& strm)
ug0D
->
SetDimensions
(
1
,
1
,
1
);
if
(
!
ug0D
->
SupportsGhostArray
(
vtkDataObject
::
POINT
)
||
!
ug0D
->
SupportsGhostArray
(
vtkDataObject
::
CELL
))
{
std
::
cerr
<<
"Unexpected results on SupportsGhostArray
\n
"
;
return
EXIT_FAILURE
;
}
// Test GetCell
vtkNew
<
vtkIdList
>
ids
;
int
cellId
;
...
...
Common/DataModel/Testing/Cxx/otherUnstructuredGrid.cxx
浏览文件 @
c604b9a4
...
...
@@ -15,6 +15,12 @@ int otherUnstructuredGrid(int, char*[])
int
retVal
=
EXIT_SUCCESS
;
vtkNew
<
vtkUnstructuredGrid
>
ug
;
if
(
!
ug
->
SupportsGhostArray
(
vtkDataObject
::
POINT
)
||
!
ug
->
SupportsGhostArray
(
vtkDataObject
::
CELL
))
{
vtkLog
(
ERROR
,
"Unexpected results on SupportsGhostArray"
);
retVal
=
EXIT_FAILURE
;
}
vtkUnsignedCharArray
*
distinctCellTypes
=
ug
->
GetDistinctCellTypesArray
();
if
(
!
distinctCellTypes
)
{
...
...
Common/DataModel/vtkCellGrid.cxx
浏览文件 @
c604b9a4
...
...
@@ -249,6 +249,16 @@ vtkUnsignedCharArray* vtkCellGrid::GetGhostArray(int type)
return
result
;
}
//------------------------------------------------------------------------------
bool
vtkCellGrid
::
SupportsGhostArray
(
int
type
)
{
if
(
type
==
CELL
)
{
return
true
;
}
return
false
;
}
int
vtkCellGrid
::
GetAttributeTypeForArray
(
vtkAbstractArray
*
arr
)
{
// First, search through DOF arrays:
...
...
Common/DataModel/vtkCellGrid.h
浏览文件 @
c604b9a4
...
...
@@ -98,6 +98,11 @@ public:
*/
vtkUnsignedCharArray
*
GetGhostArray
(
int
type
)
override
;
/**
* Returns true if type is CELL, false otherwise
*/
bool
SupportsGhostArray
(
int
type
)
override
;
/**
* Retrieves the attribute type that an array came from.
* This is useful for obtaining which attribute type a input array
...
...
Common/DataModel/vtkCompositeDataSet.cxx
浏览文件 @
c604b9a4
...
...
@@ -147,6 +147,16 @@ vtkDataObject* vtkCompositeDataSet::GetDataSet(unsigned int flatIndex)
return
nullptr
;
}
//------------------------------------------------------------------------------
bool
vtkCompositeDataSet
::
SupportsGhostArray
(
int
type
)
{
if
(
type
==
POINT
||
type
==
CELL
)
{
return
true
;
}
return
false
;
}
//------------------------------------------------------------------------------
void
vtkCompositeDataSet
::
PrintSelf
(
ostream
&
os
,
vtkIndent
indent
)
{
...
...
Common/DataModel/vtkCompositeDataSet.h
浏览文件 @
c604b9a4
...
...
@@ -176,6 +176,11 @@ public:
template
<
class
DataSetT
=
vtkDataSet
>
static
std
::
vector
<
DataSetT
*>
GetDataSets
(
vtkDataObject
*
dobj
,
bool
preserveNull
=
false
);
/**
* Returns true for POINT or CELL, false otherwise
*/
bool
SupportsGhostArray
(
int
type
)
override
;
protected:
vtkCompositeDataSet
();
~
vtkCompositeDataSet
()
override
;
...
...
Common/DataModel/vtkDataObject.cxx
浏览文件 @
c604b9a4
...
...
@@ -664,6 +664,12 @@ vtkUnsignedCharArray* vtkDataObject::GetGhostArray(int type)
:
nullptr
;
}
//------------------------------------------------------------------------------
bool
vtkDataObject
::
SupportsGhostArray
(
int
vtkNotUsed
(
type
))
{
return
false
;
}
//------------------------------------------------------------------------------
vtkFieldData
*
vtkDataObject
::
GetAttributesAsFieldData
(
int
type
)
{
...
...
Common/DataModel/vtkDataObject.h
浏览文件 @
c604b9a4
...
...
@@ -304,6 +304,20 @@ public:
*/
virtual
vtkUnsignedCharArray
*
GetGhostArray
(
int
type
);
/**
* Returns if this type of data object support ghost array for specified type.
* The type may be:
* <ul>
* <li>POINT - Defined in vtkDataSet subclasses
* <li>CELL - Defined in vtkDataSet subclasses.
* </ul>
* The other attribute types, will return false since
* ghosts arrays are not defined for now outside of point or cell.
* for vtkDataObject, this always return false but subclasses may override
* this method and implement their own logic.
*/
virtual
bool
SupportsGhostArray
(
int
type
);
/**
* Returns the attributes of the data object as a vtkFieldData.
* This returns non-null values in all the same cases as GetAttributes,
...
...
Common/DataModel/vtkDataSet.cxx
浏览文件 @
c604b9a4
...
...
@@ -1067,6 +1067,16 @@ vtkUnsignedCharArray* vtkDataSet::GetGhostArray(int attributeType)
}
}
//------------------------------------------------------------------------------
bool
vtkDataSet
::
SupportsGhostArray
(
int
type
)
{
if
(
type
==
POINT
||
type
==
CELL
)
{
return
true
;
}
return
false
;
}
//------------------------------------------------------------------------------
vtkUnsignedCharArray
*
vtkDataSet
::
AllocatePointGhostArray
()
{
...
...
Common/DataModel/vtkDataSet.h
浏览文件 @
c604b9a4
...
...
@@ -521,6 +521,11 @@ public:
*/
vtkUnsignedCharArray
*
GetGhostArray
(
int
type
)
override
;
/**
* Returns true for POINT or CELL, false otherwise
*/
bool
SupportsGhostArray
(
int
type
)
override
;
protected:
// Constructor with default bounds (0,1, 0,1, 0,1).
vtkDataSet
();
...
...
Common/DataModel/vtkHyperTreeGrid.cxx
浏览文件 @
c604b9a4
...
...
@@ -1424,6 +1424,16 @@ unsigned long vtkHyperTreeGrid::GetActualMemorySize()
return
(
this
->
GetActualMemorySizeBytes
()
>>
10
);
}
//------------------------------------------------------------------------------
bool
vtkHyperTreeGrid
::
SupportsGhostArray
(
int
type
)
{
if
(
type
==
CELL
)
{
return
true
;
}
return
false
;
}
//------------------------------------------------------------------------------
void
vtkHyperTreeGrid
::
GetIndexFromLevelZeroCoordinates
(
vtkIdType
&
treeindex
,
unsigned
int
i
,
unsigned
int
j
,
unsigned
int
k
)
const
...
...
Common/DataModel/vtkHyperTreeGrid.h
浏览文件 @
c604b9a4
...
...
@@ -532,6 +532,11 @@ public:
*/
unsigned
long
GetActualMemorySize
()
override
;
/**
* Returns true if type is CELL, false otherwise
*/
bool
SupportsGhostArray
(
int
type
)
override
;
private:
/**
* Recursively initialize pure material mask
...
...
ZenZenZ
@kee131
mentioned in commit
84ef3678
·
9月 16, 2023
mentioned in commit
84ef3678
mentioned in commit 84ef36783be6c963395955ff6d7d8b8c11d5e91c
开关提交列表
ZenZenZ
@kee131
mentioned in commit
84ef3678
·
9月 16, 2023
mentioned in commit
84ef3678
mentioned in commit 84ef36783be6c963395955ff6d7d8b8c11d5e91c
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录