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
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
Backofen, Rainer
amdis
Commits
4833cba6
Commit
4833cba6
authored
14 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
Just the ellipt demos
parent
c49beaba
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
demo/init/ellipt.dat.2d
+3
-3
3 additions, 3 deletions
demo/init/ellipt.dat.2d
demo/src/ellipt.cc
+3
-34
3 additions, 34 deletions
demo/src/ellipt.cc
with
6 additions
and
37 deletions
demo/init/ellipt.dat.2d
+
3
−
3
View file @
4833cba6
dimension of world: 2
dimension of world: 2
elliptMesh->macro file name: ./macro/macro.stand.2d
elliptMesh->macro file name: ./macro/macro.stand.2d
elliptMesh->global refinements:
2
elliptMesh->global refinements:
0
ellipt->mesh: elliptMesh
ellipt->mesh: elliptMesh
ellipt->dim: 2
ellipt->dim: 2
...
@@ -19,11 +19,11 @@ ellipt->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM
...
@@ -19,11 +19,11 @@ ellipt->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM
ellipt->estimator->C0: 0.1 % constant of element residual
ellipt->estimator->C0: 0.1 % constant of element residual
ellipt->estimator->C1: 0.1 % constant of jump residual
ellipt->estimator->C1: 0.1 % constant of jump residual
ellipt->marker->strategy:
0
% 0: no adaption 1: GR 2: MS 3: ES 4:GERS
ellipt->marker->strategy:
2
% 0: no adaption 1: GR 2: MS 3: ES 4:GERS
ellipt->marker->MSGamma: 0.5
ellipt->marker->MSGamma: 0.5
ellipt->adapt->tolerance: 1e-4
ellipt->adapt->tolerance: 1e-4
ellipt->adapt->max iteration: 0
ellipt->adapt->max iteration:
1
0
ellipt->adapt->refine bisections: 2
ellipt->adapt->refine bisections: 2
ellipt->output->filename: ellipt
ellipt->output->filename: ellipt
...
...
This diff is collapsed.
Click to expand it.
demo/src/ellipt.cc
+
3
−
34
View file @
4833cba6
...
@@ -83,41 +83,10 @@ int main(int argc, char* argv[])
...
@@ -83,41 +83,10 @@ int main(int argc, char* argv[])
// ===== start adaption loop =====
// ===== start adaption loop =====
// adapt.adapt();
adapt
.
adapt
();
// Speichert hier bei jedem 2D-Element die DOFs auf dem Element.
std
::
vector
<
DegreeOfFreedom
>
localDofs
(
3
);
// Damit wir jeden DOF nur einmal aufrufen, speichern wir hier jeden
// besuchten DOF.
std
::
set
<
DegreeOfFreedom
>
dofsVisited
;
// Okay, einfach das Gitter traversieren.
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
ellipt
.
getMesh
(),
-
1
,
Mesh
::
CALL_LEAF_EL
|
Mesh
::
FILL_COORDS
);
while
(
elInfo
)
{
// Zuerst lassen wir uns die DOFs des aktuellen Elements in localDofs abspeichern.
ellipt
.
getFeSpace
()
->
getBasisFcts
()
->
getLocalIndices
(
elInfo
->
getElement
(),
ellipt
.
getFeSpace
()
->
getAdmin
(),
localDofs
);
// Dann durchlaufen wir die drei DOFs (ist also fix für lineare Elemente in 2D!!!!)
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
// Falls der DOF noch nicht ausgegeben wurde.
if
(
dofsVisited
.
count
(
localDofs
[
i
])
==
0
)
{
// Gib globalen DOF Index und seine Welt-Koordinaten aus.
std
::
cout
<<
"DOF "
<<
localDofs
[
i
]
<<
": "
<<
elInfo
->
getCoord
(
i
)[
0
]
<<
" "
<<
elInfo
->
getCoord
(
i
)[
1
]
<<
"
\n
"
;
// Merke dir den DOF, dass er schon ausgegebe wurde.
dofsVisited
.
insert
(
localDofs
[
i
]);
}
}
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
ellipt
.
writeFiles
(
adaptInfo
,
true
);
}
}
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