GCC Code Coverage Report


Directory: ./
File: Model/laplacianCurvModel.cpp
Date: 2024-04-14 07:32:34
Exec Total Coverage
Lines: 0 18 0.0%
Branches: 0 2 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 // System includes
16
17 // External includes
18
19 // Project includes
20 #include "Model/laplacianCurvModel.hpp"
21 #include "Core/mpiInfo.hpp"
22
23 namespace felisce {
24 LaplacianCurvModel::LaplacianCurvModel() {
25 m_name = "LaplacianCurv";
26 }
27
28 LaplacianCurvModel::~LaplacianCurvModel()
29 = default;
30
31
32 void LaplacianCurvModel::forward() {
33 PetscPrintf(MpiInfo::petscComm(),"\n\n\tTimestep: %d \n\n", m_fstransient->iteration);
34
35 //Assembly llop on elements.
36 m_linearProblem[0]->assembleMatrixRHSBD(MpiInfo::rankProc());
37
38 //Specific operations before solve the system.
39 postAssemblingMatrixRHS();
40
41 //Apply boundary conditions.
42 m_linearProblem[0]->finalizeEssBCTransient();
43 m_linearProblem[0]->applyBC(FelisceParam::instance().essentialBoundaryConditionsMethod, MpiInfo::rankProc());
44
45 //Solve linear system.
46 m_linearProblem[0]->solve(MpiInfo::rankProc(), MpiInfo::numProc());
47
48 //Advance time step.
49 updateTime();
50
51 //Write solution with ensight.
52 writeSolution();
53 }
54
55 int LaplacianCurvModel::getNstate() const {
56 return m_linearProblem[0]->numDof();
57 }
58
59 void LaplacianCurvModel::getState(double* & state) {
60 m_linearProblem[0]->getSolution(state, MpiInfo::numProc(), MpiInfo::rankProc());
61 }
62
63 void LaplacianCurvModel::setState(double* & state) {
64 m_linearProblem[0]->setSolution(state, MpiInfo::numProc(), MpiInfo::rankProc());
65 }
66 }
67
68
69