MoReFEM
Loading...
Searching...
No Matches
Namespaces | Data Structures | Typedefs | Enumerations | Functions | Variables

Main MoReFEM namespace. More...

Namespaces

namespace  Crtp
 Namespace that enclose some generic CRTP ("Curiously recurrent template pattern").
 
namespace  DomainNS
 Namespace that enclose stuff related to Domain.
 
namespace  FilesystemNS
 Namespace that enclose filesystem utilities (check a folder do exist, remove a file, and so forth...)
 
namespace  GlobalVariationalOperatorNS
 Namespace that enclose global variational operator instances (and few helper functions).
 
namespace  NumericNS
 Namespace that enclose numeric utilities (such as IsZero() or AreEqual() used to compared floating-points).
 
namespace  ParameterNS
 Namespace that enclose stuff related to Parameter.
 
namespace  QuadratureNS
 Namespace that enclose quadrature points and rules.
 
namespace  RefFEltNS
 Namespace that enclose the available reference finite elements.
 
namespace  TimeManagerNS
 Namespace that enclose stuff related to TimeManager.
 
namespace  Utilities
 Namespace that enclose most of the Utilities (some aren't for conveniency, such as NumericNS or FilesystemNS).
 
namespace  Wrappers
 Namespace that enclose wrappers over third-party libraries.
 

Data Structures

class  Coords
 Define a SpatialPoint in a specific mesh. More...
 
class  DirichletBoundaryCondition
 Class in charge of Dirichlet boundary conditions. More...
 
class  DirichletBoundaryConditionManager
 Singleton class which is aware of all essential boundary conditions that might be considered within a model. More...
 
class  Dof
 Class in charge of dof information. More...
 
class  Domain
 This class holds descriptors that can be used to tailor a sub-domain of a Mesh. More...
 
class  DomainManager
 This class is used to create and retrieve Domain objects. More...
 
class  Edge
 Class in charge of the edge interface. More...
 
class  Exception
 Generic class for MoReFEM exceptions. More...
 
class  ExtendedUnknown
 This class encapsulates an unknown in a given finite element space. More...
 
class  Face
 Class in charge of the face interface. More...
 
class  FEltSpace
 The class in charge of most of the interaction with nodes, dofs and unknowns. More...
 
class  FiberList
 Read from an Ensight file values given at dofs and interpret then in term of a Parameter object. More...
 
class  FindCoordsOfGlobalVector
 Returns for a global vector a vector if equal size with the Coords on which each dofs are located. More...
 
class  GeometricElt
 Generic class handling geometric element. More...
 
class  GlobalDiagonalMatrix
 Specific case of GlobalMatrix which is square and diagonal. More...
 
class  GlobalMatrix
 Class which encapsulates both the Petsc matrix and the numbering subsets used to described its rows and columns. More...
 
class  GlobalParameterOperator
 Parent class of all GlobalParameterOperator. More...
 
class  GlobalVector
 Class which encapsulates both the Petsc vector and the numbering subset used to described it. More...
 
class  GodOfDof
 Object in charge of all the dofs related to a given Mesh. More...
 
class  GodOfDofManager
 This class is used to create and retrieve GodOfDof objects. More...
 
class  Hexahedron20
 A Hexahedron20 geometric element read in a mesh. More...
 
class  Hexahedron27
 A Hexahedron27 geometric element read in a mesh. More...
 
class  Hexahedron8
 A Hexahedron8 geometric element read in a mesh. More...
 
class  InputAnalyticalPrestress
 Policy to use when InputAnalyticalPrestress is involved in SecondPiolaKirchhoffStressTensor. More...
 
class  InputData
 This class read the input data file and then is in charge of holding the values read. More...
 
class  InputMicrosphere
 Contains all the Parameter that are related to the properties of a InputMicrosphere. More...
 
class  Interface
 Polymorphic base of all interface classes. More...
 
struct  IsStrongType
 Facility to determine whether a class T is a StrongType or not. More...
 
struct  IsStrongType< StrongType< T, Parameter, Skills... > >
 
class  LocalCoords
 LocalCoords used in the local reference element. More...
 
class  LocalFEltSpace
 This class holds all Finite elements related to a given GeometricElt. More...
 
class  Mesh
 Class responsible for a mesh and its content. More...
 
class  MeshLabel
 Depiction of a given label. More...
 
class  Model
 Class that drives the finite element resolution. More...
 
class  ModelSettings
 Class which purpose is to store model-related data that are intended to be set exclusively by the author of the model. More...
 
class  MoReFEMData
 Init MoReFEM: initialize mpi and read the input data file. More...
 
class  MoReFEMDataForTest
 A specific version of MoReFEMData which is to be used in most of the tests written after July 2023. More...
 
class  Node
 A Node is an ensemble of Dofs located at the same place and addressing the same unknown and shape function label. More...
 
class  NodeBearer
 A NodeBearer is created whenever some dofs are located on a given geometric Interface. More...
 
class  NumberingSubset
 Descriptor of a dof numbering. More...
 
class  OrientedEdge
 Class used to store an edge inside a GeometricElt. More...
 
class  OrientedFace
 Class used to store an face inside a GeometricElement. More...
 
class  Parameter
 Abstract class used to define a Parameter. More...
 
class  Point1
 A Point1 geometric element read in a mesh. More...
 
class  Quadrangle4
 A Quadrangle4 geometric element read in a mesh. More...
 
class  Quadrangle8
 A Quadrangle8 geometric element read in a mesh. More...
 
class  Quadrangle9
 A Quadrangle9 geometric element read in a mesh. More...
 
class  QuadraturePoint
 Quadrature point used to perform discrete integration. More...
 
class  QuadratureRule
 Defines a quadrature rule. More...
 
class  QuadratureRulePerTopology
 This class list the quadrature rule to use for each topology. More...
 
class  RefGeomElt
 Polymorphic class which can access static functions related to shape functions, interface and topology. More...
 
class  Segment2
 A Segment2 geometric element read in a mesh. More...
 
class  Segment3
 A Segment3 geometric element read in a mesh. More...
 
class  Solid
 Contains all the Parameter that are related to the properties of a solid. More...
 
class  SpatialPoint
 Define a spatial three-dimensional point. More...
 
class  StrongType
 Abstract class used to define a StrongType, which allows more expressive code and ensures that the order of arguments of the same underlying type is respected at call sites. More...
 
class  Tetrahedron10
 A Tetrahedron10 geometric element read in a mesh. More...
 
class  Tetrahedron4
 A Tetrahedron4 geometric element read in a mesh. More...
 
class  TimeKeep
 Class used to profile crudely (through prints) the code. More...
 
class  TimeManager
 Class in charge of managing the elapsing of time within the simulation. More...
 
class  Triangle3
 A Triangle3 geometric element read in a mesh. More...
 
class  Triangle6
 A Triangle6 geometric element read in a mesh. More...
 
class  Unknown
 Very generic information about a given unknown. More...
 
class  UnknownManager
 Singleton that is aware of all considered unknown, regardless of GodOfDof. More...
 
class  VariationalFormulation
 CRTP base for VariationalFormulation. More...
 
class  Vertex
 Class in charge of the Vertex interface. More...
 
class  Volume
 Class in charge of the face interface. More...
 

Typedefs

using GlobalMatrixWithCoefficient = std::pair< GlobalMatrix &, double >
 Useful alias to avoid cluttering the main programs with too low-level C++.
 
using GlobalVectorWithCoefficient = std::pair< GlobalVector &, double >
 Useful alias to avoid cluttering the main programs with too low-level C++.
 
using LocalFEltSpacePerRefLocalFEltSpace = std::vector< std::pair< Internal::RefFEltNS::RefLocalFEltSpace::const_shared_ptr, LocalFEltSpace::per_geom_elt_index > >
 Provides for all the RefLocalFEltSpace the list of associated LocalFEltSpace.
 
template<TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT = TimeManager<TimeManagerNS::Policy::Static>, template< ParameterNS::Type, class > class TimeDependencyT = ParameterNS::TimeDependencyNS::None>
using ScalarParameter = Parameter< ParameterNS::Type::scalar, LocalCoords, TimeManagerT, TimeDependencyT >
 Convenient alias to define a scalar parameter.
 
template<TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT = TimeManager<TimeManagerNS::Policy::Static>, template< ParameterNS::Type, class > class TimeDependencyT = ParameterNS::TimeDependencyNS::None>
using VectorialParameter = Parameter< ParameterNS::Type::vector, LocalCoords, TimeManagerT, TimeDependencyT >
 Convenient alias to define a vectorial parameter.
 
template<TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT = TimeManager<TimeManagerNS::Policy::Static>, template< ParameterNS::Type, class > class TimeDependencyT = ParameterNS::TimeDependencyNS::None>
using MatricialParameter = Parameter< ParameterNS::Type::matrix, LocalCoords, TimeManagerT, TimeDependencyT >
 Convenient alias to define a matricial parameter.
 
template<ParameterNS::Type TypeT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ::MoReFEM::ParameterNS::TimeDependencyNS::None, std::size_t NfeltSpaceT = 1ul>
using ParameterAtDof = typename Internal::ParameterNS::ParameterAtDofImpl< TypeT, TimeManagerT, TimeDependencyT, NfeltSpaceT >::type
 Parameter class which provides values at LocalCoords of quantities defined on dofs.
 
template<ParameterNS::Type TypeT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None>
using ParameterAtQuadraturePoint = Internal::ParameterNS::ParameterInstance< TypeT, ParameterNS::Policy::AtQuadraturePoint, TimeManagerT, TimeDependencyT >
 Convenient alias for a parameter defined at dof.
 
using parmetis_int = idx_t
 Alias to the type used in Parmetis for integers.
 
using parmetis_real = real_t
 Alias to the type used in Parmetis for reals.
 
using LocalVector = xt::xtensor< double, 1, xt::layout_type::row_major >
 Convenient alias for the type used in MoReFEM for local vectors.
 
using LocalMatrix = xt::xtensor< double, 2, xt::layout_type::row_major >
 Convenient alias for the type used most of the time in MoReFEM for local matrices.
 

Enumerations

enum class  DoConsiderProcessorWiseLocal2Global { no , yes }
 Whether models should compute the very first processor-wise local2global array for each LocalFEltSpace/numbering subset combination found in FEltSpace. More...
 
enum class  DoComputeProcessorWiseLocal2Global { no , yes }
 If DoConsiderProcessorWiseLocal2Global is yes, each operator might decide whether it actually requires the processor-wise local2global array or not.
 
enum class  CoordsType { local , global }
 Whether Coords or LocalCoords are considered.
 
enum class  program_type { model , test , post_processing , update_lua_file }
 Whether a model, a test, a post-processing program is run.
 
enum class  is_morefem_data { yes , for_test }
 Enum to help define the concept.
 
enum class  check_inverted_elements_policy { from_input_data , do_check , no_check , unspecified }
 
enum class  enable_non_linear_solver { no , yes }
 Whether a non linear solver might be used in the variational formulation.
 
enum class  StaticOrDynamic { static_ , dynamic_ }
 Handy enumeration for models that work in two steps: first a static phase during initialization and then a dynamic phase.
 
enum class  BoundaryConditionMethod { pseudo_elimination , penalization }
 Choice of the method used to apply Dirichlet boundary conditions. More...
 
enum class  create_output_dir { yes , no }
 Whether output directory must be created or not.
 
enum class  DofNumberingScheme { DofNumberingScheme::contiguous_per_node }
 Enum to list all the possible choices available to number the dofs. More...
 
enum class  IsFactorized { yes , no }
 Whether the matrix has already been factorized or not. More...
 
enum class  SourceType { volumic , surfacic }
 Whether volumic or surfacic source is considered.
 
enum class  create_domain_list_for_coords { yes , no }
 Whether the model will compute the list of domains a coord is in or not. More...
 
enum class  allow_reset_index { no , yes }
 Convenient enum to lift a check in a very specific case (reloading from pre-partitioned data)
 
enum class  print_banner { yes , no }
 Enum class to say whether banners are printed or not.
 
enum class  AllocateGradientFEltPhi { no , yes }
 Whether a gradient matrix should be allocated for InformationAtQuadraturePoint. More...
 
enum class  MpiScale { processor_wise = 0 , program_wise }
 Convenient alias to distinguish processor-wise and program-wise quantities. More...
 
enum class  RoleOnProcessor { processor_wise = 0 , ghost }
 An enum to distinguish between processor-wise and ghost on a given mpi rank.
 
enum class  RoleOnProcessorPlusBoth { processor_wise = 0 , ghost , both }
 Same as RoleOnProcessor with the additional possibility to choose 'both'.
 
enum class  NonZeroPattern { same , different , subset }
 Convenient enum used to typify more strongly Petsc macro values. More...
 
enum class  update_ghost { yes , no }
 Enum class to specify if in a copy ghosts are updated or not.
 
enum class  binary_or_ascii { from_input_data , ascii , binary }
 Enum class to specify whether the choice of output (ascii or binary)
 
enum class  IsMatrixOrVector { vector , matrix }
 Convenient enum class.
 

Functions

void InitTimeKeepLog (const FilesystemNS::Directory &result_directory)
 Init the time keeper and write its logs in the output directory specified in input_data.
 
void AssertSameNumberingSubset (const GlobalMatrix &matrix1, const GlobalMatrix &matrix2)
 Assert two matrices share the same NumberingSubset.
 
void PrintNumberingSubset (std::string_view matrix_name, const GlobalMatrix &matrix)
 Debug tool to print the unique ids of row and column NumberingSubset.
 
void Swap (GlobalMatrix &A, GlobalMatrix &B)
 Swap two matrices.
 
void Swap (GlobalMatrix &, GlobalMatrix::petsc_parent &)
 Declared but do not defined: we do not want to be able to do this but we also want to avoid the 'slicing effect' (i.e. attributes of child class ignored entirely).
 
void Swap (GlobalMatrix::petsc_parent &, GlobalMatrix &)
 Declared but do not defined: we do not want to be able to do this but we also want to avoid the 'slicing effect' (i.e. attributes of child class ignored entirely).
 
void PrintNumberingSubset (std::string &&vector_name, const GlobalVector &vector)
 Debug tool to print the unique id of NumberingSubset.
 
void Swap (GlobalVector &A, GlobalVector &B)
 Swap two vectors.
 
void Swap (GlobalVector &, GlobalVector::parent &)
 Declared but do not defined: we do not want to be able to do this but we also want to avoid the 'slicing effect' (i.e. attributes of child class ignored entirely).
 
void Swap (GlobalVector::parent &, GlobalVector &)
 Declared but do not defined: we do not want to be able to do this but we also want to avoid the 'slicing effect' (i.e. attributes of child class ignored entirely).
 
template<::MoReFEM::Advanced::Concept::MoReFEMDataType MoReFEMDataT>
void PrecomputeExit (const MoReFEMDataT &morefem_data)
 Provide the precompute exit.
 
bool operator== (const NumberingSubset &lhs, const NumberingSubset &rhs)
 operator== for the class.
 
bool operator< (const NumberingSubset &lhs, const NumberingSubset &rhs)
 operator< for the class.
 
template<class EnumT >
constexpr NumberingSubsetNS::unique_id AsNumberingSubsetId (EnumT enum_value)
 Convert into the NumberingSubsetNS::unique_id strong type the enum value defined in the input data file.
 
bool IsConsistentOverRanks (const Wrappers::Mpi &mpi, const NumberingSubset::vector_const_shared_ptr &numbering_subset_list)
 Check the NumberingSubset list is the same on all ranks - same items and same ordering.
 
void ClearAllBoundaryConditionInitialValueList ()
 Clear the initial values of all essential boundary conditions.
 
template<class EnumT >
constexpr BoundaryConditionNS::unique_id AsBoundaryConditionId (EnumT enum_value)
 Convert into the BoundaryCondition::unique_id strong type the enum value defined in the input data file.
 
bool operator< (const LocalFEltSpace &lhs, const LocalFEltSpace &rhs) noexcept
 operator< for the class.
 
bool operator== (const LocalFEltSpace &lhs, const LocalFEltSpace &rhs) noexcept
 operator< for the class.
 
bool IsLocalFEltSpaceInDomain (const LocalFEltSpace &local_felt_space, const Domain &domain) noexcept
 Returns whether the local_felt_space is in domain or not.
 
template<RoleOnProcessor RoleOnProcessorT>
void ExtractLocalFEltSpaceList (const FEltSpace &felt_space, LocalFEltSpace::vector_shared_ptr &list)
 Extract the list of all LocalFEltSpace present in the felt_space.
 
template<class EnumT >
constexpr FEltSpaceNS::unique_id AsFEltSpaceId (EnumT enum_value)
 Convert into the FEltSpaceNS::unique_id strong type the enum value defined in the input data file.
 
bool operator< (const GodOfDof &lhs, const GodOfDof &rhs)
 operator< for the class.
 
void PrintNodeBearerList (const NodeBearer::vector_shared_ptr &node_bearer_list, std::size_t rank, std::ostream &stream=std::cout)
 Print the ids of node bearers on the local processor.
 
void AllocateGlobalMatrix (const GodOfDof &god_of_dof, GlobalMatrix &matrix)
 Allocate the underlying (parallel) pattern of a matrix.
 
void AllocateGlobalMatrix (const GodOfDof &god_of_dof, GlobalDiagonalMatrix &matrix)
 Allocate the underlying (parallel) pattern of a matrix.
 
void AllocateGlobalVector (const GodOfDof &god_of_dof, GlobalVector &vector)
 Allocate the underlying (parallel) pattern of a vector.
 
void AssertMatrixRespectPattern (const GodOfDof &god_of_dof, const GlobalMatrix &matrix, const std::source_location location=std::source_location::current())
 Check whether a matrix really follows the pattern expected from its numbering subset.
 
void ClearGodOfDofTemporaryData ()
 Clear temporary data for each god of dof.
 
bool operator< (const Dof &lhs, const Dof &rhs)
 operator< for the class.
 
bool operator== (const Dof &lhs, const Dof &rhs)
 operator== for the class.
 
bool operator< (const Node &lhs, const Node &rhs)
 operator< for the class.
 
bool operator== (const Node &lhs, const Node &rhs)
 operator== for the class.
 
DofNumberingScheme CurrentDofNumberingScheme ()
 Returns the way dofs are numbered.
 
bool operator< (const NodeBearer &lhs, const NodeBearer &rhs)
 operator< for the class.
 
bool operator== (const NodeBearer &lhs, const NodeBearer &rhs)
 operator== for the class.
 
std::ostream & operator<< (std::ostream &stream, const QuadraturePoint &rhs)
 Overload of operator<< for user-defined class.
 
bool operator== (const ExtendedUnknown &lhs, const ExtendedUnknown &rhs)
 operator== for the class.
 
bool operator< (const ExtendedUnknown &lhs, const ExtendedUnknown &rhs)
 operator< for the class.
 
bool operator< (const Unknown &lhs, const Unknown &rhs)
 operator< for the class.
 
bool operator== (const Unknown &lhs, const Unknown &rhs)
 operator== for the class.
 
bool operator!= (const Unknown &lhs, const Unknown &rhs)
 operator!= for the class.
 
std::size_t Ncomponent (const Unknown &unknown, const std::size_t mesh_dimension)
 
template<class EnumT >
constexpr UnknownNS::unique_id AsUnknownId (EnumT enum_value)
 Convert into the UnknownNS::unique_id strong type the enum value defined in the input data file.
 
void WriteUnknownList (const FilesystemNS::Directory &output_directory)
 Write in output directory a file that lists all the unknowns.
 
bool operator< (const Coords &lhs, const Coords &rhs)
 operator< for the class.
 
bool operator== (const Coords &lhs, const Coords &rhs)
 operator== for the class.
 
template<bool DoPrintIndexT>
void WriteEnsightFormat (const Coords &point, std::ostream &stream)
 Write the point in Ensight format.
 
template<class FloatT >
void WriteMeditFormat (const std::size_t mesh_dimension, const Coords &point, int lm_mesh_index)
 Write the point in Medit format.
 
void WriteVTK_PolygonalDataFormat (const Coords &point, std::ostream &stream)
 Write the point in VTK_PolygonalData format.
 
std::ostream & operator<< (std::ostream &stream, const Coords &rhs)
 Overload of operator<< for user-defined class.
 
void AssertNCoordsConsistency (const Wrappers::Mpi &mpi)
 Check whether all Coords on the current processor are properly accounted for in the Mesh objects.
 
bool operator== (const LocalCoords &lhs, const LocalCoords &rhs)
 operator== for the class.
 
template<class ContainerT >
LocalCoords ComputeCenterOfGravity (const ContainerT &coords_list)
 Return the center of gravity of several LocalCoords.
 
std::vector< Advanced::ComponentNS::index_typeExtractMismatchedComponentIndexes (const LocalCoords &lhs, const LocalCoords &rhs)
 Find how many components differ between two LocalCoords, and returns their index.
 
Advanced::ComponentNS::index_type ExtractMismatchedComponentIndex (const LocalCoords &lhs, const LocalCoords &rhs)
 A more limited version of ExtractMismatchedComponentIndexes in the case exactly one value is expected.
 
std::vector< Advanced::ComponentNS::index_typeExtractIdenticalComponentIndexes (const std::vector< LocalCoords > &coords_list)
 Find how many components are identical for each of the input LocalCoords, and returns their index.
 
std::pair< Advanced::ComponentNS::index_type, double > ExtractIdenticalComponentIndex (const std::vector< LocalCoords > &coords_list)
 A more limited version of ExtractIdenticalComponentIndexes in the case exactly one value is expected.
 
std::ostream & operator<< (std::ostream &stream, const LocalCoords &rhs)
 Overload of operator<< for user-defined class.
 
double Distance (const SpatialPoint &lhs, const SpatialPoint &rhs)
 Calculates the distance between two points, using a L2 norm.
 
std::ostream & operator<< (std::ostream &stream, const SpatialPoint &rhs)
 Overload of operator<< for user-defined class.
 
bool operator== (const Domain &lhs, const Domain &rhs) noexcept
 operator== for the class.
 
template<MpiScale MpiScaleT>
std::size_t NcoordsInDomain (const ::MoReFEM::Wrappers::Mpi &mpi, const Domain &domain, const Mesh &mesh)
 Compute the number of Coords in a Domain.
 
template<class EnumT >
constexpr DomainNS::unique_id AsDomainId (EnumT enum_value)
 Convert into the DomainNS::unique_id strong type the enum value defined in the input data file.
 
bool operator== (const MeshLabel &lhs, const MeshLabel &rhs) noexcept
 operator== for the class.
 
bool operator< (const MeshLabel &lhs, const MeshLabel &rhs) noexcept
 operator< for the class.
 
bool operator!= (const MeshLabel &lhs, const MeshLabel &rhs) noexcept
 operator!= for the class.
 
bool operator== (const GeometricElt &lhs, const GeometricElt &rhs) noexcept
 operator== for the class.
 
bool operator< (const GeometricElt &lhs, const GeometricElt &rhs) noexcept
 operator< for the class.
 
bool operator< (const Interface &lhs, const Interface &rhs) noexcept
 operator< for the class.
 
bool operator== (const Interface &lhs, const Interface &rhs) noexcept
 operator== for the class.
 
bool operator!= (const Interface &lhs, const Interface &rhs) noexcept
 operator!= for the class.
 
std::string ShortHand (const Interface &interface)
 Gives a short hand to tag the interface, such as 'V15' or 'E105'.
 
std::unordered_map< GeometricElt::shared_ptr, std::size_t, std::hash< GeometricElt::shared_ptr >, Utilities::PointerComparison::Equal< GeometricElt::shared_ptr > > ComputeColoring (const Mesh &mesh, std::size_t dimension, std::vector< std::size_t > &Ngeometric_elt_with_color)
 Computes coloring for a mesh.
 
void WriteInterfaceList (const std::pair< const ::MoReFEM::MeshNS::unique_id, FilesystemNS::Directory::const_unique_ptr > &mesh, std::string_view filename="interfaces.hhdata")
 Write in the given output directory a file in which all the interfaces are written.
 
bool operator== (const Mesh &lhs, const Mesh &rhs)
 operator== for the class.
 
template<class EnumT >
constexpr MeshNS::unique_id AsMeshId (EnumT enum_value)
 Convert into the MeshNS::unique_id strong type the enum value defined in the input data file.
 
bool operator== (const RefGeomElt &lhs, const RefGeomElt &rhs)
 operator== for the class.
 
bool operator!= (const RefGeomElt &lhs, const RefGeomElt &rhs)
 operator!= for the class.
 
bool operator< (const RefGeomElt &lhs, const RefGeomElt &rhs)
 operator< for the class.
 
template<class EnumT >
constexpr FiberListNS::unique_id AsFiberListId (EnumT enum_value)
 Convert into the FiberList::unique_id strong type the enum value defined in the input data file.
 
template<Advanced::Concept::InputDataNS::SectionType SectionT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None, class StringT , ::MoReFEM::Advanced::Concept::MoReFEMDataType MoReFEMDataT>
Parameter< ParameterNS::Type::vector, LocalCoords, TimeManagerT, TimeDependencyT >::unique_ptr Init3DCompoundParameterFromInputData (StringT &&name, const Domain &domain, const MoReFEMDataT &morefem_data)
 Init a three dimensional parameter, e.g. a source.
 
template<TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None, class StringT >
ScalarParameter< TimeManagerT, TimeDependencyT >::unique_ptr InitScalarParameterFromInputData (StringT &&name, const Domain &domain, const std::string &nature, const Internal::ParameterNS::Traits< ParameterNS::Type::scalar >::variant_type &value)
 Build a ScalarParameter from data read in the input data file.
 
template<Advanced::Concept::InputDataNS::SectionType SectionT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None, class StringT , ::MoReFEM::Advanced::Concept::MoReFEMDataType MoReFEMDataT>
ScalarParameter< TimeManagerT, TimeDependencyT >::unique_ptr InitScalarParameterFromInputData (StringT &&name, const Domain &domain, const MoReFEMDataT &morefem_data)
 Build a ScalarParameter from data read in the input data file.
 
template<Advanced::Concept::InputDataNS::SectionType SectionT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None, class StringT , ::MoReFEM::Advanced::Concept::MoReFEMDataType MoReFEMDataT>
VectorialParameter< TimeManagerT, TimeDependencyT >::unique_ptr InitVectorialParameterFromInputData (StringT &&name, const Domain &domain, const MoReFEMDataT &morefem_data)
 Build a VectorialParameter from data read in the input data file.
 
template<Advanced::Concept::InputDataNS::SectionType SectionT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None, class StringT , ::MoReFEM::Advanced::Concept::MoReFEMDataType MoReFEMDataT>
MatricialParameter< TimeManagerT, TimeDependencyT >::unique_ptr InitMatricialParameterFromInputData (StringT &&name, const Domain &domain, const MoReFEMDataT &morefem_data)
 Build a VectorialParameter from data read in the input data file.
 
template<class ContainerT >
bool IsSameForAllRanks (const Wrappers::Mpi &mpi, const ContainerT &container, std::optional< typename ContainerT::value_type > epsilon=std::nullopt)
 Check whether a container is the same on all ranks or not.
 
template<typename EnumT >
constexpr auto EnumUnderlyingType (EnumT enumerator) noexcept
 Extract the integer value behind an enum class.
 
void ThrowBeforeMain (Exception &&exception)
 Print the what() of an exception that occurred before the main() call.
 
template<class T >
constexpr std::string_view GetTypeName ()
 Fetch the name of the type given as template parameter.
 
template<class T , class ParameterT , template< class > class... Skills>
std::ostream & operator<< (std::ostream &stream, const StrongType< T, ParameterT, Skills... > &rhs)
 Overload of operator<< for user-defined class.
 

Variables

constexpr double penalisation_very_high_value = 1.e20
 Very high value to use in penalization schemes.
 
constexpr const std::size_t DEFAULT_DEGREE_OF_EXACTNESS = 5
 

Detailed Description

Main MoReFEM namespace.

Typedef Documentation

◆ LocalFEltSpacePerRefLocalFEltSpace

Provides for all the RefLocalFEltSpace the list of associated LocalFEltSpace.

[internal] This container behaves almost like a map, except that there is no ordering relation on the keys (that's why a std::map was not used in the first place).

◆ ParameterAtDof

template<ParameterNS::Type TypeT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ::MoReFEM::ParameterNS::TimeDependencyNS::None, std::size_t NfeltSpaceT = 1ul>
using MoReFEM::ParameterAtDof = typedef typename Internal::ParameterNS::ParameterAtDofImpl<TypeT, TimeManagerT, TimeDependencyT, NfeltSpaceT>::type

Parameter class which provides values at LocalCoords of quantities defined on dofs.

Attention
The purpose of to get here the dofs related to a given Unknown. The GlobalVector from which data are extracted might actually include more, but a single ParameterAtDof can provide values for only one of them. If you actually needs both, just define two ParameterAtDof, one for each Unknown.
Template Parameters
TypeTParameterNS::Type might be scalar or vectorial.
NfeltSpaceTIf 1, only one FEltSpace is expected; of any dimension. If 2, two are expected: one that deals with LocalFEltSpace the same dimension of the mesh, the other for this dimension minus 1. 3 is possible as well, going up to dimension minus 2.

A Parameter is first and foremost a spatial-dependent data: its main purpose is to describe the value of a physical parameter at a given local position. However, we might also want to apply a decoupled time dependency, i.e. consider value of the parameter might be determined by:

P(x, t) = f(x) * g(t)

In this case, g(t) is stored as a function and is recomputed at each Parameter::TimeUpdate() calls (such calls should therefore be located in Model::InitializeStep() where the time update actually occur).

Currently Doxygen doesn't seem able to display the interface of the underlying class, despite the TYPEDEF_HIDES_STRUCT = YES in Doxygen file. You may see the full interface of the class (on complete Doxygen documentation) at Internal::ParameterNS::ParameterInstance except the constructor (due to variadic arguments); its prototype is:

ParameterAtDof(const Mesh& mesh,
const FEltSpace& felt_space, // one such line for each \a NfeltSpaceT
const Unknown& unknown,
const GlobalVector& global_vector);
The class in charge of most of the interaction with nodes, dofs and unknowns.
Definition FEltSpace.hpp:111
Class which encapsulates both the Petsc vector and the numbering subset used to described it.
Definition GlobalVector.hpp:68
Class responsible for a mesh and its content.
Definition Mesh.hpp:76
Very generic information about a given unknown.
Definition Unknown.hpp:40
typename Internal::ParameterNS::ParameterAtDofImpl< TypeT, TimeManagerT, TimeDependencyT, NfeltSpaceT >::type ParameterAtDof
Parameter class which provides values at LocalCoords of quantities defined on dofs.
Definition ParameterAtDof.hpp:65

where:

Parameters
[in]nameName of the Parameter.
Parameters
[in]domainDomain upon which the Parameter is defined; this Domain MUST be associated with a Mesh (more often than not domain encompasses all the Coords of its associated Mesh). The reason it is a Domain and not a Mesh is that in some cases (fibers for instance) we might want to define it only on a subset of a Mesh. For this specific polcy the Domain is mostly left unused except for toms sanity checks in debug mode.
[in]unknownA scalar or vectorial unknown that acts a bit as a strawman: dofs are defined only in relationship to an unknown, so you must create one if none fulfill your purposes (for instance if you deal with a vectorial unknown and need a scalar Dof field, you must create another unknown only for their Parameter). To save space, it's better if this unknown is in its own numbering subset, but this is not mandatory.
[in]global_vectorThe vector which includes the actual values at the dofs. The values at dofs may evolve should this vector change.
[in]felt_spaceFEltSpace upon which the Parameter may be evaluated.
Attention
Current implementation is not secure enough with respect of quadrature rule!
Todo:
#1031

◆ ParameterAtQuadraturePoint

template<ParameterNS::Type TypeT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None>
using MoReFEM::ParameterAtQuadraturePoint = typedef Internal::ParameterNS:: ParameterInstance<TypeT, ParameterNS::Policy::AtQuadraturePoint, TimeManagerT, TimeDependencyT>

Convenient alias for a parameter defined at dof.

Currently Doxygen doesn't seem able to display the interface of the underlying class, despite the TYPEDEF_HIDES_STRUCT = YES in Doxygen file. You may see the full interface of the class (on complete Doxygen documentation) at Internal::ParameterNS::ParameterInstance except the constructor (due to variadic arguments)

template<class StringT>
const Mesh& mesh,
const QuadratureRulePerTopology& quadrature_rule_per_topology,
storage_value_type initial_value,
const TimeManagerT& time_manager);
This class list the quadrature rule to use for each topology.
Definition QuadratureRulePerTopology.hpp:37
Internal::ParameterNS::ParameterInstance< TypeT, ParameterNS::Policy::AtQuadraturePoint, TimeManagerT, TimeDependencyT > ParameterAtQuadraturePoint
Convenient alias for a parameter defined at dof.
Definition ParameterAtQuadraturePoint.hpp:62

where:

  • mesh Mesh considered. It is actually unused for this kind Parameter, but required nonetheless to conform to generic parameter interface.
  • initial_value A scalar, vectorial or matrix initial value to create the parameter.
  • time_manager The time manager of MoReFEM.
Attention
Current implementation is not secure enough with respect of quadrature rule!
Todo:
#1031

Enumeration Type Documentation

◆ check_inverted_elements_policy

Enum class to choose between doing a (relatively) expensive check on the Jacobian of the mapping from reference to deformed configuration

◆ IsFactorized

enum class MoReFEM::IsFactorized
strong

Whether the matrix has already been factorized or not.

If yes, there is a huge speed-up in the solver, but you must be sure the matrix is still the same. So in the first call, the value must be 'no'.

◆ create_domain_list_for_coords

Whether the model will compute the list of domains a coord is in or not.

This functionality is not required for all models, and is not cheap in memory, hence the possibility not to do it. Of course, methods that expect these domain information will assert if you call them after setting create_domain_list_for_coords::no.

◆ AllocateGradientFEltPhi

Whether a gradient matrix should be allocated for InformationAtQuadraturePoint.

This is required for LocalVariationalOperator that uses up gradient-based elements. If you're not sure, try 'no' and run in debug mode: an assert will tell you if 'yes' was required.

◆ MpiScale

enum class MoReFEM::MpiScale
strong

Convenient alias to distinguish processor-wise and program-wise quantities.

Note
The usual words used in HPC are simply 'local' and 'global'. However, given that in a finite element context those words also get a very different meaning, we chose to rename the ones related to parallelism.

◆ NonZeroPattern

enum class MoReFEM::NonZeroPattern
strong

Convenient enum used to typify more strongly Petsc macro values.

Should be in Wrappers::Petsc sub-namespace as well but it's more convenient for a model developer not to have to preffix this enum class each time.

Function Documentation

◆ PrecomputeExit()

template<::MoReFEM::Advanced::Concept::MoReFEMDataType MoReFEMDataT>
void MoReFEM::PrecomputeExit ( const MoReFEMDataT &  morefem_data)

Provide the precompute exit.

When the parallelism strategy is "precompute", once all the data are written we want to exit the program as soon as possible. The proper way to do so is to throw a GracefulExit exception, which should be properly trapped in the main.

This function does so IF the parallelism strategy is "precompute"; if not it does nothing (including the case there are no parallelism policy specified in the Lua file).

Parameters
[in]morefem_dataThe object which encapsulates some stuff that acts as global data, such as:
  • The content of the input data.
  • Mpi related information.
  • The directory into which output is to be written.
  • Management of time iterations

◆ operator==() [1/10]

bool MoReFEM::operator== ( const ExtendedUnknown lhs,
const ExtendedUnknown rhs 
)

operator== for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is equal to rhs according to the criteria chosen for the class. Criteria: Two such objects are equal if both unknown and numbering subset are the same.

◆ operator<() [1/7]

bool MoReFEM::operator< ( const ExtendedUnknown lhs,
const ExtendedUnknown rhs 
)

operator< for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is less than rhs according to the criteria chosen for the class. Criteria: first unknown are compared, then numbering subset and finally shape function label.

◆ operator<() [2/7]

bool MoReFEM::operator< ( const Unknown lhs,
const Unknown rhs 
)

operator< for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is less than rhs according to the criteria chosen for the class. Criterion used here is the underlying unique id.

◆ operator==() [2/10]

bool MoReFEM::operator== ( const Unknown lhs,
const Unknown rhs 
)

operator== for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is equal to rhs according to the criteria chosen for the class. Criterion used here is the underlying unique id.

◆ operator!=() [1/4]

bool MoReFEM::operator!= ( const Unknown lhs,
const Unknown rhs 
)

operator!= for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is not equal to rhs according to the criteria chosen for the class. Criterion used here is the underlying unique id.

◆ Ncomponent()

std::size_t MoReFEM::Ncomponent ( const Unknown unknown,
const std::size_t  mesh_dimension 
)

Number of components to consider for the unknown.

Parameters
[in]unknownUnknown for which the information is requested.
[in]mesh_dimensionDimension of the mesh.

◆ AsUnknownId()

template<class EnumT >
constexpr UnknownNS::unique_id MoReFEM::AsUnknownId ( EnumT  enum_value)
constexpr

Convert into the UnknownNS::unique_id strong type the enum value defined in the input data file.

In a typical Model, indexes related to fields (e.g. Unknown) are defined in an enum class named typically UnknownIndex. This facility is a shortcut to convert this enum into a proper UnknownNS::unique_id that is used in the library to identify Unknown.

Parameters
[in]enum_valueThe index related to the Unknown, stored in an enum class. See a typical 'InputData.hpp' file to understand it better.
Returns
The identifier for a Unknown as used in the library.

◆ WriteUnknownList()

void MoReFEM::WriteUnknownList ( const FilesystemNS::Directory output_directory)

Write in output directory a file that lists all the unknowns.

Should be called only on root processor.

Parameters
[in]output_directoryOutput directory in which a file named 'unknowns.hhdata' will be written.

◆ operator<() [3/7]

bool MoReFEM::operator< ( const Coords lhs,
const Coords rhs 
)

operator< for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is less than rhs according to the criteria chosen for the class.

By convention the ordering is performed by increasing index (the processor-wise position one), provided both are of the same nature. If not, an exception is thrown.

◆ operator==() [3/10]

bool MoReFEM::operator== ( const Coords lhs,
const Coords rhs 
)

operator== for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is equal to rhs according to the criteria chosen for the class.

By convention the ordering is performed by increasing index (the processor-wise position one), provided both are of the same nature. If not, an exception is thrown.

◆ WriteEnsightFormat()

template<bool DoPrintIndexT>
void MoReFEM::WriteEnsightFormat ( const Coords point,
std::ostream &  stream 
)

Write the point in Ensight format.

This format is to set a width of 12 characters for each coordinate of the point; scientific notation is used

Parameters
[in]pointPoint considered
Parameters
[in,out]streamStream upon which object information are written.
Template Parameters
DoPrintIndexTTrue if the point is preceded by its internal index

[internal] See Item 23 of "Effective C++" from Scott Meyers to see why this is a function and not a method.

◆ WriteMeditFormat()

template<class FloatT >
void MoReFEM::WriteMeditFormat ( const std::size_t  mesh_dimension,
const Coords point,
int  lm_mesh_index 
)

Write the point in Medit format.

This is achieved through calls to the libmesh API.

Parameters
[in]mesh_dimensionDimension of the mesh considered.
[in]pointPoint considered.
[in]lm_mesh_indexMesh index that has been associated when the output file was opened with Libmesh API.
Template Parameters
FloatTfloat or double (depends on Medit "version" parameter).

◆ WriteVTK_PolygonalDataFormat()

void MoReFEM::WriteVTK_PolygonalDataFormat ( const Coords point,
std::ostream &  stream 
)

Write the point in VTK_PolygonalData format.

This format is classic with each online corresponding to a point.

Parameters
[in]pointPoint considered
Parameters
[in,out]streamStream upon which object information are written.

◆ operator<<() [1/4]

std::ostream & MoReFEM::operator<< ( std::ostream &  stream,
const Coords rhs 
)

Overload of operator<< for user-defined class.

Parameters
[in,out]streamOutput stream.
[in]rhsObject which content is to be written to output stream.
Returns
Output stream.

◆ AssertNCoordsConsistency()

void MoReFEM::AssertNCoordsConsistency ( const Wrappers::Mpi mpi)

Check whether all Coords on the current processor are properly accounted for in the Mesh objects.

Parameters
[in]mpiMpi object which knows the rank of the processor, the total number of processors, etc...

If not, an exception is thrown (so that the actual numbers are displayed - something a mere assert can't handle.

◆ operator==() [4/10]

bool MoReFEM::operator== ( const LocalCoords lhs,
const LocalCoords rhs 
)

operator== for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is equal to rhs according to the criteria chosen for the class.

Two LocalCoords are consider equal when all their components are.

It is assumed here (and asserted in debug) that both arguments are the same dimension.

◆ ComputeCenterOfGravity()

template<class ContainerT >
LocalCoords MoReFEM::ComputeCenterOfGravity ( const ContainerT &  coords_list)

Return the center of gravity of several LocalCoords.

It is assumed here (and asserted in debug) that all LocalCoords are the same dimension.

Parameters
[in]coords_listList of Coords for which center of gravity is sought.
Template Parameters
ContainerTA contained to enclose several LocalCoords objects. Typically a std::vector<LocalCoords> or std::array<LocalCoords, ...>.
Returns
Computed center of gravity.

◆ ExtractMismatchedComponentIndexes()

std::vector< Advanced::ComponentNS::index_type > MoReFEM::ExtractMismatchedComponentIndexes ( const LocalCoords lhs,
const LocalCoords rhs 
)

Find how many components differ between two LocalCoords, and returns their index.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
Indexes of the mismatched components. For instance if (0., 1., 0.) and (0., 4., 0.) are considered in coords_list, return {1}.

◆ ExtractMismatchedComponentIndex()

Advanced::ComponentNS::index_type MoReFEM::ExtractMismatchedComponentIndex ( const LocalCoords lhs,
const LocalCoords rhs 
)

A more limited version of ExtractMismatchedComponentIndexes in the case exactly one value is expected.

This is the one actually required: this function is called when determining which is the component that vary inside an edge of a reference topology element that is quadrangular of hexahedronal.

There is an assert here that requires only one value fits the bill.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
Position of the mismatched component (unique by design of this function; if not the call was improper).

◆ ExtractIdenticalComponentIndexes()

std::vector< Advanced::ComponentNS::index_type > MoReFEM::ExtractIdenticalComponentIndexes ( const std::vector< LocalCoords > &  coords_list)

Find how many components are identical for each of the input LocalCoords, and returns their index.

Parameters
[in]coords_listList of Coords under investigation.
Returns
Indexes of the components that are equal. For instance if (0, 1, 0) and (0, 4, 0) are considered in coords_list, return (0, 2).

◆ ExtractIdenticalComponentIndex()

std::pair< Advanced::ComponentNS::index_type, double > MoReFEM::ExtractIdenticalComponentIndex ( const std::vector< LocalCoords > &  coords_list)

A more limited version of ExtractIdenticalComponentIndexes in the case exactly one value is expected.

There is an assert here that requires only one value fits the bill.

Parameters
[in]coords_listList of Coords under investigation.
Returns
Key is the position of the identical component (assumed to be unique) and the value is its value.

◆ operator<<() [2/4]

std::ostream & MoReFEM::operator<< ( std::ostream &  stream,
const LocalCoords rhs 
)

Overload of operator<< for user-defined class.

Parameters
[in,out]streamOutput stream.
[in]rhsObject which content is to be written to output stream.
Returns
Output stream.

◆ Distance()

double MoReFEM::Distance ( const SpatialPoint lhs,
const SpatialPoint rhs 
)

Calculates the distance between two points, using a L2 norm.

Friendship.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
Distance between two points following L2 norm.

◆ operator<<() [3/4]

std::ostream & MoReFEM::operator<< ( std::ostream &  stream,
const SpatialPoint rhs 
)

Overload of operator<< for user-defined class.

Parameters
[in,out]streamOutput stream.
[in]rhsObject which content is to be written to output stream.
Returns
Output stream.

◆ operator==() [5/10]

bool MoReFEM::operator== ( const Domain lhs,
const Domain rhs 
)
noexcept

operator== for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is equal to rhs according to the criteria chosen for the class.

Equality is ensured here only with unique ids.

◆ NcoordsInDomain()

template<MpiScale MpiScaleT>
std::size_t MoReFEM::NcoordsInDomain ( const ::MoReFEM::Wrappers::Mpi mpi,
const Domain domain,
const Mesh mesh 
)

Compute the number of Coords in a Domain.

Template Parameters
MpiScaleTEither program_wise or processor_wise.
Parameters
[in]mpiMpi object.
[in]domainDomain considered.
[in]meshMesh in which the domain is enclosed.
Returns
Number of Coords in the domain.
Attention
In processor-wise case, Coords only related to ghost NodeBearer aren't considered in the count here! However, a Coords may be counted as processor-wise on several different ranks; the program-wise case correctly accounts for this and count in this case only the lowest rank.

◆ AsDomainId()

template<class EnumT >
constexpr DomainNS::unique_id MoReFEM::AsDomainId ( EnumT  enum_value)
constexpr

Convert into the DomainNS::unique_id strong type the enum value defined in the input data file.

In a typical Model, indexes related to fields (e.g. Domain) are defined in an enum class named typically DomainIndex. This facility is a shortcut to convert this enum into a proper DomainNS::unique_id that is used in the library to identify Domain.

Parameters
[in]enum_valueThe index related to the Domain, stored in an enum class. See a typical 'InputData.hpp' file to understand it better.
Returns
The identifier for a Domain as used in the library.

◆ operator==() [6/10]

bool MoReFEM::operator== ( const MeshLabel lhs,
const MeshLabel rhs 
)
inlinenoexcept

operator== for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is equal to rhs according to the criteria chosen for the class.

Criterion is whether their unique identifiers (returned by GetUniqueId()) are the same.

◆ operator<() [4/7]

bool MoReFEM::operator< ( const MeshLabel lhs,
const MeshLabel rhs 
)
noexcept

operator< for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is less than rhs according to the criteria chosen for the class.

Criterion relies upon their unique identifiers (returned by GetUniqueId()).

◆ operator!=() [2/4]

bool MoReFEM::operator!= ( const MeshLabel lhs,
const MeshLabel rhs 
)
inlinenoexcept

operator!= for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is not equal to rhs according to the criteria chosen for the class.

Criterion is whether their unique identifiers (returned by GetUniqueId()) are not the same.

◆ operator==() [7/10]

bool MoReFEM::operator== ( const GeometricElt lhs,
const GeometricElt rhs 
)
noexcept

operator== for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is equal to rhs according to the criteria chosen for the class.

The underlying index is the criterion used here: two geometric elements are equal if their index is the same.

◆ operator<() [5/7]

bool MoReFEM::operator< ( const GeometricElt lhs,
const GeometricElt rhs 
)
noexcept

operator< for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is less than rhs according to the criteria chosen for the class.

As for operator==, underlying index is used to perform the comparison.

◆ operator<() [6/7]

bool MoReFEM::operator< ( const Interface lhs,
const Interface rhs 
)
noexcept

operator< for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is less than rhs according to the criteria chosen for the class.

The convention is that the ordering is done following the coords list in the manner:

  • Nature are organized in the order: Vertex, Edge, Face, Volume.
  • If same nature, indexes are compared.

◆ operator==() [8/10]

bool MoReFEM::operator== ( const Interface lhs,
const Interface rhs 
)
noexcept

operator== for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is equal to rhs according to the criteria chosen for the class.

Two Interface objects are equal if their nature and their index are the same.

Beware: an overload is provided for OrientedEdge and OrientedFace which also takes into account the orientation.

◆ operator!=() [3/4]

bool MoReFEM::operator!= ( const Interface lhs,
const Interface rhs 
)
noexcept

operator!= for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is not equal to rhs according to the criteria chosen for the class.

Defined from operator==.

◆ ShortHand()

std::string MoReFEM::ShortHand ( const Interface interface)

Gives a short hand to tag the interface, such as 'V15' or 'E105'.

The possible letters are:

  • V (for Vertex)
  • E (for Edge)
  • F (for Face)
  • G (for Volume - V was always taken and G may stand for GeometricElement).

The digits are the program-wise index.

Such shorthands are used in the context of pre-partitioning: the file with the prepartitioned data uses them up.

Parameters
[in]interfaceInterface considered.

◆ ComputeColoring()

std::unordered_map< GeometricElt::shared_ptr, std::size_t, std::hash< GeometricElt::shared_ptr >, Utilities::PointerComparison::Equal< GeometricElt::shared_ptr > > MoReFEM::ComputeColoring ( const Mesh mesh,
std::size_t  dimension,
std::vector< std::size_t > &  Ngeometric_elt_with_color 
)

Computes coloring for a mesh.

The present algorithm attributes 'colors' to each GeometricElt so that two adjacent GeometricElt never share the same color. As few colors as possible are used here.

Parameters
[in]meshMesh for which the coloring is computed.
[in]dimensionOnly geometric elements of a given dimension are considered here.
[out]Ngeometric_elt_with_colorFor each index/color, the number of geometric elements. For instance the third element of the vector is the number of geometric elements with color 2.

Beware: this algorithm acts processor-wise: if it is called after the reduction to processor-wise data, it will actupon them alone and not on the whole initial object.

Returns
The coloring attributed for each geometric elements.

[internal] Unordered map use the address and not the GeometricElt object in its hash table.

◆ WriteInterfaceList()

void MoReFEM::WriteInterfaceList ( const std::pair< const ::MoReFEM::MeshNS::unique_id, FilesystemNS::Directory::const_unique_ptr > &  mesh,
std::string_view  filename = "interfaces.hhdata" 
)

Write in the given output directory a file in which all the interfaces are written.

This function should be called only on root processor.

Parameters
[in]meshKey is the unique id of the Mesh which interface list is to be written; value the path of its associated output directory (which should have already been created).
[in]filenameName if the file to be written in output directory; default value is what is expected by facilities such as tests or post-processing. (the functionality to modify it has been introduced mostly for dev purposes; tests and post-processing expect the default value).

A 'interfaces.hhdata' file will be written inside this output directory.

◆ operator==() [9/10]

bool MoReFEM::operator== ( const Mesh lhs,
const Mesh rhs 
)

operator== for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is equal to rhs according to the criteria chosen for the class.

The comparison is performed using the underlying unique id.

◆ AsMeshId()

template<class EnumT >
constexpr MeshNS::unique_id MoReFEM::AsMeshId ( EnumT  enum_value)
constexpr

Convert into the MeshNS::unique_id strong type the enum value defined in the input data file.

In a typical Model, indexes related to fields (e.g. Mesh) are defined in an enum class named typically MeshIndex. This facility is a shortcut to convert this enum into a proper MeshNS::unique_id that is used in the library to identify a Mesh.

Parameters
[in]enum_valueThe index related to the Mesh, stored in an enum class. See a typical 'InputData.hpp' file to understand it better.
Returns
The identifier for a Mesh as used in the library.

◆ operator==() [10/10]

bool MoReFEM::operator== ( const RefGeomElt lhs,
const RefGeomElt rhs 
)

operator== for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is equal to rhs according to the criteria chosen for the class. The comparison is performed with underlying GeometricEltEnum.

◆ operator!=() [4/4]

bool MoReFEM::operator!= ( const RefGeomElt lhs,
const RefGeomElt rhs 
)

operator!= for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is not equal to rhs according to the criteria chosen for the class. The comparison is performed with underlying GeometricEltEnum.

◆ operator<() [7/7]

bool MoReFEM::operator< ( const RefGeomElt lhs,
const RefGeomElt rhs 
)

operator< for the class.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.
Returns
True if lhs is less than rhs according to the criteria chosen for the class.

The comparison is performed with underlying GeometricEltEnum.

◆ AsFiberListId()

template<class EnumT >
constexpr FiberListNS::unique_id MoReFEM::AsFiberListId ( EnumT  enum_value)
constexpr

Convert into the FiberList::unique_id strong type the enum value defined in the input data file.

In a typical Model, indexes related to fields (e.g. FiberList) are defined in an enum class named typically FiberListIndex. This facility is a shortcut to convert this enum into a proper FiberListNS::unique_id that is used in the library to identify FiberList.

Parameters
[in]enum_valueThe index related to the FiberList, stored in an enum class. See a typical 'InputData.hpp' file to understand it better.
Returns
The identifier for a FiberList as used in the library.

◆ Init3DCompoundParameterFromInputData()

template<Advanced::Concept::InputDataNS::SectionType SectionT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None, class StringT , ::MoReFEM::Advanced::Concept::MoReFEMDataType MoReFEMDataT>
Parameter< ParameterNS::Type::vector, LocalCoords, TimeManagerT, TimeDependencyT >::unique_ptr MoReFEM::Init3DCompoundParameterFromInputData ( StringT &&  name,
const Domain domain,
const MoReFEMDataT &  morefem_data 
)

Init a three dimensional parameter, e.g. a source.

This is handled actually as three separate ScalarParameter, which nature may change: one might be defined by a Lua function and another one by a constant.

Parameters
[in]nameName of the parameter, as it will appear in outputs.
Parameters
[in]morefem_dataThe object which encapsulates some stuff that acts as global data, such as:
  • The content of the input data.
  • Mpi related information.
  • The directory into which output is to be written.
  • Management of time iterations
[in]domainDomain upon which the Parameter is defined; this Domain MUST be associated with a Mesh (more often than not domain encompasses all the Coords of its associated Mesh). The reason it is a Domain and not a Mesh is that in some cases (fibers for instance) we might want to define it only on a subset of a Mesh.

If any of the nature of the component is 'ignore', all components should be as well. In this case, nullptr is returned.

Returns
Parameter considered (or nullptr if nature is 'ignore').

◆ InitScalarParameterFromInputData() [1/2]

template<TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None, class StringT >
ScalarParameter< TimeManagerT, TimeDependencyT >::unique_ptr MoReFEM::InitScalarParameterFromInputData ( StringT &&  name,
const Domain domain,
const std::string &  nature,
const Internal::ParameterNS::Traits< ParameterNS::Type::scalar >::variant_type &  value 
)

Build a ScalarParameter from data read in the input data file.

Template Parameters
TimeDependencyTPolicy in charge of time dependency.
Parameters
[in]nameName of the parameter, as it will appear in outputs.
Parameters
[in]domainDomain upon which the Parameter is defined; this Domain MUST be associated with a Mesh (more often than not domain encompasses all the Coords of its associated Mesh). The reason it is a Domain and not a Mesh is that in some cases (fibers for instance) we might want to define it only on a subset of a Mesh.
Template Parameters
SectionTThe type of the section from InputData that includes the data for the Parameter to build.
Attention
Please notice all Parameter can't be initialized from the input data file. For instance a parameter defined directly at quadrature points or at dofs must be built in hard in the code; current function enables to choose among certain pre-definite choices (at the time of this writing, 'constant', 'lua function' and 'piecewise constant by domain').
Returns
Parameter considered, or nullptr if irrelevant (i.e. naure was 'ignore').
Parameters
[in]natureValue of 'nature' field (read from input data file)
[in]valueContent of 'value' field (read from input data file).

◆ InitScalarParameterFromInputData() [2/2]

template<Advanced::Concept::InputDataNS::SectionType SectionT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None, class StringT , ::MoReFEM::Advanced::Concept::MoReFEMDataType MoReFEMDataT>
ScalarParameter< TimeManagerT, TimeDependencyT >::unique_ptr MoReFEM::InitScalarParameterFromInputData ( StringT &&  name,
const Domain domain,
const MoReFEMDataT &  morefem_data 
)

Build a ScalarParameter from data read in the input data file.

Template Parameters
TimeDependencyTPolicy in charge of time dependency.
Parameters
[in]nameName of the parameter, as it will appear in outputs.
Parameters
[in]domainDomain upon which the Parameter is defined; this Domain MUST be associated with a Mesh (more often than not domain encompasses all the Coords of its associated Mesh). The reason it is a Domain and not a Mesh is that in some cases (fibers for instance) we might want to define it only on a subset of a Mesh.
Template Parameters
SectionTThe type of the section from InputData that includes the data for the Parameter to build.
Attention
Please notice all Parameter can't be initialized from the input data file. For instance a parameter defined directly at quadrature points or at dofs must be built in hard in the code; current function enables to choose among certain pre-definite choices (at the time of this writing, 'constant', 'lua function' and 'piecewise constant by domain').
Returns
Parameter considered, or nullptr if irrelevant (i.e. naure was 'ignore').
Parameters
[in]morefem_dataThe object which encapsulates some stuff that acts as global data, such as:
  • The content of the input data.
  • Mpi related information.
  • The directory into which output is to be written.
  • Management of time iterations

◆ InitVectorialParameterFromInputData()

template<Advanced::Concept::InputDataNS::SectionType SectionT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None, class StringT , ::MoReFEM::Advanced::Concept::MoReFEMDataType MoReFEMDataT>
VectorialParameter< TimeManagerT, TimeDependencyT >::unique_ptr MoReFEM::InitVectorialParameterFromInputData ( StringT &&  name,
const Domain domain,
const MoReFEMDataT &  morefem_data 
)

Build a VectorialParameter from data read in the input data file.

Template Parameters
TimeDependencyTPolicy in charge of time dependency.
Parameters
[in]nameName of the parameter, as it will appear in outputs.
Parameters
[in]domainDomain upon which the Parameter is defined; this Domain MUST be associated with a Mesh (more often than not domain encompasses all the Coords of its associated Mesh). The reason it is a Domain and not a Mesh is that in some cases (fibers for instance) we might want to define it only on a subset of a Mesh.
Template Parameters
SectionTThe type of the section from InputData that includes the data for the Parameter to build.
Attention
Please notice all Parameter can't be initialized from the input data file. For instance a parameter defined directly at quadrature points or at dofs must be built in hard in the code; current function enables to choose among certain pre-definite choices (at the time of this writing, 'constant', 'lua function' and 'piecewise constant by domain').
Returns
Parameter considered, or nullptr if irrelevant (i.e. naure was 'ignore').
Parameters
[in]morefem_dataThe object which encapsulates some stuff that acts as global data, such as:
  • The content of the input data.
  • Mpi related information.
  • The directory into which output is to be written.
  • Management of time iterations

◆ InitMatricialParameterFromInputData()

template<Advanced::Concept::InputDataNS::SectionType SectionT, TIME_MANAGER_TEMPLATE_KEYWORD TimeManagerT, template< ParameterNS::Type, TIME_MANAGER_TEMPLATE_KEYWORD > class TimeDependencyT = ParameterNS::TimeDependencyNS::None, class StringT , ::MoReFEM::Advanced::Concept::MoReFEMDataType MoReFEMDataT>
MatricialParameter< TimeManagerT, TimeDependencyT >::unique_ptr MoReFEM::InitMatricialParameterFromInputData ( StringT &&  name,
const Domain domain,
const MoReFEMDataT &  morefem_data 
)

Build a VectorialParameter from data read in the input data file.

Template Parameters
TimeDependencyTPolicy in charge of time dependency.
Parameters
[in]nameName of the parameter, as it will appear in outputs.
Parameters
[in]domainDomain upon which the Parameter is defined; this Domain MUST be associated with a Mesh (more often than not domain encompasses all the Coords of its associated Mesh). The reason it is a Domain and not a Mesh is that in some cases (fibers for instance) we might want to define it only on a subset of a Mesh.
Template Parameters
SectionTThe type of the section from InputData that includes the data for the Parameter to build.
Attention
Please notice all Parameter can't be initialized from the input data file. For instance a parameter defined directly at quadrature points or at dofs must be built in hard in the code; current function enables to choose among certain pre-definite choices (at the time of this writing, 'constant', 'lua function' and 'piecewise constant by domain').
Returns
Parameter considered, or nullptr if irrelevant (i.e. naure was 'ignore').
Parameters
[in]morefem_dataThe object which encapsulates some stuff that acts as global data, such as:
  • The content of the input data.
  • Mpi related information.
  • The directory into which output is to be written.
  • Management of time iterations

◆ IsSameForAllRanks()

template<class ContainerT >
bool MoReFEM::IsSameForAllRanks ( const Wrappers::Mpi mpi,
const ContainerT &  container,
std::optional< typename ContainerT::value_type >  epsilon = std::nullopt 
)

Check whether a container is the same on all ranks or not.

Parameters
[in]mpiMpi object which knows the rank of the processor, the total number of processors, etc...
[in]containerContainer which is under scrutiny.
[in]epsilonOptional that must be activated ONLY IF Container::value_type is a floating point.
Returns
True if the container is the same for all ranks.

Considering the use case I have, this method is implemented to be simple, not the fastest possible. I have no doubt there are more clever and efficient way to implement such a functionality, but it would be overkill in my case.

Template Parameters
ContainerTA container with either integer or floating point values.

◆ EnumUnderlyingType()

template<typename EnumT >
constexpr auto MoReFEM::EnumUnderlyingType ( EnumT  enumerator)
constexprnoexcept

Extract the integer value behind an enum class.

Template Parameters
EnumTType of the enum considered.
Parameters
[in]enumeratorElement of the enum for which we want the underlying integer value.
Returns
The underlying integer value behind an enum class member. The exact type of the integer is derived with std::underlying_type traits.

◆ ThrowBeforeMain()

void MoReFEM::ThrowBeforeMain ( Exception &&  exception)

Print the what() of an exception that occurred before the main() call.

In the Factory idiom, some registering functions are intended to be called BEFORE the main().

For this reason, an additional step is added (namely print to std::cerr the explanation of the exception) so that developer might find quickly what happened.

Parameters
[in]exceptionException to throw.

◆ GetTypeName()

template<class T >
constexpr std::string_view MoReFEM::GetTypeName ( )
constexpr

Fetch the name of the type given as template parameter.

Adapted from https://stackoverflow.com/questions/81870/is-it-possible-to-print-a-variables-type-in-standard-c

Template Parameters
TType which information is requested.
Returns
Name of the type, e.g. 'double' or 'const std::string&'.

◆ operator<<() [4/4]

template<class T , class ParameterT , template< class > class... Skills>
std::ostream & MoReFEM::operator<< ( std::ostream &  stream,
const StrongType< T, ParameterT, Skills... > &  rhs 
)

Overload of operator<< for user-defined class.

Parameters
[in,out]streamOutput stream.
[in]rhsObject which content is to be written to output stream.
Returns
Output stream.

This one works only if a Print(std::ostream&) method exists in StrongType class; skill Printable defines such a method.