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
13e0e967
Commit
13e0e967
authored
10 years ago
by
Elias Pipping
Browse files
Options
Downloads
Patches
Plain Diff
[Cleanup] Move weights into normal stress
parent
3b7a9e24
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/tectonic/frictionpotential.hh
+11
-10
11 additions, 10 deletions
dune/tectonic/frictionpotential.hh
dune/tectonic/globalratestatefriction.hh
+3
-4
3 additions, 4 deletions
dune/tectonic/globalratestatefriction.hh
src/assemblers.cc
+8
-2
8 additions, 2 deletions
src/assemblers.cc
with
22 additions
and
16 deletions
dune/tectonic/frictionpotential.hh
+
11
−
10
View file @
13e0e967
...
...
@@ -29,8 +29,9 @@ class FrictionPotential {
class
TruncatedRateState
:
public
FrictionPotential
{
public:
TruncatedRateState
(
double
coefficient
,
double
_normalStress
,
FrictionData
_fd
)
:
fd
(
_fd
),
weight
(
coefficient
),
normalStress
(
_normalStress
)
{}
TruncatedRateState
(
double
_weight
,
double
_weightedNormalStress
,
FrictionData
_fd
)
:
fd
(
_fd
),
weight
(
_weight
),
weightedNormalStress
(
_weightedNormalStress
)
{}
double
coefficientOfFriction
(
double
V
)
const
{
if
(
V
<=
Vmin
)
...
...
@@ -40,14 +41,14 @@ class TruncatedRateState : public FrictionPotential {
}
double
differential
(
double
V
)
const
{
return
weight
*
(
fd
.
C
-
n
ormalStress
*
coefficientOfFriction
(
V
)
)
;
return
weight
*
fd
.
C
-
weightedN
ormalStress
*
coefficientOfFriction
(
V
);
}
double
second_deriv
(
double
V
)
const
{
if
(
V
<=
Vmin
)
return
0
;
return
weight
*
(
-
n
ormalStress
)
*
(
fd
.
a
/
V
);
return
-
weight
edN
ormalStress
*
(
fd
.
a
/
V
);
}
double
regularity
(
double
V
)
const
{
...
...
@@ -65,26 +66,26 @@ class TruncatedRateState : public FrictionPotential {
private
:
FrictionData
const
fd
;
double
const
weight
;
double
const
n
ormalStress
;
double
const
weightedN
ormalStress
;
double
Vmin
;
};
class
RegularisedRateState
:
public
FrictionPotential
{
public:
RegularisedRateState
(
double
coefficien
t
,
double
_
n
ormalStress
,
RegularisedRateState
(
double
_weigh
t
,
double
_
weightedN
ormalStress
,
FrictionData
_fd
)
:
fd
(
_fd
),
weight
(
coefficient
),
n
ormalStress
(
_
n
ormalStress
)
{}
:
fd
(
_fd
),
weight
(
_weight
),
weightedN
ormalStress
(
_
weightedN
ormalStress
)
{}
double
coefficientOfFriction
(
double
V
)
const
{
return
fd
.
a
*
std
::
asinh
(
0.5
*
V
/
Vmin
);
}
double
differential
(
double
V
)
const
{
return
weight
*
(
fd
.
C
-
n
ormalStress
*
coefficientOfFriction
(
V
)
)
;
return
weight
*
fd
.
C
-
weightedN
ormalStress
*
coefficientOfFriction
(
V
);
}
double
second_deriv
(
double
V
)
const
{
return
weight
*
(
-
n
ormalStress
)
*
fd
.
a
/
std
::
hypot
(
2.0
*
Vmin
,
V
);
return
-
weight
edN
ormalStress
*
fd
.
a
/
std
::
hypot
(
2.0
*
Vmin
,
V
);
}
double
regularity
(
double
V
)
const
{
return
std
::
abs
(
second_deriv
(
V
));
}
...
...
@@ -97,7 +98,7 @@ class RegularisedRateState : public FrictionPotential {
private
:
FrictionData
const
fd
;
double
const
weight
;
double
const
n
ormalStress
;
double
const
weightedN
ormalStress
;
double
Vmin
;
};
...
...
This diff is collapsed.
Click to expand it.
dune/tectonic/globalratestatefriction.hh
+
3
−
4
View file @
13e0e967
...
...
@@ -26,10 +26,9 @@ class GlobalRateStateFriction : public GlobalFriction<Matrix, Vector> {
GlobalRateStateFriction
(
BoundaryPatch
<
GridView
>
const
&
frictionalBoundary
,
GridView
const
&
gridView
,
GlobalFrictionData
<
block_size
>
const
&
frictionInfo
,
// Note: passing the following two makes no sense
ScalarVector
const
&
weights
,
ScalarVector
const
&
n
ormalStress
)
:
restrictions
(
n
ormalStress
.
size
())
{
ScalarVector
const
&
weightedN
ormalStress
)
:
restrictions
(
weightedN
ormalStress
.
size
())
{
auto
trivialNonlinearity
=
std
::
make_shared
<
Friction
>
(
std
::
make_shared
<
TrivialFunction
>
());
...
...
@@ -44,7 +43,7 @@ class GlobalRateStateFriction : public GlobalFriction<Matrix, Vector> {
continue
;
}
auto
const
fp
=
std
::
make_shared
<
ScalarFriction
>
(
weights
[
i
],
n
ormalStress
[
i
],
frictionInfo
(
coordinate
));
weights
[
i
],
weightedN
ormalStress
[
i
],
frictionInfo
(
coordinate
));
restrictions
[
i
]
=
std
::
make_shared
<
Friction
>
(
fp
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/assemblers.cc
+
8
−
2
View file @
13e0e967
...
...
@@ -142,15 +142,21 @@ auto MyAssembler<GridView, dimension>::assembleFrictionNonlinearity(
vertexAssembler
.
assembleBoundaryFunctional
(
frictionalBoundaryAssembler
,
weights
,
frictionalBoundary
);
}
ScalarVector
weightedNormalStress
(
weights
.
size
());
for
(
size_t
i
=
0
;
i
<
weights
.
size
();
++
i
)
weightedNormalStress
[
i
]
=
weights
[
i
]
*
normalStress
[
i
];
switch
(
frictionModel
)
{
case
Config
::
Truncated
:
return
std
::
make_shared
<
GlobalRateStateFriction
<
Matrix
,
Vector
,
TruncatedRateState
,
GridView
>>
(
frictionalBoundary
,
gridView
,
frictionInfo
,
weights
,
normalStress
);
frictionalBoundary
,
gridView
,
frictionInfo
,
weights
,
weightedNormalStress
);
case
Config
::
Regularised
:
return
std
::
make_shared
<
GlobalRateStateFriction
<
Matrix
,
Vector
,
RegularisedRateState
,
GridView
>>
(
frictionalBoundary
,
gridView
,
frictionInfo
,
weights
,
normalStress
);
frictionalBoundary
,
gridView
,
frictionInfo
,
weights
,
weightedNormalStress
);
default:
assert
(
false
);
}
...
...
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