Commit ba2528f3 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#9 Boundary conditions: put all Component into Private namespace. Document...

#9 Boundary conditions: put all Component into Private namespace. Document properly Component namespace and put it into FElt module.
parent eda11b01
......@@ -4307,7 +4307,7 @@
BE2801E81C7F17C300FD01BC /* InvariantManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InvariantManager.cpp; sourceTree = "<group>"; };
BE2801E91C7F17C300FD01BC /* InvariantManager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InvariantManager.hpp; sourceTree = "<group>"; };
BE2801EA1C7F17C300FD01BC /* InvariantManager.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InvariantManager.hxx; sourceTree = "<group>"; };
BE2836601CA49390003E62CE /* Component.doxygen */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = Component.doxygen; sourceTree = "<group>"; };
BE2836601CA49390003E62CE /* Component.doxygen */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; name = Component.doxygen; path = ../Private/Component/Component.doxygen; sourceTree = "<group>"; };
BE2B65FE1A2778C700E80864 /* BasicRefFElt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicRefFElt.cpp; sourceTree = "<group>"; };
BE2B65FF1A2778C700E80864 /* BasicRefFElt.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = BasicRefFElt.hpp; sourceTree = "<group>"; };
BE2B66001A2778C700E80864 /* BasicRefFElt.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = BasicRefFElt.hxx; sourceTree = "<group>"; };
......@@ -4390,6 +4390,7 @@
BE3302491C9012E4005A8FFE /* SConscript */ = {isa = PBXFileReference; explicitFileType = text.script.python; name = SConscript; path = AcousticWave/SConscript; sourceTree = "<group>"; };
BE372DCF18C47F3B00127212 /* main_test_geometry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main_test_geometry.cpp; sourceTree = "<group>"; };
BE372DDB18C4802900127212 /* main_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main_test.cpp; sourceTree = "<group>"; };
BE37EFEB1CB308340006C0AD /* FiniteElement.doxygen */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = FiniteElement.doxygen; sourceTree = "<group>"; };
BE3A54E419DA9CF800A52D92 /* EnumInterface.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = EnumInterface.hpp; sourceTree = "<group>"; };
BE3A54E919DAA49200A52D92 /* EnumInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EnumInterface.cpp; sourceTree = "<group>"; };
BE3AB275183503A5009E1B76 /* Elasticity */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Elasticity; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -5268,22 +5269,22 @@
BEBEB19619C8429F00E4EA1D /* UnknownManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnknownManager.cpp; sourceTree = "<group>"; };
BEBEB19719C8429F00E4EA1D /* UnknownManager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = UnknownManager.hpp; sourceTree = "<group>"; };
BEBEB19819C8429F00E4EA1D /* UnknownManager.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = UnknownManager.hxx; sourceTree = "<group>"; };
BEBEB1BA19C8445300E4EA1D /* Comp1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Comp1.cpp; sourceTree = "<group>"; };
BEBEB1BB19C8445300E4EA1D /* Comp1.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Comp1.hpp; sourceTree = "<group>"; };
BEBEB1BC19C8445300E4EA1D /* Comp12.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Comp12.cpp; sourceTree = "<group>"; };
BEBEB1BD19C8445300E4EA1D /* Comp12.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Comp12.hpp; sourceTree = "<group>"; };
BEBEB1BE19C8445300E4EA1D /* Comp123.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Comp123.cpp; sourceTree = "<group>"; };
BEBEB1BF19C8445300E4EA1D /* Comp123.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Comp123.hpp; sourceTree = "<group>"; };
BEBEB1C019C8445300E4EA1D /* Comp13.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Comp13.cpp; sourceTree = "<group>"; };
BEBEB1C119C8445300E4EA1D /* Comp13.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Comp13.hpp; sourceTree = "<group>"; };
BEBEB1C219C8445300E4EA1D /* Comp2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Comp2.cpp; sourceTree = "<group>"; };
BEBEB1C319C8445300E4EA1D /* Comp2.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Comp2.hpp; sourceTree = "<group>"; };
BEBEB1C419C8445300E4EA1D /* Comp23.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Comp23.cpp; sourceTree = "<group>"; };
BEBEB1C519C8445300E4EA1D /* Comp23.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Comp23.hpp; sourceTree = "<group>"; };
BEBEB1C619C8445300E4EA1D /* Comp3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Comp3.cpp; sourceTree = "<group>"; };
BEBEB1C719C8445300E4EA1D /* Comp3.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Comp3.hpp; sourceTree = "<group>"; };
BEBEB1C819C8445300E4EA1D /* CompNA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CompNA.cpp; sourceTree = "<group>"; };
BEBEB1C919C8445300E4EA1D /* CompNA.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = CompNA.hpp; sourceTree = "<group>"; };
BEBEB1BA19C8445300E4EA1D /* Comp1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Comp1.cpp; path = ../Private/Component/Comp1.cpp; sourceTree = "<group>"; };
BEBEB1BB19C8445300E4EA1D /* Comp1.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Comp1.hpp; path = ../Private/Component/Comp1.hpp; sourceTree = "<group>"; };
BEBEB1BC19C8445300E4EA1D /* Comp12.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Comp12.cpp; path = ../Private/Component/Comp12.cpp; sourceTree = "<group>"; };
BEBEB1BD19C8445300E4EA1D /* Comp12.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Comp12.hpp; path = ../Private/Component/Comp12.hpp; sourceTree = "<group>"; };
BEBEB1BE19C8445300E4EA1D /* Comp123.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Comp123.cpp; path = ../Private/Component/Comp123.cpp; sourceTree = "<group>"; };
BEBEB1BF19C8445300E4EA1D /* Comp123.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Comp123.hpp; path = ../Private/Component/Comp123.hpp; sourceTree = "<group>"; };
BEBEB1C019C8445300E4EA1D /* Comp13.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Comp13.cpp; path = ../Private/Component/Comp13.cpp; sourceTree = "<group>"; };
BEBEB1C119C8445300E4EA1D /* Comp13.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Comp13.hpp; path = ../Private/Component/Comp13.hpp; sourceTree = "<group>"; };
BEBEB1C219C8445300E4EA1D /* Comp2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Comp2.cpp; path = ../Private/Component/Comp2.cpp; sourceTree = "<group>"; };
BEBEB1C319C8445300E4EA1D /* Comp2.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Comp2.hpp; path = ../Private/Component/Comp2.hpp; sourceTree = "<group>"; };
BEBEB1C419C8445300E4EA1D /* Comp23.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Comp23.cpp; path = ../Private/Component/Comp23.cpp; sourceTree = "<group>"; };
BEBEB1C519C8445300E4EA1D /* Comp23.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Comp23.hpp; path = ../Private/Component/Comp23.hpp; sourceTree = "<group>"; };
BEBEB1C619C8445300E4EA1D /* Comp3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Comp3.cpp; path = ../Private/Component/Comp3.cpp; sourceTree = "<group>"; };
BEBEB1C719C8445300E4EA1D /* Comp3.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Comp3.hpp; path = ../Private/Component/Comp3.hpp; sourceTree = "<group>"; };
BEBEB1C819C8445300E4EA1D /* CompNA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompNA.cpp; path = ../Private/Component/CompNA.cpp; sourceTree = "<group>"; };
BEBEB1C919C8445300E4EA1D /* CompNA.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = CompNA.hpp; path = ../Private/Component/CompNA.hpp; sourceTree = "<group>"; };
BEBEB1CA19C8445300E4EA1D /* ComponentManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentManager.cpp; sourceTree = "<group>"; };
BEBEB1CB19C8445300E4EA1D /* ComponentManager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ComponentManager.hpp; sourceTree = "<group>"; };
BEBEB1CC19C8445300E4EA1D /* ComponentManager.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ComponentManager.hxx; sourceTree = "<group>"; };
......@@ -8345,6 +8346,7 @@
BE9C4D001807F5BC005B94BC /* FiniteElement */ = {
isa = PBXGroup;
children = (
BE37EFEB1CB308340006C0AD /* FiniteElement.doxygen */,
BE5BE50619336DC3006BE2BF /* SConscript */,
BE2B65FD1A2778C700E80864 /* RefFiniteElement */,
BEBEB15D19C83BB600E4EA1D /* FiniteElement */,
......@@ -9215,7 +9217,6 @@
BEBEB1CD19C8445300E4EA1D /* DirichletBoundaryCondition.cpp */,
BEBEB1CE19C8445300E4EA1D /* DirichletBoundaryCondition.hpp */,
BEBEB1CF19C8445300E4EA1D /* DirichletBoundaryCondition.hxx */,
BEBEB1B919C8445300E4EA1D /* Component */,
BEBEB20519C847E600E4EA1D /* Private */,
);
path = BoundaryConditions;
......@@ -9242,7 +9243,8 @@
BEBEB1C819C8445300E4EA1D /* CompNA.cpp */,
BEBEB1C919C8445300E4EA1D /* CompNA.hpp */,
);
path = Component;
name = Component;
path = ../Component;
sourceTree = "<group>";
};
BEBEB1FA19C8467500E4EA1D /* Exceptions */ = {
......@@ -9257,6 +9259,7 @@
BEBEB20519C847E600E4EA1D /* Private */ = {
isa = PBXGroup;
children = (
BEBEB1B919C8445300E4EA1D /* Component */,
BEB7B1001BB4168F005E5D18 /* DirichletBoundaryConditionManager.cpp */,
BEB7B1011BB4168F005E5D18 /* DirichletBoundaryConditionManager.hpp */,
BEB7B1021BB4168F005E5D18 /* DirichletBoundaryConditionManager.hxx */,
//! \file
//
//
// Displacement.cpp
// HappyHeart
//
// Created by Sébastien Gilles on 30/09/13.
// Copyright (c) 2013 Inria. All rights reserved.
//
#include "FiniteElement/BoundaryConditions/Component/CompNA.hpp"
#include "FiniteElement/BoundaryConditions/Private/ComponentFactory.hpp"
namespace HappyHeart
{
namespace ComponentNS
{
namespace // anonymous
{
ComponentManager::const_shared_ptr Create()
{
return std::make_unique<CompNA>();
}
// Register the geometric element in the 'ComponentFactory' singleton.
// The return value is mandatory: we can't simply call a void function outside function boundaries
// See "Modern C++ Design", Chapter 8, P205.
__attribute__((unused)) const bool registered = Private::ComponentFactory::CreateOrGetInstance().Register<CompNA>(Create);
} // anonymous namespace
CompNA::CompNA() = default;
} // namespace ComponentNS
} // namespace HappyHeart
......@@ -23,6 +23,10 @@ namespace HappyHeart
{
/// \addtogroup FElt
///@{
/*!
* \brief Helper class to handle which components are to be used in an essential boundary condition.
*
......@@ -105,6 +109,8 @@ namespace HappyHeart
};
///@} // \addtogroup
} // namespace HappyHeart
......
......@@ -53,6 +53,10 @@ namespace HappyHeart
/// \addtogroup FElt
///@{
/*!
* \brief Class in charge of Dirichlet boundary conditions.
*
......@@ -352,7 +356,9 @@ namespace HappyHeart
};
///@} // \addtogroup
} // namespace HappyHeart
......
......@@ -46,6 +46,10 @@ namespace HappyHeart
{
/// \addtogroup FElt
///@{
/*!
* \brief Store there for a pair boundary condition/numbering subset the dofs involved in
* the boundary condition and their associated values.
......@@ -146,6 +150,10 @@ namespace HappyHeart
};
///@} // \addtogroup
} // namespace Private
......
//! \file
//! \file
//
//
// Displacement.cpp
......@@ -9,7 +9,7 @@
//
#include "FiniteElement/BoundaryConditions/Component/Comp123.hpp"
#include "FiniteElement/BoundaryConditions/Private/Component/Comp1.hpp"
#include "FiniteElement/BoundaryConditions/Private/ComponentFactory.hpp"
......@@ -17,36 +17,43 @@ namespace HappyHeart
{
namespace ComponentNS
namespace Private
{
namespace // anonymous
namespace ComponentNS
{
ComponentManager::const_shared_ptr Create()
namespace // anonymous
{
return std::make_unique<Comp123>();
}
ComponentManager::const_shared_ptr Create()
{
return std::make_unique<Comp1>();
}
// Register the geometric element in the 'ComponentFactory' singleton.
// The return value is mandatory: we can't simply call a void function outside function boundaries
// See "Modern C++ Design", Chapter 8, P205.
__attribute__((unused)) const bool registered = Private::ComponentFactory::CreateOrGetInstance().Register<Comp1>(Create);
} // anonymous namespace
// Register the geometric element in the 'ComponentFactory' singleton.
// The return value is mandatory: we can't simply call a void function outside function boundaries
// See "Modern C++ Design", Chapter 8, P205.
__attribute__((unused)) const bool registered = Private::ComponentFactory::CreateOrGetInstance().Register<Comp123>(Create);
Comp1::Comp1() = default;
} // anonymous namespace
Comp123::Comp123() = default;
} // namespace ComponentNS
} // namespace ComponentNS
} // namespace Private
......
//! \file
//! \file
//
//
// Displacement.h
......@@ -19,45 +19,52 @@
namespace HappyHeart
{
namespace ComponentNS
namespace Private
{
/*!
* \brief The class in charge fo managing Comp1 behaviour.
*
* \attention Make sure not to define any data attribute in the class!
* Mother class doesn't get a virtual destructor, and is used polymorphically, so we must make sure
* not to add any data attribute that would induce memory leaks (it shouldn't be required anyway:
* the derived classes are designed to be very lightweight and add no additional functionalities...)
*
*/
struct Comp1 final : public Private::TComponentManager<Comp1>
namespace ComponentNS
{
/*!
* \brief Constructor.
*/
explicit Comp1();
/*!
* \copydoc doxygen_hide_component_static_name_method
* \brief The class in charge fo managing Comp1 behaviour.
*
* \attention Make sure not to define any data attribute in the class!
* Mother class doesn't get a virtual destructor, and is used polymorphically, so we must make sure
* not to add any data attribute that would induce memory leaks (it shouldn't be required anyway:
* the derived classes are designed to be very lightweight and add no additional functionalities...)
*
*/
static std::string Name() { return "Comp1"; }
struct Comp1 final : public Private::TComponentManager<Comp1>
{
/*!
* \brief Constructor.
*/
explicit Comp1();
/*!
* \copydoc doxygen_hide_component_static_name_method
*/
static std::string Name() { return "Comp1"; }
/*!
* \copydoc doxygen_hide_component_static_is_activated_method
*/
static std::bitset<3> IsActivated() { return std::bitset<3>("001"); }
};
/*!
* \copydoc doxygen_hide_component_static_is_activated_method
*/
static std::bitset<3> IsActivated() { return std::bitset<3>("001"); }
};
} // namespace ComponentNS
} // namespace ComponentNS
} // namespace Private
} // namespace HappyHeart
......
//! \file
//! \file
//
//
// Displacement.cpp
......@@ -9,7 +9,7 @@
//
#include "FiniteElement/BoundaryConditions/Component/Comp1.hpp"
#include "FiniteElement/BoundaryConditions/Private/Component/Comp12.hpp"
#include "FiniteElement/BoundaryConditions/Private/ComponentFactory.hpp"
......@@ -17,37 +17,42 @@ namespace HappyHeart
{
namespace ComponentNS
namespace Private
{
namespace // anonymous
namespace ComponentNS
{
ComponentManager::const_shared_ptr Create()
namespace // anonymous
{
return std::make_unique<Comp1>();
}
ComponentManager::const_shared_ptr Create()
{
return std::make_unique<Comp12>();
}
// Register the geometric element in the 'ComponentFactory' singleton.
// The return value is mandatory: we can't simply call a void function outside function boundaries
// See "Modern C++ Design", Chapter 8, P205.
__attribute__((unused)) const bool registered = Private::ComponentFactory::CreateOrGetInstance().Register<Comp12>(Create);
} // anonymous namespace
// Register the geometric element in the 'ComponentFactory' singleton.
// The return value is mandatory: we can't simply call a void function outside function boundaries
// See "Modern C++ Design", Chapter 8, P205.
__attribute__((unused)) const bool registered = Private::ComponentFactory::CreateOrGetInstance().Register<Comp1>(Create);
Comp12::Comp12() = default;
} // anonymous namespace
Comp1::Comp1() = default;
} // namespace ComponentNS
} // namespace ComponentNS
} // namespace Private
......
//! \file
//! \file
//
//
// Displacement.h
......@@ -21,43 +21,50 @@ namespace HappyHeart
{
namespace ComponentNS
namespace Private
{
/*!
* \brief The class in charge fo managing Comp12 behaviour.
*
* \attention Make sure not to define any data attribute in the class!
* Mother class doesn't get a virtual destructor, and is used polymorphically, so we must make sure
* not to add any data attribute that would induce memory leaks (it shouldn't be required anyway:
* the derived classes are designed to be very lightweight and add no additional functionalities...)
*
*/
struct Comp12 final : public Private::TComponentManager<Comp12>
namespace ComponentNS
{
/*!
* \brief Constructor.
*/
explicit Comp12();
/*!
* \copydoc doxygen_hide_component_static_name_method
* \brief The class in charge fo managing Comp12 behaviour.
*
* \attention Make sure not to define any data attribute in the class!
* Mother class doesn't get a virtual destructor, and is used polymorphically, so we must make sure
* not to add any data attribute that would induce memory leaks (it shouldn't be required anyway:
* the derived classes are designed to be very lightweight and add no additional functionalities...)
*
*/
static std::string Name() { return "Comp12"; }
struct Comp12 final : public Private::TComponentManager<Comp12>
{
/*!
* \brief Constructor.
*/
explicit Comp12();
/*!
* \copydoc doxygen_hide_component_static_name_method
*/
static std::string Name() { return "Comp12"; }
/*!
* \copydoc doxygen_hide_component_static_is_activated_method
*/
static std::bitset<3> IsActivated() { return std::bitset<3>("011"); }
};
/*!
* \copydoc doxygen_hide_component_static_is_activated_method
*/
static std::bitset<3> IsActivated() { return std::bitset<3>("011"); }
};
} // namespace ComponentNS
} // namespace ComponentNS
} // namespace Private
......
//! \file
//
//
// Displacement.cpp
// HappyHeart
//
// Created by Sébastien Gilles on 30/09/13.
// Copyright (c) 2013 Inria. All rights reserved.
//
#include "FiniteElement/BoundaryConditions/Private/Component/Comp123.hpp"
#include "FiniteElement/BoundaryConditions/Private/ComponentFactory.hpp"
namespace HappyHeart
{
namespace Private
{
namespace ComponentNS
{
namespace // anonymous
{
ComponentManager::const_shared_ptr Create()
{
return std::make_unique<Comp123>();
}
// Register the geometric element in the 'ComponentFactory' singleton.
// The return value is mandatory: we can't simply call a void function outside function boundaries
// See "Modern C++ Design", Chapter 8, P205.
__attribute__((unused)) const bool registered = Private::ComponentFactory::CreateOrGetInstance().Register<Comp123>(Create);
} // anonymous namespace
Comp123::Comp123() = default;
} // namespace ComponentNS
} // namespace Private
} // namespace HappyHeart
//! \file
//! \file
//
//
// Displacement.h
......@@ -19,47 +19,54 @@
namespace HappyHeart
{
namespace ComponentNS
namespace Private
{
/*!