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
68fcf79e
Commit
68fcf79e
authored
Jul 20, 2016
by
GILLES Sebastien
Browse files
#820
deltaSolidVector computed.
parent
05165c15
Changes
5
Hide whitespace changes
Inline
Side-by-side
Sources/ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/InnerLoop/VariationalFormulation.hpp
View file @
68fcf79e
...
...
@@ -567,12 +567,25 @@ namespace HappyHeart
//! Non constant accessor to the deltaMixtVariables ( odo #820 Rename and comment!).
GlobalVector
&
GetNonCstDeltaMixtVariables
()
noexcept
;
//! Constant accessor to the deltaDarcyVector ( odo #820 Rename and comment!).
//! Constant accessor to the deltaDarcyVector (
\t
odo #820 Rename and comment!).
const
GlobalVector
&
GetDeltaDarcyVector
()
const
noexcept
;
//! Non constant accessor to the deltaDarcyVector ( odo #820 Rename and comment!).
//! Non constant accessor to the deltaDarcyVector (
\t
odo #820 Rename and comment!).
GlobalVector
&
GetNonCstDeltaDarcyVector
()
noexcept
;
//! Constant accessor to the deltaSolidVector ( \todo #820 Rename and comment!).
const
GlobalVector
&
GetDeltaSolidVector
()
const
noexcept
;
//! Non constant accessor to the deltaSolidVector ( \todo #820 Rename and comment!).
GlobalVector
&
GetNonCstDeltaSolidVector
()
noexcept
;
//! Constant accessor to the deltaSolidVector ( \todo #820 Rename and comment!).
const
GlobalVector
&
GetMonolithicDeltaDarcyVector
()
const
noexcept
;
//! Non constant accessor to the deltaDarcyVector ( \todo #820 Rename and comment!).
GlobalVector
&
GetNonCstMonolithicDeltaDarcyVector
()
noexcept
;
///@}
...
...
@@ -920,6 +933,31 @@ namespace HappyHeart
//! Work vector with same pattern as Rhs.
GlobalVector
::
unique_ptr
work_vector_rhs_like_
=
nullptr
;
//! Vector which holds the values to use within dH for non homogeneous Dirichlet boundary condition.
GlobalVector
::
unique_ptr
non_homogeneous_robin_vector_
=
nullptr
;
//! Differential velocity of the solid ('dispSdeltar' in dH function in Freefem script).
GlobalVector
::
unique_ptr
solid_differential_velocity_
=
nullptr
;
//! Differential velocity of the solid ('dispSdeltar' in dH function in Freefem script) on robin interface.
GlobalVector
::
unique_ptr
solid_differential_velocity_on_robin_interface_
=
nullptr
;
//! Load state correction (see Freefem script).
GlobalVector
::
unique_ptr
dirichlet_load_state_correction_
=
nullptr
;
//! deltaMixtVariables (\todo #820 Rename and comment!)
GlobalVector
::
unique_ptr
delta_mixt_variables_
=
nullptr
;
//! deltaDarcyVector (\todo #820 Rename and comment!)
GlobalVector
::
unique_ptr
delta_darcy_vector_
=
nullptr
;
//! deltaDarcyVector (\todo #820 Rename and comment!)
GlobalVector
::
unique_ptr
monolithic_delta_darcy_vector_
=
nullptr
;
//! deltaSolidVector (\todo #820 Rename and comment!)
GlobalVector
::
unique_ptr
delta_solid_vector_
=
nullptr
;
///@}
...
...
@@ -955,26 +993,10 @@ namespace HappyHeart
//! Parameter that encapsulates velSHalfVhf.
ParameterAtDof
<
ParameterNS
::
Type
::
vector
>::
type
::
const_unique_ptr
velSHalfVhf_param_
=
nullptr
;
//! Vector which holds the values to use within dH for non homogeneous Dirichlet boundary condition.
GlobalVector
::
unique_ptr
non_homogeneous_robin_vector_
=
nullptr
;
//! Value of the fluid mass at the end of previous time step.
const
GlobalVector
&
previous_time_step_fluid_mass_on_solid_mesh_
;
//! Differential velocity of the solid ('dispSdeltar' in dH function in Freefem script).
GlobalVector
::
unique_ptr
solid_differential_velocity_
=
nullptr
;
//! Differential velocity of the solid ('dispSdeltar' in dH function in Freefem script) on robin interface.
GlobalVector
::
unique_ptr
solid_differential_velocity_on_robin_interface_
=
nullptr
;
//! Load state correction (see Freefem script).
GlobalVector
::
unique_ptr
dirichlet_load_state_correction_
=
nullptr
;
//! deltaMixtVariables (\todo #820 Rename and comment!)
GlobalVector
::
unique_ptr
delta_mixt_variables_
=
nullptr
;
//! deltaDarcyVector (\todo #820 Rename and comment!)
GlobalVector
::
unique_ptr
delta_darcy_vector_
=
nullptr
;
};
...
...
Sources/ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/InnerLoop/VariationalFormulation.hxx
View file @
68fcf79e
...
...
@@ -299,12 +299,21 @@ namespace HappyHeart
auto
&
delta_darcy_vector
=
GetNonCstDeltaDarcyVector
();
delta_darcy_vector
.
ZeroEntries
(
__FILE__
,
__LINE__
);
{
GlobalVectorWithCoefficient
with_coeff
(
delta_darcy_vector
,
-
1.
);
GetDeltaDarcyOperator
().
Assemble
(
std
::
make_tuple
(
std
::
ref
(
with_coeff
)),
ImplicitStepFluidNS
::
IsFullDarcy
::
no
);
auto
&
monolithic_delta_darcy_vector
=
GetNonCstMonolithicDeltaDarcyVector
();
monolithic_delta_darcy_vector
.
ZeroEntries
(
__FILE__
,
__LINE__
);
{
GlobalVectorWithCoefficient
with_coeff
(
monolithic_delta_darcy_vector
,
-
1.
);
GetDeltaDarcyOperator
().
Assemble
(
std
::
make_tuple
(
std
::
ref
(
with_coeff
)),
ImplicitStepFluidNS
::
IsFullDarcy
::
no
);
}
Wrappers
::
Petsc
::
MatMult
(
GetMonolithic2Velocity
().
GetInterpolationMatrix
(),
monolithic_delta_darcy_vector
,
delta_darcy_vector
,
__FILE__
,
__LINE__
);
}
{
...
...
@@ -317,10 +326,28 @@ namespace HappyHeart
filename
,
__FILE__
,
__LINE__
,
PETSC_VIEWER_ASCII_MATLAB
);
}
auto
&
delta_solid_vector
=
GetNonCstDeltaSolidVector
();
Wrappers
::
Petsc
::
MatMultTranspose
(
variable_holder_parent
::
GetVariableHolder
().
GetSolidOnFluidMesh
().
GetMatrixSolidToFluid
(),
delta_darcy_vector
,
delta_solid_vector
,
__FILE__
,
__LINE__
);
{
const
auto
filename
=
parent
::
GetOutputDirectory
(
numbering_subset
)
+
"/"
+
DifferentialPreffix
(
differential
::
yes
)
+
"deltaSolidVector_"
+
GetIterationTag
()
+
".m"
;
delta_solid_vector
.
View
(
parent
::
MpiHappyHeart
(),
filename
,
__FILE__
,
__LINE__
,
PETSC_VIEWER_ASCII_MATLAB
);
}
// \todo #820 At the moment, I accept my norm is not the same as Bruno's; see what Petsc gives when
...
...
Sources/ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/InnerLoop/VariationalFormulationAccessors.hxx
View file @
68fcf79e
...
...
@@ -717,6 +717,22 @@ namespace HappyHeart
}
template
<
class
HyperelasticLawT
>
inline
const
GlobalVector
&
VariationalFormulation
<
HyperelasticLawT
>::
GetMonolithicDeltaDarcyVector
()
const
noexcept
{
assert
(
!
(
!
monolithic_delta_darcy_vector_
));
return
*
monolithic_delta_darcy_vector_
;
}
template
<
class
HyperelasticLawT
>
inline
GlobalVector
&
VariationalFormulation
<
HyperelasticLawT
>::
GetNonCstMonolithicDeltaDarcyVector
()
noexcept
{
return
const_cast
<
GlobalVector
&>
(
GetMonolithicDeltaDarcyVector
());
}
template
<
class
HyperelasticLawT
>
inline
const
GlobalVector
&
VariationalFormulation
<
HyperelasticLawT
>::
GetDeltaDarcyVector
()
const
noexcept
{
...
...
@@ -730,6 +746,22 @@ namespace HappyHeart
{
return
const_cast
<
GlobalVector
&>
(
GetDeltaDarcyVector
());
}
template
<
class
HyperelasticLawT
>
inline
const
GlobalVector
&
VariationalFormulation
<
HyperelasticLawT
>::
GetDeltaSolidVector
()
const
noexcept
{
assert
(
!
(
!
delta_solid_vector_
));
return
*
delta_solid_vector_
;
}
template
<
class
HyperelasticLawT
>
inline
GlobalVector
&
VariationalFormulation
<
HyperelasticLawT
>::
GetNonCstDeltaSolidVector
()
noexcept
{
return
const_cast
<
GlobalVector
&>
(
GetDeltaSolidVector
());
}
...
...
Sources/ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/InnerLoop/VariationalFormulationInit.hxx
View file @
68fcf79e
...
...
@@ -72,9 +72,14 @@ namespace HappyHeart
non_homogeneous_robin_vector_
=
std
::
make_unique
<
GlobalVector
>
(
system_solution
);
dirichlet_load_state_correction_
=
std
::
make_unique
<
GlobalVector
>
(
system_solution
);
delta_mixt_variables_
=
std
::
make_unique
<
GlobalVector
>
(
system_solution
);
delta_darcy_vector_
=
std
::
make_unique
<
GlobalVector
>
(
system_solution
);
monolithic_
delta_darcy_vector_
=
std
::
make_unique
<
GlobalVector
>
(
system_solution
);
}
delta_darcy_vector_
=
std
::
make_unique
<
GlobalVector
>
(
god_of_dof
.
GetNumberingSubset
(
EnumUnderlyingType
(
NumberingSubsetIndex
::
fluid_velocity
)));
AllocateGlobalVector
(
god_of_dof
,
GetNonCstDeltaDarcyVector
());
solid_differential_velocity_on_robin_interface_
=
std
::
make_unique
<
GlobalVector
>
(
god_of_dof
.
GetNumberingSubset
(
EnumUnderlyingType
(
NumberingSubsetIndex
::
fluid_velocity_on_robin_interface
)));
AllocateGlobalVector
(
god_of_dof
,
GetNonCstSolidDifferentialVelocityOnRobinInterface
());
...
...
@@ -174,6 +179,10 @@ namespace HappyHeart
work_solid_velocity_
=
std
::
make_unique
<
GlobalVector
>
(
god_of_dof
.
GetNumberingSubset
(
EnumUnderlyingType
(
NumberingSubsetIndex
::
solid_velocity_on_fluid
)));
AllocateGlobalVector
(
god_of_dof
,
*
work_solid_velocity_
);
delta_solid_vector_
=
std
::
make_unique
<
GlobalVector
>
(
solid_god_of_dof
.
GetNumberingSubset
(
EnumUnderlyingType
(
NumberingSubsetIndex
::
solid_velocity
)));
AllocateGlobalVector
(
solid_god_of_dof
,
GetNonCstDeltaSolidVector
());
}
{
...
...
Sources/ModelInstances/UnderDevelopment/Poromechanics/Model.hxx
View file @
68fcf79e
...
...
@@ -197,7 +197,9 @@ namespace HappyHeart
solid_vector
.
UpdateGhosts
(
__FILE__
,
__LINE__
);
solid_vector
.
View
(
parent
::
MpiHappyHeart
(),
solid_god_of_dof
.
GetOutputDirectoryForNumberingSubset
(
numbering_subset
)
+
"/solid_velocity_vector_time_"
+
std
::
to_string
(
parent
::
GetTimeManager
().
NtimeModified
())
+
".m"
,
solid_god_of_dof
.
GetOutputDirectoryForNumberingSubset
(
numbering_subset
)
+
"/solid_velocity_vector_time_"
+
std
::
to_string
(
parent
::
GetTimeManager
().
NtimeModified
())
+
".m"
,
__FILE__
,
__LINE__
,
PETSC_VIEWER_ASCII_MATLAB
);
}
...
...
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