root/src/secOrd_op_identity_impl.h

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

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. evaluate

   1 /*! \file secOrd_op_identity_impl.h
   2     \author Christian Power
   3     \date 9. March 2016
   4 
   5     \brief The actuall dune class and function that is behind secOrd_op_identity.h
   6 
   7      Revision history:
   8      --------------------------------------------------
   9 
  10           Revised by Christian Power March 2016
  11           Originally written by Christian Power
  12                (power22c@gmail.com) March 2016
  13 
  14      Idea
  15      --------------------------------------------------
  16 
  17      Here comes the dune implementation.
  18 
  19          Created by Christian Power on 16.03.2016
  20          Copyright (c) 2016 Christian Power.  All rights reserved.
  21      
  22 */
  23 
  24 #ifndef SECORD_OP_IDENTITY_IMPL_H
  25 #define SECORD_OP_IDENTITY_IMPL_H
  26 
  27 #include <config.h>
  28 #include <dune/fem/operator/lagrangeinterpolation.hh>
  29 #include "grid.h"
  30 
  31 namespace Esfem{
  32   namespace Impl{
  33     struct Identity_impl
  34       : Dune::Fem::Function<Esfem::Grid::Grid_and_time::Vec_Function_space,      
  35                             Identity_impl>
  36     {
  37       using FE_space = Esfem::Grid::Grid_and_time::Vec_Function_space;
  38       using Domain = FE_space::DomainType;
  39       using Range = FE_space::RangeType;
  40       static_assert(Domain::dimension == Range::dimension, "Bad dimension");
  41 
  42       void evaluate(const Domain& d, Range& r) const { 
  43         for(int i = 0; i < Domain::dimension; ++i) r[i] = d[i];
  44       }
  45     };
  46   }
  47 }
  48 
  49 #endif // SECORD_OP_IDENTITY_IMPL_H

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