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
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
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
agnumpde
dune-tectonic
Commits
ab1eecf9
Commit
ab1eecf9
authored
9 years ago
by
Elias Pipping
Browse files
Options
Downloads
Patches
Plain Diff
[Cleanup] Use override
parent
8c878ee4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/tectonic/frictionpotential.hh
+18
-16
18 additions, 16 deletions
dune/tectonic/frictionpotential.hh
with
18 additions
and
16 deletions
dune/tectonic/frictionpotential.hh
+
18
−
16
View file @
ab1eecf9
...
...
@@ -33,32 +33,32 @@ class TruncatedRateState : public FrictionPotential {
FrictionData
_fd
)
:
fd
(
_fd
),
weight
(
_weight
),
weightedNormalStress
(
_weightedNormalStress
)
{}
double
coefficientOfFriction
(
double
V
)
const
{
double
coefficientOfFriction
(
double
V
)
const
override
{
if
(
V
<=
Vmin
)
return
0.0
;
return
fd
.
a
*
std
::
log
(
V
/
Vmin
);
}
double
differential
(
double
V
)
const
{
double
differential
(
double
V
)
const
override
{
return
weight
*
fd
.
C
-
weightedNormalStress
*
coefficientOfFriction
(
V
);
}
double
second_deriv
(
double
V
)
const
{
double
second_deriv
(
double
V
)
const
override
{
if
(
V
<=
Vmin
)
return
0
;
return
-
weightedNormalStress
*
(
fd
.
a
/
V
);
}
double
regularity
(
double
V
)
const
{
double
regularity
(
double
V
)
const
override
{
if
(
std
::
abs
(
V
-
Vmin
)
<
1e-14
)
// TODO
return
std
::
numeric_limits
<
double
>::
infinity
();
return
std
::
abs
(
second_deriv
(
V
));
}
void
updateAlpha
(
double
alpha
)
{
void
updateAlpha
(
double
alpha
)
override
{
double
const
logrest
=
(
fd
.
mu0
+
fd
.
b
*
alpha
)
/
fd
.
a
;
Vmin
=
fd
.
V0
/
std
::
exp
(
logrest
);
}
...
...
@@ -76,21 +76,23 @@ class RegularisedRateState : public FrictionPotential {
FrictionData
_fd
)
:
fd
(
_fd
),
weight
(
_weight
),
weightedNormalStress
(
_weightedNormalStress
)
{}
double
coefficientOfFriction
(
double
V
)
const
{
double
coefficientOfFriction
(
double
V
)
const
override
{
return
fd
.
a
*
std
::
asinh
(
0.5
*
V
/
Vmin
);
}
double
differential
(
double
V
)
const
{
double
differential
(
double
V
)
const
override
{
return
weight
*
fd
.
C
-
weightedNormalStress
*
coefficientOfFriction
(
V
);
}
double
second_deriv
(
double
V
)
const
{
double
second_deriv
(
double
V
)
const
override
{
return
-
weightedNormalStress
*
fd
.
a
/
std
::
hypot
(
2.0
*
Vmin
,
V
);
}
double
regularity
(
double
V
)
const
{
return
std
::
abs
(
second_deriv
(
V
));
}
double
regularity
(
double
V
)
const
override
{
return
std
::
abs
(
second_deriv
(
V
));
}
void
updateAlpha
(
double
alpha
)
{
void
updateAlpha
(
double
alpha
)
override
{
double
const
logrest
=
(
fd
.
mu0
+
fd
.
b
*
alpha
)
/
fd
.
a
;
Vmin
=
fd
.
V0
/
std
::
exp
(
logrest
);
}
...
...
@@ -104,16 +106,16 @@ class RegularisedRateState : public FrictionPotential {
class
ZeroFunction
:
public
FrictionPotential
{
public:
double
evaluate
(
double
)
const
{
return
0
;
}
double
evaluate
(
double
)
const
override
{
return
0
;
}
double
coefficientOfFriction
(
double
s
)
const
{
return
0
;
}
double
coefficientOfFriction
(
double
s
)
const
override
{
return
0
;
}
double
differential
(
double
)
const
{
return
0
;
}
double
differential
(
double
)
const
override
{
return
0
;
}
double
second_deriv
(
double
)
const
{
return
0
;
}
double
second_deriv
(
double
)
const
override
{
return
0
;
}
double
regularity
(
double
)
const
{
return
0
;
}
double
regularity
(
double
)
const
override
{
return
0
;
}
void
updateAlpha
(
double
)
{}
void
updateAlpha
(
double
)
override
{}
};
#endif
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