Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
amdis
amdis-core
Commits
f320e33d
Commit
f320e33d
authored
6 years ago
by
Müller, Felix
Committed by
Praetorius, Simon
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
replaced calls to leafGridView by globalBasis->gridView, estimator is now accessed by treepath
parent
bd9927ab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/amdis/Marker.cpp
+1
-0
1 addition, 0 deletions
src/amdis/Marker.cpp
src/amdis/ProblemStat.hpp
+14
-8
14 additions, 8 deletions
src/amdis/ProblemStat.hpp
src/amdis/ProblemStat.inc.hpp
+6
-4
6 additions, 4 deletions
src/amdis/ProblemStat.inc.hpp
with
21 additions
and
12 deletions
src/amdis/Marker.cpp
+
1
−
0
View file @
f320e33d
...
...
@@ -18,6 +18,7 @@ namespace AMDiS {
switch
(
strategy
)
{
case
0
:
// no refinement/coarsening
marker
=
NULL
;
break
;
case
1
:
msg
(
"Creating global refinement (GR) marker
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
src/amdis/ProblemStat.hpp
+
14
−
8
View file @
f320e33d
...
...
@@ -279,13 +279,19 @@ namespace AMDiS
solution_
=
std
::
make_shared
<
SystemVector
>
(
*
globalBasis_
,
"solution"
);
rhs_
=
std
::
make_shared
<
SystemVector
>
(
*
globalBasis_
,
"rhs"
);
estimates
.
resize
(
leafGridView
().
indexSet
().
size
(
0
));
for
(
std
::
size_t
i
=
0
;
i
<
estimates
.
size
();
i
++
)
{
estimates
[
i
].
resize
(
nComponents
);
for
(
std
::
size_t
j
=
0
;
j
<
estimates
[
i
].
size
();
j
++
)
{
systemMatrix
=
std
::
make_shared
<
SystemMatrix
>
(
*
globalBasis
,
*
globalBasis
,
"mat"
);
solution
=
std
::
make_shared
<
SystemVector
>
(
*
globalBasis
,
"solution"
);
auto
localView
=
globalBasis
->
localView
();
forEachNode
(
localView
.
tree
(),
[
&
,
this
](
auto
const
&
node
,
auto
treePath
)
{
std
::
string
i
=
to_string
(
treePath
);
estimates
[
i
].
resize
(
globalBasis
->
gridView
().
indexSet
().
size
(
0
));
for
(
std
::
size_t
j
=
0
;
j
<
estimates
[
i
].
size
();
j
++
)
estimates
[
i
][
j
]
=
0.0
;
// TODO: Remove when estimate() is implemented
}
}
});
rhs_
=
std
::
make_shared
<
SystemVector
>
(
*
globalBasis_
,
"rhs"
);
}
void
createSolver
()
...
...
@@ -300,7 +306,7 @@ namespace AMDiS
}
void
createEstimator
()
{
/*
{
/*
COPIED FROM AMDiS
for (std::size_t i = 0, i < nComponents, i++) {
std::string estName = "";
Parameters::get(name + "->estimator->name[" + std::to_string(i) + "]", estName);
...
...
@@ -400,7 +406,7 @@ namespace AMDiS
/// A vector with the local element error estimates
/// reverse indexed by [component index][element index]
std
::
vector
<
std
::
vector
<
double
>
>
estimates
;
std
::
map
<
std
::
string
,
std
::
vector
<
double
>
>
estimates
;
/// A block-vector (load-vector) corresponding to the right.hand side
/// of the equation, filled during assembling
...
...
This diff is collapsed.
Click to expand it.
src/amdis/ProblemStat.inc.hpp
+
6
−
4
View file @
f320e33d
...
...
@@ -142,9 +142,11 @@ void ProblemStat<Traits>::createMarker()
return
;
int
i
=
std
::
stoi
(
to_string
(
treePath
));
// TODO: To be removed
// replace with treePath once supported
marker
.
push_back
(
Marker
<
Traits
>::
createMarker
(
componentName
,
i
,
estimates
[
i
],
componentGrids
[
i
]));
// replace i with treePath once supported
auto
marker_
=
Marker
<
Traits
>::
createMarker
(
componentName
,
i
,
estimates
[
std
::
to_string
(
i
)],
componentGrids
[
i
]);
if
(
marker_
)
marker
.
push_back
(
marker_
);
// If there is more than one marker, and all components are defined
// on the same grid, the maximum marking has to be enabled.
...
...
@@ -379,7 +381,7 @@ Flag ProblemStat<Traits>::refineMesh(AdaptInfo& adaptInfo)
std
::
map
<
typename
Grid
::
LocalIdSet
::
IdType
,
double
>
vertexData
;
// std::map<typename Grid::LocalIdSet::IdType, double> elementData;
const
auto
&
gridView
=
g
rid
->
leafG
ridView
();
const
auto
&
gridView
=
g
lobalBasis
->
g
ridView
();
const
auto
&
indexSet
=
gridView
.
indexSet
();
const
auto
&
idSet
=
grid
->
localIdSet
();
...
...
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