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
263c24da
Commit
263c24da
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup
parent
76bd98ae
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/myconvexproblem.hh
+6
-14
6 additions, 14 deletions
src/myconvexproblem.hh
src/one-body-sample.cc
+2
-4
2 additions, 4 deletions
src/one-body-sample.cc
with
8 additions
and
18 deletions
src/myconvexproblem.hh
+
6
−
14
View file @
263c24da
...
...
@@ -11,39 +11,31 @@
\tparam MatrixTypeTEMPLATE The type used for the matrix of the quadratic
part
*/
template
<
class
NonlinearityTypeTEMPLATE
,
class
MatrixTypeTEMPLATE
>
template
<
class
NonlinearityTypeTEMPLATE
,
class
MatrixTypeTEMPLATE
,
class
VectorTypeTEMPLATE
>
class
MyConvexProblem
{
public:
typedef
NonlinearityTypeTEMPLATE
NonlinearityType
;
typedef
typename
NonlinearityType
::
VectorType
VectorType
;
typedef
VectorType
TEMPLATE
VectorType
;
typedef
MatrixTypeTEMPLATE
MatrixType
;
typedef
typename
NonlinearityType
::
LocalVectorT
ype
LocalVectorType
;
typedef
typename
VectorType
::
block_t
ype
LocalVectorType
;
typedef
typename
MatrixType
::
block_type
LocalMatrixType
;
static
const
int
block_size
=
NonlinearityType
::
block_size
;
/** \brief Constructor with the problem components
\param a A scalar factor in front of the quadratic part (the quadratic
part includes a factor of 1/2 already)
\param A The matrix of the quadratic part
\param am A scalar factor in front of the optional rank-one matrix
\param Am A rank-one matrix given by a single vector. The matrix is
AmAm^T
\param phi The nonlinearity
\param f The linear functional
\param u The solution vector
*/
MyConvexProblem
(
double
a
,
const
MatrixType
&
A
,
double
am
,
const
VectorType
&
Am
,
NonlinearityType
&
phi
,
MyConvexProblem
(
const
MatrixType
&
A
,
NonlinearityType
&
phi
,
const
VectorType
&
f
,
VectorType
&
u
)
:
a
(
a
),
A
(
A
),
am
(
am
),
Am
(
Am
),
phi
(
phi
),
f
(
f
),
u
(
u
)
{};
:
A
(
A
),
phi
(
phi
),
f
(
f
),
u
(
u
)
{};
double
a
;
const
MatrixType
&
A
;
double
am
;
const
VectorType
&
Am
;
NonlinearityType
&
phi
;
const
VectorType
&
f
;
...
...
This diff is collapsed.
Click to expand it.
src/one-body-sample.cc
+
2
−
4
View file @
263c24da
...
...
@@ -142,12 +142,10 @@ int main() {
typedef
ZeroNonlinearity
<
SmallVector
,
SmallMatrix
>
NonlinearityType
;
NonlinearityType
phi
;
typedef
MyConvexProblem
<
NonlinearityType
,
OperatorType
>
typedef
MyConvexProblem
<
NonlinearityType
,
OperatorType
,
VectorType
>
MyConvexProblemType
;
VectorType
unused_vector
(
grid
.
size
(
grid
.
maxLevel
(),
dim
),
0
);
MyConvexProblemType
myConvexProblem
(
1
,
stiffnessMatrix
,
0
,
unused_vector
,
phi
,
f
,
u1
);
MyConvexProblemType
myConvexProblem
(
stiffnessMatrix
,
phi
,
f
,
u1
);
typedef
MyBlockProblem
<
MyConvexProblemType
>
MyBlockProblemType
;
MyBlockProblemType
myBlockProblem
(
myConvexProblem
);
...
...
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