Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MoReFEM
CoreLibrary
MoReFEM
Commits
882f20f7
Commit
882f20f7
authored
Oct 26, 2015
by
GILLES Sebastien
Browse files
#718
FSI: simplify calls that update vectors and matrices.
parent
aaa96c6d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Sources/ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Hyperelasticity/VariationalFormulation.hpp
View file @
882f20f7
...
...
@@ -201,10 +201,7 @@ namespace HappyHeart
* \brief Update the content of all the vectors and matrices relevant to the computation of the tangent
* and the residual.
*/
void
UpdateVectorsAndMatrices
();
//! An helper method of \a UpdateVectorsAndMatrices().
void
AssembleVectorsAndMatrices
();
void
UpdateVectorsAndMatrices
(
const
Vec
&
a_evaluation_state
);
/*!
* \brief Compute the matrix of the system.
...
...
Sources/ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Hyperelasticity/VariationalFormulation.hxx
View file @
882f20f7
...
...
@@ -247,27 +247,7 @@ namespace HappyHeart
{
return
&
HyperelasticityNS
::
Impl
::
Snes
<
self
>::
Viewer
;
}
template
<
class
LawPolicyT
,
HyperelasticityNS
::
TimeScheme
TimeSchemeT
>
void
VariationalFormulationHyperElasticity
<
LawPolicyT
,
TimeSchemeT
>
::
AssembleVectorsAndMatrices
()
{
auto
&
vm
=
GetNonCstVectorsAndMatrices
();
vm
.
GetEvaluationState
().
View
(
this
->
MpiHappyHeart
(),
__FILE__
,
__LINE__
);
// Assemble stiffness (depends upon the time scheme; vm types is used here to call the proper
// assembling operation(s)).
HyperelasticityNS
::
Private
::
AssembleStiffness
(
this
->
GetStiffnessOperator
(),
false
,
vm
);
}
template
<
...
...
@@ -392,7 +372,6 @@ namespace HappyHeart
vm
.
UpdateEvaluationState
(
a_evaluation_state
);
{
// Compute some matrices and vectors through arithmetical operations (e.g. vector for midpoint position).
const
bool
is_dynamic_iteration
=
true
;
...
...
@@ -405,8 +384,11 @@ namespace HappyHeart
}
{
// Assemble into vectors and matrices the relevant operators
AssembleVectorsAndMatrices
();
// Assemble stiffness (depends upon the time scheme; vm types is used here to call the proper
// assembling operation(s)).
HyperelasticityNS
::
Private
::
AssembleStiffness
(
this
->
GetStiffnessOperator
(),
false
,
vm
);
}
}
...
...
Sources/ModelInstances/Hyperelasticity/TimeSchemes/Midpoint/Midpoint.hxx
View file @
882f20f7
...
...
@@ -32,8 +32,15 @@ namespace HappyHeart
{
static_cast
<
void
>
(
is_static_call
);
GlobalMatrixWithCoefficient
mat
(
vm
.
GetNonCstMatrixNewStiffness
(),
1.
);
GlobalVectorWithCoefficient
vec
(
vm
.
GetNonCstVectorNewStiffness
(),
1.
);
auto
&
matrix_stiffness
=
vm
.
GetNonCstMatrixNewStiffness
();
auto
&
vector_stiffness
=
vm
.
GetNonCstVectorNewStiffness
();
matrix_stiffness
.
ZeroEntries
(
__FILE__
,
__LINE__
);
vector_stiffness
.
ZeroEntries
(
__FILE__
,
__LINE__
);
GlobalMatrixWithCoefficient
mat
(
matrix_stiffness
,
1.
);
GlobalVectorWithCoefficient
vec
(
vector_stiffness
,
1.
);
the_operator
.
Assemble
(
std
::
make_tuple
(
std
::
ref
(
mat
),
std
::
ref
(
vec
)),
vm
.
GetMidpointPosition
(),
...
...
Sources/ModelInstances/Hyperelasticity/VariationalFormulationHyperElasticity.hxx
View file @
882f20f7
...
...
@@ -599,14 +599,6 @@ namespace HappyHeart
auto
&
vm
=
this
->
GetNonCstVectorsAndMatrices
();
vm
.
UpdateEvaluationState
(
a_evaluation_state
);
{
// Zero all relevant matrices and vectors.
vm
.
GetNonCstMatrixNewStiffness
().
ZeroEntries
(
__FILE__
,
__LINE__
);
vm
.
GetNonCstVectorNewStiffness
().
ZeroEntries
(
__FILE__
,
__LINE__
);
}
{
// Compute some matrices and vectors through arithmetical operations (e.g. vector for midpoint position).
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment