Commit 50f87e23 authored by GILLES Sebastien's avatar GILLES Sebastien

#1140 Rename GeometricMeshRegion Mesh throughout the code.

parent ed776e3a
This diff is collapsed.
......@@ -80,7 +80,7 @@ namespace MoReFEM
/*!
* \brief Index of the geometric mesh region.
* \brief Index of the mesh.
*
*/
struct DomainIndex
......
......@@ -105,7 +105,7 @@ namespace MoReFEM
void DirichletBoundaryCondition::ShrinkToProcessorWise(const GodOfDof& god_of_dof)
{
assert(GetDomain().GetGeometricMeshRegionIdentifier() == god_of_dof.GetUniqueId());
assert(GetDomain().GetMeshIdentifier() == god_of_dof.GetUniqueId());
// We can drop here the Dof which count is 1 (it means another processor is in charge of it - the Dof is
// then expected to have been removed everywhere except in present class).
......
......@@ -94,7 +94,7 @@ namespace MoReFEM
{
assert(!(!god_of_dof_ptr));
SetFEltList(god_of_dof_ptr->GetGeometricMeshRegion(), domain);
SetFEltList(god_of_dof_ptr->GetMesh(), domain);
if (IsEmpty() && god_of_dof_ptr->GetMpi().IsRootProcessor())
{
......@@ -177,7 +177,7 @@ namespace MoReFEM
}
void FEltSpace::SetFEltList(const GeometricMeshRegion& mesh, const Domain& domain)
void FEltSpace::SetFEltList(const Mesh& mesh, const Domain& domain)
{
const auto felt_space_dimension = GetDimension();
const auto&& bag = mesh.BagOfEltType(felt_space_dimension);
......@@ -337,7 +337,7 @@ namespace MoReFEM
unsigned int FEltSpace::GetMeshDimension() const
{
const auto god_of_dof_ptr = GetGodOfDofFromWeakPtr();
return god_of_dof_ptr->GetGeometricMeshRegion().GetDimension();
return god_of_dof_ptr->GetMesh().GetDimension();
}
......
......@@ -55,7 +55,7 @@ namespace MoReFEM
// ============================
class GeometricMeshRegion;
class Mesh;
class Domain;
class GodOfDof;
......@@ -486,11 +486,11 @@ namespace MoReFEM
*
* \internal <b><tt>[internal]</tt></b> This method is called in the constructor and should not be called again afterwards.
*
* \param[in] mesh Geometric mesh region upon which the GodOfDof in which the finite element space
* \param[in] mesh Mesh upon which the GodOfDof in which the finite element space
* is defined is built.
* \param[in] domain The domain that delimits the whole finite element space.
*/
void SetFEltList(const GeometricMeshRegion& mesh,
void SetFEltList(const Mesh& mesh,
const Domain& domain);
/*!
......
......@@ -63,7 +63,7 @@ namespace MoReFEM
GodOfDof::GodOfDof(const Wrappers::Mpi& mpi,
GeometricMeshRegion& mesh)
Mesh& mesh)
: Crtp::CrtpMpi<GodOfDof>(mpi),
unique_id_parent(mesh.GetUniqueId()),
mesh_(mesh)
......@@ -181,7 +181,7 @@ namespace MoReFEM
// - Reduce the list of finite elements in each finite element space to the processor-wise ones only.
// - Compute the ghost node bearers for each finite element space.
// - Compute the reduced geometric mesh region, limited to processor-wise geometric elements.
// - Compute the reduced mesh, limited to processor-wise geometric elements.
// The only quantity not yet reduced is the dofs involved in the boundary conditions.
if (mpi.Nprocessor<int>() > 1)
ReduceToProcessorWise();
......@@ -215,7 +215,7 @@ namespace MoReFEM
auto& bc = *bc_ptr;
// God of dof should only reduce its own boundary conditions.
if (bc.GetDomain().GetGeometricMeshRegionIdentifier() == GetUniqueId())
if (bc.GetDomain().GetMeshIdentifier() == GetUniqueId())
bc.ShrinkToProcessorWise(*this);
}
}
......@@ -235,7 +235,7 @@ namespace MoReFEM
}
// Prepare if relevant the data to compute movemeshes in finite element spaces.
const auto mesh_dimension = GetGeometricMeshRegion().GetDimension();
const auto mesh_dimension = GetMesh().GetDimension();
for (const auto& felt_space_ptr : felt_space_list)
{
......@@ -317,7 +317,7 @@ namespace MoReFEM
// after the reduction to processor-wise, at the beginning of the method SetBoundaryCondition().
// However it means severing the dependancy here upon node_helper; actually only two data attributes are
// used in the method ComputeNodeBearerListOnBoundary() and it should be relatively easy to avoid this.
const auto& mesh = GetGeometricMeshRegion();
const auto& mesh = GetMesh();
for (auto& boundary_condition_ptr : boundary_condition_list)
......@@ -422,7 +422,7 @@ namespace MoReFEM
GetFEltSpaceList(),
processor_wise_node_bearer_list,
GetNonCstGhostNodeBearerList(),
GetNonCstGeometricMeshRegion());
GetNonCstMesh());
}
......
......@@ -20,7 +20,7 @@
# include "Core/InputParameterData/Advanced/SetFromInputParameterData.hpp"
# include "Core/InputParameter/Result.hpp"
# include "Geometry/Mesh/GeometricMeshRegion.hpp"
# include "Geometry/Mesh/Mesh.hpp"
# include "FiniteElement/Unknown/UnknownManager.hpp"
# include "FiniteElement/FiniteElementSpace/FEltSpace.hpp"
......@@ -63,14 +63,14 @@ namespace MoReFEM
/*!
* \brief Object in charge of all the dofs related to a given \a GeometricMeshRegion.
* \brief Object in charge of all the dofs related to a given \a Mesh.
*
* There is exactly one \a GodOfDof per \a GeometricMeshRegion; both objects share the same unique id. For instance
* There is exactly one \a GodOfDof per \a Mesh; both objects share the same unique id. For instance
* if in the input parameter file there is
* \verbatim
Mesh2 = { ... }
\endverbatim
* a \a GeometricMeshRegion AND a \a GodOfDof with an identifier of 2 are created.
* a \a Mesh AND a \a GodOfDof with an identifier of 2 are created.
*
* \a GodOfDof is also the place where all finite element spaces related to a given mesh are stored.
*/
......@@ -111,7 +111,7 @@ namespace MoReFEM
* \param[in] mesh Mesh upon which the GodOfDof is built.
*/
explicit GodOfDof(const Wrappers::Mpi& mpi,
GeometricMeshRegion& mesh);
Mesh& mesh);
public:
......@@ -156,8 +156,8 @@ namespace MoReFEM
std::string&& output_directory);
//! Get the geometric mesh region object.
const GeometricMeshRegion& GetGeometricMeshRegion() const noexcept;
//! Get the mesh object.
const Mesh& GetMesh() const noexcept;
/*!
* \brief Get access to the \a unique_id -th finite element space.
......@@ -363,15 +363,15 @@ namespace MoReFEM
/*!
* \brief Non constant access to the geometric mesh region object.
* \brief Non constant access to the mesh object.
*
* \attention Access is public solely for the needs of FEltSpace::Movemesh(). You shouldn't call this accessor
* at all unless you are modifying the core of MoReFEM; during the development of a model you shouldn't
* use this one at all and prefer the constant accessor.
*
* \return \a GeometricMeshRegion on top of which the GodOfDof has been built.
* \return \a Mesh on top of which the GodOfDof has been built.
*/
GeometricMeshRegion& GetNonCstGeometricMeshRegion() noexcept;
Mesh& GetNonCstMesh() noexcept;
......@@ -533,7 +533,7 @@ namespace MoReFEM
NumberingSubset::vector_const_shared_ptr numbering_subset_list_;
//! Mesh covered by the current object.
GeometricMeshRegion& mesh_;
Mesh& mesh_;
//! List of all node bearers. Each one is present only once here; ghost aren't present in this one.
NodeBearer::vector_shared_ptr processor_wise_node_bearer_list_;
......
......@@ -44,13 +44,13 @@ namespace MoReFEM
}
inline const GeometricMeshRegion& GodOfDof::GetGeometricMeshRegion() const noexcept
inline const Mesh& GodOfDof::GetMesh() const noexcept
{
return mesh_;
}
inline GeometricMeshRegion& GodOfDof::GetNonCstGeometricMeshRegion() noexcept
inline Mesh& GodOfDof::GetNonCstMesh() noexcept
{
return mesh_;
}
......
......@@ -14,7 +14,7 @@
# include "Utilities/Singleton/Singleton.hpp"
# include "Geometry/Mesh/Internal/GeometricMeshRegionManager.hpp"
# include "Geometry/Mesh/Internal/MeshManager.hpp"
# include "FiniteElement/FiniteElementSpace/GodOfDof.hpp"
......
......@@ -23,7 +23,7 @@ namespace MoReFEM
{
const auto unique_id = section.GetUniqueId();
auto& mesh = Internal::MeshNS::GeometricMeshRegionManager::GetInstance(__FILE__, __LINE__).GetNonCstMesh(unique_id);
auto& mesh = Internal::MeshNS::MeshManager::GetInstance(__FILE__, __LINE__).GetNonCstMesh(unique_id);
auto raw_ptr = new GodOfDof(mpi, mesh);
......
......@@ -31,9 +31,9 @@ namespace MoReFEM
}
const GeometricMeshRegion& GetGeometricMeshRegion(const GodOfDof& god_of_dof)
const Mesh& GetMesh(const GodOfDof& god_of_dof)
{
return god_of_dof.GetGeometricMeshRegion();
return god_of_dof.GetMesh();
}
......
......@@ -14,7 +14,7 @@
# include "ThirdParty/Wrappers/Mpi/Mpi.hpp"
# include "Geometry/Mesh/GeometricMeshRegion.hpp"
# include "Geometry/Mesh/Mesh.hpp"
......@@ -66,13 +66,13 @@ namespace MoReFEM
/*!
* \brief Return the geometric mesh region of a god of dof.
* \brief Return the mesh of a god of dof.
*
* \copydoc doxygen_hide_break_circular_dependancy_text
*
* \return GeometricMeshRegion related to the \a god_of_dof.
* \return Mesh related to the \a god_of_dof.
*/
const GeometricMeshRegion& GetGeometricMeshRegion(const GodOfDof& god_of_dof);
const Mesh& GetMesh(const GodOfDof& god_of_dof);
/*!
......
......@@ -14,7 +14,7 @@
#include "Utilities/Containers/Vector.hpp"
#include "Utilities/TimeKeep/TimeKeep.hpp"
#include "Geometry/Mesh/GeometricMeshRegion.hpp"
#include "Geometry/Mesh/Mesh.hpp"
#include "FiniteElement/FiniteElementSpace/Internal/ComputeMatrixPattern.hpp"
#include "FiniteElement/FiniteElementSpace/Internal/Partition.hpp"
......
......@@ -37,7 +37,7 @@ namespace MoReFEM
// ============================
class GeometricMeshRegion;
class Mesh;
namespace Internal
......
......@@ -13,7 +13,7 @@
#include "Utilities/Containers/UnorderedMap.hpp"
#include "Geometry/Mesh/GeometricMeshRegion.hpp"
#include "Geometry/Mesh/Mesh.hpp"
#include "Geometry/Domain/Domain.hpp"
#include "Geometry/Interfaces/Internal/BuildInterfaceHelper.hpp"
......@@ -148,7 +148,7 @@ namespace MoReFEM
NodeBearer::vector_shared_ptr CreateNodeListHelper
::ComputeNodeBearerListOnBoundary(const GeometricMeshRegion& mesh,
::ComputeNodeBearerListOnBoundary(const Mesh& mesh,
const DirichletBoundaryCondition& boundary_condition) const
{
const auto& boundary_condition_domain = boundary_condition.GetDomain();
......@@ -159,7 +159,7 @@ namespace MoReFEM
NodeBearer::vector_shared_ptr node_bearer_on_bc;
using iterator_geometric_element = GeometricMeshRegion::iterator_geometric_element;
using iterator_geometric_element = Mesh::iterator_geometric_element;
iterator_geometric_element begin, end;
for (const auto& geometric_elt_type_ptr : bag_of_boundary_domain)
......
......@@ -91,7 +91,7 @@ namespace MoReFEM
* \return The list of node bearers.
*/
NodeBearer::vector_shared_ptr
ComputeNodeBearerListOnBoundary(const GeometricMeshRegion& mesh,
ComputeNodeBearerListOnBoundary(const Mesh& mesh,
const DirichletBoundaryCondition& boundary_condition) const;
......
......@@ -17,7 +17,7 @@
# include "Core/Enum.hpp"
# include "Geometry/Mesh/GeometricMeshRegion.hpp"
# include "Geometry/Mesh/Mesh.hpp"
# include "FiniteElement/Nodes_and_dofs/Dof.hpp"
# include "FiniteElement/FiniteElementSpace/Internal/Impl/ComputeDofIndexes.hpp"
......
......@@ -34,7 +34,7 @@ namespace MoReFEM
void MovemeshHelper::ConstructHelper(const NodeBearer::vector_shared_ptr& node_bearer_list,
const ExtendedUnknown& extended_unknown
# ifndef NDEBUG
, const GeometricMeshRegion& mesh
, const Mesh& mesh
, const Dof::vector_shared_ptr& felt_space_dof_list
# endif // NDEBUG
)
......@@ -121,7 +121,7 @@ namespace MoReFEM
, numbering_subset_(extended_unknown.GetNumberingSubset())
#endif // NDEBUG
{
const auto& mesh = god_of_dof.GetGeometricMeshRegion();
const auto& mesh = god_of_dof.GetMesh();
const auto Ncoords = static_cast<std::size_t>(mesh.NprocessorWiseCoord() + mesh.NghostCoord());
dof_index_list_per_coord_.resize(static_cast<std::size_t>(Ncoords));
......@@ -190,7 +190,7 @@ namespace MoReFEM
assert(numbering_subset_ == displacement.GetNumberingSubset());
const auto& god_of_dof = GetGodOfDof();
const auto& mesh = god_of_dof.GetGeometricMeshRegion();
const auto& mesh = god_of_dof.GetMesh();
::MoReFEM::Wrappers::Petsc
::AccessGhostContent helper(displacement,
......
......@@ -174,7 +174,7 @@ namespace MoReFEM
void ConstructHelper(const NodeBearer::vector_shared_ptr& node_bearer_list,
const ExtendedUnknown& extended_unknown
# ifndef NDEBUG
, const GeometricMeshRegion& mesh
, const Mesh& mesh
, const Dof::vector_shared_ptr& felt_space_dof_list
# endif // NDEBUG
);
......
......@@ -11,7 +11,7 @@
#include "ThirdParty/Wrappers/Mpi/Mpi.hpp"
#include "Geometry/Mesh/GeometricMeshRegion.hpp"
#include "Geometry/Mesh/Mesh.hpp"
#include "FiniteElement/FiniteElementSpace/FEltSpace.hpp"
#include "FiniteElement/FiniteElementSpace/Internal/Impl/AttributeProcessorHelper.hpp"
......@@ -70,12 +70,12 @@ namespace MoReFEM
/*!
* \brief Reduce the geometric mesh region object to its components on the local processor.
* \brief Reduce the mesh object to its components on the local processor.
*
* \internal This is a struct solely to help friendship declaration in GeometricMeshRegion.
* \internal This is a struct solely to help friendship declaration in Mesh.
* \internal This frienship is also the reason it is not in the anonymous namespace!
*/
struct ReduceGeometricMeshRegion
struct ReduceMesh
{
......@@ -85,13 +85,13 @@ namespace MoReFEM
* \param[in] felt_space_list List of all finite element space. For each of them, the list
* of geometric elements used will be extracted and put in the list of elements to keep.
* \param[in] processor_wise_node_bearer_list List of processor-wise node bearers.
* \param[in,out] mesh The GeometricMeshRegion to be reduced to processor-wise data.
* \param[in,out] mesh The Mesh to be reduced to processor-wise data.
*/
static void Perform(const ::MoReFEM::Wrappers::Mpi& mpi,
const FEltSpace::vector_unique_ptr& felt_space_list,
const NodeBearer::vector_shared_ptr& processor_wise_node_bearer_list,
const NodeBearer::vector_shared_ptr& ghost_node_bearer_list,
GeometricMeshRegion& mesh);
Mesh& mesh);
};
......@@ -99,7 +99,7 @@ namespace MoReFEM
const FEltSpace::vector_unique_ptr& felt_space_list,
const NodeBearer::vector_shared_ptr& processor_wise_node_bearer_list,
NodeBearer::vector_shared_ptr& ghost_node_bearer_list,
GeometricMeshRegion& geometric_mesh_region)
Mesh& mesh)
{
const unsigned int mpi_rank = mpi.GetRank<unsigned int>();
......@@ -128,11 +128,11 @@ namespace MoReFEM
Utilities::PointerComparison::Less<NodeBearer::shared_ptr>(),
Utilities::PointerComparison::Equal<NodeBearer::shared_ptr>());
ReduceGeometricMeshRegion::Perform(mpi,
ReduceMesh::Perform(mpi,
felt_space_list,
processor_wise_node_bearer_list,
ghost_node_bearer_list,
geometric_mesh_region);
mesh);
}
......@@ -163,12 +163,12 @@ namespace MoReFEM
void ReduceGeometricMeshRegion
void ReduceMesh
::Perform(const ::MoReFEM::Wrappers::Mpi& mpi,
const FEltSpace::vector_unique_ptr& felt_space_list,
const NodeBearer::vector_shared_ptr& processor_wise_node_bearer_list,
const NodeBearer::vector_shared_ptr& ghost_node_bearer_list,
GeometricMeshRegion& mesh)
Mesh& mesh)
{
GeometricElt::vector_shared_ptr processor_wise_geo_element;
......
......@@ -25,7 +25,7 @@ namespace MoReFEM
// Forward declarations.
// ============================
class GeometricMeshRegion;
class Mesh;
class FEltSpace;
......@@ -75,7 +75,7 @@ namespace MoReFEM
*
* \copydetails doxygen_hide_mpi_param
* \param[in,out] felt_space_list The list of finite elt spaces to reduce to processor-wise data.
* \param[in,out] geometric_mesh_region In input the mesh as read initially. In output, the reduced mesh
* \param[in,out] mesh In input the mesh as read initially. In output, the reduced mesh
* that includes only GeometricElts on the local processor.
* \param[in] processor_wise_node_bearer_list The list of processor-wise node bearers, computed previously.
* \param[in,out] ghost_node_bearer_list The list of ghost node bearers, i.e. the ones that were in
......@@ -87,7 +87,7 @@ namespace MoReFEM
const FEltSpace::vector_unique_ptr& felt_space_list,
const NodeBearer::vector_shared_ptr& processor_wise_node_bearer_list,
NodeBearer::vector_shared_ptr& ghost_node_bearer_list,
GeometricMeshRegion& geometric_mesh_region);
Mesh& mesh);
};
......
......@@ -9,7 +9,7 @@
/// \addtogroup FiniteElementGroup
/// \{
#include "Geometry/Mesh/GeometricMeshRegion.hpp"
#include "Geometry/Mesh/Mesh.hpp"
#include "FiniteElement/Unknown/Unknown.hpp"
......
......@@ -34,7 +34,7 @@ namespace MoReFEM
// ============================
class GeometricMeshRegion;
class Mesh;
class UnknownManager;
......
......@@ -20,7 +20,7 @@
# include "Core/InputParameter/FElt/Unknown.hpp"
# include "Geometry/Mesh/GeometricMeshRegion.hpp"
# include "Geometry/Mesh/Mesh.hpp"
# include "FiniteElement/Unknown/Unknown.hpp"
# include "FiniteElement/Nodes_and_dofs/Exceptions/Dof.hpp"
......
......@@ -87,7 +87,7 @@ namespace MoReFEM
//! Constructor.
template<typename... ConstructorArgs>
explicit InitialConditionInstance(const GeometricMeshRegion& geometric_mesh_region,
explicit InitialConditionInstance(const Mesh& mesh,
ConstructorArgs&&... arguments);
//! Destructor.
......
......@@ -36,10 +36,10 @@ namespace MoReFEM
>
template<typename... ConstructorArgs>
InitialConditionInstance<TypeT, NaturePolicyT, Args...>
::InitialConditionInstance(const GeometricMeshRegion& geometric_mesh_region,
::InitialConditionInstance(const Mesh& mesh,
ConstructorArgs&&... arguments)
: parent(geometric_mesh_region),
nature_policy(geometric_mesh_region, std::forward<ConstructorArgs>(arguments)...)
: parent(mesh),
nature_policy(mesh, std::forward<ConstructorArgs>(arguments)...)
{ }
......
......@@ -39,7 +39,7 @@ namespace MoReFEM
*
* \tparam LuaFieldT Lua field considered in the input file.
*
* \param[in] geometric_mesh_region Mesh upon which the InitialCondition is applied. Initial condition
* \param[in] mesh Mesh upon which the InitialCondition is applied. Initial condition
* might be requested at each of each \a Coords.
* \param[in] nature One of the possible nature specified in the comment of the input parameter. Currently
* only 'constant' and 'lua_function'.
......@@ -54,7 +54,7 @@ namespace MoReFEM
class InputParameterDataT
>
InitialCondition<ParameterNS::Type::scalar>::unique_ptr
InitScalarInitialCondition(const GeometricMeshRegion& geometric_mesh_region,
InitScalarInitialCondition(const Mesh& mesh,
const InputParameterDataT& input_parameter_data,
const std::string& nature,
double scalar_value);
......
......@@ -31,7 +31,7 @@ namespace MoReFEM
class InputParameterDataT
>
InitialCondition<ParameterNS::Type::scalar>::unique_ptr
InitScalarInitialCondition(const GeometricMeshRegion& geometric_mesh_region,
InitScalarInitialCondition(const Mesh& mesh,
const InputParameterDataT& input_parameter,
const std::string& nature,
const double scalar_value)
......@@ -46,7 +46,7 @@ namespace MoReFEM
Policy::Constant
>;
return std::make_unique<initial_condition_type>(geometric_mesh_region, scalar_value);
return std::make_unique<initial_condition_type>(mesh, scalar_value);
}
else if (nature == "lua_function")
{
......@@ -60,7 +60,7 @@ namespace MoReFEM
decltype(auto) value =
IPL::Extract<LuaFieldT>::Value(input_parameter);
return std::make_unique<initial_condition_type>(geometric_mesh_region, value);
return std::make_unique<initial_condition_type>(mesh, value);
}
else
{
......
......@@ -40,7 +40,7 @@ namespace MoReFEM
*
* \tparam LuaFieldT Lua field considered in the input file.
*
* \param[in] geometric_mesh_region Mesh upon which the InitialCondition is applied. Initial condition
* \param[in] mesh Mesh upon which the InitialCondition is applied. Initial condition
* might be requested at each of each \a Coords.
* \copydoc doxygen_hide_input_parameter_data_arg
*
......@@ -55,7 +55,7 @@ namespace MoReFEM
class InputParameterDataT
>
InitialCondition<ParameterNS::Type::vector>::unique_ptr
InitThreeDimensionalInitialCondition(const GeometricMeshRegion& geometric_mesh_region,
InitThreeDimensionalInitialCondition(const Mesh& mesh,
const InputParameterDataT& input_parameter_data);
......
......@@ -27,7 +27,7 @@ namespace MoReFEM
template<class InitialConditionT, class InputParameterDataT>
InitialCondition<ParameterNS::Type::vector>::unique_ptr
InitThreeDimensionalInitialCondition(const GeometricMeshRegion& geometric_mesh_region,
InitThreeDimensionalInitialCondition(const Mesh& mesh,
const InputParameterDataT& input_parameter_data)
{