Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
iwr
amdis
Commits
23323668
Commit
23323668
authored
Jul 04, 2017
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DOFSerializer implementation put into .cc file
parent
967fd680
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
AMDiS/src/DOFSerializer.cc
AMDiS/src/DOFSerializer.cc
+11
-5
tools/install_boost.sh
tools/install_boost.sh
+1
-1
No files found.
AMDiS/src/DOFSerializer.cc
View file @
23323668
...
...
@@ -28,6 +28,8 @@ void DOFSerializer::gather(int macroIndex, DOFVector<double> const* vec, std::ve
values
.
clear
();
}
TEST_EXIT
(
mesh_
==
vec
->
getFeSpace
()
->
getMesh
())(
"Incompatible meshes!
\n
"
);
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirstOneMacro
(
mesh_
,
macroIndex
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
while
(
elInfo
)
{
...
...
@@ -51,12 +53,13 @@ void DOFSerializer::gather(GeoIndex geo, ElInfo* elInfo, DOFVector<double> const
{
int
nd
;
if
((
nd
=
admin_
->
getNumberOfDofs
(
geo
)))
{
int
vertic
es
=
mesh_
->
getGeo
(
geo
);
int
entiti
es
=
mesh_
->
getGeo
(
geo
);
int
nd0
=
admin_
->
getNumberOfPreDofs
(
geo
);
int
n0
=
mesh_
->
getNode
(
geo
);
for
(
int
n
=
0
;
n
<
vertic
es
;
n
++
)
{
for
(
int
n
=
0
;
n
<
entiti
es
;
n
++
)
{
for
(
int
d
=
0
;
d
<
nd
;
d
++
)
{
DegreeOfFreedom
globalDof
=
elInfo
->
getElement
()
->
getDof
(
n0
+
n
,
nd0
+
d
);
TEST_EXIT
(
globalDof
<
visited_
.
size
())(
"visited container not large enough!
\n
"
);
if
(
!
visited_
[
globalDof
])
{
visited_
[
globalDof
]
=
true
;
values
.
push_back
((
*
vec
)[
globalDof
]);
...
...
@@ -86,6 +89,8 @@ void DOFSerializer::scatter(int macroIndex, std::vector<double> const& values, D
counter_
=
0u
;
}
TEST_EXIT
(
mesh_
==
vec
->
getFeSpace
()
->
getMesh
())(
"Incompatible meshes!
\n
"
);
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirstOneMacro
(
mesh_
,
macroIndex
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
while
(
elInfo
)
{
...
...
@@ -109,15 +114,16 @@ void DOFSerializer::scatter(GeoIndex geo, ElInfo* elInfo, std::vector<double> co
{
int
nd
;
if
((
nd
=
admin_
->
getNumberOfDofs
(
geo
)))
{
int
vertic
es
=
mesh_
->
getGeo
(
geo
);
int
entiti
es
=
mesh_
->
getGeo
(
geo
);
int
nd0
=
admin_
->
getNumberOfPreDofs
(
geo
);
int
n0
=
mesh_
->
getNode
(
geo
);
for
(
int
n
=
0
;
n
<
vertic
es
;
n
++
)
{
for
(
int
n
=
0
;
n
<
entiti
es
;
n
++
)
{
for
(
int
d
=
0
;
d
<
nd
;
d
++
)
{
DegreeOfFreedom
globalDof
=
elInfo
->
getElement
()
->
getDof
(
n0
+
n
,
nd0
+
d
);
TEST_EXIT
(
globalDof
<
visited_
.
size
())(
"visited container not large enough!
\n
"
);
if
(
!
visited_
[
globalDof
])
{
visited_
[
globalDof
]
=
true
;
assert
(
values
.
size
()
<
co
u
nt
er_
);
TEST_EXIT
(
counter_
<
values
.
size
())(
"Not enough values in value-
cont
ainer!
\n
"
);
(
*
vec
)[
globalDof
]
=
values
[
counter_
++
];
}
}
...
...
tools/install_boost.sh
View file @
23323668
...
...
@@ -23,5 +23,5 @@ cd ${BUILD_DIR}
./bootstrap.sh
--prefix
=
${
BOOST_PREFIX
}
\
--with-libraries
=
system,iostreams,filesystem,program_options,date_time,test,thread,mpi,serialization
echo
"using mpi ;"
>>
project-config.jam
./b2
-s
NO_BZIP2
=
1
-s
NO_ZLIB
=
1
cxxflags
=
"-std=c++14"
--build-type
=
minimal
variant
=
release
install
./b2
cxxflags
=
"-std=c++14"
--build-type
=
minimal
variant
=
release
install
rm
-rf
${
BUILD_DIR
}
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