Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Nektar
Nektar
Commits
d95a459a
Commit
d95a459a
authored
Jun 20, 2014
by
Dave Moxey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug, add information on valency
parent
5df0a5a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
10 deletions
+45
-10
library/MultiRegions/AssemblyMap/AssemblyMap.cpp
library/MultiRegions/AssemblyMap/AssemblyMap.cpp
+45
-10
No files found.
library/MultiRegions/AssemblyMap/AssemblyMap.cpp
View file @
d95a459a
...
...
@@ -1236,7 +1236,6 @@ namespace Nektar
Array
<
OneD
,
NekDouble
>
tmpGlob
(
m_numGlobalBndCoeffs
,
0.0
);
AssembleBnd
(
tmpLoc
,
tmpGlob
);
int
highValence
=
Vmath
::
Vmax
(
m_numGlobalBndCoeffs
,
tmpGlob
,
1
);
int
totGlobDof
=
globCnt
;
int
totGlobBndDof
=
globBndCnt
;
int
totGlobDirDof
=
globDirCnt
;
...
...
@@ -1244,7 +1243,30 @@ namespace Nektar
int
totLocalBndDof
=
m_numLocalBndCoeffs
;
int
totLocalDirDof
=
m_numLocalDirBndCoeffs
;
vRowComm
->
AllReduce
(
highValence
,
LibUtilities
::
ReduceMax
);
int
meanValence
=
0
;
int
maxValence
=
0
;
int
minValence
=
10000000
;
for
(
int
i
=
0
;
i
<
m_numGlobalBndCoeffs
;
++
i
)
{
if
(
!
m_globalToUniversalBndMapUnique
[
i
])
{
continue
;
}
if
(
tmpGlob
[
i
]
>
maxValence
)
{
maxValence
=
tmpGlob
[
i
];
}
if
(
tmpGlob
[
i
]
<
minValence
)
{
minValence
=
tmpGlob
[
i
];
}
meanValence
+=
tmpGlob
[
i
];
}
vRowComm
->
AllReduce
(
maxValence
,
LibUtilities
::
ReduceMax
);
vRowComm
->
AllReduce
(
minValence
,
LibUtilities
::
ReduceMin
);
vRowComm
->
AllReduce
(
meanValence
,
LibUtilities
::
ReduceSum
);
vRowComm
->
AllReduce
(
totGlobDof
,
LibUtilities
::
ReduceSum
);
vRowComm
->
AllReduce
(
totGlobBndDof
,
LibUtilities
::
ReduceSum
);
vRowComm
->
AllReduce
(
totGlobDirDof
,
LibUtilities
::
ReduceSum
);
...
...
@@ -1252,18 +1274,21 @@ namespace Nektar
vRowComm
->
AllReduce
(
totLocalBndDof
,
LibUtilities
::
ReduceSum
);
vRowComm
->
AllReduce
(
totLocalDirDof
,
LibUtilities
::
ReduceSum
);
meanValence
/=
totGlobBndDof
;
if
(
isRoot
)
{
out
<<
"Assembly map statistics for field "
<<
variable
<<
":"
<<
endl
;
out
<<
" - Number of local/global dof : "
out
<<
" - Number of local/global dof
: "
<<
totLocalDof
<<
" "
<<
totGlobDof
<<
endl
;
out
<<
" - Number of local/global boundary dof : "
out
<<
" - Number of local/global boundary dof
: "
<<
totLocalBndDof
<<
" "
<<
totGlobBndDof
<<
endl
;
out
<<
" - Number of local/global Dirichlet dof : "
out
<<
" - Number of local/global Dirichlet dof
: "
<<
totLocalDirDof
<<
" "
<<
totGlobDirDof
<<
endl
;
out
<<
" - Highest dof valency : "
<<
highValence
<<
endl
;
out
<<
" - dof valency (min/max/mean) : "
<<
minValence
<<
" "
<<
maxValence
<<
" "
<<
meanValence
<<
endl
;
if
(
n
>
1
)
{
...
...
@@ -1276,6 +1301,7 @@ namespace Nektar
vRowComm
->
Recv
(
i
,
tmp
);
mean
+=
tmp
[
0
];
mean2
+=
tmp
[
0
]
*
tmp
[
0
];
if
(
tmp
[
0
]
>
maxval
)
{
maxval
=
tmp
[
0
];
...
...
@@ -1286,10 +1312,10 @@ namespace Nektar
}
}
out
<<
" - Local dof dist. (min/max/mean
)
: "
out
<<
" - Local dof dist. (min/max/mean
/dev)
: "
<<
minval
<<
" "
<<
maxval
<<
" "
<<
(
mean
/
n
)
<<
" "
<<
sqrt
(
mean2
/
n
-
mean
*
mean
/
n
/
n
)
<<
endl
;
vRowComm
->
Block
();
mean
=
minval
=
maxval
=
m_numLocalBndCoeffs
;
...
...
@@ -1300,9 +1326,18 @@ namespace Nektar
vRowComm
->
Recv
(
i
,
tmp
);
mean
+=
tmp
[
0
];
mean2
+=
tmp
[
0
]
*
tmp
[
0
];
if
(
tmp
[
0
]
>
maxval
)
{
maxval
=
tmp
[
0
];
}
if
(
tmp
[
0
]
<
minval
)
{
minval
=
tmp
[
0
];
}
}
out
<<
" - Local bnd dof dist. (min/max/mean
)
: "
out
<<
" - Local bnd dof dist. (min/max/mean
/dev)
: "
<<
minval
<<
" "
<<
maxval
<<
" "
<<
(
mean
/
n
)
<<
" "
<<
sqrt
(
mean2
/
n
-
mean
*
mean
/
n
/
n
)
<<
endl
;
}
...
...
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