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
4f2769a4
Commit
4f2769a4
authored
11 years ago
by
Elias Pipping
Committed by
Elias Pipping
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
dim -> block_size; FrictionType typedef
parent
67b2b386
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/tectonic/globalnonlinearity.hh
+4
-2
4 additions, 2 deletions
dune/tectonic/globalnonlinearity.hh
dune/tectonic/globalruinanonlinearity.hh
+8
-6
8 additions, 6 deletions
dune/tectonic/globalruinanonlinearity.hh
with
12 additions
and
8 deletions
dune/tectonic/globalnonlinearity.hh
+
4
−
2
View file @
4f2769a4
...
...
@@ -20,7 +20,9 @@ class GlobalNonlinearity {
public:
using
MatrixType
=
MatrixTypeTEMPLATE
;
using
VectorType
=
VectorTypeTEMPLATE
;
int
static
const
dim
=
VectorTypeTEMPLATE
::
block_type
::
dimension
;
using
LocalVectorType
=
typename
VectorType
::
block_type
;
static
const
int
block_size
=
LocalVectorType
::
dimension
;
using
FrictionType
=
LocalFriction
<
block_size
>
;
double
operator
()(
VectorType
const
&
x
)
const
{
double
tmp
=
0
;
...
...
@@ -34,7 +36,7 @@ class GlobalNonlinearity {
/*
Return a restriction of the outer function to the i'th node.
*/
virtual
shared_ptr
<
LocalFriction
<
dim
>>
restriction
(
int
i
)
const
=
0
;
virtual
shared_ptr
<
LocalFriction
<
block_size
>>
restriction
(
int
i
)
const
=
0
;
void
addHessian
(
VectorType
const
&
v
,
MatrixType
&
hessian
)
const
{
for
(
size_t
i
=
0
;
i
<
v
.
size
();
++
i
)
{
...
...
This diff is collapsed.
Click to expand it.
dune/tectonic/globalruinanonlinearity.hh
+
8
−
6
View file @
4f2769a4
...
...
@@ -17,23 +17,25 @@ namespace Dune {
template
<
class
MatrixType
,
class
VectorType
>
class
GlobalRuinaNonlinearity
:
public
GlobalNonlinearity
<
MatrixType
,
VectorType
>
{
public:
using
GlobalNonlinearity
<
MatrixType
,
VectorType
>::
block_size
;
using
typename
GlobalNonlinearity
<
MatrixType
,
VectorType
>::
FrictionType
;
private:
using
typename
GlobalNonlinearity
<
MatrixType
,
VectorType
>::
SingletonVectorType
;
public:
using
GlobalNonlinearity
<
MatrixType
,
VectorType
>::
dim
;
GlobalRuinaNonlinearity
(
Dune
::
BitSetVector
<
1
>
const
&
frictionalNodes
,
SingletonVectorType
const
&
nodalIntegrals
,
FrictionData
const
&
fd
)
:
restrictions
(
nodalIntegrals
.
size
())
{
auto
trivialNonlinearity
=
make_shared
<
Local
Friction
<
dim
>
>
(
make_shared
<
TrivialFunction
>
());
make_shared
<
Friction
Type
>
(
make_shared
<
TrivialFunction
>
());
for
(
size_t
i
=
0
;
i
<
restrictions
.
size
();
++
i
)
{
restrictions
[
i
]
=
frictionalNodes
[
i
][
0
]
?
make_shared
<
Local
Friction
<
dim
>
>
(
?
make_shared
<
Friction
Type
>
(
make_shared
<
FrictionPotential
>
(
nodalIntegrals
[
i
],
fd
))
:
trivialNonlinearity
;
}
...
...
@@ -47,12 +49,12 @@ class GlobalRuinaNonlinearity
/*
Return a restriction of the outer function to the i'th node.
*/
shared_ptr
<
Local
Friction
<
dim
>
>
restriction
(
int
i
)
const
override
{
shared_ptr
<
Friction
Type
>
restriction
(
int
i
)
const
override
{
return
restrictions
[
i
];
}
private
:
std
::
vector
<
shared_ptr
<
Local
Friction
<
dim
>
>>
restrictions
;
std
::
vector
<
shared_ptr
<
Friction
Type
>>
restrictions
;
};
}
#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