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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
agnumpde
dune-solvers
Commits
bdc88e8e
Commit
bdc88e8e
authored
Sep 6, 2017
by
Jonathan Youett
Browse files
Options
Downloads
Patches
Plain Diff
Add setter for obstacle field, and store it internally as shared_ptr
parent
16976ae7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/solvers/solvers/quadraticipopt.hh
+8
-1
8 additions, 1 deletion
dune/solvers/solvers/quadraticipopt.hh
with
8 additions
and
1 deletion
dune/solvers/solvers/quadraticipopt.hh
+
8
−
1
View file @
bdc88e8e
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include
<dune/solvers/common/boxconstraint.hh>
#include
<dune/solvers/common/boxconstraint.hh>
#include
<dune/solvers/common/canignore.hh>
#include
<dune/solvers/common/canignore.hh>
#include
<dune/solvers/common/wrapownshare.hh>
#include
<dune/solvers/solvers/linearsolver.hh>
#include
<dune/solvers/solvers/linearsolver.hh>
#include
"IpTNLP.hpp"
#include
"IpTNLP.hpp"
...
@@ -697,6 +698,12 @@ public:
...
@@ -697,6 +698,12 @@ public:
constraintObstacles_
=
Dune
::
stackobject_to_shared_ptr
(
obstacles
);
constraintObstacles_
=
Dune
::
stackobject_to_shared_ptr
(
obstacles
);
}
}
//! Set box-constraints for the coordinates
template
<
class
ObstacleVector
>
void
setObstacles
(
ObstacleVector
&&
obstacles
)
{
obstacles_
=
wrap_own_share
<
std
::
vector
<
BoxConstraint
<
field_type
,
blocksize
>
>
>
(
std
::
forward
<
ObstacleVector
>
(
obstacles
));
}
virtual
void
solve
();
virtual
void
solve
();
///////////////////////////////////////////////////////
///////////////////////////////////////////////////////
...
@@ -720,7 +727,7 @@ public:
...
@@ -720,7 +727,7 @@ public:
//! Vector containing the bound constraints of the variables
//! Vector containing the bound constraints of the variables
// Can stay unset when no bound constraints exist
// Can stay unset when no bound constraints exist
std
::
vector
<
BoxConstraint
<
field_type
,
blocksize
>
>
*
obstacles_
;
std
::
shared_ptr
<
std
::
vector
<
BoxConstraint
<
field_type
,
blocksize
>
>
>
obstacles_
;
//! The type of the linear solver to be used within IpOpt, default depends on the system where IpOpt is built
//! The type of the linear solver to be used within IpOpt, default depends on the system where IpOpt is built
std
::
string
linearSolverType_
;
std
::
string
linearSolverType_
;
...
...
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