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
iwr
amdis
Commits
6020c0d7
Commit
6020c0d7
authored
Mar 09, 2009
by
Thomas Witkowski
Browse files
* And again the stupid getGradient bug :)
parent
09b09438
Changes
1
Show whitespace changes
Inline
Side-by-side
AMDiS/src/DOFVector.cc
View file @
6020c0d7
...
...
@@ -555,6 +555,7 @@ namespace AMDiS {
}
else
{
if
(
!
result
)
{
result
=
NEW
WorldVector
<
DOFVector
<
double
>*>
;
result
->
set
(
NULL
);
}
for
(
int
i
=
0
;
i
<
dow
;
i
++
)
{
...
...
@@ -586,8 +587,9 @@ namespace AMDiS {
numNodes
+=
numPositionNodes
;
}
TEST_EXIT_DBG
(
numNodes
==
mesh
->
getNumberOfNodes
())
(
"invalid number of nodes
\n
"
);
// TEST_EXIT_DBG(numNodes == mesh->getNumberOfNodes())
// ("invalid number of nodes\n");
TEST_EXIT_DBG
(
numDOFs
==
basFcts
->
getNumber
())
(
"number of dofs != number of basis functions
\n
"
);
...
...
@@ -598,7 +600,7 @@ namespace AMDiS {
// traverse mesh
std
::
vector
<
bool
>
visited
(
getUsedSize
(),
false
);
TraverseStack
stack
;
Flag
fillFlag
=
Mesh
::
CALL_LEAF_EL
|
Mesh
::
FILL_GRD_LAMBDA
;
Flag
fillFlag
=
Mesh
::
CALL_LEAF_EL
|
Mesh
::
FILL_GRD_LAMBDA
|
Mesh
::
FILL_COORDS
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
fillFlag
);
WorldVector
<
double
>
grd
;
...
...
@@ -614,11 +616,10 @@ namespace AMDiS {
DegreeOfFreedom
dofIndex
=
dof
[
i
][
numNodePreDOFs
[
localDOFNr
]
+
j
];
if
(
!
visited
[
dofIndex
])
{
basFcts
->
evalGrdUh
(
*
(
bary
[
localDOFNr
]),
grdLambda
,
localUh
,
&
grd
);
basFcts
->
evalGrdUh
(
*
(
bary
[
localDOFNr
]),
grdLambda
,
localUh
,
&
grd
);
for
(
int
k
=
0
;
k
<
dow
;
k
++
)
{
(
*
result
)[
k
][
dofIndex
]
=
grd
[
k
];
(
*
(
*
result
)[
k
]
)
[
dofIndex
]
=
grd
[
k
];
}
visited
[
dofIndex
]
=
true
;
...
...
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