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
08d37d87
Commit
08d37d87
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
The current globalnonlinearity was Laursen's
parent
9180851a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/tectonic/globallaursennonlinearity.hh
+52
-0
52 additions, 0 deletions
dune/tectonic/globallaursennonlinearity.hh
dune/tectonic/globalnonlinearity.hh
+1
-32
1 addition, 32 deletions
dune/tectonic/globalnonlinearity.hh
src/one-body-sample.cc
+3
-3
3 additions, 3 deletions
src/one-body-sample.cc
with
56 additions
and
35 deletions
dune/tectonic/globallaursennonlinearity.hh
0 → 100644
+
52
−
0
View file @
08d37d87
/* -*- mode:c++; mode:semantic -*- */
#ifndef DUNE_TECTONIC_GLOBAL_LAURSEN_NONLINEARITY_HH
#define DUNE_TECTONIC_GLOBAL_LAURSEN_NONLINEARITY_HH
#include
<dune/common/fvector.hh>
#include
"globalnonlinearity.hh"
namespace
Dune
{
template
<
int
dim
,
class
OuterFunctionType
>
class
GlobalLaursenNonlinearity
:
public
Dune
::
GlobalNonlinearity
<
dim
,
OuterFunctionType
>
{
public:
GlobalLaursenNonlinearity
(
std
::
vector
<
double
>
const
&
coefficientOfFriction
,
std
::
vector
<
double
>
const
&
normalStress
,
std
::
vector
<
Dune
::
FieldVector
<
double
,
1
>>
const
&
nodalIntegrals
)
:
coefficientOfFriction
(
coefficientOfFriction
),
normalStress
(
normalStress
),
nodalIntegrals
(
nodalIntegrals
)
{}
/*
Return a restriction of the outer function to the i'th node. If
mu and sigma_n denote the coefficient of friction and the normal
stress, respectively, at the i'th node, this function is given
by
sigma_n [(1/eta \bar Gamma)* + mu id]
TODO: We chose Gamma = id, so that (\bar Gamma)* = \Gamma^{-1}
= id^{-1} = id. The factor 1/eta cancels in this special case, leaving us
with
sigma_n [id + mu id] = sigma_n (1 + mu) id
*/
virtual
void
restriction
(
int
i
,
OuterFunctionType
&
f
)
const
{
double
coefficient
=
nodalIntegrals
[
i
][
0
];
coefficient
*=
normalStress
[
i
];
coefficient
*=
1
+
coefficientOfFriction
[
i
];
f
=
OuterFunctionType
(
coefficient
);
}
private
:
// TODO: If we're clever, we only store one vector with the precomputed
// results
std
::
vector
<
double
>
coefficientOfFriction
;
std
::
vector
<
double
>
normalStress
;
std
::
vector
<
Dune
::
FieldVector
<
double
,
1
>>
nodalIntegrals
;
};
}
#endif
This diff is collapsed.
Click to expand it.
dune/tectonic/globalnonlinearity.hh
+
1
−
32
View file @
08d37d87
...
...
@@ -8,41 +8,10 @@
namespace
Dune
{
template
<
int
dim
,
class
OuterFunctionType
>
class
GlobalNonlinearity
{
public:
GlobalNonlinearity
(
std
::
vector
<
double
>
const
&
coefficientOfFriction
,
std
::
vector
<
double
>
const
&
normalStress
,
std
::
vector
<
Dune
::
FieldVector
<
double
,
1
>>
const
&
nodalIntegrals
)
:
coefficientOfFriction
(
coefficientOfFriction
),
normalStress
(
normalStress
),
nodalIntegrals
(
nodalIntegrals
)
{}
/*
Return a restriction of the outer function to the i'th node. If
mu and sigma_n denote the coefficient of friction and the normal
stress, respectively, at the i'th node, this function is given
by
sigma_n [(1/eta \bar Gamma)* + mu id]
TODO: We chose Gamma = id, so that (\bar Gamma)* = \Gamma^{-1}
= id^{-1} = id. The factor 1/eta cancels in this special case, leaving us
with
sigma_n [id + mu id] = sigma_n (1 + mu) id
*/
void
restriction
(
int
i
,
OuterFunctionType
&
f
)
const
{
double
coefficient
=
nodalIntegrals
[
i
][
0
];
coefficient
*=
normalStress
[
i
];
coefficient
*=
1
+
coefficientOfFriction
[
i
];
f
=
OuterFunctionType
(
coefficient
);
}
private
:
// TODO: If we're clever, we only store one vector with the precomputed
// results
std
::
vector
<
double
>
coefficientOfFriction
;
std
::
vector
<
double
>
normalStress
;
std
::
vector
<
Dune
::
FieldVector
<
double
,
1
>>
nodalIntegrals
;
virtual
void
restriction
(
int
i
,
OuterFunctionType
&
f
)
const
=
0
;
};
}
#endif
This diff is collapsed.
Click to expand it.
src/one-body-sample.cc
+
3
−
3
View file @
08d37d87
...
...
@@ -41,7 +41,7 @@
#include
<dune/solvers/solvers/loopsolver.hh>
#include
<dune/tnnmg/iterationsteps/genericnonlineargs.hh>
#include
<dune/tectonic/globalnonlinearity.hh>
#include
<dune/tectonic/global
laursen
nonlinearity.hh>
#include
<dune/tectonic/myconvexproblem.hh>
#include
<dune/tectonic/myblockproblem.hh>
...
...
@@ -226,8 +226,8 @@ int main(int argc, char *argv[]) {
std
::
fill
(
coefficientOfFriction
.
begin
(),
coefficientOfFriction
.
end
(),
parset
.
get
<
double
>
(
"boundary.mu"
));
Dune
::
GlobalNonlinearity
<
dim
,
Dune
::
LinearFunction
>
myGlobalNonlinearity
(
coefficientOfFriction
,
normalStress
,
nodalIntegrals
);
Dune
::
Global
Laursen
Nonlinearity
<
dim
,
Dune
::
LinearFunction
>
myGlobalNonlinearity
(
coefficientOfFriction
,
normalStress
,
nodalIntegrals
);
// }}}
{
...
...
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