Skip to content
GitLab
Menu
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
c21c94de
Commit
c21c94de
authored
Sep 18, 2013
by
Praetorius, Simon
Browse files
some changes in Mesh to allow for better findElInfoAtPoint
parent
26179bbc
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/Mesh.cc
View file @
c21c94de
...
...
@@ -709,23 +709,26 @@ namespace AMDiS {
int
k
;
while
((
k
=
mel_info
->
worldToCoord
(
xy
,
&
lambda
))
>=
0
)
{
macrosVisited
.
insert
(
mel
->
getIndex
());
if
(
mel
->
getNeighbour
(
k
)
&&
!
macrosVisited
.
count
(
mel
->
getNeighbour
(
k
)
->
getIndex
()))
{
// look for next macro-element in the direction of the coordinates xy
mel
=
mel
->
getNeighbour
(
k
);
// if (macrosVisited.count(mel->getIndex())) // Nur für periodische RB interessant, muss noch implementiert werden
// return false;
mel_info
->
fillMacroInfo
(
mel
);
continue
;
}
else
{
// consider all neighbors of the current macro-element to visit next
for
(
int
i
=
0
;
i
<
dim
+
1
;
++
i
)
{
if
(
i
!=
k
&&
mel
->
getNeighbour
(
i
)
&&
!
macrosVisited
.
count
(
mel
->
getNeighbour
(
i
)
->
getIndex
()))
active
.
push
(
mel
->
getNeighbour
(
i
));
}
if
(
active
.
empty
())
{
if
(
macrosVisited
.
size
()
==
getNumberOfMacros
())
{
// if all neighbors are visited already
if
(
active
.
empty
())
{
if
(
macrosVisited
.
size
()
==
static_cast
<
size_t
>
(
getNumberOfMacros
()))
{
// if all macro-elements are visited -> no element found!
delete
mel_info
;
return
false
;
}
else
{
// go to an arbitrary macro-element to continue the search
deque
<
MacroElement
*>::
iterator
it
;
bool
found
=
false
;
for
(
it
=
firstMacroElement
();
it
!=
endOfMacroElements
();
it
++
)
{
...
...
AMDiS/src/parallel/PetscSolver.cc
View file @
c21c94de
...
...
@@ -85,7 +85,7 @@ namespace AMDiS { namespace Parallel {
TEST_EXIT
(
meshDistributor
)(
"No meshDistributor provided. Should not happen!
\n
"
);
MPI
::
COMM_WORLD
.
Barrier
();
double
wtime
=
MPI
::
Wtime
()
;
Timer
t
;
if
(
createMatrixData
)
fillPetscMatrix
(
const_cast
<
Matrix
<
DOFMatrix
*
>*
>
(
A
.
getOriginalMat
()));
...
...
@@ -93,7 +93,7 @@ namespace AMDiS { namespace Parallel {
fillPetscRhs
(
&
b
);
INFO
(
info
,
8
)(
"creation of parallel data structures needed %.5f seconds
\n
"
,
MPI
::
Wtime
()
-
wtime
);
t
.
elapsed
()
);
solvePetscMatrix
(
x
,
NULL
);
...
...
Write
Preview
Supports
Markdown
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