Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-solvers
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
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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-solvers
Commits
fea0935a
Commit
fea0935a
authored
11 years ago
by
Oliver Sander
Committed by
sander
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
replace OperatorType by MatrixType and DiscFuncType by VectorType
[[Imported from SVN: r11762]]
parent
db0a17a1
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
dune/solvers/iterationsteps/trustregiongsstep.cc
+9
-9
9 additions, 9 deletions
dune/solvers/iterationsteps/trustregiongsstep.cc
dune/solvers/iterationsteps/trustregiongsstep.hh
+7
-7
7 additions, 7 deletions
dune/solvers/iterationsteps/trustregiongsstep.hh
with
16 additions
and
16 deletions
dune/solvers/iterationsteps/trustregiongsstep.cc
+
9
−
9
View file @
fea0935a
template
<
class
Operator
Type
,
class
DiscFunc
Type
>
template
<
class
Matrix
Type
,
class
Vector
Type
>
inline
DiscFunc
Type
TrustRegionGSStep
<
OperatorType
,
DiscFunc
Type
>::
getSol
()
Vector
Type
TrustRegionGSStep
<
MatrixType
,
Vector
Type
>::
getSol
()
{
return
*
(
this
->
x_
);
}
template
<
class
Operator
Type
,
class
DiscFunc
Type
>
template
<
class
Matrix
Type
,
class
Vector
Type
>
inline
typename
DiscFunc
Type
::
field_type
TrustRegionGSStep
<
OperatorType
,
DiscFunc
Type
>::
typename
Vector
Type
::
field_type
TrustRegionGSStep
<
MatrixType
,
Vector
Type
>::
residual
(
unsigned
int
index
,
int
blockIndex
)
const
{
const
Operator
Type
&
mat
=
*
this
->
mat_
;
const
Matrix
Type
&
mat
=
*
this
->
mat_
;
typedef
typename
Operator
Type
::
row_type
RowType
;
typedef
typename
Matrix
Type
::
row_type
RowType
;
typedef
typename
RowType
::
ConstIterator
ColumnIterator
;
/* The following loop computes
...
...
@@ -42,11 +42,11 @@ residual(unsigned int index, int blockIndex) const
}
template
<
class
Operator
Type
,
class
DiscFunc
Type
>
template
<
class
Matrix
Type
,
class
Vector
Type
>
inline
void
TrustRegionGSStep
<
OperatorType
,
DiscFunc
Type
>::
iterate
()
void
TrustRegionGSStep
<
MatrixType
,
Vector
Type
>::
iterate
()
{
const
Operator
Type
&
mat
=
*
this
->
mat_
;
const
Matrix
Type
&
mat
=
*
this
->
mat_
;
const
std
::
vector
<
BoxConstraint
<
field_type
,
blocksize
>
>&
obstacles
=
*
this
->
obstacles_
;
// Debug: check for energy decrease
...
...
This diff is collapsed.
Click to expand it.
dune/solvers/iterationsteps/trustregiongsstep.hh
+
7
−
7
View file @
fea0935a
...
...
@@ -12,15 +12,15 @@
/** \brief A Gauss-Seidel iterator which does not assume that the functional
is convex, but which expects a bounded admissible set.
*/
template
<
class
Operator
Type
,
class
DiscFunc
Type
>
class
TrustRegionGSStep
:
public
ProjectedBlockGSStep
<
OperatorType
,
DiscFunc
Type
>
template
<
class
Matrix
Type
,
class
Vector
Type
>
class
TrustRegionGSStep
:
public
ProjectedBlockGSStep
<
MatrixType
,
Vector
Type
>
{
typedef
typename
DiscFunc
Type
::
block_type
VectorBlock
;
typedef
typename
Vector
Type
::
block_type
VectorBlock
;
enum
{
blocksize
=
VectorBlock
::
dimension
};
typedef
typename
DiscFunc
Type
::
field_type
field_type
;
typedef
typename
Vector
Type
::
field_type
field_type
;
public
:
...
...
@@ -28,14 +28,14 @@
TrustRegionGSStep
()
{}
//! Constructor with a linear problem
TrustRegionGSStep
(
Operator
Type
&
mat
,
DiscFunc
Type
&
x
,
DiscFunc
Type
&
rhs
)
:
LinearIterationStep
<
OperatorType
,
DiscFunc
Type
>
(
mat
,
x
,
rhs
)
TrustRegionGSStep
(
Matrix
Type
&
mat
,
Vector
Type
&
x
,
Vector
Type
&
rhs
)
:
LinearIterationStep
<
MatrixType
,
Vector
Type
>
(
mat
,
x
,
rhs
)
{}
//! Perform one iteration
virtual
void
iterate
();
virtual
DiscFunc
Type
getSol
();
virtual
Vector
Type
getSol
();
field_type
residual
(
unsigned
int
index
,
int
blockIndex
)
const
;
...
...
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