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
109bc227
Commit
109bc227
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Do not inherit from Nonlinearity
Necessitates implementation of directionDomain
parent
20f6f4a4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mynonlinearity.cc
+12
-18
12 additions, 18 deletions
src/mynonlinearity.cc
with
12 additions
and
18 deletions
src/mynonlinearity.cc
+
12
−
18
View file @
109bc227
...
...
@@ -7,24 +7,24 @@
#include
<dune/common/fvector.hh>
#include
<dune/common/fmatrix.hh>
#include
<dune/istl/bcrsmatrix.hh>
#include
<dune/istl/bvector.hh>
#include
<dune/fufem/interval.hh>
#include
<dune/tnnmg/problem-classes/nonlinearity.hh>
#include
"properscalarincreasingconvexfunction.hh"
#include
<limits>
template
<
int
dimension
,
class
OuterFunction
=
TrivialFunction
>
class
MyNonlinearity
:
public
Nonlinearity
<
Dune
::
FieldVector
<
double
,
dimension
>
,
Dune
::
FieldMatrix
<
double
,
dimension
,
dimension
>>
{
class
MyNonlinearity
{
public:
typedef
Dune
::
FieldVector
<
double
,
dimension
>
SmallVector
;
typedef
Dune
::
FieldMatrix
<
double
,
dimension
,
dimension
>
SmallMatrix
;
void
directionalSubDiff
(
SmallVector
u
,
SmallVector
v
,
Interval
<
double
>
&
D
)
{
typedef
Dune
::
BlockVector
<
SmallVector
>
VectorType
;
typedef
Dune
::
BlockVector
<
SmallMatrix
>
MatrixType
;
void
directionalSubDiff
(
SmallVector
u
,
SmallVector
v
,
Interval
<
double
>&
D
)
{
if
(
u
==
SmallVector
(
0.0
))
{
D
[
0
]
=
D
[
1
]
=
func_
.
rightDifferential
(
0
);
}
else
if
(
u
*
v
>
0
)
{
...
...
@@ -36,17 +36,11 @@ class MyNonlinearity
}
}
double
operator
()(
const
Dune
::
BlockVector
<
SmallVector
>
&
)
const
{
return
3
;
}
void
addGradient
(
const
Dune
::
BlockVector
<
SmallVector
>
&
,
Dune
::
BlockVector
<
SmallVector
>
&
)
const
{}
void
addHessian
(
const
Dune
::
BlockVector
<
SmallVector
>
&
,
Dune
::
BCRSMatrix
<
SmallMatrix
>
&
)
const
{}
void
addHessianIndices
(
Dune
::
MatrixIndexSet
&
)
const
{}
void
setVector
(
const
Dune
::
BlockVector
<
SmallVector
>
&
)
{}
void
updateEntry
(
int
,
double
,
int
)
{}
void
subDiff
(
int
,
double
,
Interval
<
double
>
&
,
int
)
const
{}
double
regularity
(
int
,
double
,
int
)
const
{
return
3
;
}
void
domain
(
int
,
Interval
<
double
>
&
,
int
)
const
{}
void
directionalDomain
(
const
VectorType
&
,
const
VectorType
&
,
Interval
<
double
>&
dom
)
const
{
dom
[
0
]
=
std
::
numeric_limits
<
double
>::
min
();
dom
[
1
]
=
std
::
numeric_limits
<
double
>::
max
();
}
OuterFunction
func_
;
};
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