Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-contact
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
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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-contact
Commits
4241680a
Commit
4241680a
authored
6 years ago
by
Jonathan Youett
Browse files
Options
Downloads
Patches
Plain Diff
Minor cleanup
parent
e8570c8e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/contact/common/staticmgcontactproblem.cc
+5
-8
5 additions, 8 deletions
dune/contact/common/staticmgcontactproblem.cc
dune/contact/common/staticmgcontactproblem.hh
+1
-1
1 addition, 1 deletion
dune/contact/common/staticmgcontactproblem.hh
with
6 additions
and
9 deletions
dune/contact/common/staticmgcontactproblem.cc
+
5
−
8
View file @
4241680a
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set ts=4 sw=2 et sts=2:
// vi: set ts=4 sw=2 et sts=2:
#include
<memory>
#include
<dune/fufem/assemblers/functionalassembler.hh>
#include
<dune/fufem/assemblers/functionalassembler.hh>
#include
<dune/fufem/assemblers/operatorassembler.hh>
#include
<dune/fufem/assemblers/operatorassembler.hh>
...
@@ -17,15 +16,15 @@ typename VectorType::field_type StaticMgContactProblem<VectorType,MaterialType>:
...
@@ -17,15 +16,15 @@ typename VectorType::field_type StaticMgContactProblem<VectorType,MaterialType>:
deformGrids
(
iterates
);
deformGrids
(
iterates
);
// The infeasibility is the maximal nonlinear constraint violation
// The infeasibility is the maximal nonlinear constraint violation
field_type
infeasibility
(
0
)
;
field_type
infeasibility
{
0.0
}
;
for
(
int
i
=
0
;
i
<
contactAssembler_
->
nCouplings
();
i
++
)
{
for
(
int
i
=
0
;
i
<
contactAssembler_
->
nCouplings
();
i
++
)
{
auto
*
coupling
=
dynamic_cast
<
ContactCoupling
*
>
(
contactAssembler_
->
getContactCouplings
()[
i
]
.
get
()
);
auto
coupling
=
std
::
dynamic_
pointer_
cast
<
ContactCoupling
>
(
contactAssembler_
->
getContactCouplings
()[
i
]);
// rebuild coupling and evaluate obstacles
// rebuild coupling and evaluate obstacles
auto
obstacles
=
coupling
->
assembleObstacles
(
true
);
auto
obstacles
=
coupling
->
assembleObstacles
(
true
);
for
(
size_t
j
=
0
;
j
<
obstacles
.
size
();
j
++
)
for
(
const
auto
&
obstacle
:
obstacles
)
infeasibility
=
std
::
max
(
infeasibility
,
-
obstacle
s
[
j
]
);
infeasibility
=
std
::
max
(
infeasibility
,
-
obstacle
);
}
}
return
infeasibility
;
return
infeasibility
;
...
@@ -59,7 +58,7 @@ template <class VectorType, class MaterialType>
...
@@ -59,7 +58,7 @@ template <class VectorType, class MaterialType>
void
StaticMgContactProblem
<
VectorType
,
MaterialType
>::
assembleQP
(
const
std
::
vector
<
VectorType
>&
iterates
)
void
StaticMgContactProblem
<
VectorType
,
MaterialType
>::
assembleQP
(
const
std
::
vector
<
VectorType
>&
iterates
)
{
{
// assemble linear and quadratic terms
// assemble linear and quadratic terms
for
(
size_t
i
=
0
;
i
<
iterates
.
size
();
i
++
)
{
for
(
size_t
i
=
0
;
i
<
iterates
.
size
();
i
++
)
{
auto
&
material
=
(
*
this
->
materials_
)[
i
];
auto
&
material
=
(
*
this
->
materials_
)[
i
];
const
auto
&
basis
=
material
.
basis
();
const
auto
&
basis
=
material
.
basis
();
...
@@ -90,8 +89,6 @@ void StaticMgContactProblem<VectorType,MaterialType>::assembleQP(const std::vect
...
@@ -90,8 +89,6 @@ void StaticMgContactProblem<VectorType,MaterialType>::assembleQP(const std::vect
// assemble the linearisations
// assemble the linearisations
contactAssembler_
->
assembleLinearisations
();
contactAssembler_
->
assembleLinearisations
();
// assemble the local coordinate systems and obstacles
contactAssembler_
->
assembleClpReflections
();
contactAssembler_
->
assembleClpReflections
();
contactAssembler_
->
assembleObstacle
();
contactAssembler_
->
assembleObstacle
();
...
...
This diff is collapsed.
Click to expand it.
dune/contact/common/staticmgcontactproblem.hh
+
1
−
1
View file @
4241680a
...
@@ -78,7 +78,7 @@ public:
...
@@ -78,7 +78,7 @@ public:
const
std
::
vector
<
VectorType
>&
rhs
()
const
{
return
rhs_
;}
const
std
::
vector
<
VectorType
>&
rhs
()
const
{
return
rhs_
;}
//! Return the nonlinear constraints
//! Return the nonlinear constraints
const
std
::
vector
<
BoxConstraint
<
field_type
,
dim
>
>
&
constraints
()
const
const
auto
&
constraints
()
const
{
{
return
contactAssembler_
->
totalObstacles_
;
return
contactAssembler_
->
totalObstacles_
;
}
}
...
...
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