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
09c650f9
Commit
09c650f9
authored
May 07, 2012
by
Praetorius, Simon
Browse files
error in evalAtPoint corrected
parent
b00c153a
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/DOFVector.cc
View file @
09c650f9
...
...
@@ -96,8 +96,8 @@ namespace AMDiS {
if
(
inside
)
{
basFcts
->
getLocalIndices
(
elInfo
->
getElement
(),
feSpace
->
getAdmin
(),
localIndices
);
ElementVector
uh
(
lambda
.
size
()
);
for
(
int
i
=
0
;
i
<
lambda
.
size
()
;
i
++
)
ElementVector
uh
(
nBasFcts
);
for
(
int
i
=
0
;
i
<
nBasFcts
;
i
++
)
uh
[
i
]
=
operator
[](
localIndices
[
i
]);
value
=
basFcts
->
evalUh
(
lambda
,
uh
);
}
else
...
...
@@ -145,8 +145,8 @@ namespace AMDiS {
if
(
inside
)
{
basFcts
->
getLocalIndices
(
elInfo
->
getElement
(),
feSpace
->
getAdmin
(),
localIndices
);
mtl
::
dense_vector
<
WorldVector
<
double
>
>
uh
(
lambda
.
size
()
);
for
(
int
i
=
0
;
i
<
lambda
.
size
()
;
i
++
)
mtl
::
dense_vector
<
WorldVector
<
double
>
>
uh
(
nBasFcts
);
for
(
int
i
=
0
;
i
<
nBasFcts
;
i
++
)
uh
[
i
]
=
operator
[](
localIndices
[
i
]);
*
val
=
basFcts
->
evalUh
(
lambda
,
uh
);
}
else
...
...
AMDiS/src/DOFVector.hh
View file @
09c650f9
...
...
@@ -980,16 +980,20 @@ namespace AMDiS {
return
false
;
basFcts
->
getLocalIndices
(
elInfo
->
getElement
(),
this
->
feSpace
->
getAdmin
(),
localIndices
);
FixVec
<
WorldVector
<
double
>
,
VERTEX
>
coords
=
elInfo
->
getCoords
();
WorldVector
<
double
>
coord
;
int
minIdx
=
-
1
;
double
minDist
=
1.e15
;
for
(
int
i
=
0
;
i
<
coords
.
size
();
i
++
)
{
WorldVector
<
double
>
dist
=
coords
[
i
]
-
p
;
for
(
int
i
=
0
;
i
<
numBasFcts
;
i
++
)
{
elInfo
->
coordToWorld
(
*
(
basFcts
->
getCoords
(
i
)),
coord
);
WorldVector
<
double
>
dist
=
coord
-
p
;
double
newDist
=
norm
(
dist
);
if
(
newDist
<
minDist
)
{
minIdx
=
i
;
minDist
=
newDist
;
if
(
minDist
<
1.e-10
)
break
;
}
}
...
...
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