Memosa-FVM  0.2
RosselandModel.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 _ROSSELANDMODEL_H_
6 #define _ROSSELANDMODEL_H_
7 
8 #include "Model.h"
9 
10 #include "GeomFields.h"
11 #include "FlowFields.h"
12 #include "ThermalFields.h"
13 #include "Mesh.h"
14 #include "LinearSolver.h"
15 
16 
17 #include "misc.h"
18 #include "FloatVarDict.h"
19 
20 
21 //thermalFields = ThermalFields('therm')
22 
23 template<class T>
24 struct RosselandVC : public FloatVarDict<T>
25 {
27  {
28  this->defineVar("temperature",T(300.00));
29  //this->defineVar("temperature",_thermalFields.temperature);
30 
31  }
32 };
33 
34 
35 template<class T>
36 class RosselandModel : public Model
37 {
38 public:
39 
40  typedef std::map<int,RosselandVC<T>*> VCMap;
41 
42  class Impl;
43 
44 
45  RosselandModel(const GeomFields& geomFields,
46  ThermalFields& thermalFields, const MeshList& meshes);
47 
48  virtual ~RosselandModel();
49 
50  virtual void init();
51 
52  VCMap& getVCMap();
53 
54  // do the specified number of iterations, return true if converged
55  bool advance(const int niter);
56 
57 private:
58  shared_ptr<Impl> _impl;
59 };
60 
61 #endif
62 
63 
shared_ptr< Impl > _impl
virtual void init()
RosselandModel(const GeomFields &geomFields, ThermalFields &thermalFields, const MeshList &meshes)
bool advance(const int niter)
void defineVar(const string varName, const T defaultValue)
Definition: FloatVarDict.h:94
Definition: Model.h:13
virtual ~RosselandModel()
std::map< int, RosselandVC< T > * > VCMap
vector< Mesh * > MeshList
Definition: Mesh.h:439