Memosa-FVM  0.2
ElectricModel.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 _ELECTRICMODEL_H_
6 #define _ELECTRICMODEL_H_
7 
8 #include "Model.h"
9 #include "GeomFields.h"
10 #include "ElectricFields.h"
11 #include "Mesh.h"
12 #include "ElectricBC.h"
13 
14 #include "Array.h"
15 #include "Vector.h"
16 #include "PhysicsConstant.h"
17 
18 template<class T>
19 class ElectricModel : public Model
20 {
21 public:
22 
23  typedef std::map<int,ElectricBC<T>*> ElectricBCMap;
24  typedef std::map<int,ElectricVC<T>*> ElectricVCMap;
25 
26  typedef Array<T> TArray;
30 
31  class Impl;
32 
33 
34  ElectricModel(const GeomFields& geomFields,
35  ElectricFields& electricFields, const MeshList& meshes);
36 
37  virtual ~ElectricModel();
38 
39  virtual void init();
40 
41  virtual map<string,shared_ptr<ArrayBase> >& getPersistenceData();
42  virtual void restart();
43 
45  ElectricBC<T>& getBC(const int id);
46 
48  ElectricVC<T>& getVC(const int id);
49 
51 
53 
54  void computeIBFacePotential(const StorageSite& solid);
55 
56  void computeSolidSurfaceForce(const StorageSite& particles);
57 
58  void computeSolidSurfaceForcePerUnitArea(const StorageSite& particles);
59 
60  void printBCs();
61 
62  bool advance(const int niter);
63 
64  void updateTime();
65 
67 
68  vector<T> getTunnelCurrent();
69 
70  T getPotentialFluxIntegral(const Mesh& mesh, const int faceGroupId);
71 
72 private:
73  shared_ptr<Impl> _impl;
74 };
75 
76 #endif
77 
ElectricModelOptions< T > & getOptions()
virtual ~ElectricModel()
ElectricVCMap & getVCMap()
bool advance(const int niter)
ElectricVC< T > & getVC(const int id)
virtual void init()
shared_ptr< Impl > _impl
Definition: ElectricModel.h:73
ElectricModel(const GeomFields &geomFields, ElectricFields &electricFields, const MeshList &meshes)
Definition: Mesh.h:49
vector< T > getTunnelCurrent()
void calculateEquilibriumParameters()
T getPotentialFluxIntegral(const Mesh &mesh, const int faceGroupId)
Vector< double, 3 > VectorD3
Definition: ElectricModel.h:28
ElectricBC< T > & getBC(const int id)
void computeIBFacePotential(const StorageSite &solid)
virtual void restart()
Array< T > TArray
Definition: ElectricModel.h:26
ElectricBCMap & getBCMap()
Definition: Model.h:13
ElectricModelConstants< T > & getConstants()
Array< VectorT3 > VectorT3Array
Definition: ElectricModel.h:29
std::map< int, ElectricBC< T > * > ElectricBCMap
Definition: ElectricModel.h:23
void computeSolidSurfaceForcePerUnitArea(const StorageSite &particles)
Definition: Array.h:14
std::map< int, ElectricVC< T > * > ElectricVCMap
Definition: ElectricModel.h:24
virtual map< string, shared_ptr< ArrayBase > > & getPersistenceData()
Vector< T, 3 > VectorT3
Definition: ElectricModel.h:27
void computeSolidSurfaceForce(const StorageSite &particles)
vector< Mesh * > MeshList
Definition: Mesh.h:439