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
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
Container registry
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansgar Burchardt
dune-solvers
Commits
0240107d
Commit
0240107d
authored
Jan 22, 2012
by
Oliver Sander
Committed by
sander
Jan 22, 2012
Browse files
Options
Downloads
Patches
Plain Diff
fix various compiler warnings
[[Imported from SVN: r5422]]
parent
999578b3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/solvers/iterationsteps/mmgstep.cc
+4
-4
4 additions, 4 deletions
dune/solvers/iterationsteps/mmgstep.cc
dune/solvers/iterationsteps/multigridstep.cc
+4
-5
4 additions, 5 deletions
dune/solvers/iterationsteps/multigridstep.cc
with
8 additions
and
9 deletions
dune/solvers/iterationsteps/mmgstep.cc
+
4
−
4
View file @
0240107d
...
@@ -76,7 +76,7 @@ void MonotoneMGStep<OperatorType, DiscFuncType>::nestedIteration()
...
@@ -76,7 +76,7 @@ void MonotoneMGStep<OperatorType, DiscFuncType>::nestedIteration()
// If we start from an infeasible configuration, the restricted
// If we start from an infeasible configuration, the restricted
// obstacles may be inconsistent. We do an ad hoc correction here.
// obstacles may be inconsistent. We do an ad hoc correction here.
// The true obstacles on the maxlevel are not touched.
// The true obstacles on the maxlevel are not touched.
for
(
in
t
i
=
0
;
i
<
(
*
obstacles_
)[
this
->
level_
].
size
();
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
(
*
obstacles_
)[
this
->
level_
].
size
();
i
++
)
{
BoxConstraint
<
field_type
,
dim
>&
cO
=
(
*
obstacles_
)[
this
->
level_
][
i
];
BoxConstraint
<
field_type
,
dim
>&
cO
=
(
*
obstacles_
)[
this
->
level_
][
i
];
for
(
int
j
=
0
;
j
<
dim
;
j
++
)
for
(
int
j
=
0
;
j
<
dim
;
j
++
)
if
(
cO
.
lower
(
j
)
>
cO
.
upper
(
j
))
if
(
cO
.
lower
(
j
)
>
cO
.
upper
(
j
))
...
@@ -116,7 +116,7 @@ void MonotoneMGStep<OperatorType, DiscFuncType>::iterate()
...
@@ -116,7 +116,7 @@ void MonotoneMGStep<OperatorType, DiscFuncType>::iterate()
// Determine critical nodes (only for debugging)
// Determine critical nodes (only for debugging)
const
double
eps
=
1e-12
;
const
double
eps
=
1e-12
;
for
(
in
t
i
=
0
;
i
<
obstacles
[
level
].
size
();
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
obstacles
[
level
].
size
();
i
++
)
{
for
(
int
j
=
0
;
j
<
dim
;
j
++
)
{
for
(
int
j
=
0
;
j
<
dim
;
j
++
)
{
...
@@ -145,7 +145,7 @@ void MonotoneMGStep<OperatorType, DiscFuncType>::iterate()
...
@@ -145,7 +145,7 @@ void MonotoneMGStep<OperatorType, DiscFuncType>::iterate()
std
::
vector
<
BoxConstraint
<
field_type
,
dim
>
>
obstacleBackup
=
obstacles
[
level
];
std
::
vector
<
BoxConstraint
<
field_type
,
dim
>
>
obstacleBackup
=
obstacles
[
level
];
// Compute defect obstacles
// Compute defect obstacles
for
(
in
t
i
=
0
;
i
<
(
*
obstacles_
)[
level
].
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
(
*
obstacles_
)[
level
].
size
();
i
++
)
obstacles
[
level
][
i
]
-=
x
[
level
][
i
];
obstacles
[
level
][
i
]
-=
x
[
level
][
i
];
// ///////////////////////
// ///////////////////////
...
@@ -154,7 +154,7 @@ void MonotoneMGStep<OperatorType, DiscFuncType>::iterate()
...
@@ -154,7 +154,7 @@ void MonotoneMGStep<OperatorType, DiscFuncType>::iterate()
// Determine critical nodes
// Determine critical nodes
const
double
eps
=
1e-12
;
const
double
eps
=
1e-12
;
for
(
in
t
i
=
0
;
i
<
obstacles
[
level
].
size
();
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
obstacles
[
level
].
size
();
i
++
)
{
for
(
int
j
=
0
;
j
<
dim
;
j
++
)
{
for
(
int
j
=
0
;
j
<
dim
;
j
++
)
{
...
...
This diff is collapsed.
Click to expand it.
dune/solvers/iterationsteps/multigridstep.cc
+
4
−
5
View file @
0240107d
...
@@ -41,7 +41,6 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
...
@@ -41,7 +41,6 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
std
::
cout
<<
"Warning: Preprocess has already been called without calling iterate afterwards!"
<<
std
::
endl
;
std
::
cout
<<
"Warning: Preprocess has already been called without calling iterate afterwards!"
<<
std
::
endl
;
preprocessCalled
=
true
;
preprocessCalled
=
true
;
int
i
;
this
->
level_
=
this
->
numLevels_
-
1
;
this
->
level_
=
this
->
numLevels_
-
1
;
// //////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////
...
@@ -51,13 +50,13 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
...
@@ -51,13 +50,13 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
DUNE_THROW
(
SolverError
,
"You requested "
<<
this
->
numLevels_
<<
" levels "
DUNE_THROW
(
SolverError
,
"You requested "
<<
this
->
numLevels_
<<
" levels "
<<
"but you supplied "
<<
this
->
mgTransfer_
.
size
()
<<
" transfer operators!"
);
<<
"but you supplied "
<<
this
->
mgTransfer_
.
size
()
<<
" transfer operators!"
);
for
(
i
=
0
;
i
<
this
->
mgTransfer_
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
this
->
mgTransfer_
.
size
();
i
++
)
if
(
this
->
mgTransfer_
[
i
]
==
NULL
)
if
(
this
->
mgTransfer_
[
i
]
==
NULL
)
DUNE_THROW
(
SolverError
,
"You have not supplied a multigrid restriction operator "
DUNE_THROW
(
SolverError
,
"You have not supplied a multigrid restriction operator "
"for level "
<<
i
);
"for level "
<<
i
);
// The matrices for the linear correction problems
// The matrices for the linear correction problems
for
(
i
=
this
->
numLevels_
-
2
;
i
>=
0
;
i
--
)
{
for
(
int
i
=
this
->
numLevels_
-
2
;
i
>=
0
;
i
--
)
{
// Delete coarse grid matrix if it exists already
// Delete coarse grid matrix if it exists already
...
@@ -79,7 +78,7 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
...
@@ -79,7 +78,7 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
// /////////////////////////////////////////////////////
// /////////////////////////////////////////////////////
// Assemble the complete hierarchy of matrices
// Assemble the complete hierarchy of matrices
// /////////////////////////////////////////////////////
// /////////////////////////////////////////////////////
for
(
i
=
this
->
mgTransfer_
.
size
()
-
1
;
i
>=
0
;
i
--
)
for
(
int
i
=
this
->
mgTransfer_
.
size
()
-
1
;
i
>=
0
;
i
--
)
this
->
mgTransfer_
[
i
]
->
galerkinRestrict
(
*
this
->
mat_
[
i
+
1
],
*
(
const_cast
<
MatrixType
*>
(
this
->
mat_
[
i
])));
this
->
mgTransfer_
[
i
]
->
galerkinRestrict
(
*
this
->
mat_
[
i
+
1
],
*
(
const_cast
<
MatrixType
*>
(
this
->
mat_
[
i
])));
// /////////////////////////////////////////////////////
// /////////////////////////////////////////////////////
...
@@ -91,7 +90,7 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
...
@@ -91,7 +90,7 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
if
(
this
->
ignoreNodes_
!=
0
)
if
(
this
->
ignoreNodes_
!=
0
)
{
{
ignoreNodesHierarchy_
[
this
->
numLevels_
-
1
]
=
const_cast
<
BitVectorType
*>
(
this
->
ignoreNodes_
);
ignoreNodesHierarchy_
[
this
->
numLevels_
-
1
]
=
const_cast
<
BitVectorType
*>
(
this
->
ignoreNodes_
);
for
(
i
=
this
->
numLevels_
-
2
;
i
>=
0
;
--
i
)
for
(
int
i
=
this
->
numLevels_
-
2
;
i
>=
0
;
--
i
)
{
{
ignoreNodesHierarchy_
[
i
]
=
new
BitVectorType
();
ignoreNodesHierarchy_
[
i
]
=
new
BitVectorType
();
this
->
mgTransfer_
[
i
]
->
restrictToFathers
(
*
ignoreNodesHierarchy_
[
i
+
1
],
*
ignoreNodesHierarchy_
[
i
]);
this
->
mgTransfer_
[
i
]
->
restrictToFathers
(
*
ignoreNodesHierarchy_
[
i
+
1
],
*
ignoreNodesHierarchy_
[
i
]);
...
...
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