Memosa-FVM  0.2
SpeciesModel.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 _SPECIESMODEL_H_
6 #define _SPECIESMODEL_H_
7 
8 #include "Model.h"
9 
10 #include "GeomFields.h"
11 #include "SpeciesFields.h"
12 
13 #include "Mesh.h"
14 
15 
16 #include "SpeciesBC.h"
17 
18 template<class T>
19 class SpeciesModel : public Model
20 {
21 public:
22 
23  typedef std::map<int,SpeciesBC<T>*> SpeciesBCMap;
24  typedef std::map<int,SpeciesVC<T>*> SpeciesVCMap;
25  class Impl;
26 
27 
28  SpeciesModel(const GeomFields& geomFields,
29  const MeshList& meshes,
30  const int nSpecies);
31 
32  virtual ~SpeciesModel();
33 
34  virtual void init();
35 
36  SpeciesFields& getSpeciesFields(const int speciesId);
37  SpeciesBCMap& getBCMap(const int speciesId);
38  SpeciesVCMap& getVCMap(const int speciesId);
39 
40  SpeciesBC<T>& getBC(const int id, const int speciesId);
41 
43 
44  T getMassFluxIntegral(const Mesh& mesh, const int faceGroupId, const int m);
45  T getAverageMassFraction(const Mesh& mesh, const int m);
46  T getMassFractionResidual(const int speciesId);
47 
48  void printBCs();
49 
50  void updateTime();
51 
52  void advance(const int niter);
53 private:
54  shared_ptr<Impl> _impl;
55 };
56 
57 #endif
58 
T getAverageMassFraction(const Mesh &mesh, const int m)
std::map< int, SpeciesVC< T > * > SpeciesVCMap
Definition: SpeciesModel.h:24
void advance(const int niter)
SpeciesBC< T > & getBC(const int id, const int speciesId)
Definition: Mesh.h:49
shared_ptr< Impl > _impl
Definition: SpeciesModel.h:54
SpeciesModel(const GeomFields &geomFields, const MeshList &meshes, const int nSpecies)
virtual void init()
T getMassFractionResidual(const int speciesId)
virtual ~SpeciesModel()
SpeciesModelOptions< T > & getOptions()
SpeciesVCMap & getVCMap(const int speciesId)
Definition: Model.h:13
T getMassFluxIntegral(const Mesh &mesh, const int faceGroupId, const int m)
SpeciesFields & getSpeciesFields(const int speciesId)
vector< Mesh * > MeshList
Definition: Mesh.h:439
std::map< int, SpeciesBC< T > * > SpeciesBCMap
Definition: SpeciesModel.h:23
SpeciesBCMap & getBCMap(const int speciesId)