Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CrayzeeWulf
Xdmf
Commits
21b23053
Commit
21b23053
authored
Jun 06, 2011
by
Kenneth Leiter
Browse files
BUG: Fix bug causing nodal attributes with more than one component to be
partitioned incorrectly by the partitioner.
parent
f45699a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/XdmfPartitioner.cpp
View file @
21b23053
...
...
@@ -355,19 +355,19 @@ XdmfPartitioner::partition(const shared_ptr<XdmfUnstructuredGrid> gridToPartitio
createdAttribute
->
setCenter
(
currAttribute
->
getCenter
());
createdAttribute
->
setType
(
currAttribute
->
getType
());
unsigned
int
index
=
0
;
unsigned
int
num
ValsP
erComponent
=
currAttribute
->
getSize
()
/
topology
->
getNumberElements
();
const
unsigned
int
num
b
erComponent
s
=
currAttribute
->
getSize
()
/
topology
->
getNumberElements
();
createdAttribute
->
initialize
(
currAttribute
->
getArrayType
(),
currElemIds
.
size
()
*
num
ValsP
erComponent
);
currElemIds
.
size
()
*
num
b
erComponent
s
);
for
(
std
::
vector
<
unsigned
int
>::
const_iterator
iter
=
currElemIds
.
begin
();
iter
!=
currElemIds
.
end
();
++
iter
)
{
createdAttribute
->
insert
(
index
,
currAttribute
,
*
iter
*
num
ValsP
erComponent
,
num
ValsP
erComponent
);
index
+=
num
ValsP
erComponent
;
*
iter
*
num
b
erComponent
s
,
num
b
erComponent
s
);
index
+=
num
b
erComponent
s
;
}
}
else
if
(
currAttribute
->
getCenter
()
==
XdmfAttributeCenter
::
Node
())
{
...
...
@@ -375,15 +375,18 @@ XdmfPartitioner::partition(const shared_ptr<XdmfUnstructuredGrid> gridToPartitio
createdAttribute
->
setName
(
currAttribute
->
getName
());
createdAttribute
->
setCenter
(
currAttribute
->
getCenter
());
createdAttribute
->
setType
(
currAttribute
->
getType
());
createdAttribute
->
initialize
(
currAttribute
->
getArrayType
(),
currNodeMap
.
size
());
createdAttribute
->
initialize
(
currAttribute
->
getArrayType
(),
currNodeMap
.
size
());
const
unsigned
int
numberComponents
=
currAttribute
->
getSize
()
/
geometry
->
getNumberPoints
();
for
(
std
::
map
<
unsigned
int
,
unsigned
int
>::
const_iterator
iter
=
currNodeMap
.
begin
();
iter
!=
currNodeMap
.
end
();
++
iter
)
{
createdAttribute
->
insert
(
iter
->
second
,
createdAttribute
->
insert
(
iter
->
second
*
numberComponents
,
currAttribute
,
iter
->
first
,
1
);
iter
->
first
*
numberComponents
,
numberComponents
);
}
}
if
(
createdAttribute
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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