Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
f98dafa2
Commit
f98dafa2
authored
Jul 10, 2020
by
Praetorius, Simon
Browse files
Add update() method for grid to adapt dependencies
parent
883e5723
Changes
2
Hide whitespace changes
Inline
Side-by-side
amdis/AdaptiveGrid.hpp
View file @
f98dafa2
...
...
@@ -202,6 +202,12 @@ namespace AMDiS
info
(
2
,
"AdaptiveGrid::postAdapt needed {} seconds"
,
t
.
elapsed
());
}
/// Update all registered dependent objects if grid is changed manually
void
update
()
{
this
->
notify
(
event
::
adapt
{
true
});
}
/// Returns the grid change index, see \ref changeIndex.
unsigned
long
changeIndex
()
const
{
...
...
amdis/DataTransfer.inc.hpp
View file @
f98dafa2
...
...
@@ -150,8 +150,10 @@ void DataTransfer<C,B>::adapt(C& coeff)
{
coeff
.
resize
();
test_exit
(
!
persistentContainer_
.
empty
(),
"No data was saved before adapting the grid, make "
"sure to call DataTransfer::preAdapt before calling adapt() on the grid"
);
// No data was saved before adapting the grid, make
// sure to call DataTransfer::preAdapt before calling adapt() on the grid
if
(
persistentContainer_
.
empty
())
return
;
GridView
gv
=
basis_
->
gridView
();
LocalView
lv
=
basis_
->
localView
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment