Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iwr
amdis
Commits
205b4671
Commit
205b4671
authored
14 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
Added pre refinements for mesh in parallel computations.
parent
0f8097b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AMDiS/src/Mesh.cc
+10
-0
10 additions, 0 deletions
AMDiS/src/Mesh.cc
AMDiS/src/parallel/MeshManipulation.cc
+17
-0
17 additions, 0 deletions
AMDiS/src/parallel/MeshManipulation.cc
with
27 additions
and
0 deletions
AMDiS/src/Mesh.cc
+
10
−
0
View file @
205b4671
...
...
@@ -1280,6 +1280,16 @@ namespace AMDiS {
}
// === Check if number of pre refinements is set ini init file. ===
int
nPreRefine
=
0
;
GET_PARAMETER
(
0
,
"parallel->pre refine"
,
"%d"
,
&
nPreRefine
);
if
(
nPreRefine
!=
0
)
{
MSG
(
"Calculated %d pre refines to be useful, but %d are set in init file!
\n
"
,
nrRefine
,
nPreRefine
);
nrRefine
=
nPreRefine
;
}
// === If we do not need to refine the mesh, return back. ===
if
(
nrRefine
==
0
)
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/parallel/MeshManipulation.cc
+
17
−
0
View file @
205b4671
...
...
@@ -25,6 +25,9 @@ namespace AMDiS {
TEST_EXIT
(
mesh
->
getDim
()
==
2
)(
"Not yet supported for dim != 2!
\n
"
);
// Create data structure that maps macro element indices to the
// corresponding pointers.
std
::
map
<
int
,
MacroElement
*>
macroIndexMap
;
for
(
std
::
set
<
MacroElement
*>::
iterator
it
=
newMacroEl
.
begin
();
it
!=
newMacroEl
.
end
();
++
it
)
...
...
@@ -33,6 +36,10 @@ namespace AMDiS {
std
::
set
<
int
>
macrosProcessed
;
std
::
map
<
const
DegreeOfFreedom
*
,
const
DegreeOfFreedom
*>
mapDelDofs
;
// === Traverse mesh and put all "old" macro element to macrosProcessed ===
// === that stores all macro elements which are really conected to the ===
// === overall mesh structure. ===
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
0
,
Mesh
::
CALL_EL_LEVEL
);
...
...
@@ -48,6 +55,10 @@ namespace AMDiS {
}
// === Traverse all new elements and connect them to the overall mesh ===
// === structure by deleting all double DOFs on macro element's vertices, ===
// === edges and faces. ===
for
(
std
::
set
<
MacroElement
*>::
iterator
it
=
newMacroEl
.
begin
();
it
!=
newMacroEl
.
end
();
++
it
)
{
...
...
@@ -127,6 +138,8 @@ namespace AMDiS {
}
// === Remove all DOF replacments of the form A -> B, B -> C by A -> C. ===
bool
changed
=
false
;
do
{
changed
=
false
;
...
...
@@ -144,6 +157,8 @@ namespace AMDiS {
}
while
(
changed
);
// === Set new DOF pointers in all elements of the mesh. ===
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
while
(
elInfo
)
{
for
(
int
i
=
0
;
i
<
mesh
->
getGeo
(
VERTEX
);
i
++
)
...
...
@@ -154,6 +169,8 @@ namespace AMDiS {
}
// === And delete all double DOFs. ===
for
(
std
::
map
<
const
DegreeOfFreedom
*
,
const
DegreeOfFreedom
*>::
iterator
it
=
mapDelDofs
.
begin
();
it
!=
mapDelDofs
.
end
();
++
it
)
mesh
->
freeDof
(
const_cast
<
DegreeOfFreedom
*>
(
it
->
first
),
VERTEX
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment