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
f3b68b29
Commit
f3b68b29
authored
Nov 09, 2015
by
GILLES Sebastien
Browse files
#723
FSI: Add a new accessor in Explicit formulation.
parent
5e7db41a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Sources/ModelInstances/FSI_EI/ExplicitStepVariationalFormulation.cpp
View file @
f3b68b29
...
...
@@ -191,7 +191,7 @@ namespace HappyHeart
{
const
auto
&
mass_fluid_velocity
=
GetMassFluidVelocity
();
const
auto
&
previous_iteration
=
Get
NonCst
PreviousFluidVelocity
();
const
auto
&
previous_iteration
=
GetPreviousFluidVelocity
();
Wrappers
::
Petsc
::
MatMult
(
mass_fluid_velocity
,
previous_iteration
,
residual_rhs
,
__FILE__
,
__LINE__
);
...
...
Sources/ModelInstances/FSI_EI/ExplicitStepVariationalFormulation.hpp
View file @
f3b68b29
...
...
@@ -166,6 +166,8 @@ namespace HappyHeart
GlobalVector
&
GetNonCstPreviousFluidVelocity
()
noexcept
;
const
GlobalVector
&
GetPreviousFluidVelocity
()
const
noexcept
;
private:
...
...
Sources/ModelInstances/FSI_EI/ExplicitStepVariationalFormulation.hxx
View file @
f3b68b29
...
...
@@ -118,13 +118,20 @@ namespace HappyHeart
}
inline
GlobalVector
&
ExplicitStepVariationalFormulation
::
GetNonCstPreviousFluidVelocity
()
noexcept
inline
const
GlobalVector
&
ExplicitStepVariationalFormulation
::
GetPreviousFluidVelocity
()
const
noexcept
{
assert
(
!
(
!
previous_fluid_velocity_
));
return
*
previous_fluid_velocity_
;
}
inline
GlobalVector
&
ExplicitStepVariationalFormulation
::
GetNonCstPreviousFluidVelocity
()
noexcept
{
return
const_cast
<
GlobalVector
&>
(
GetPreviousFluidVelocity
());
}
inline
const
GlobalMatrix
&
ExplicitStepVariationalFormulation
::
GetResidualMatrix
()
const
noexcept
{
assert
(
!
(
!
residual_matrix_
));
...
...
Sources/ModelInstances/FSI_EI/Newton/ModelForward.hxx
View file @
f3b68b29
...
...
@@ -299,6 +299,27 @@ namespace HappyHeart
const
auto
&
residual
=
explicit_step_formulation
.
ComputeResidual
();
residual
.
template
Print
<
MpiScale
::
processor_wise
>(
mpi
,
output_dir
+
"explicit_step_fluid_residual.hhdata"
,
__FILE__
,
__LINE__
);
{
const
auto
&
dispSdelta
=
explicit_step_formulation
.
GetSystemSolution
(
numbering_subset
);
const
PetscReal
evaluation_state_min
=
dispSdelta
.
Min
(
__FILE__
,
__LINE__
).
second
;
const
PetscReal
evaluation_state_max
=
dispSdelta
.
Max
(
__FILE__
,
__LINE__
).
second
;
std
::
cout
<<
"Explicit solution EXTREMA ARE "
<<
evaluation_state_min
<<
" and "
<<
evaluation_state_max
<<
" on "
<<
dispSdelta
.
GetProgramWiseSize
(
__FILE__
,
__LINE__
)
<<
" elements."
<<
std
::
endl
;
// OK
}
{
const
auto
&
dispSdelta
=
residual
;
const
PetscReal
evaluation_state_min
=
dispSdelta
.
Min
(
__FILE__
,
__LINE__
).
second
;
const
PetscReal
evaluation_state_max
=
dispSdelta
.
Max
(
__FILE__
,
__LINE__
).
second
;
std
::
cout
<<
"Explicit residual EXTREMA ARE "
<<
evaluation_state_min
<<
" and "
<<
evaluation_state_max
<<
" on "
<<
dispSdelta
.
GetProgramWiseSize
(
__FILE__
,
__LINE__
)
<<
" elements."
<<
std
::
endl
;
// OK
}
}
...
...
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