Skip to content
GitLab
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
13576494
Commit
13576494
authored
Apr 04, 2016
by
GILLES Sebastien
Browse files
#880
Porosity: fix parallel issues in PorosityParameter. Some remaining in SolidOnFluidMesh...
parent
6a6301bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Sources/ModelInstances/UnderDevelopment/Poromechanics/Private/PorosityParameter.cpp
View file @
13576494
...
...
@@ -8,6 +8,8 @@
// Copyright © 2016 Inria. All rights reserved.
//
#include
"ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hpp"
#include
"FiniteElement/FiniteElementSpace/GodOfDofManager.hpp"
#include
"FiniteElement/FiniteElementSpace/Private/DofProgramWiseIndexListPerVertexCoordIndexManager.hpp"
...
...
@@ -66,9 +68,10 @@ namespace HappyHeart
auto
&
underlying_vector
=
GetNonCstOnFluidMeshVector
();
AllocateGlobalVector
(
god_of_dof
,
underlying_vector
);
// \todo #820 Works only because same underlying mesh and same shape function!
on_fluid_mesh_vector_previous_time_iteration_
=
std
::
make_unique
<
GlobalVector
>
(
underlying_vector
);
underlying_vector
.
Copy
(
solution_porosity_varf
,
__FILE__
,
__LINE__
);
auto
&
vector_prev_time_iteration
=
GetNonCstOnFluidMeshVectorPreviousTimeIteration
();
vector_prev_time_iteration
.
Copy
(
underlying_vector
,
__FILE__
,
__LINE__
);
on_fluid_mesh_
=
std
::
make_unique
<
fluid_param_at_dof_type
>
(
"Porosity on fluid mesh"
,
...
...
@@ -85,7 +88,7 @@ namespace HappyHeart
felt_space
,
felt_space_dim_minus_1
,
unknown
,
GetNonCstOnFluidMeshV
ector
P
rev
iousT
ime
I
teration
()
);
v
ector
_p
rev
_t
ime
_i
teration
);
}
...
...
@@ -118,12 +121,13 @@ namespace HappyHeart
GetNonCstOnFluidMeshVectorPreviousTimeIteration
().
Copy
(
on_fluid_vector
,
__FILE__
,
__LINE__
);
const
auto
&
from_solid_to_fluid
=
GetFromSolidToFluid
().
GetInterpolationMatrix
();
// \todo #820 Works only because same mesh and same shape function at the moment; the former won't
// hold indefinitely (an interpolator will be required at this point).
on_fluid_vector
.
Copy
(
GetSolutionPorosityVarf
(),
__FILE__
,
__LINE__
);
Wrappers
::
Petsc
::
MatMult
(
from_solid_to_fluid
,
GetSolutionPorosityVarf
(),
on_fluid_vector
,
__FILE__
,
__LINE__
);
}
...
...
Sources/ModelInstances/UnderDevelopment/Poromechanics/Private/PorosityParameter.hpp
View file @
13576494
...
...
@@ -115,7 +115,6 @@ namespace HappyHeart
//! Constant accessor to the solution of the PorosityVariationalFormulation.
const
GlobalVector
&
GetSolutionPorosityVarf
()
const
noexcept
;
//! Non constant accessor to the porosity parameter on the solid mesh.
ParameterAtDof
<
ParameterNS
::
Type
::
scalar
>::
type
&
GetNonCstOnSolidMesh
()
noexcept
;
...
...
@@ -131,19 +130,20 @@ namespace HappyHeart
//! Non constant accessor to the underlying global vector for porosity on fluid mesh.
GlobalVector
&
GetNonCstOnFluidMeshVector
()
noexcept
;
/*!
* \brief Constant accessor to the underlying global vector for porosity on fluid mesh from previous
* time iteration.
*/
const
GlobalVector
&
GetOnFluidMeshVectorPreviousTimeIteration
()
const
noexcept
;
/*!
* \brief Non constant accessor to the underlying global vector for porosity on fluid mesh from
* previous time iteration.
*/
GlobalVector
&
GetNonCstOnFluidMeshVectorPreviousTimeIteration
()
noexcept
;
//! Constant accessor to the interpolator solid -> fluid for porosity unknown.
const
NonConformInterpolatorNS
::
FromVertexMatching
&
GetFromSolidToFluid
()
const
noexcept
;
///@}
...
...
@@ -169,9 +169,8 @@ namespace HappyHeart
//! Underlying global vector for porosity on fluid mesh from previous time iteration.
GlobalVector
::
unique_ptr
on_fluid_mesh_vector_previous_time_iteration_
=
nullptr
;
//! Interpolator to transform porosity from solid \a GodOfDof to the fluid one.
NonConformInterpolatorNS
::
FromVertexMatching
::
unique_ptr
from_solid_to_fluid_
=
nullptr
;
//! Interpolator solid -> fluid for porosity unknown.
NonConformInterpolatorNS
::
FromVertexMatching
::
const_unique_ptr
from_solid_to_fluid_
=
nullptr
;
};
...
...
Sources/ModelInstances/UnderDevelopment/Poromechanics/Private/PorosityParameter.hxx
View file @
13576494
...
...
@@ -101,7 +101,12 @@ namespace HappyHeart
}
inline
const
NonConformInterpolatorNS
::
FromVertexMatching
&
PorosityParameter
::
GetFromSolidToFluid
()
const
noexcept
{
assert
(
!
(
!
from_solid_to_fluid_
));
return
*
from_solid_to_fluid_
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment