Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-tectonic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
agnumpde
dune-tectonic
Commits
31bc3dec
Commit
31bc3dec
authored
11 years ago
by
Elias Pipping
Browse files
Options
Downloads
Patches
Plain Diff
[Cleanup] Sort out bisection instances in MyBlockProblem
parent
392273c7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/tectonic/myblockproblem.hh
+9
-12
9 additions, 12 deletions
dune/tectonic/myblockproblem.hh
with
9 additions
and
12 deletions
dune/tectonic/myblockproblem.hh
+
9
−
12
View file @
31bc3dec
...
@@ -58,9 +58,8 @@ template <class ConvexProblem> class MyBlockProblem {
...
@@ -58,9 +58,8 @@ template <class ConvexProblem> class MyBlockProblem {
MyBlockProblem
(
Dune
::
ParameterTree
const
&
parset
,
MyBlockProblem
(
Dune
::
ParameterTree
const
&
parset
,
ConvexProblem
const
&
problem
)
ConvexProblem
const
&
problem
)
:
parset
(
parset
),
problem
(
problem
)
{
:
parset
(
parset
),
problem
(
problem
),
localBisection
()
// NOTE: defaults
bisection
=
Bisection
();
{}
}
std
::
string
getOutput
(
bool
header
=
false
)
const
{
std
::
string
getOutput
(
bool
header
=
false
)
const
{
if
(
header
)
{
if
(
header
)
{
...
@@ -106,8 +105,8 @@ template <class ConvexProblem> class MyBlockProblem {
...
@@ -106,8 +105,8 @@ template <class ConvexProblem> class MyBlockProblem {
return
0
;
return
0
;
int
bisectionsteps
=
0
;
int
bisectionsteps
=
0
;
Bisection
bisection
;
Bisection
const
globalBisection
;
// NOTE: defaults
return
b
isection
.
minimize
(
psi
,
vnorm
,
0.0
,
bisectionsteps
)
/
vnorm
;
// TODO
return
globalB
isection
.
minimize
(
psi
,
vnorm
,
0.0
,
bisectionsteps
)
/
vnorm
;
}
}
void
assembleTruncate
(
VectorType
const
&
u
,
Linearization
&
linearization
,
void
assembleTruncate
(
VectorType
const
&
u
,
Linearization
&
linearization
,
...
@@ -186,7 +185,7 @@ template <class ConvexProblem> class MyBlockProblem {
...
@@ -186,7 +185,7 @@ template <class ConvexProblem> class MyBlockProblem {
/** \brief Constructs and returns an iterate object */
/** \brief Constructs and returns an iterate object */
IterateObject
getIterateObject
()
{
IterateObject
getIterateObject
()
{
return
IterateObject
(
parset
,
b
isection
,
problem
);
return
IterateObject
(
parset
,
localB
isection
,
problem
);
}
}
private
:
private
:
...
@@ -195,8 +194,7 @@ template <class ConvexProblem> class MyBlockProblem {
...
@@ -195,8 +194,7 @@ template <class ConvexProblem> class MyBlockProblem {
// problem data
// problem data
ConvexProblem
const
&
problem
;
ConvexProblem
const
&
problem
;
// commonly used minimization stuff
Bisection
const
localBisection
;
Bisection
bisection
;
mutable
std
::
ostringstream
outStream
;
mutable
std
::
ostringstream
outStream
;
};
};
...
@@ -214,7 +212,7 @@ class MyBlockProblem<ConvexProblem>::IterateObject {
...
@@ -214,7 +212,7 @@ class MyBlockProblem<ConvexProblem>::IterateObject {
IterateObject
(
Dune
::
ParameterTree
const
&
parset
,
Bisection
const
&
bisection
,
IterateObject
(
Dune
::
ParameterTree
const
&
parset
,
Bisection
const
&
bisection
,
ConvexProblem
const
&
problem
)
ConvexProblem
const
&
problem
)
:
problem
(
problem
),
:
problem
(
problem
),
bisection
(
bisection
),
bisection
_
(
bisection
),
localsteps
(
parset
.
get
<
size_t
>
(
"localsolver.steps"
))
{}
localsteps
(
parset
.
get
<
size_t
>
(
"localsolver.steps"
))
{}
public
:
public
:
...
@@ -254,7 +252,7 @@ class MyBlockProblem<ConvexProblem>::IterateObject {
...
@@ -254,7 +252,7 @@ class MyBlockProblem<ConvexProblem>::IterateObject {
auto
const
phi
=
problem
.
phi
.
restriction
(
m
);
auto
const
phi
=
problem
.
phi
.
restriction
(
m
);
EllipticEnergy
<
block_size
>
localJ
(
*
localA
,
localb
,
phi
,
ignore
);
EllipticEnergy
<
block_size
>
localJ
(
*
localA
,
localb
,
phi
,
ignore
);
minimise
(
localJ
,
ui
,
localsteps
,
bisection
);
minimise
(
localJ
,
ui
,
localsteps
,
bisection
_
);
}
}
}
}
...
@@ -262,8 +260,7 @@ class MyBlockProblem<ConvexProblem>::IterateObject {
...
@@ -262,8 +260,7 @@ class MyBlockProblem<ConvexProblem>::IterateObject {
// problem data
// problem data
ConvexProblem
const
&
problem
;
ConvexProblem
const
&
problem
;
// commonly used minimization stuff
Bisection
const
bisection_
;
Bisection
bisection
;
// state data for smoothing procedure used by:
// state data for smoothing procedure used by:
// setIterate, updateIterate, solveLocalProblem
// setIterate, updateIterate, solveLocalProblem
...
...
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