GCC Code Coverage Report


Directory: ./
File: Hyperelasticity/invariantHelper.hpp
Date: 2024-04-14 07:32:34
Exec Total Coverage
Lines: 4 4 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 // ______ ______ _ _ _____ ______
2 // | ____| ____| | (_)/ ____| | ____|
3 // | |__ | |__ | | _| (___ ___| |__
4 // | __| | __| | | | |\___ \ / __| __|
5 // | | | |____| |____| |____) | (__| |____
6 // |_| |______|______|_|_____/ \___|______|
7 // Finite Elements for Life Sciences and Engineering
8 //
9 // License: LGL2.1 License
10 // FELiScE default license: LICENSE in root folder
11 //
12 // Main authors: S. Gilles
13 //
14
15 #ifndef _FELISCE_InvariantHelper_hpp
16 #define _FELISCE_InvariantHelper_hpp
17
18 // System includes
19
20 // External includes
21
22 // Project includes
23
24 namespace felisce {
25
26 namespace Invariants {
27
28 namespace Private {
29
30 template<unsigned int NcomponentT>
31 class Component {
32 public:
33
34 // Set components
35 3156000 void SetComponents(std::array<double, NcomponentT> components)
36 {
37 3156000 m_components = std::move(components);
38 }
39
40 /*!
41 * \brief Return the array containing all components.
42 *
43 * Beware because it assumes you know which is the ordering used, contrary to individual components above.
44 */
45 3156000 std::array<double, NcomponentT> components() const
46 {
47 3156000 return std::move(m_components);
48 }
49
50 protected:
51
52 // Constructor.
53 Component() = default;
54
55 // Destructor.
56 ~Component() = default;
57
58
59 protected:
60
61 /*!
62 * \brief Components if the Cauchy Green tensor.
63 *
64 * They are stored in the following order: xx, yy, xy for 2D and xx, yy, zz, xy, yz, xz for 3D.
65 */
66 std::array<double, NcomponentT> m_components;
67
68 };
69 } // namespace Private
70
71 } // namespace Invariants
72
73 } // namespace felisce
74
75 #endif
76