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
b75bb090
Commit
b75bb090
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix up RuinaFunction
parent
5dbefe66
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
dune/tectonic/nicefunction.hh
+12
-40
12 additions, 40 deletions
dune/tectonic/nicefunction.hh
with
12 additions
and
40 deletions
dune/tectonic/nicefunction.hh
+
12
−
40
View file @
b75bb090
...
...
@@ -41,44 +41,25 @@ class RuinaFunction : public NiceFunction {
h
(
h
),
rho
(
exp
(
-
(
mu
+
compound_state
)
/
a
))
{}
/*
If mu and sigma_n denote the coefficient of friction and the
normal stress, respectively, this function is given by
1/eta sigma_n r(max(eta id, rho)) + a rho + mu
with the constants a and b from Ruina's model and
r(beta) = beta (a (log beta - 1) + mu)
as well as
rho = exp(-mu/a)
*/
// TODO: untested
void
virtual
evaluate
(
double
const
&
x
,
double
&
y
)
const
{
assert
(
false
);
double
const
arg
=
eta
*
x
/
h
;
if
(
arg
<=
rho
)
{
y
=
-
std
::
log
(
rho
);
// TODO: We can write this out explicitly
return
;
}
y
=
arg
*
(
std
::
log
(
arg
)
-
1
)
-
arg
*
std
::
log
(
rho
)
+
rho
-
std
::
log
(
rho
);
double
const
expstar
=
(
arg
==
0
)
?
0
:
arg
*
std
::
log
(
arg
)
-
arg
;
double
const
gamma
=
normalStress
*
(
mu
+
a
*
std
::
log
(
eta
)
+
compound_state
);
y
=
a
*
normalStress
*
expstar
+
gamma
*
arg
;
y
*=
coefficient
*
h
*
normalStress
/
eta
;
}
/*
(leaving some terms aside): with s > rho
1/eta d/dx [ a * (s log s - s) + mu s ] where s = eta x
= 1/eta [ a * (log (eta x) * eta) + eta mu ]
= a * log(eta x) + mu
*/
double
virtual
leftDifferential
(
double
s
)
const
{
double
const
arg
=
eta
*
s
/
h
;
if
(
arg
<
=
rho
)
if
(
arg
=
=
0
)
return
0
;
return
coefficient
*
normalStress
*
(
a
*
std
::
log
(
arg
)
+
mu
+
compound_state
);
double
const
gamma
=
normalStress
*
(
mu
+
a
*
std
::
log
(
eta
)
+
compound_state
);
return
coefficient
*
(
a
*
normalStress
*
std
::
log
(
arg
)
+
gamma
);
}
/* see above */
...
...
@@ -86,21 +67,12 @@ class RuinaFunction : public NiceFunction {
return
leftDifferential
(
s
);
}
/*
d/dx a * log(eta x) + mu
= a * 1/(eta x) * eta
= a/x
*/
double
virtual
second_deriv
(
double
s
)
const
{
// includes the case eta * s = rho for which there is no second derivative
if
(
eta
*
s
/
h
<=
rho
)
return
0
;
else
return
coefficient
*
normalStress
*
a
/
s
;
return
coefficient
*
a
*
normalStress
/
s
;
}
double
virtual
regularity
(
double
s
)
const
{
if
(
eta
*
s
==
rho
)
if
(
s
==
0
)
return
std
::
numeric_limits
<
double
>::
infinity
();
return
std
::
abs
(
second_deriv
(
s
));
...
...
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