root/src/secOrd_op_brusselator_impl.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*! \file secOrd_op_brusselator_impl.h
   2     \brief Ancillary classes for Esfem::SecOrd::Brusselator
   3 
   4      Revision history
   5      --------------------------------------------------
   6 
   7           Revised by Christian Power May 2016
   8           Originally written by Christian Power
   9                (power22c@gmail.com) Februar 2016
  10 
  11 
  12      \author Christian Power 
  13      \date 18. May 2016
  14      \copyright Copyright (c) 2016 Christian Power.  All rights reserved.
  15  */
  16 
  17 #ifndef SECORD_OP_BRUSSELATOR_IMPL_H
  18 #define SECORD_OP_BRUSSELATOR_IMPL_H 
  19 
  20 #include <config.h>
  21 #include <dune/fem/operator/common/operator.hh>
  22 #include <dune/fem/operator/linear/istloperator.hh>
  23 #include <dune/fem/solver/istlsolver.hh>
  24 #include <dune/fem/operator/common/differentiableoperator.hh>
  25 #include "esfem_fwd.h"
  26 #include "grid.h"
  27 
  28 using FE_function = Esfem::Grid::Scal_FEfun::Dune_FEfun;
  29 using Entity = FE_function::DiscreteFunctionSpaceType::IteratorType::Entity;
  30 using Local_function = FE_function::LocalFunctionType;
  31 
  32 using Linear_operator = Dune::Fem::ISTLLinearOperator<FE_function, FE_function>;
  33 using Local_matrix = Linear_operator::LocalMatrixType;
  34 
  35 class Brusselator_op
  36   : // public Dune::Fem::Operator<FE_function>,
  37     public Dune::Fem::DifferentiableOperator<Linear_operator>
  38 {
  39 public:
  40   explicit Brusselator_op(const Esfem::Io::Parameter&,
  41                           const Esfem::Grid::Grid_and_time&,
  42                           const Esfem::Growth,
  43                           const FE_function& triMassMatrix_firstArg,
  44                           const FE_function& triMassMatrix_secondArg);
  45   ~Brusselator_op();
  46   Brusselator_op(const Brusselator_op&) = delete;
  47   Brusselator_op& operator=(const Brusselator_op&) = delete;
  48 
  49   void operator()(const FE_function& rhs, FE_function& lhs) const override;
  50   void mass_matrix(const FE_function& rhs, FE_function& lhs) const;
  51   void massMatrix_constOne(FE_function&) const;
  52 
  53   void jacobian(const FE_function&, Linear_operator&) const;
  54 private:
  55   struct Data;
  56   std::unique_ptr<Data> d_ptr;
  57   
  58   void heat_model(const Entity&, const Local_function& rhs_loc,
  59                   Local_function& lhs_loc) const;
  60   void quad_massMatrix_model(const Entity&, const Local_function& rhs_loc,
  61                              Local_function& lhs_loc) const;
  62   void jacobian_matrix_heat(const Entity&,
  63                             const Local_function&, Local_matrix&) const;
  64   void jacobian_matrix_quadMass(const Entity&,
  65                                 const Local_function&, Local_matrix&) const;
  66 };
  67 
  68 #endif // SECORD_OP_BRUSSELATOR_IMPL_H

/* [<][>][^][v][top][bottom][index][help] */