<commit_before>#ifndef __sak_conservative_interface_h
#define __sak_conservative_interface_h

#include "interface.h"

template<int dim, int spacedim, int n_components, class Implementation>
class ConservativeInterface : public Interface<dim,spacedim,n_components>
{

  typedef Assembly::Scratch::NFields<dim,spacedim> Scratch;
  typedef Assembly::CopyData::NFieldsPreconditioner<dim,spacedim> CopyPreconditioner;
  typedef Assembly::CopyData::NFieldsSystem<dim,spacedim> CopySystem;
public:

  ConservativeInterface(const std::string &name="",
                        const std::string &default_fe="FE_Q(1)",
                        const std::string &default_component_names="u",
                        const std::string &default_coupling="",
                        const std::string &default_preconditioner_coupling="") :
    Interface<dim,spacedim,n_components>(name, default_fe, default_component_names,
                                         default_coupling, default_preconditioner_coupling) {};

  virtual void get_system_energy(const typename DoFHandler<dim,spacedim>::active_cell_iterator &c,
                                 Scratch &s,
                                 CopySystem &d,
                                 Sdouble &e) const
  {
    static_cast<const Implementation *>(this)->system_energy(c,s,d,e);
  }


  virtual void get_system_energy(const typename DoFHandler<dim,spacedim>::active_cell_iterator &c,
                                 Scratch &s,
                                 CopySystem &d,
                                 SSdouble &e) const
  {
    static_cast<const Implementation *>(this)->system_energy(c,s,d,e);
  }


  virtual void get_preconditioner_energy(const typename DoFHandler<dim,spacedim>::active_cell_iterator &c,
                                         Scratch &s,
                                         CopySystem &d,
                                         Sdouble &e) const
  {
    static_cast<const Implementation *>(this)->preconditioner_energy(c,s,d,e);
  }


  virtual void get_preconditioner_energy(const typename DoFHandler<dim,spacedim>::active_cell_iterator &c,
                                         Scratch &s,
                                         CopyPreconditioner &d,
                                         SSdouble &e) const
  {
    static_cast<const Implementation *>(this)->preconditioner_energy(c,s,d,e);
  }
};

#endif<commit_msg>init commit for the documentation of conservative interface<commit_after>#ifndef __sak_conservative_interface_h
#define __sak_conservative_interface_h
/*
 * Conservative Interface
 *
 * This class is a child of interface.h
 *
 * It is used to define a problem in the case whole the problem
 * could be stated in terms of energy and this energy can be derived
 * in ordert ot find a solution to the problem.
 *
 */

#include "interface.h"

template<int dim, int spacedim, int n_components, class Implementation>
class ConservativeInterface : public Interface<dim,spacedim,n_components>
{

  typedef Assembly::Scratch::NFields<dim,spacedim> Scratch;
  typedef Assembly::CopyData::NFieldsPreconditioner<dim,spacedim> CopyPreconditioner;
  typedef Assembly::CopyData::NFieldsSystem<dim,spacedim> CopySystem;
public:

  ConservativeInterface(const std::string &name="",
                        const std::string &default_fe="FE_Q(1)",
                        const std::string &default_component_names="u",
                        const std::string &default_coupling="",
                        const std::string &default_preconditioner_coupling="") :
    Interface<dim,spacedim,n_components>(name, default_fe, default_component_names,
                                         default_coupling, default_preconditioner_coupling) {};

  virtual void get_system_energy(const typename DoFHandler<dim,spacedim>::active_cell_iterator &c,
                                 Scratch &s,
                                 CopySystem &d,
                                 Sdouble &e) const
  {
    static_cast<const Implementation *>(this)->system_energy(c,s,d,e);
  }


  virtual void get_system_energy(const typename DoFHandler<dim,spacedim>::active_cell_iterator &c,
                                 Scratch &s,
                                 CopySystem &d,
                                 SSdouble &e) const
  {
    static_cast<const Implementation *>(this)->system_energy(c,s,d,e);
  }


  virtual void get_preconditioner_energy(const typename DoFHandler<dim,spacedim>::active_cell_iterator &c,
                                         Scratch &s,
                                         CopySystem &d,
                                         Sdouble &e) const
  {
    static_cast<const Implementation *>(this)->preconditioner_energy(c,s,d,e);
  }


  virtual void get_preconditioner_energy(const typename DoFHandler<dim,spacedim>::active_cell_iterator &c,
                                         Scratch &s,
                                         CopyPreconditioner &d,
                                         SSdouble &e) const
  {
    static_cast<const Implementation *>(this)->preconditioner_energy(c,s,d,e);
  }
};

#endif
=======
>>>>>>> init commit for the documentation of conservative interface
{'fraction_non_alphanumeric': 0.08827480330071004, 'fraction_numerical': 0.00038380349261178274, 'mean_word_length': 2.1877675840978594, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 40, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6517886', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1320, 'n_words': 284}