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
56986c50
Commit
56986c50
authored
9 years ago
by
Jonathan Youett
Browse files
Options
Downloads
Patches
Plain Diff
Move obstacle creation to where it is set
parent
69949da4
Branches
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/solvers/test/mmgtest.cc
+10
-10
10 additions, 10 deletions
dune/solvers/test/mmgtest.cc
with
10 additions
and
10 deletions
dune/solvers/test/mmgtest.cc
+
10
−
10
View file @
56986c50
...
...
@@ -39,16 +39,6 @@ void solveObstacleProblemByMMGSolver(const GridType& grid, const MatrixType& mat
// create double obstacle constraints
const
int
blockSize
=
VectorType
::
block_type
::
dimension
;
std
::
vector
<
BoxConstraint
<
typename
Vector
::
field_type
,
blockSize
>
>
boxConstraints
(
rhs
.
size
());
for
(
int
i
=
0
;
i
<
boxConstraints
.
size
();
++
i
)
{
for
(
int
j
=
0
;
j
<
blockSize
;
++
j
)
{
boxConstraints
[
i
].
lower
(
j
)
=
-
1
;
boxConstraints
[
i
].
upper
(
j
)
=
+
1
;
}
}
/////////////////////////////////////////////////////////////
// Create a monotone multigrid solver
/////////////////////////////////////////////////////////////
...
...
@@ -79,6 +69,16 @@ void solveObstacleProblemByMMGSolver(const GridType& grid, const MatrixType& mat
Dune
::
BitSetVector
<
blockSize
>
hasObstacle
(
x
.
size
(),
true
);
mmgStep
->
hasObstacle_
=
&
hasObstacle
;
std
::
vector
<
BoxConstraint
<
typename
Vector
::
field_type
,
blockSize
>
>
boxConstraints
(
rhs
.
size
());
for
(
int
i
=
0
;
i
<
boxConstraints
.
size
();
++
i
)
{
for
(
int
j
=
0
;
j
<
blockSize
;
++
j
)
{
boxConstraints
[
i
].
lower
(
j
)
=
-
1
;
boxConstraints
[
i
].
upper
(
j
)
=
+
1
;
}
}
mmgStep
->
obstacles_
=
&
boxConstraints
;
// we need a vector of pointers to the transfer operator base class
...
...
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