GCC Code Coverage Report


Directory: ./
File: Solver/linearProblemHarmonicExtension.hpp
Date: 2024-04-14 07:32:34
Exec Total Coverage
Lines: 0 1 0.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:
13 //
14
15 #ifndef _LINEARPROBLEMHARMONICEXTENSION_HPP
16 #define _LINEARPROBLEMHARMONICEXTENSION_HPP
17
18 // System includes
19 #include <cmath>
20 #include <vector>
21
22 // External includes
23
24 // Project includes
25 #include "FiniteElement/elementField.hpp"
26 #include "FiniteElement/elementMatrix.hpp"
27 #include "FiniteElement/elementVector.hpp"
28 #include "Solver/bdf.hpp"
29 #include "Solver/lumpedModelBC.hpp"
30 #include "Core/felisceParam.hpp"
31 #include "Solver/linearProblem.hpp"
32
33 namespace felisce {
34 /*!
35 \file linearProblemHarmonicExtension.hpp
36
37 \date May 2013
38 \brief Matrix and rhs for the Poisson solver.
39 */
40
41 class LinearProblemHarmonicExtension:
42 public LinearProblem {
43 public:
44 LinearProblemHarmonicExtension();
45 ~LinearProblemHarmonicExtension() override;
46
47 void initialize(std::vector<GeometricMeshRegion::Pointer>& mesh, FelisceTransient::Pointer fstransient, MPI_Comm& comm, bool doUseSNES) override;
48 void initPerElementType(ElementType eltType, FlagMatrixRHS flagMatrixRHS = FlagMatrixRHS::matrix_and_rhs) override;
49 void computeElementArray(const std::vector<Point*>& elemPoint, const std::vector<felInt>& elemIdPoint, felInt& iel, FlagMatrixRHS flagMatrixRHS = FlagMatrixRHS::matrix_and_rhs) override;
50 void userFinalizeEssBCTransient() override;
51 void readMatchFile_ALE(ListVariable listVariable, const std::string& fileName);
52 void identifyIdDofToMatch_ALE(Dof& dof);
53 void finalizeEssBCTransientDerivedProblem() override;
54 void readDataDisplacement(std::vector<IO::Pointer>& io, double ReadTime);
55 //Static part of the matrix in _A
56 void copyMatrixRHS() override;
57 void addMatrixRHS() override;
58
59 felInt totNumDofToMatch() const { return m_totNumDofToMatch; }
60
61 inline PetscVector& HarmExtSol() { return m_HarmExtSol; }
62
63
64 protected:
65 CurrentFiniteElement* m_fe;
66 felInt m_iDisplacement;
67 PetscVector m_HarmExtSol;
68
69 private:
70 PetscMatrix m_matrix;
71 bool m_buildTeporaryMatrix;
72
73 double m_scaleCoeff;
74 // for matching
75 felInt m_totNumNodeToMatch;
76 felInt m_totNumDofToMatch;
77 felInt m_numDofBySupportToMatch;
78 std::vector<int> m_listOfDofToMatch;
79 felInt* m_listOfNodeToMatch;
80
81 std::vector<double> m_vectorDisp;
82 std::vector<double> m_oldVectorDisp;
83 std::vector<double> m_oldOldVectorDisp;
84 int m_oldVectorDispIteration;
85
86 std::vector<felInt> stiffenElementIds;
87 void initializeStiffnessVector();
88 };
89 }
90
91 #endif
92