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
CrayzeeWulf
Xdmf
Commits
68d4ee41
Commit
68d4ee41
authored
Jul 02, 2010
by
Kenneth Leiter
Browse files
ENH: Add Hexahedron_64() to Hexahedron() Topology Conversion.
parent
12f100b7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
utils/XdmfTopologyConverter.cpp
View file @
68d4ee41
This diff is collapsed.
Click to expand it.
utils/XdmfTopologyConverter.hpp
View file @
68d4ee41
...
...
@@ -46,6 +46,7 @@ private:
// Specific Topology Converters
class
HexahedronToHexahedron64
;
class
Hexahedron64ToHexahedron
;
// Point comparator
class
PointComparison
;
...
...
utils/tests/Cxx/TestXdmfTopologyConverter.cpp
View file @
68d4ee41
...
...
@@ -62,5 +62,18 @@ int main(int argc, char* argv[])
assert
(
i
==
hex64Grid
->
getTopology
()
->
getArray
()
->
getValueCopy
<
unsigned
int
>
(
i
));
}
/*
* Hexahedron_64 to Hexahedron
*/
boost
::
shared_ptr
<
XdmfGrid
>
newHexGrid
=
converter
->
convert
(
hex64Grid
,
XdmfTopologyType
::
Hexahedron
());
assert
(
newHexGrid
->
getGeometry
()
->
getGeometryType
()
==
XdmfGeometryType
::
XYZ
());
assert
(
newHexGrid
->
getGeometry
()
->
getNumberPoints
()
==
64
);
for
(
unsigned
int
i
=
0
;
i
<
192
;
++
i
)
{
assert
(
fabs
(
expectedPoints
[
i
]
-
newHexGrid
->
getGeometry
()
->
getArray
()
->
getValueCopy
<
double
>
(
i
))
<
epsilon
);
}
assert
(
newHexGrid
->
getTopology
()
->
getTopologyType
()
==
XdmfTopologyType
::
Hexahedron
());
assert
(
newHexGrid
->
getTopology
()
->
getNumberElements
()
==
27
);
return
0
;
}
Write
Preview
Markdown
is supported
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