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
Aland, Sebastian
amdis
Commits
4e04f5ba
Commit
4e04f5ba
authored
Jan 04, 2012
by
Praetorius, Simon
Browse files
getRecoveryGradient vor higher polynomial degrees
parent
fd574ac4
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/DOFVector.cc
View file @
4e04f5ba
...
...
@@ -412,7 +412,7 @@ namespace AMDiS {
volume
.
set
(
0.0
);
const
BasisFunction
*
basFcts
=
feSpace
->
getBasisFcts
();
int
n
PreDofs
=
feSpace
->
getAdmin
()
->
getNumberOfPreDofs
(
VERTEX
);
int
n
BasisFcts
=
basFcts
->
getNumber
(
);
DimVec
<
double
>
bary
(
dim
,
DEFAULT_VALUE
,
(
1.0
/
(
dim
+
1.0
)));
WorldVector
<
double
>
grd
;
...
...
@@ -421,22 +421,22 @@ namespace AMDiS {
Mesh
*
mesh
=
feSpace
->
getMesh
();
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
Mesh
::
CALL_LEAF_EL
|
Mesh
::
FILL_DET
|
Mesh
::
CALL_LEAF_EL
|
Mesh
::
FILL_DET
|
Mesh
::
FILL_GRD_LAMBDA
|
Mesh
::
FILL_COORDS
);
ElementVector
localUh
(
basFcts
->
getNumber
());
mtl
::
dense_vector
<
double
>
localUh
(
basFcts
->
getNumber
());
std
::
vector
<
DegreeOfFreedom
>
localIndices
(
nBasisFcts
);
while
(
elInfo
)
{
double
det
=
elInfo
->
getDet
();
const
DegreeOfFreedom
**
dof
=
elInfo
->
getElement
()
->
getDof
();
const
DimVec
<
WorldVector
<
double
>
>
&
grdLambda
=
elInfo
->
getGrdLambda
();
getLocalVector
(
elInfo
->
getElement
(),
localUh
);
basFcts
->
evalGrdUh
(
bary
,
grdLambda
,
localUh
,
&
grd
);
basFcts
->
getLocalIndices
(
elInfo
->
getElement
(),
feSpace
->
getAdmin
(),
localIndices
);
for
(
int
i
=
0
;
i
<
dim
+
1
;
i
++
)
{
DegreeOfFreedom
dofIndex
=
dof
[
i
][
nPreDofs
];
(
*
result
)[
dofIndex
]
+=
grd
*
det
;
volume
[
dofIndex
]
+=
det
;
for
(
int
i
=
0
;
i
<
nBasisFcts
;
i
++
)
{
(
*
result
)[
localIndices
[
i
]]
+=
grd
*
det
;
volume
[
localIndices
[
i
]]
+=
det
;
}
elInfo
=
stack
.
traverseNext
(
elInfo
);
...
...
AMDiS/src/io/PngReader.cc
View file @
4e04f5ba
...
...
@@ -64,6 +64,8 @@ namespace AMDiS {
cout
<<
"Bytes per pixel: "
<<
bytesPerPixel
<<
endl
;
double
value
=
0
;
const
DOFAdmin
*
admin
=
vec
->
getFeSpace
()
->
getAdmin
();
const
BasisFunction
*
basFcts
=
vec
->
getFeSpace
()
->
getBasisFcts
();
int
numBasFcts
=
basFcts
->
getNumber
();
DegreeOfFreedom
*
localIndices
=
new
DegreeOfFreedom
[
numBasFcts
];
...
...
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