GCC Code Coverage Report


Directory: ./
File: Model/NSHeatModel.cpp
Date: 2024-04-14 07:32:34
Exec Total Coverage
Lines: 0 22 0.0%
Branches: 0 36 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/NSHeatModel.hpp"
21 #include "Solver/linearProblemNSHeat.hpp"
22
23 namespace felisce {
24 NSHeatModel::NSHeatModel():NSModel() {
25 m_name = "Navier Stokes and Heat equations coupled";
26 }
27 void NSHeatModel::forward() {
28 if ( m_fstransient->iteration == 0 ) {
29 static_cast<LinearProblemNSHeat*>(m_linearProblem[0])->userInitialize();
30 if ( FelisceParam::instance().exportP1Normal ) {
31 m_linearProblem[0]->initPetscVectors();
32
33 static_cast<LinearProblemNSHeat*>(m_linearProblem[0])->computeNormalField(FelisceParam::instance().labelExportP1Normal,0);
34
35
36 PetscVector zero;
37 zero.duplicateFrom(m_linearProblem[0]->solution());
38 zero.zeroEntries();
39 m_linearProblem[0]->writeSolutionFromVec( zero , MpiInfo::rankProc(), m_ios, m_fstransient->time, m_fstransient->iteration, std::string("normal"));
40 }
41 }
42
43 NSModel::forward();
44 m_linearProblem[0]->gatherSolution();
45 static_cast<LinearProblemNSHeat*>(m_linearProblem[0])->userPostProcessing();
46
47 if ( FelisceParam::instance().exportP1Normal) {
48 m_linearProblem[0]->writeSolutionFromVec(m_linearProblem[0]->get(LinearProblem::sequential,"normalField"),
49 MpiInfo::rankProc(),
50 m_ios,
51 m_fstransient->time,
52 m_fstransient->iteration,
53 std::string("normal"));
54 }
55 }
56 }
57