Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Kewei Lu
VTK-m
Commits
25162d0b
Commit
25162d0b
authored
Jul 30, 2015
by
Sujin Philip
Browse files
Merge branch 'fix-field-constructors' into 'master'
Minor fixes to Field class See merge request !109
parents
5e5203d6
b8e23e37
Changes
1
Hide whitespace changes
Inline
Side-by-side
vtkm/cont/Field.h
View file @
25162d0b
...
...
@@ -212,6 +212,24 @@ public:
};
/// constructors for points / whole mesh
VTKM_CONT_EXPORT
Field
(
std
::
string
name
,
vtkm
::
IdComponent
order
,
AssociationEnum
association
,
vtkm
::
cont
::
DynamicArrayHandle
&
data
)
:
Name
(
name
),
Order
(
order
),
Association
(
association
),
AssocCellSetName
(),
AssocLogicalDim
(
-
1
),
Data
(
data
),
Bounds
(),
ModifiedFlag
(
true
)
{
VTKM_ASSERT_CONT
(
this
->
Association
==
ASSOC_WHOLE_MESH
||
this
->
Association
==
ASSOC_POINTS
);
}
template
<
typename
T
,
typename
Storage
>
VTKM_CONT_EXPORT
Field
(
std
::
string
name
,
...
...
@@ -308,13 +326,13 @@ public:
VTKM_ASSERT_CONT
(
this
->
Association
==
ASSOC_CELL_SET
);
}
template
<
typename
T
>
template
<
typename
T
,
typename
Storage
>
VTKM_CONT_EXPORT
Field
(
std
::
string
name
,
vtkm
::
IdComponent
order
,
AssociationEnum
association
,
const
std
::
string
&
cellSetName
,
vtkm
::
cont
::
ArrayHandle
<
T
>
&
data
)
vtkm
::
cont
::
ArrayHandle
<
T
,
Storage
>
&
data
)
:
Name
(
name
),
Order
(
order
),
Association
(
association
),
...
...
@@ -404,13 +422,13 @@ public:
VTKM_ASSERT_CONT
(
this
->
Association
==
ASSOC_LOGICAL_DIM
);
}
template
<
typename
T
>
template
<
typename
T
,
typename
Storage
>
VTKM_CONT_EXPORT
Field
(
std
::
string
name
,
vtkm
::
IdComponent
order
,
AssociationEnum
association
,
vtkm
::
IdComponent
logicalDim
,
vtkm
::
cont
::
ArrayHandle
<
T
>
&
data
)
vtkm
::
cont
::
ArrayHandle
<
T
,
Storage
>
&
data
)
:
Name
(
name
),
Order
(
order
),
Association
(
association
),
...
...
@@ -574,6 +592,12 @@ public:
VTKM_CONT_EXPORT
const
vtkm
::
cont
::
DynamicArrayHandle
&
GetData
()
const
{
return
this
->
Data
;
}
VTKM_CONT_EXPORT
vtkm
::
cont
::
DynamicArrayHandle
&
GetData
()
{
this
->
ModifiedFlag
=
true
;
return
this
->
Data
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment