CentralDifferenceTimeIntegrationScheme.h 2.04 KB
Newer Older
Gilles MARCKMANN's avatar
Gilles MARCKMANN committed
1
/*
2 3
    This source code is subject to non-permissive licence,
    see the DamageBandDyn/LICENSE file for conditions.
Gilles MARCKMANN's avatar
Gilles MARCKMANN committed
4
*/
5 6
#ifndef _CentralDifferenceTimeIntegrationScheme_h
#define _CentralDifferenceTimeIntegrationScheme_h
7 8
// DamageBandDyn
#include "TimeIntegrationScheme.h"
9 10 11 12 13 14 15
// Xfem
#include "xAssembler.h"
// SolverBase
#include "xCSRVector.h"
#include "xCSRMatrix.h"
#include "xLinearSystemSolverDiagonal.h"

16 17 18 19
class Pilot;
class Observer;
class PostProcessing;
class TreatmentOfEssEnvOptimized;
20

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

30 31 32 33 34 35 36 37 38
  CentralDifferenceTimeIntegrationScheme(Formulation&,
                                         MeshUpdator&, MeshProjector&,
                                         Pilot&,
                                         TreatmentOfEssEnvOptimized&,
                                         const bool, const bool,
                                         Observer&,
                                         PostProcessing&);
  virtual ~CentralDifferenceTimeIntegrationScheme()
  {}
39

40 41 42 43
  void initialize();
  void restore();
  void initiate();
  void compute();
44
private:
45 46 47 48 49
  Formulation&                formulation;
  MeshUpdator&                mesh_updator;
  MeshProjector&              mesh_projector;
  Pilot&                      pilot;
  TreatmentOfEssEnvOptimized& treatment_of_ess_env_optimized;
50

51
  const bool reassemble_mass;
52

53 54 55 56 57 58
  lalg::xCSRVector disp;
  lalg::xCSRVector speed;
  lalg::xCSRVector accel;
  lalg::xCSRVector rhs;
  lalg::xCSRVector prediction_speed;
  lalg::xCSRMatrix mass;
59

60 61 62
  xfem::xAssemblerBasic<>* assembler_mass;
  xfem::xAssemblerBasic<> assembler_Fext;
  xfem::xAssemblerBasic<> assembler_Fint;
63

64
  xLinearSystemSolverDiagonal solver;
65

66 67
  Observer& observer;
  PostProcessing& post_processing;
68 69 70 71
};

#include "CentralDifferenceTimeIntegrationScheme_imp.h"
#endif