Memosa-FVM  0.2
PhononBC.h
Go to the documentation of this file.
1 // This file os part of FVM
2 // Copyright (c) 2012 FVM Authors
3 // See LICENSE file for terms.
4 
5 #ifndef _PHONONBC_H_
6 #define _PHONONBC_H_
7 
8 #include "misc.h"
9 #include "FloatVarDict.h"
10 #include "AMG.h"
11 
12 template<class T>
13 struct PhononBC : public FloatVarDict<T>
14 {
16  {
17  this->defineVar("specifiedTemperature",T(300.0));
18  this->defineVar("specifiedReflection",T(0.0));
19  this->defineVar("specifiedHeatflux",T(0.0));
20  }
21  string bcType;
22 };
23 
24 template<class T>
25 struct PhononModelOptions : public FloatVarDict<T>
26 {
28  {
29  this->defineVar("timeStep",T(0.1));
30  this->defineVar("initialTemperature",T(310.0));
31  this->defineVar("Tref",T(299.0));
32  this->printNormalizedResiduals = true;
33  this->transient = false;
35  this->PhononLinearSolver=0;
36  this->absTolerance=1e-8;
37  this->relTolerance=1-4;
38  this->showResidual=5;
39  this->defineVar("transmissivity0to1", T(0.0));
40  this->defineVar("transmissivity1to0", T(0.0));
41  }
42 
44  bool transient;
47  double absTolerance;
48  double relTolerance;
50 
51 #ifndef SWIG
53  {
54  if (this->PhononLinearSolver == 0)
55  {
56  LinearSolver* ls(new AMG());
57  ls->relativeTolerance = 1e-5;
58  ls->nMaxIterations = 100;
59  ls->verbosity=0;
60  this->PhononLinearSolver = ls;
61  }
62  return *this->PhononLinearSolver ;
63  }
64 #endif
65 
66 };
67 
68 
69 #endif
string bcType
Definition: PhononBC.h:21
double absTolerance
Definition: PhononBC.h:47
Definition: AMG.h:27
PhononBC()
Definition: PhononBC.h:15
void defineVar(const string varName, const T defaultValue)
Definition: FloatVarDict.h:94
LinearSolver * PhononLinearSolver
Definition: PhononBC.h:46
int nMaxIterations
Definition: LinearSolver.h:31
bool printNormalizedResiduals
Definition: PhononBC.h:43
double relativeTolerance
Definition: LinearSolver.h:33
int timeDiscretizationOrder
Definition: PhononBC.h:45
LinearSolver & getPhononLinearSolver()
Definition: PhononBC.h:52
double relTolerance
Definition: PhononBC.h:48