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
deed69a8
Commit
deed69a8
authored
May 22, 2012
by
Thomas Witkowski
Browse files
Fixed problem for 3D mesh redistribution.
parent
f5195017
Changes
3
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/Mesh.cc
View file @
deed69a8
...
@@ -602,28 +602,21 @@ namespace AMDiS {
...
@@ -602,28 +602,21 @@ namespace AMDiS {
TEST_EXIT_DBG
(
position
>=
CENTER
&&
position
<=
FACE
)
TEST_EXIT_DBG
(
position
>=
CENTER
&&
position
<=
FACE
)
(
"unknown position %d
\n
"
,
position
);
(
"unknown position %d
\n
"
,
position
);
int
ndof
=
nDof
[
position
];
if
(
nDof
[
position
])
{
if
(
ndof
)
{
TEST_EXIT_DBG
(
dof
!=
NULL
)(
"dof = NULL, but ndof = %d
\n
"
,
nDof
[
position
]);
if
(
!
dof
)
{
MSG
(
"dof = NULL, but ndof = %d
\n
"
,
ndof
);
return
;
}
}
else
{
}
else
{
if
(
dof
)
TEST_EXIT_DBG
(
dof
==
NULL
)(
"dof != NULL, but ndof = 0
\n
"
);
MSG
(
"dof != NULL, but ndof = 0
\n
"
);
return
;
}
}
TEST_EXIT_DBG
(
n
d
of
<=
MAX_DOF
)
TEST_EXIT_DBG
(
n
D
of
[
position
]
<=
MAX_DOF
)
(
"ndof too big: ndof = %d, MAX_DOF = %d
\n
"
,
n
d
of
,
MAX_DOF
);
(
"ndof too big: ndof = %d, MAX_DOF = %d
\n
"
,
n
D
of
[
position
]
,
MAX_DOF
);
for
(
unsigned
int
i
=
0
;
i
<
admin
.
size
();
i
++
)
{
for
(
unsigned
int
i
=
0
;
i
<
admin
.
size
();
i
++
)
{
int
n
=
admin
[
i
]
->
getNumberOfDofs
(
position
);
int
n
=
admin
[
i
]
->
getNumberOfDofs
(
position
);
int
n0
=
admin
[
i
]
->
getNumberOfPreDofs
(
position
);
int
n0
=
admin
[
i
]
->
getNumberOfPreDofs
(
position
);
TEST_EXIT_DBG
(
n
+
n0
<=
n
d
of
)
TEST_EXIT_DBG
(
n
+
n0
<=
n
D
of
[
position
]
)
(
"n = %d, n0 = %d too large: ndof = %d
\n
"
,
n
,
n0
,
n
d
of
);
(
"n = %d, n0 = %d too large: ndof = %d
\n
"
,
n
,
n0
,
n
D
of
[
position
]
);
for
(
int
j
=
0
;
j
<
n
;
j
++
)
for
(
int
j
=
0
;
j
<
n
;
j
++
)
admin
[
i
]
->
freeDofIndex
(
dof
[
n0
+
j
]);
admin
[
i
]
->
freeDofIndex
(
dof
[
n0
+
j
]);
...
...
AMDiS/src/parallel/MeshDistributor.cc
View file @
deed69a8
...
@@ -1318,8 +1318,9 @@ namespace AMDiS {
...
@@ -1318,8 +1318,9 @@ namespace AMDiS {
// === Add new macro elements to mesh. ===
// === Add new macro elements to mesh. ===
TEST_EXIT
(
mesh
->
getGeo
(
FACE
)
||
mesh
->
getGeo
(
CENTER
))
TEST_EXIT_DBG
(
feSpaces
.
size
()
==
1
)(
"Not yet implemented!
\n
"
);
(
"Mh, dass macht dann doch noch etwas Arbeit fr den Thomas!
\n
"
);
TEST_EXIT_DBG
(
feSpaces
[
0
]
->
getBasisFcts
()
->
getDegree
()
==
1
)
(
"Not yet implemented!
\n
"
);
for
(
std
::
set
<
MacroElement
*>::
iterator
it
=
newMacroEl
.
begin
();
for
(
std
::
set
<
MacroElement
*>::
iterator
it
=
newMacroEl
.
begin
();
it
!=
newMacroEl
.
end
();
++
it
)
{
it
!=
newMacroEl
.
end
();
++
it
)
{
...
@@ -1336,9 +1337,6 @@ namespace AMDiS {
...
@@ -1336,9 +1337,6 @@ namespace AMDiS {
for
(
int
i
=
0
;
i
<
mesh
->
getGeo
(
VERTEX
);
i
++
)
for
(
int
i
=
0
;
i
<
mesh
->
getGeo
(
VERTEX
);
i
++
)
mel
->
getElement
()
->
setDof
(
i
,
mesh
->
getDof
(
VERTEX
));
mel
->
getElement
()
->
setDof
(
i
,
mesh
->
getDof
(
VERTEX
));
for
(
int
i
=
0
;
i
<
mesh
->
getGeo
(
EDGE
);
i
++
)
mel
->
getElement
()
->
setDof
(
mesh
->
getGeo
(
VERTEX
)
+
i
,
mesh
->
getDof
(
EDGE
));
// Push the macro element to all macro elements in mesh.
// Push the macro element to all macro elements in mesh.
mesh
->
getMacroElements
().
push_back
(
mel
);
mesh
->
getMacroElements
().
push_back
(
mel
);
}
}
...
@@ -1372,8 +1370,8 @@ namespace AMDiS {
...
@@ -1372,8 +1370,8 @@ namespace AMDiS {
stdMpi
.
recv
(
it
->
first
);
stdMpi
.
recv
(
it
->
first
);
stdMpi
.
startCommunication
();
stdMpi
.
startCommunication
();
if
(
interchangeVectors
.
size
()
==
0
)
TEST_EXIT
(
interchangeVectors
.
size
()
>
0
)
WARNING
(
"There are no interchange vectors defined!
\n
"
);
(
"There are no interchange vectors defined!
\n
"
);
StdMpi
<
vector
<
vector
<
double
>
>
>
stdMpi2
(
mpiComm
,
true
);
StdMpi
<
vector
<
vector
<
double
>
>
>
stdMpi2
(
mpiComm
,
true
);
stdMpi2
.
send
(
sendValues
);
stdMpi2
.
send
(
sendValues
);
...
...
AMDiS/src/parallel/MeshManipulation.cc
View file @
deed69a8
...
@@ -157,8 +157,7 @@ namespace AMDiS {
...
@@ -157,8 +157,7 @@ namespace AMDiS {
dofPosIndex
[
dofs0
[
i
]]
=
dofGeoIndex0
[
i
];
dofPosIndex
[
dofs0
[
i
]]
=
dofGeoIndex0
[
i
];
TEST_EXIT_DBG
(
dofGeoIndex0
[
i
]
==
dofGeoIndex1
[
i
])
TEST_EXIT_DBG
(
dofGeoIndex0
[
i
]
==
dofGeoIndex1
[
i
])
(
"Should not happen: %d %d
\n
"
,
(
"Should not happen: %d %d
\n
"
,
dofGeoIndex0
[
i
],
dofGeoIndex1
[
i
]);
dofGeoIndex0
[
i
],
dofGeoIndex1
[
i
]);
}
}
break
;
break
;
...
@@ -190,17 +189,24 @@ namespace AMDiS {
...
@@ -190,17 +189,24 @@ namespace AMDiS {
BoundaryObject
b0
(
el0
,
0
,
FACE
,
i
,
reverseMode
);
BoundaryObject
b0
(
el0
,
0
,
FACE
,
i
,
reverseMode
);
BoundaryObject
b1
(
el1
,
0
,
FACE
,
elIt
->
ithObject
,
false
);
BoundaryObject
b1
(
el1
,
0
,
FACE
,
elIt
->
ithObject
,
false
);
DofContainer
dofs0
,
dofs1
;
DofContainer
dofs0
,
dofs1
;
el0
->
getAllDofs
(
feSpace
,
b0
,
dofs0
,
true
);
vector
<
GeoIndex
>
dofGeoIndex0
,
dofGeoIndex1
;
el1
->
getAllDofs
(
feSpace
,
b1
,
dofs1
,
true
);
el0
->
getAllDofs
(
feSpace
,
b0
,
dofs0
,
true
,
&
dofGeoIndex0
);
el1
->
getAllDofs
(
feSpace
,
b1
,
dofs1
,
true
,
&
dofGeoIndex1
);
#if (DEBUG != 0)
#if (DEBUG != 0)
debug
::
testDofsByCoords
(
feSpace
,
dofs0
,
dofs1
);
if
(
feSpaces
.
size
()
==
1
)
debug
::
testDofsByCoords
(
feSpace
,
dofs0
,
dofs1
);
else
TEST_EXIT_DBG
(
dofs0
.
size
()
==
dofs1
.
size
())(
"Should not happen!
\n
"
);
#endif
#endif
for
(
unsigned
int
i
=
0
;
i
<
dofs0
.
size
();
i
++
)
{
for
(
unsigned
int
i
=
0
;
i
<
dofs0
.
size
();
i
++
)
{
mapDelDofs
[
dofs0
[
i
]]
=
dofs1
[
i
];
mapDelDofs
[
dofs0
[
i
]]
=
dofs1
[
i
];
dofPosIndex
[
dofs0
[
i
]]
=
FACE
;
dofPosIndex
[
dofs0
[
i
]]
=
dofGeoIndex1
[
i
];
TEST_EXIT_DBG
(
dofGeoIndex0
[
i
]
==
dofGeoIndex1
[
i
])
(
"Should not happen: %d %d
\n
"
,
dofGeoIndex0
[
i
],
dofGeoIndex1
[
i
]);
}
}
break
;
break
;
...
...
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