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
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
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
podlesny
dune-tectonic
Commits
dd26314c
Commit
dd26314c
authored
11 years ago
by
Elias Pipping
Browse files
Options
Downloads
Patches
Plain Diff
[Cleanup] Use std::begin() and std::end()
parent
b81d75b4
No related branches found
Branches containing commit
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
+8
-8
8 additions, 8 deletions
dune/tectonic/myblockproblem.hh
with
8 additions
and
8 deletions
dune/tectonic/myblockproblem.hh
+
8
−
8
View file @
dd26314c
...
@@ -142,8 +142,8 @@ class MyBlockProblem : /* NOT PUBLIC */ BlockNonlinearGSProblem<ConvexProblem> {
...
@@ -142,8 +142,8 @@ class MyBlockProblem : /* NOT PUBLIC */ BlockNonlinearGSProblem<ConvexProblem> {
// compute quadratic part of hessian (linearization.A += problem_.A)
// compute quadratic part of hessian (linearization.A += problem_.A)
for
(
size_t
i
=
0
;
i
<
problem_
.
A
.
N
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
problem_
.
A
.
N
();
++
i
)
{
auto
const
end
=
problem_
.
A
[
i
]
.
end
(
);
auto
const
end
=
std
::
end
(
problem_
.
A
[
i
]);
for
(
auto
it
=
problem_
.
A
[
i
]
.
begin
(
);
it
!=
end
;
++
it
)
for
(
auto
it
=
std
::
begin
(
problem_
.
A
[
i
]);
it
!=
end
;
++
it
)
linearization
.
A
[
i
][
it
.
index
()]
+=
*
it
;
linearization
.
A
[
i
][
it
.
index
()]
+=
*
it
;
}
}
...
@@ -163,13 +163,13 @@ class MyBlockProblem : /* NOT PUBLIC */ BlockNonlinearGSProblem<ConvexProblem> {
...
@@ -163,13 +163,13 @@ class MyBlockProblem : /* NOT PUBLIC */ BlockNonlinearGSProblem<ConvexProblem> {
// apply truncation to stiffness matrix and rhs
// apply truncation to stiffness matrix and rhs
for
(
size_t
row
=
0
;
row
<
linearization
.
A
.
N
();
++
row
)
{
for
(
size_t
row
=
0
;
row
<
linearization
.
A
.
N
();
++
row
)
{
auto
const
col_end
=
linearization
.
A
[
row
]
.
end
(
);
auto
const
col_end
=
std
::
end
(
linearization
.
A
[
row
]);
for
(
auto
col_it
=
linearization
.
A
[
row
]
.
begin
(
);
col_it
!=
col_end
;
for
(
auto
col_it
=
std
::
begin
(
linearization
.
A
[
row
]);
col_it
!=
col_end
;
++
col_it
)
{
++
col_it
)
{
size_t
const
col
=
col_it
.
index
();
size_t
const
col
=
col_it
.
index
();
for
(
size_t
i
=
0
;
i
<
col_it
->
N
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
col_it
->
N
();
++
i
)
{
auto
const
blockEnd
=
(
*
col_it
)[
i
]
.
end
(
);
auto
const
blockEnd
=
std
::
end
(
(
*
col_it
)[
i
]);
for
(
auto
blockIt
=
(
*
col_it
)[
i
]
.
begin
(
);
blockIt
!=
blockEnd
;
for
(
auto
blockIt
=
std
::
begin
(
(
*
col_it
)[
i
]);
blockIt
!=
blockEnd
;
++
blockIt
)
++
blockIt
)
if
(
linearization
.
truncation
[
row
][
i
]
||
if
(
linearization
.
truncation
[
row
][
i
]
||
linearization
.
truncation
[
col
][
blockIt
.
index
()])
linearization
.
truncation
[
col
][
blockIt
.
index
()])
...
@@ -243,8 +243,8 @@ class MyBlockProblem<ConvexProblem>::IterateObject {
...
@@ -243,8 +243,8 @@ class MyBlockProblem<ConvexProblem>::IterateObject {
LocalMatrixType
const
*
localA
=
nullptr
;
LocalMatrixType
const
*
localA
=
nullptr
;
LocalVectorType
localb
(
problem
.
f
[
m
]);
LocalVectorType
localb
(
problem
.
f
[
m
]);
auto
const
end
=
problem
.
A
[
m
]
.
end
(
);
auto
const
end
=
std
::
end
(
problem
.
A
[
m
]);
for
(
auto
it
=
problem
.
A
[
m
]
.
begin
(
);
it
!=
end
;
++
it
)
{
for
(
auto
it
=
std
::
begin
(
problem
.
A
[
m
]);
it
!=
end
;
++
it
)
{
size_t
const
j
=
it
.
index
();
size_t
const
j
=
it
.
index
();
if
(
j
==
m
)
if
(
j
==
m
)
localA
=
&
(
*
it
);
// localA = A[m][m]
localA
=
&
(
*
it
);
// localA = A[m][m]
...
...
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