CentralDifferenceTimeIntegrationScheme.h 2.08 KB
Newer Older
1 2 3 4 5
/* 
    This file is a part of eXlibris C++ Library
    under the GNU General Public License:
    See the LICENSE.md files for terms and 
    conditions.
Gilles MARCKMANN's avatar
Gilles MARCKMANN committed
6
*/
7 8


9 10
#ifndef _CentralDifferenceTimeIntegrationScheme_h
#define _CentralDifferenceTimeIntegrationScheme_h
11 12
// DamageBandDyn
#include "TimeIntegrationScheme.h"
13 14 15 16 17 18 19
// Xfem
#include "xAssembler.h"
// SolverBase
#include "xCSRVector.h"
#include "xCSRMatrix.h"
#include "xLinearSystemSolverDiagonal.h"

20 21 22 23
class Pilot;
class Observer;
class PostProcessing;
class TreatmentOfEssEnvOptimized;
24

25 26 27
/// CD scheme for non-linear problems
template <typename FORMULATION, typename MESHUPDATOR, typename MESHPROJECTOR>
class CentralDifferenceTimeIntegrationScheme : public TimeIntegrationScheme
28 29
{
public:
30 31 32
  typedef FORMULATION   Formulation;
  typedef MESHUPDATOR   MeshUpdator;
  typedef MESHPROJECTOR MeshProjector;
33

34 35 36 37 38 39 40 41 42
  CentralDifferenceTimeIntegrationScheme(Formulation&,
                                         MeshUpdator&, MeshProjector&,
                                         Pilot&,
                                         TreatmentOfEssEnvOptimized&,
                                         const bool, const bool,
                                         Observer&,
                                         PostProcessing&);
  virtual ~CentralDifferenceTimeIntegrationScheme()
  {}
43

44 45 46 47
  void initialize();
  void restore();
  void initiate();
  void compute();
48
private:
49 50 51 52 53
  Formulation&                formulation;
  MeshUpdator&                mesh_updator;
  MeshProjector&              mesh_projector;
  Pilot&                      pilot;
  TreatmentOfEssEnvOptimized& treatment_of_ess_env_optimized;
54

55
  const bool reassemble_mass;
56

57 58 59 60 61 62
  lalg::xCSRVector disp;
  lalg::xCSRVector speed;
  lalg::xCSRVector accel;
  lalg::xCSRVector rhs;
  lalg::xCSRVector prediction_speed;
  lalg::xCSRMatrix mass;
63

64 65 66
  xfem::xAssemblerBasic<>* assembler_mass;
  xfem::xAssemblerBasic<> assembler_Fext;
  xfem::xAssemblerBasic<> assembler_Fint;
67

68
  xLinearSystemSolverDiagonal solver;
69

70 71
  Observer& observer;
  PostProcessing& post_processing;
72 73 74 75
};

#include "CentralDifferenceTimeIntegrationScheme_imp.h"
#endif