GCC Code Coverage Report


Directory: ./
File: Solver/linearProblemBidomainCurv.hpp
Date: 2024-04-14 07:32:34
Exec Total Coverage
Lines: 0 10 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: A. Collin
13 //
14
15 #ifndef _LinearProblemBidomainCurv_HPP
16 #define _LinearProblemBidomainCurv_HPP
17
18 // System includes
19 #include <vector>
20
21 // External includes
22
23 // Project includes
24 #include "Solver/linearProblem.hpp"
25 #include "Core/felisceParam.hpp"
26 #include "Solver/bdf.hpp"
27 #include "Solver/cardiacFunction.hpp"
28 #include "FiniteElement/elementField.hpp"
29
30 namespace felisce
31 {
32 /*!
33 \class LinearProblemBidomainCurv
34 \authors A. Collin
35 */
36 class LinearProblemBidomainCurv:
37 public LinearProblem {
38 public:
39 LinearProblemBidomainCurv();
40 ~LinearProblemBidomainCurv() override;
41 void initialize(std::vector<GeometricMeshRegion::Pointer>& mesh, FelisceTransient::Pointer fstransient, MPI_Comm& comm, bool doUseSNES) override;
42
43 void getFiberDirection(felInt iel, int iUnknown, std::vector<double>& elemFiber);
44 void getAngle(felInt iel, int iUnknown, std::vector<double>& elemAngle);
45 void getData(felInt iel, int iUnknown, std::vector<double>& elemData);
46 void initPerElementTypeBD(ElementType eltType, FlagMatrixRHS flagMatrixRHS = FlagMatrixRHS::matrix_and_rhs) override;
47 void initPerDomainBD(int label, FlagMatrixRHS flagMatrixRHS = FlagMatrixRHS::matrix_and_rhs) override {
48 IGNORE_UNUSED_FLAG_MATRIX_RHS;
49 m_currentLabel=label;
50 }
51 double conductivityHet(int currentLabel);
52 double conductivityHom(int currentLabel);
53 void computeElementArrayBD(const std::vector<Point*>& elemPoint, const std::vector<felInt>& elemIdPoint, felInt& iel, FlagMatrixRHS flagMatrixRHS = FlagMatrixRHS::matrix_and_rhs) override;
54 void initLevelSet();
55 void levelSet(double min, double max);
56 void initSolutionTimeBef();
57 void solutionTimeBef();
58
59 // void initializeElecPhy(SchafSolver* schaf){ m_schaf = schaf;}
60 void initializeTimeScheme(Bdf* bdf) override {
61 m_bdf = bdf;
62 }
63 void readData(IO& io) override;
64 void readDataForDA(IO& io, double iteration);
65 std::vector<double> & Reference() {
66 return m_vectorRef;
67 }
68 double averageLS(CurvilinearFiniteElement* fePtr, int idfe, int minus);
69 virtual void sortSolution() {}
70 double* sortedSolution() {
71 return m_sortedSol;
72 }
73
74
75 virtual void readMatch(){}
76 virtual void readElectrodeMeasure(){}
77 virtual void addElectrodeCondtrol(){}
78
79 void addMatrixRHS() override;
80 void writeEnsightScalar(double* solValue, int idIter, std::string varName);
81 void writeEnsightCase(int numIt, std::string varName);
82
83 protected:
84 CurvilinearFiniteElement* m_fePotTransMemb;
85 CurvilinearFiniteElement* m_fePotExtraCell;
86 felInt m_ipotTransMemb;
87 felInt m_ipotExtraCell;
88 double* m_sortedSol;
89 private:
90 // SchafSolver* m_schaf;
91 Bdf* m_bdf;
92 std::vector<double> m_vectorFiber;
93 std::vector<double> m_vectorAngle;
94 std::vector<double> m_vectorRef;
95 std::vector<double> m_data;
96 PetscVector m_seqIon;
97 PetscVector m_seqBdfRHS;
98 bool allocateSeqVec;
99 bool allocateLevelSet;
100 bool allocateSol_n_1;
101 PetscVector m_levelSet;
102 PetscVector m_levelSetSeq;
103 PetscVector m_sol_n_1;
104 // felInt m_size;
105 // ISLocalToGlobalMapping m_localDofToGlobalDof;
106 ElementField m_elemFieldLSVm;
107 ElementField m_elemFieldVm;
108 double m_avHeavU0;
109 double m_avHeavMinusU0;
110 };
111 }
112
113 #endif
114