Memosa-FVM  0.2
StructureModel.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 _STRUCTUREMODEL_H_
6 #define _STRUCTUREMODEL_H_
7 
8 #include "Model.h"
9 
10 #include "GeomFields.h"
11 #include "StructureFields.h"
12 
13 #include "Mesh.h"
14 #include "LinearSolver.h"
15 
16 #include "StructureBC.h"
17 
18 template<class T>
19 class StructureModel : public Model
20 {
21 public:
22 
23  typedef std::map<int,StructureBC<T>*> StructureBCMap;
24  typedef std::map<int,StructureVC<T>*> StructureVCMap;
25 
26  class Impl;
27 
28 
29  StructureModel(const GeomFields& geomFields,
30  StructureFields& structureFields, const MeshList& meshes);
31 
32  virtual ~StructureModel();
33 
34  virtual void init();
35 
38 
40 
41  //void printBCs();
42 
43  // do the specified number of iterations, return true if converged
44  bool advance(const int niter);
45  void advanceExplicit(const int nsteps, const double deltaT);
46  void initExplicitAdvance();
47  void finishExplicitAdvance();
48 
49 
50  void updateTime();
51  void creepInit();
52  void computeVMStress();
53  void updateForceOnBoundary(const StorageSite& faceSite, const ArrayBase& bforceA, const map<int,int>& commonFacesMap,
54  ArrayBase& fxA, ArrayBase& fyA, ArrayBase& fzA);
55 
56  // Vector<T,3> getPressureIntegral(const Mesh& mesh, const int faceGroupID);
57  // Vector<T,3> getPVIntegral(const Field& velCoeff, const Mesh& mesh, const int faceGroupID);
58  //Vector<T,3> getDeformationFluxIntegral(const Mesh& mesh, const int faceGroupID);
59  //Vector<T,3> getDeformationDerivativeIntegral(const Mesh& mesh);
60  void getTraction(const Mesh& mesh);
61  void getStrain(const Mesh& mesh);
62  void getPlasticDiagStrain(const Mesh& mesh);
63 
64 
65  // Vector<T,3> getPressureIntegralonIBFaces(const Mesh& mesh);
66  // Vector<T,3> getMomentumFluxIntegralonIBFaces(const Mesh& mesh);
67 
68 
69  //boost::shared_ptr<ArrayBase> getStressTensor(const Mesh& mesh, const ArrayBase& cellIds);
70 
71 
72  // void printPressureIntegrals();
73  //void printDeformationFluxIntegrals();
74  // void printMassFluxIntegrals();
75 
76  // void computeIBFaceVelocity(const StorageSite& particles);
77  // void computeIBandSolidVelocity(const StorageSite& particles);
78  //LinearSolver& getMomentumSolver();
79  //LinearSolver& getContinuitySolver();
80 
81 private:
82  shared_ptr<Impl> _impl;
83 };
84 
85 #endif
86 
void advanceExplicit(const int nsteps, const double deltaT)
StructureModelOptions< T > & getOptions()
std::map< int, StructureVC< T > * > StructureVCMap
shared_ptr< Impl > _impl
Definition: Mesh.h:49
std::map< int, StructureBC< T > * > StructureBCMap
virtual void init()
StructureVCMap & getVCMap()
StructureModel(const GeomFields &geomFields, StructureFields &structureFields, const MeshList &meshes)
bool advance(const int niter)
void getStrain(const Mesh &mesh)
void updateForceOnBoundary(const StorageSite &faceSite, const ArrayBase &bforceA, const map< int, int > &commonFacesMap, ArrayBase &fxA, ArrayBase &fyA, ArrayBase &fzA)
StructureBCMap & getBCMap()
void getTraction(const Mesh &mesh)
Definition: Model.h:13
void getPlasticDiagStrain(const Mesh &mesh)
vector< Mesh * > MeshList
Definition: Mesh.h:439