Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MoReFEM
CoreLibrary
MoReFEM
Commits
062040b2
Commit
062040b2
authored
Oct 29, 2015
by
GILLES Sebastien
Browse files
#723
FSI/Newton: invert a sign to follow same convention as Freefem's script.
parent
20e8feb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Data/Lua/demo_input_fsi_ei.lua
View file @
062040b2
...
...
@@ -264,7 +264,7 @@ EssentialBoundaryCondition3 = {
Mesh1
=
{
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh
=
"${HOME}/Codes/HappyHeart/Data/Mesh/ThTotal2D
small
.mesh"
,
mesh
=
"${HOME}/Codes/HappyHeart/Data/Mesh/ThTotal2D.mesh"
,
-- Format of the input mesh.
-- Expected format: "VALUE"
...
...
Sources/ModelInstances/FSI_EI/Newton/ModelForward.hxx
View file @
062040b2
...
...
@@ -45,6 +45,7 @@ namespace HappyHeart
UpdateSolidDisplacementAfterSoF
();
UpdateFluidDirichletCondition
(
differential
::
yes
);
ImplicitFluidStep
(
differential
::
yes
);
auto
&
fluid_varf
=
GetNonCstImplicitStepFluidVariationalFormulation
();
...
...
@@ -54,7 +55,7 @@ namespace HappyHeart
const
auto
&
solid_numbering_subset
=
solid_varf
.
GetNumberingSubset
();
const
auto
&
solid_tangent
=
solid_varf
.
GetSystemMatrix
(
solid_numbering_subset
,
solid_numbering_subset
);
//
auto& sol
id_residual
= *solid_displacement_inside_dh_;
auto
&
sol
ution
=
*
solid_displacement_inside_dh_
;
auto
&
solid_residual
=
GetNonCstSolidResidual
();
Wrappers
::
Petsc
::
MatMultTranspose
(
GetInterpolationMatrixSolid2FluidVelocity
(),
...
...
@@ -62,10 +63,16 @@ namespace HappyHeart
solid_residual
,
__FILE__
,
__LINE__
);
// GetNonCstDifferentialSolidSolver().
GetNonCstDifferentialSolidSolver
().
SolveLinear
(
solid_tangent
,
solid_tangent
,
solid_residual
,
solution
,
__FILE__
,
__LINE__
);
// SOLVE LINEAR HERE!
solid_residual
.
View
(
mpi
,
__FILE__
,
__LINE__
);
//solution.View(mpi, __FILE__, __LINE__);
const
PetscReal
evaluation_state_min
=
solution
.
Min
(
__FILE__
,
__LINE__
).
second
;
const
PetscReal
evaluation_state_max
=
solution
.
Max
(
__FILE__
,
__LINE__
).
second
;
std
::
cout
<<
"EXTREMA ARE "
<<
evaluation_state_min
<<
" and "
<<
evaluation_state_max
<<
std
::
endl
;
...
...
@@ -307,10 +314,10 @@ namespace HappyHeart
auto
&
solid_displacement_evolution_in_SoF
=
GetNonCstSolidDisplacementEvolutionInSoF
();
solid_displacement_evolution_in_SoF
.
Copy
(
s
olid
_d
isplacement
_after_
SoF
,
__FILE__
,
__LINE__
);
solid_displacement_evolution_in_SoF
.
Copy
(
GetS
olid
D
isplacement
Before
SoF
()
,
__FILE__
,
__LINE__
);
Wrappers
::
Petsc
::
AXPY
(
-
1.
,
GetS
olid
D
isplacement
Before
SoF
()
,
s
olid
_d
isplacement
_after_
SoF
,
solid_displacement_evolution_in_SoF
,
__FILE__
,
__LINE__
);
...
...
@@ -320,6 +327,12 @@ namespace HappyHeart
__FILE__
,
__LINE__
);
const
PetscReal
evaluation_state_min
=
solid_displacement_evolution_in_SoF
.
Min
(
__FILE__
,
__LINE__
).
second
;
const
PetscReal
evaluation_state_max
=
solid_displacement_evolution_in_SoF
.
Max
(
__FILE__
,
__LINE__
).
second
;
std
::
cout
<<
"H0 EXTREMA ARE "
<<
evaluation_state_min
<<
" and "
<<
evaluation_state_max
<<
" on "
<<
solid_displacement_evolution_in_SoF
.
GetProgramWiseSize
(
__FILE__
,
__LINE__
)
<<
" elements."
<<
std
::
endl
;
// const auto& mpi = parent::MpiHappyHeart();
...
...
Write
Preview
Markdown
is supported
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