Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
7f849e47
Commit
7f849e47
authored
Jul 04, 2017
by
Praetorius, Simon
Browse files
DOFSerializer implementation put into .cc file
parent
5de0fd6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/DOFSerializer.cc
View file @
7f849e47
...
...
@@ -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 @
7f849e47
...
...
@@ -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
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