pi-DoMUS: Parallel Deal.II MUltiphysics Solver
pde_system_interface.h
Go to the documentation of this file.
1 #ifndef _pidomus_pde_system_interface_h
2 #define _pidomus_pde_system_interface_h
3 
4 #include "base_interface.h"
5 
6 using namespace deal2lkit;
7 using namespace pidomus;
8 
45 template<int dim, int spacedim, class Implementation, typename LAC=LATrilinos>
46 class PDESystemInterface : public BaseInterface<dim,spacedim,LAC>
47 {
48 
49 
50 public:
51 
52  virtual ~PDESystemInterface() {};
53 
57  PDESystemInterface(const std::string &name="",
58  const unsigned int &n_components=0,
59  const unsigned int &n_matrices=0,
60  const std::string &default_fe="FE_Q(1)",
61  const std::string &default_component_names="u",
62  const std::string &default_differential_components="") :
63  BaseInterface<dim,spacedim,LAC>(name, n_components,n_matrices,
64  default_fe, default_component_names,
65  default_differential_components)
66  {
67  static_cast<Implementation *>(this)->init();
68  }
69 
71  {
72  BaseInterface<dim,spacedim,LAC>::declare_parameters(prm);
73  }
74 
76  FEValuesCache<dim,spacedim> &scratch,
77  std::vector<Sdouble> &energies,
78  std::vector<std::vector<double> > &local_residuals,
79  bool compute_only_system_terms) const
80  {
81  static_cast<const Implementation *>(this)->energies_and_residuals(cell,
82  scratch,
83  energies,
84  local_residuals,
85  compute_only_system_terms);
86 
87  }
88 
89 
91  FEValuesCache<dim,spacedim> &scratch,
92  std::vector<SSdouble> &energies,
93  std::vector<std::vector<Sdouble> > &local_residuals,
94  bool compute_only_system_terms) const
95  {
96  static_cast<const Implementation *>(this)->energies_and_residuals(cell,
97  scratch,
98  energies,
99  local_residuals,
100  compute_only_system_terms);
101 
102  }
103 
104 };
105 
106 #endif
Definition: lac_type.h:33
ActiveSelector::active_cell_iterator active_cell_iterator
virtual ~PDESystemInterface()
Definition: pde_system_interface.h:52
This is the class that users should derive from.
Definition: pde_system_interface.h:46
virtual void declare_parameters(ParameterHandler &prm)
Definition: pde_system_interface.h:70
PDESystemInterface(const std::string &name="", const unsigned int &n_components=0, const unsigned int &n_matrices=0, const std::string &default_fe="FE_Q(1)", const std::string &default_component_names="u", const std::string &default_differential_components="")
Pass initializers to the base class constructor.
Definition: pde_system_interface.h:57
Definition: copy_data.h:18
virtual void assemble_energies_and_residuals(const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, FEValuesCache< dim, spacedim > &scratch, std::vector< Sdouble > &energies, std::vector< std::vector< double > > &local_residuals, bool compute_only_system_terms) const
Definition: pde_system_interface.h:75
virtual void assemble_energies_and_residuals(const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, FEValuesCache< dim, spacedim > &scratch, std::vector< SSdouble > &energies, std::vector< std::vector< Sdouble > > &local_residuals, bool compute_only_system_terms) const
Definition: pde_system_interface.h:90