#ifndef GUARD_37174cfc9d6bf565336cac0d2ea785f5
#define GUARD_37174cfc9d6bf565336cac0d2ea785f5

#define USING_DUNE_PYTHON 1
#include <config.h>
#include <dune/alugrid/dgf.hh>
#include <dune/alugrid/grid.hh>
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#include <dune/fem/gridpart/filter/simple.hh>
#include <dune/fem/gridpart/filteredgridpart.hh>
#include <dune/fempy/py/gridview.hh>
#include <dune/python/grid/gridview.hh>
#include <dune/python/grid/hierarchical.hh>
#include <dune/fem/function/localfunction/bindable.hh>
#include <dune/fem/common/intersectionside.hh>
#include <dune/python/pybind11/pybind11.h>
#include <dune/python/pybind11/extensions.h>
#include <dune/fempy/py/grid/gridpart.hh>
#include <dune/common/exceptions.hh>
#include <dune/fempy/py/ufllocalfunction.hh>

namespace UFLLocalFunctions_37174cfc9d6bf565336cac0d2ea785f5
{

  // UFLLocalFunction
// ----------------

template< class GridPart >
struct UFLLocalFunction
  : public Dune::Fem::BindableGridFunctionWithSpace<GridPart,Dune::Dim<2>>
{
  typedef GridPart GridPartType;
  typedef typename GridPartType::GridViewType GridView;
  typedef typename GridView::ctype ctype;
  typedef Dune::Fem::BindableGridFunctionWithSpace<GridPart,Dune::Dim<2>> BaseType;
  typedef Dune::Fem::GridFunctionSpace<GridPartType,Dune::Dim<2>> FunctionSpaceType;
  typedef typename GridPartType::template Codim< 0 >::EntityType EntityType;
  typedef typename GridPartType::IntersectionType IntersectionType;
  typedef typename EntityType::Geometry Geometry;
  typedef typename Geometry::GlobalCoordinate GlobalCoordinateType;
  typedef Dune::Fem::IntersectionSide Side;
  typedef std::tuple<> ConstantTupleType;
  typedef std::tuple<> CoefficientTupleType;
  static constexpr bool gridPartValid = true;
  template< std::size_t i >
  using CoefficientType = std::tuple_element_t< i, CoefficientTupleType >;
  template< std::size_t i >
  using ConstantType = typename std::tuple_element_t< i, ConstantTupleType >::element_type;
  using BaseType::entity;
  using BaseType::geometry;

  UFLLocalFunction ( const GridPartType &gridPart, const std::string &name, int order, const Dune::Fem::ParameterReader &parameter = Dune::Fem::Parameter::container() )
    : BaseType(gridPart,name,order)
  {}

  void bind ( const IntersectionType &intersection, Side side )
  {
    BaseType::bind(intersection, side);
  }

  void bind ( const EntityType &entity )
  {
    BaseType::bind(entity);
  }

  void unbind ()
  {
    BaseType::unbind();
  }

  template< class Point >
  void evaluate ( const Point &x, typename FunctionSpaceType::RangeType &result ) const
  {
    using std::max;
    using std::min;
    using std::sqrt;
    GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
    const auto tmp1 = tmp0[ 1 ] * tmp0[ 1 ];
    const auto tmp2 = tmp0[ 0 ] * tmp0[ 0 ];
    const auto tmp3 = tmp2 + tmp1;
    const auto tmp4 = 1e-10 + tmp3;
    const auto tmp5 = std::sqrt( tmp4 );
    const auto tmp6 = -0.4 + tmp5;
    const auto tmp7 = 0.15 + tmp0[ 1 ];
    const auto tmp8 = tmp7 * tmp7;
    const auto tmp9 = 0.15 + tmp0[ 0 ];
    const auto tmp10 = tmp9 * tmp9;
    const auto tmp11 = tmp10 + tmp8;
    const auto tmp12 = 1e-10 + tmp11;
    const auto tmp13 = std::sqrt( tmp12 );
    const auto tmp14 = -0.3 + tmp13;
    const auto tmp15 = -0.15 + tmp0[ 1 ];
    const auto tmp16 = tmp15 * tmp15;
    const auto tmp17 = -0.15 + tmp0[ 0 ];
    const auto tmp18 = tmp17 * tmp17;
    const auto tmp19 = tmp18 + tmp16;
    const auto tmp20 = 1e-10 + tmp19;
    const auto tmp21 = std::sqrt( tmp20 );
    const auto tmp22 = -0.3 + tmp21;
    const auto tmp23 = std::min( tmp22, tmp14 );
    const auto tmp24 = std::max( tmp23, tmp6 );
    const auto tmp25 = 2 * tmp21;
    const auto tmp26 = tmp17 + tmp17;
    const auto tmp27 = tmp26 / tmp25;
    const auto tmp28 = tmp27 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp29 = 2 * tmp13;
    const auto tmp30 = tmp9 + tmp9;
    const auto tmp31 = tmp30 / tmp29;
    const auto tmp32 = -1 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp33 = 1.0 + tmp32;
    const auto tmp34 = tmp33 * tmp31;
    const auto tmp35 = tmp34 + tmp28;
    const auto tmp36 = tmp35 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp37 = 2 * tmp5;
    const auto tmp38 = tmp0[ 0 ] + tmp0[ 0 ];
    const auto tmp39 = tmp38 / tmp37;
    const auto tmp40 = -1 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp41 = 1.0 + tmp40;
    const auto tmp42 = tmp41 * tmp39;
    const auto tmp43 = tmp42 + tmp36;
    const auto tmp44 = -1 * tmp43;
    const auto tmp45 = tmp44 * tmp24;
    const auto tmp46 = -1 * (tmp24 <= 0.0 ? 1 : 0.0);
    const auto tmp47 = 1 + tmp46;
    const auto tmp48 = tmp47 * tmp45;
    const auto tmp49 = tmp0[ 0 ] + tmp48;
    const auto tmp50 = tmp15 + tmp15;
    const auto tmp51 = tmp50 / tmp25;
    const auto tmp52 = tmp51 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp53 = tmp7 + tmp7;
    const auto tmp54 = tmp53 / tmp29;
    const auto tmp55 = tmp33 * tmp54;
    const auto tmp56 = tmp55 + tmp52;
    const auto tmp57 = tmp56 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp58 = tmp0[ 1 ] + tmp0[ 1 ];
    const auto tmp59 = tmp58 / tmp37;
    const auto tmp60 = tmp41 * tmp59;
    const auto tmp61 = tmp60 + tmp57;
    const auto tmp62 = -1 * tmp61;
    const auto tmp63 = tmp62 * tmp24;
    const auto tmp64 = tmp47 * tmp63;
    const auto tmp65 = tmp0[ 1 ] + tmp64;
    result[ 0 ] = tmp49;
    result[ 1 ] = tmp65;
  }

  template< class Point >
  void jacobian ( const Point &x, typename FunctionSpaceType::JacobianRangeType &result ) const
  {
    using std::max;
    using std::min;
    using std::sqrt;
    GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
    const auto tmp1 = tmp0[ 1 ] * tmp0[ 1 ];
    const auto tmp2 = tmp0[ 0 ] * tmp0[ 0 ];
    const auto tmp3 = tmp2 + tmp1;
    const auto tmp4 = 1e-10 + tmp3;
    const auto tmp5 = std::sqrt( tmp4 );
    const auto tmp6 = -0.4 + tmp5;
    const auto tmp7 = 0.15 + tmp0[ 1 ];
    const auto tmp8 = tmp7 * tmp7;
    const auto tmp9 = 0.15 + tmp0[ 0 ];
    const auto tmp10 = tmp9 * tmp9;
    const auto tmp11 = tmp10 + tmp8;
    const auto tmp12 = 1e-10 + tmp11;
    const auto tmp13 = std::sqrt( tmp12 );
    const auto tmp14 = -0.3 + tmp13;
    const auto tmp15 = -0.15 + tmp0[ 1 ];
    const auto tmp16 = tmp15 * tmp15;
    const auto tmp17 = -0.15 + tmp0[ 0 ];
    const auto tmp18 = tmp17 * tmp17;
    const auto tmp19 = tmp18 + tmp16;
    const auto tmp20 = 1e-10 + tmp19;
    const auto tmp21 = std::sqrt( tmp20 );
    const auto tmp22 = -0.3 + tmp21;
    const auto tmp23 = std::min( tmp22, tmp14 );
    const auto tmp24 = std::max( tmp23, tmp6 );
    const auto tmp25 = 2 * tmp21;
    const auto tmp26 = tmp17 + tmp17;
    const auto tmp27 = tmp26 / tmp25;
    const auto tmp28 = 2 * tmp27;
    const auto tmp29 = tmp28 * tmp27;
    const auto tmp30 = -1 * tmp29;
    const auto tmp31 = 2 + tmp30;
    const auto tmp32 = tmp31 / tmp25;
    const auto tmp33 = tmp32 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp34 = 2 * tmp13;
    const auto tmp35 = tmp9 + tmp9;
    const auto tmp36 = tmp35 / tmp34;
    const auto tmp37 = 2 * tmp36;
    const auto tmp38 = tmp37 * tmp36;
    const auto tmp39 = -1 * tmp38;
    const auto tmp40 = 2 + tmp39;
    const auto tmp41 = tmp40 / tmp34;
    const auto tmp42 = -1 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp43 = 1.0 + tmp42;
    const auto tmp44 = tmp43 * tmp41;
    const auto tmp45 = tmp44 + tmp33;
    const auto tmp46 = tmp45 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp47 = 2 * tmp5;
    const auto tmp48 = tmp0[ 0 ] + tmp0[ 0 ];
    const auto tmp49 = tmp48 / tmp47;
    const auto tmp50 = 2 * tmp49;
    const auto tmp51 = tmp50 * tmp49;
    const auto tmp52 = -1 * tmp51;
    const auto tmp53 = 2 + tmp52;
    const auto tmp54 = tmp53 / tmp47;
    const auto tmp55 = -1 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp56 = 1.0 + tmp55;
    const auto tmp57 = tmp56 * tmp54;
    const auto tmp58 = tmp57 + tmp46;
    const auto tmp59 = -1 * tmp58;
    const auto tmp60 = tmp59 * tmp24;
    const auto tmp61 = tmp27 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp62 = tmp43 * tmp36;
    const auto tmp63 = tmp62 + tmp61;
    const auto tmp64 = tmp63 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp65 = tmp56 * tmp49;
    const auto tmp66 = tmp65 + tmp64;
    const auto tmp67 = -1 * tmp66;
    const auto tmp68 = tmp66 * tmp67;
    const auto tmp69 = tmp68 + tmp60;
    const auto tmp70 = -1 * (tmp24 <= 0.0 ? 1 : 0.0);
    const auto tmp71 = 1 + tmp70;
    const auto tmp72 = tmp71 * tmp69;
    const auto tmp73 = 1 + tmp72;
    const auto tmp74 = tmp15 + tmp15;
    const auto tmp75 = tmp74 / tmp25;
    const auto tmp76 = 2 * tmp75;
    const auto tmp77 = tmp76 * tmp27;
    const auto tmp78 = -1 * tmp77;
    const auto tmp79 = tmp78 / tmp25;
    const auto tmp80 = tmp79 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp81 = tmp7 + tmp7;
    const auto tmp82 = tmp81 / tmp34;
    const auto tmp83 = 2 * tmp82;
    const auto tmp84 = tmp83 * tmp36;
    const auto tmp85 = -1 * tmp84;
    const auto tmp86 = tmp85 / tmp34;
    const auto tmp87 = tmp43 * tmp86;
    const auto tmp88 = tmp87 + tmp80;
    const auto tmp89 = tmp88 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp90 = tmp0[ 1 ] + tmp0[ 1 ];
    const auto tmp91 = tmp90 / tmp47;
    const auto tmp92 = 2 * tmp91;
    const auto tmp93 = tmp92 * tmp49;
    const auto tmp94 = -1 * tmp93;
    const auto tmp95 = tmp94 / tmp47;
    const auto tmp96 = tmp56 * tmp95;
    const auto tmp97 = tmp96 + tmp89;
    const auto tmp98 = -1 * tmp97;
    const auto tmp99 = tmp98 * tmp24;
    const auto tmp100 = tmp75 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp101 = tmp43 * tmp82;
    const auto tmp102 = tmp101 + tmp100;
    const auto tmp103 = tmp102 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp104 = tmp56 * tmp91;
    const auto tmp105 = tmp104 + tmp103;
    const auto tmp106 = tmp105 * tmp67;
    const auto tmp107 = tmp106 + tmp99;
    const auto tmp108 = tmp71 * tmp107;
    const auto tmp109 = tmp28 * tmp75;
    const auto tmp110 = -1 * tmp109;
    const auto tmp111 = tmp110 / tmp25;
    const auto tmp112 = tmp111 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp113 = tmp37 * tmp82;
    const auto tmp114 = -1 * tmp113;
    const auto tmp115 = tmp114 / tmp34;
    const auto tmp116 = tmp43 * tmp115;
    const auto tmp117 = tmp116 + tmp112;
    const auto tmp118 = tmp117 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp119 = tmp50 * tmp91;
    const auto tmp120 = -1 * tmp119;
    const auto tmp121 = tmp120 / tmp47;
    const auto tmp122 = tmp56 * tmp121;
    const auto tmp123 = tmp122 + tmp118;
    const auto tmp124 = -1 * tmp123;
    const auto tmp125 = tmp124 * tmp24;
    const auto tmp126 = -1 * tmp105;
    const auto tmp127 = tmp66 * tmp126;
    const auto tmp128 = tmp127 + tmp125;
    const auto tmp129 = tmp71 * tmp128;
    const auto tmp130 = tmp76 * tmp75;
    const auto tmp131 = -1 * tmp130;
    const auto tmp132 = 2 + tmp131;
    const auto tmp133 = tmp132 / tmp25;
    const auto tmp134 = tmp133 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp135 = tmp83 * tmp82;
    const auto tmp136 = -1 * tmp135;
    const auto tmp137 = 2 + tmp136;
    const auto tmp138 = tmp137 / tmp34;
    const auto tmp139 = tmp43 * tmp138;
    const auto tmp140 = tmp139 + tmp134;
    const auto tmp141 = tmp140 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp142 = tmp92 * tmp91;
    const auto tmp143 = -1 * tmp142;
    const auto tmp144 = 2 + tmp143;
    const auto tmp145 = tmp144 / tmp47;
    const auto tmp146 = tmp56 * tmp145;
    const auto tmp147 = tmp146 + tmp141;
    const auto tmp148 = -1 * tmp147;
    const auto tmp149 = tmp148 * tmp24;
    const auto tmp150 = tmp105 * tmp126;
    const auto tmp151 = tmp150 + tmp149;
    const auto tmp152 = tmp71 * tmp151;
    const auto tmp153 = 1 + tmp152;
    (result[ 0 ])[ 0 ] = tmp73;
    (result[ 0 ])[ 1 ] = tmp108;
    (result[ 1 ])[ 0 ] = tmp129;
    (result[ 1 ])[ 1 ] = tmp153;
  }

  template< class Point >
  void hessian ( const Point &x, typename FunctionSpaceType::HessianRangeType &result ) const
  {
    using std::max;
    using std::min;
    using std::sqrt;
    GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
    const auto tmp1 = tmp0[ 1 ] * tmp0[ 1 ];
    const auto tmp2 = tmp0[ 0 ] * tmp0[ 0 ];
    const auto tmp3 = tmp2 + tmp1;
    const auto tmp4 = 1e-10 + tmp3;
    const auto tmp5 = std::sqrt( tmp4 );
    const auto tmp6 = -0.4 + tmp5;
    const auto tmp7 = 0.15 + tmp0[ 1 ];
    const auto tmp8 = tmp7 * tmp7;
    const auto tmp9 = 0.15 + tmp0[ 0 ];
    const auto tmp10 = tmp9 * tmp9;
    const auto tmp11 = tmp10 + tmp8;
    const auto tmp12 = 1e-10 + tmp11;
    const auto tmp13 = std::sqrt( tmp12 );
    const auto tmp14 = -0.3 + tmp13;
    const auto tmp15 = -0.15 + tmp0[ 1 ];
    const auto tmp16 = tmp15 * tmp15;
    const auto tmp17 = -0.15 + tmp0[ 0 ];
    const auto tmp18 = tmp17 * tmp17;
    const auto tmp19 = tmp18 + tmp16;
    const auto tmp20 = 1e-10 + tmp19;
    const auto tmp21 = std::sqrt( tmp20 );
    const auto tmp22 = -0.3 + tmp21;
    const auto tmp23 = std::min( tmp22, tmp14 );
    const auto tmp24 = std::max( tmp23, tmp6 );
    const auto tmp25 = -1 * (tmp24 <= 0.0 ? 1 : 0.0);
    const auto tmp26 = 1 + tmp25;
    const auto tmp27 = 2 * tmp21;
    const auto tmp28 = tmp17 + tmp17;
    const auto tmp29 = tmp28 / tmp27;
    const auto tmp30 = 2 * tmp29;
    const auto tmp31 = tmp30 * tmp29;
    const auto tmp32 = -1 * tmp31;
    const auto tmp33 = 2 + tmp32;
    const auto tmp34 = tmp33 / tmp27;
    const auto tmp35 = tmp30 * tmp34;
    const auto tmp36 = -1 * tmp35;
    const auto tmp37 = 2 * tmp34;
    const auto tmp38 = tmp37 * tmp29;
    const auto tmp39 = tmp38 + tmp35;
    const auto tmp40 = -1 * tmp39;
    const auto tmp41 = tmp40 + tmp36;
    const auto tmp42 = tmp41 / tmp27;
    const auto tmp43 = tmp42 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp44 = 2 * tmp13;
    const auto tmp45 = tmp9 + tmp9;
    const auto tmp46 = tmp45 / tmp44;
    const auto tmp47 = 2 * tmp46;
    const auto tmp48 = tmp47 * tmp46;
    const auto tmp49 = -1 * tmp48;
    const auto tmp50 = 2 + tmp49;
    const auto tmp51 = tmp50 / tmp44;
    const auto tmp52 = tmp47 * tmp51;
    const auto tmp53 = -1 * tmp52;
    const auto tmp54 = 2 * tmp51;
    const auto tmp55 = tmp54 * tmp46;
    const auto tmp56 = tmp55 + tmp52;
    const auto tmp57 = -1 * tmp56;
    const auto tmp58 = tmp57 + tmp53;
    const auto tmp59 = tmp58 / tmp44;
    const auto tmp60 = -1 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp61 = 1.0 + tmp60;
    const auto tmp62 = tmp61 * tmp59;
    const auto tmp63 = tmp62 + tmp43;
    const auto tmp64 = tmp63 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp65 = 2 * tmp5;
    const auto tmp66 = tmp0[ 0 ] + tmp0[ 0 ];
    const auto tmp67 = tmp66 / tmp65;
    const auto tmp68 = 2 * tmp67;
    const auto tmp69 = tmp68 * tmp67;
    const auto tmp70 = -1 * tmp69;
    const auto tmp71 = 2 + tmp70;
    const auto tmp72 = tmp71 / tmp65;
    const auto tmp73 = tmp68 * tmp72;
    const auto tmp74 = -1 * tmp73;
    const auto tmp75 = 2 * tmp72;
    const auto tmp76 = tmp75 * tmp67;
    const auto tmp77 = tmp76 + tmp73;
    const auto tmp78 = -1 * tmp77;
    const auto tmp79 = tmp78 + tmp74;
    const auto tmp80 = tmp79 / tmp65;
    const auto tmp81 = -1 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp82 = 1.0 + tmp81;
    const auto tmp83 = tmp82 * tmp80;
    const auto tmp84 = tmp83 + tmp64;
    const auto tmp85 = -1 * tmp84;
    const auto tmp86 = tmp85 * tmp24;
    const auto tmp87 = tmp34 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp88 = tmp61 * tmp51;
    const auto tmp89 = tmp88 + tmp87;
    const auto tmp90 = tmp89 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp91 = tmp82 * tmp72;
    const auto tmp92 = tmp91 + tmp90;
    const auto tmp93 = -1 * tmp92;
    const auto tmp94 = tmp29 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp95 = tmp61 * tmp46;
    const auto tmp96 = tmp95 + tmp94;
    const auto tmp97 = tmp96 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp98 = tmp82 * tmp67;
    const auto tmp99 = tmp98 + tmp97;
    const auto tmp100 = tmp99 * tmp93;
    const auto tmp101 = tmp100 + tmp86;
    const auto tmp102 = -1 * tmp99;
    const auto tmp103 = tmp92 * tmp102;
    const auto tmp104 = tmp103 + tmp100;
    const auto tmp105 = tmp104 + tmp101;
    const auto tmp106 = tmp105 * tmp26;
    const auto tmp107 = tmp15 + tmp15;
    const auto tmp108 = tmp107 / tmp27;
    const auto tmp109 = 2 * tmp108;
    const auto tmp110 = tmp109 * tmp34;
    const auto tmp111 = -1 * tmp110;
    const auto tmp112 = tmp109 * tmp29;
    const auto tmp113 = -1 * tmp112;
    const auto tmp114 = tmp113 / tmp27;
    const auto tmp115 = tmp30 * tmp114;
    const auto tmp116 = 2 * tmp114;
    const auto tmp117 = tmp116 * tmp29;
    const auto tmp118 = tmp117 + tmp115;
    const auto tmp119 = -1 * tmp118;
    const auto tmp120 = tmp119 + tmp111;
    const auto tmp121 = tmp120 / tmp27;
    const auto tmp122 = tmp121 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp123 = tmp7 + tmp7;
    const auto tmp124 = tmp123 / tmp44;
    const auto tmp125 = 2 * tmp124;
    const auto tmp126 = tmp125 * tmp51;
    const auto tmp127 = -1 * tmp126;
    const auto tmp128 = tmp125 * tmp46;
    const auto tmp129 = -1 * tmp128;
    const auto tmp130 = tmp129 / tmp44;
    const auto tmp131 = tmp47 * tmp130;
    const auto tmp132 = 2 * tmp130;
    const auto tmp133 = tmp132 * tmp46;
    const auto tmp134 = tmp133 + tmp131;
    const auto tmp135 = -1 * tmp134;
    const auto tmp136 = tmp135 + tmp127;
    const auto tmp137 = tmp136 / tmp44;
    const auto tmp138 = tmp61 * tmp137;
    const auto tmp139 = tmp138 + tmp122;
    const auto tmp140 = tmp139 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp141 = tmp0[ 1 ] + tmp0[ 1 ];
    const auto tmp142 = tmp141 / tmp65;
    const auto tmp143 = 2 * tmp142;
    const auto tmp144 = tmp143 * tmp72;
    const auto tmp145 = -1 * tmp144;
    const auto tmp146 = tmp143 * tmp67;
    const auto tmp147 = -1 * tmp146;
    const auto tmp148 = tmp147 / tmp65;
    const auto tmp149 = tmp68 * tmp148;
    const auto tmp150 = 2 * tmp148;
    const auto tmp151 = tmp150 * tmp67;
    const auto tmp152 = tmp151 + tmp149;
    const auto tmp153 = -1 * tmp152;
    const auto tmp154 = tmp153 + tmp145;
    const auto tmp155 = tmp154 / tmp65;
    const auto tmp156 = tmp82 * tmp155;
    const auto tmp157 = tmp156 + tmp140;
    const auto tmp158 = -1 * tmp157;
    const auto tmp159 = tmp158 * tmp24;
    const auto tmp160 = tmp108 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp161 = tmp61 * tmp124;
    const auto tmp162 = tmp161 + tmp160;
    const auto tmp163 = tmp162 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp164 = tmp82 * tmp142;
    const auto tmp165 = tmp164 + tmp163;
    const auto tmp166 = tmp165 * tmp93;
    const auto tmp167 = tmp166 + tmp159;
    const auto tmp168 = tmp114 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp169 = tmp61 * tmp130;
    const auto tmp170 = tmp169 + tmp168;
    const auto tmp171 = tmp170 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp172 = tmp82 * tmp148;
    const auto tmp173 = tmp172 + tmp171;
    const auto tmp174 = -1 * tmp173;
    const auto tmp175 = tmp99 * tmp174;
    const auto tmp176 = tmp173 * tmp102;
    const auto tmp177 = tmp176 + tmp175;
    const auto tmp178 = tmp177 + tmp167;
    const auto tmp179 = tmp178 * tmp26;
    const auto tmp180 = -1 * tmp115;
    const auto tmp181 = tmp30 * tmp108;
    const auto tmp182 = -1 * tmp181;
    const auto tmp183 = tmp182 / tmp27;
    const auto tmp184 = 2 * tmp183;
    const auto tmp185 = tmp184 * tmp29;
    const auto tmp186 = tmp185 + tmp110;
    const auto tmp187 = -1 * tmp186;
    const auto tmp188 = tmp187 + tmp180;
    const auto tmp189 = tmp188 / tmp27;
    const auto tmp190 = tmp189 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp191 = -1 * tmp131;
    const auto tmp192 = tmp47 * tmp124;
    const auto tmp193 = -1 * tmp192;
    const auto tmp194 = tmp193 / tmp44;
    const auto tmp195 = 2 * tmp194;
    const auto tmp196 = tmp195 * tmp46;
    const auto tmp197 = tmp196 + tmp126;
    const auto tmp198 = -1 * tmp197;
    const auto tmp199 = tmp198 + tmp191;
    const auto tmp200 = tmp199 / tmp44;
    const auto tmp201 = tmp61 * tmp200;
    const auto tmp202 = tmp201 + tmp190;
    const auto tmp203 = tmp202 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp204 = -1 * tmp149;
    const auto tmp205 = tmp68 * tmp142;
    const auto tmp206 = -1 * tmp205;
    const auto tmp207 = tmp206 / tmp65;
    const auto tmp208 = 2 * tmp207;
    const auto tmp209 = tmp208 * tmp67;
    const auto tmp210 = tmp209 + tmp144;
    const auto tmp211 = -1 * tmp210;
    const auto tmp212 = tmp211 + tmp204;
    const auto tmp213 = tmp212 / tmp65;
    const auto tmp214 = tmp82 * tmp213;
    const auto tmp215 = tmp214 + tmp203;
    const auto tmp216 = -1 * tmp215;
    const auto tmp217 = tmp216 * tmp24;
    const auto tmp218 = tmp175 + tmp217;
    const auto tmp219 = tmp183 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp220 = tmp61 * tmp194;
    const auto tmp221 = tmp220 + tmp219;
    const auto tmp222 = tmp221 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp223 = tmp82 * tmp207;
    const auto tmp224 = tmp223 + tmp222;
    const auto tmp225 = tmp224 * tmp102;
    const auto tmp226 = tmp225 + tmp166;
    const auto tmp227 = tmp226 + tmp218;
    const auto tmp228 = tmp227 * tmp26;
    const auto tmp229 = tmp109 * tmp114;
    const auto tmp230 = -1 * tmp229;
    const auto tmp231 = tmp109 * tmp108;
    const auto tmp232 = -1 * tmp231;
    const auto tmp233 = 2 + tmp232;
    const auto tmp234 = tmp233 / tmp27;
    const auto tmp235 = 2 * tmp234;
    const auto tmp236 = tmp235 * tmp29;
    const auto tmp237 = tmp236 + tmp229;
    const auto tmp238 = -1 * tmp237;
    const auto tmp239 = tmp238 + tmp230;
    const auto tmp240 = tmp239 / tmp27;
    const auto tmp241 = tmp240 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp242 = tmp125 * tmp130;
    const auto tmp243 = -1 * tmp242;
    const auto tmp244 = tmp125 * tmp124;
    const auto tmp245 = -1 * tmp244;
    const auto tmp246 = 2 + tmp245;
    const auto tmp247 = tmp246 / tmp44;
    const auto tmp248 = 2 * tmp247;
    const auto tmp249 = tmp248 * tmp46;
    const auto tmp250 = tmp249 + tmp242;
    const auto tmp251 = -1 * tmp250;
    const auto tmp252 = tmp251 + tmp243;
    const auto tmp253 = tmp252 / tmp44;
    const auto tmp254 = tmp61 * tmp253;
    const auto tmp255 = tmp254 + tmp241;
    const auto tmp256 = tmp255 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp257 = tmp143 * tmp148;
    const auto tmp258 = -1 * tmp257;
    const auto tmp259 = tmp143 * tmp142;
    const auto tmp260 = -1 * tmp259;
    const auto tmp261 = 2 + tmp260;
    const auto tmp262 = tmp261 / tmp65;
    const auto tmp263 = 2 * tmp262;
    const auto tmp264 = tmp263 * tmp67;
    const auto tmp265 = tmp264 + tmp257;
    const auto tmp266 = -1 * tmp265;
    const auto tmp267 = tmp266 + tmp258;
    const auto tmp268 = tmp267 / tmp65;
    const auto tmp269 = tmp82 * tmp268;
    const auto tmp270 = tmp269 + tmp256;
    const auto tmp271 = -1 * tmp270;
    const auto tmp272 = tmp271 * tmp24;
    const auto tmp273 = tmp165 * tmp174;
    const auto tmp274 = tmp273 + tmp272;
    const auto tmp275 = tmp234 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp276 = tmp61 * tmp247;
    const auto tmp277 = tmp276 + tmp275;
    const auto tmp278 = tmp277 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp279 = tmp82 * tmp262;
    const auto tmp280 = tmp279 + tmp278;
    const auto tmp281 = tmp280 * tmp102;
    const auto tmp282 = tmp281 + tmp273;
    const auto tmp283 = tmp282 + tmp274;
    const auto tmp284 = tmp283 * tmp26;
    const auto tmp285 = tmp30 * tmp183;
    const auto tmp286 = -1 * tmp285;
    const auto tmp287 = tmp37 * tmp108;
    const auto tmp288 = tmp287 + tmp285;
    const auto tmp289 = -1 * tmp288;
    const auto tmp290 = tmp289 + tmp286;
    const auto tmp291 = tmp290 / tmp27;
    const auto tmp292 = tmp291 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp293 = tmp47 * tmp194;
    const auto tmp294 = -1 * tmp293;
    const auto tmp295 = tmp54 * tmp124;
    const auto tmp296 = tmp295 + tmp293;
    const auto tmp297 = -1 * tmp296;
    const auto tmp298 = tmp297 + tmp294;
    const auto tmp299 = tmp298 / tmp44;
    const auto tmp300 = tmp61 * tmp299;
    const auto tmp301 = tmp300 + tmp292;
    const auto tmp302 = tmp301 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp303 = tmp68 * tmp207;
    const auto tmp304 = -1 * tmp303;
    const auto tmp305 = tmp75 * tmp142;
    const auto tmp306 = tmp305 + tmp303;
    const auto tmp307 = -1 * tmp306;
    const auto tmp308 = tmp307 + tmp304;
    const auto tmp309 = tmp308 / tmp65;
    const auto tmp310 = tmp82 * tmp309;
    const auto tmp311 = tmp310 + tmp302;
    const auto tmp312 = -1 * tmp311;
    const auto tmp313 = tmp312 * tmp24;
    const auto tmp314 = -1 * tmp224;
    const auto tmp315 = tmp99 * tmp314;
    const auto tmp316 = tmp315 + tmp313;
    const auto tmp317 = -1 * tmp165;
    const auto tmp318 = tmp92 * tmp317;
    const auto tmp319 = tmp318 + tmp315;
    const auto tmp320 = tmp319 + tmp316;
    const auto tmp321 = tmp320 * tmp26;
    const auto tmp322 = tmp109 * tmp183;
    const auto tmp323 = -1 * tmp322;
    const auto tmp324 = tmp30 * tmp234;
    const auto tmp325 = tmp116 * tmp108;
    const auto tmp326 = tmp325 + tmp324;
    const auto tmp327 = -1 * tmp326;
    const auto tmp328 = tmp327 + tmp323;
    const auto tmp329 = tmp328 / tmp27;
    const auto tmp330 = tmp329 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp331 = tmp125 * tmp194;
    const auto tmp332 = -1 * tmp331;
    const auto tmp333 = tmp47 * tmp247;
    const auto tmp334 = tmp132 * tmp124;
    const auto tmp335 = tmp334 + tmp333;
    const auto tmp336 = -1 * tmp335;
    const auto tmp337 = tmp336 + tmp332;
    const auto tmp338 = tmp337 / tmp44;
    const auto tmp339 = tmp61 * tmp338;
    const auto tmp340 = tmp339 + tmp330;
    const auto tmp341 = tmp340 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp342 = tmp143 * tmp207;
    const auto tmp343 = -1 * tmp342;
    const auto tmp344 = tmp68 * tmp262;
    const auto tmp345 = tmp150 * tmp142;
    const auto tmp346 = tmp345 + tmp344;
    const auto tmp347 = -1 * tmp346;
    const auto tmp348 = tmp347 + tmp343;
    const auto tmp349 = tmp348 / tmp65;
    const auto tmp350 = tmp82 * tmp349;
    const auto tmp351 = tmp350 + tmp341;
    const auto tmp352 = -1 * tmp351;
    const auto tmp353 = tmp352 * tmp24;
    const auto tmp354 = tmp165 * tmp314;
    const auto tmp355 = tmp354 + tmp353;
    const auto tmp356 = -1 * tmp280;
    const auto tmp357 = tmp99 * tmp356;
    const auto tmp358 = tmp173 * tmp317;
    const auto tmp359 = tmp358 + tmp357;
    const auto tmp360 = tmp359 + tmp355;
    const auto tmp361 = tmp360 * tmp26;
    const auto tmp362 = -1 * tmp324;
    const auto tmp363 = tmp184 * tmp108;
    const auto tmp364 = tmp363 + tmp322;
    const auto tmp365 = -1 * tmp364;
    const auto tmp366 = tmp365 + tmp362;
    const auto tmp367 = tmp366 / tmp27;
    const auto tmp368 = tmp367 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp369 = -1 * tmp333;
    const auto tmp370 = tmp195 * tmp124;
    const auto tmp371 = tmp370 + tmp331;
    const auto tmp372 = -1 * tmp371;
    const auto tmp373 = tmp372 + tmp369;
    const auto tmp374 = tmp373 / tmp44;
    const auto tmp375 = tmp61 * tmp374;
    const auto tmp376 = tmp375 + tmp368;
    const auto tmp377 = tmp376 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp378 = -1 * tmp344;
    const auto tmp379 = tmp208 * tmp142;
    const auto tmp380 = tmp379 + tmp342;
    const auto tmp381 = -1 * tmp380;
    const auto tmp382 = tmp381 + tmp378;
    const auto tmp383 = tmp382 / tmp65;
    const auto tmp384 = tmp82 * tmp383;
    const auto tmp385 = tmp384 + tmp377;
    const auto tmp386 = -1 * tmp385;
    const auto tmp387 = tmp386 * tmp24;
    const auto tmp388 = tmp357 + tmp387;
    const auto tmp389 = tmp224 * tmp317;
    const auto tmp390 = tmp389 + tmp354;
    const auto tmp391 = tmp390 + tmp388;
    const auto tmp392 = tmp391 * tmp26;
    const auto tmp393 = tmp109 * tmp234;
    const auto tmp394 = -1 * tmp393;
    const auto tmp395 = tmp235 * tmp108;
    const auto tmp396 = tmp395 + tmp393;
    const auto tmp397 = -1 * tmp396;
    const auto tmp398 = tmp397 + tmp394;
    const auto tmp399 = tmp398 / tmp27;
    const auto tmp400 = tmp399 * (tmp22 < tmp14 ? 1 : 0.0);
    const auto tmp401 = tmp125 * tmp247;
    const auto tmp402 = -1 * tmp401;
    const auto tmp403 = tmp248 * tmp124;
    const auto tmp404 = tmp403 + tmp401;
    const auto tmp405 = -1 * tmp404;
    const auto tmp406 = tmp405 + tmp402;
    const auto tmp407 = tmp406 / tmp44;
    const auto tmp408 = tmp61 * tmp407;
    const auto tmp409 = tmp408 + tmp400;
    const auto tmp410 = tmp409 * (tmp23 > tmp6 ? 1 : 0.0);
    const auto tmp411 = tmp143 * tmp262;
    const auto tmp412 = -1 * tmp411;
    const auto tmp413 = tmp263 * tmp142;
    const auto tmp414 = tmp413 + tmp411;
    const auto tmp415 = -1 * tmp414;
    const auto tmp416 = tmp415 + tmp412;
    const auto tmp417 = tmp416 / tmp65;
    const auto tmp418 = tmp82 * tmp417;
    const auto tmp419 = tmp418 + tmp410;
    const auto tmp420 = -1 * tmp419;
    const auto tmp421 = tmp420 * tmp24;
    const auto tmp422 = tmp165 * tmp356;
    const auto tmp423 = tmp422 + tmp421;
    const auto tmp424 = tmp280 * tmp317;
    const auto tmp425 = tmp424 + tmp422;
    const auto tmp426 = tmp425 + tmp423;
    const auto tmp427 = tmp426 * tmp26;
    ((result[ 0 ])[ 0 ])[ 0 ] = tmp106;
    ((result[ 0 ])[ 0 ])[ 1 ] = tmp179;
    ((result[ 0 ])[ 1 ])[ 0 ] = tmp228;
    ((result[ 0 ])[ 1 ])[ 1 ] = tmp284;
    ((result[ 1 ])[ 0 ])[ 0 ] = tmp321;
    ((result[ 1 ])[ 0 ])[ 1 ] = tmp361;
    ((result[ 1 ])[ 1 ])[ 0 ] = tmp392;
    ((result[ 1 ])[ 1 ])[ 1 ] = tmp427;
  }

  template< std::size_t i >
  const ConstantType< i > &constant () const
  {
    return *std::get< i >( constants_ );
  }

  template< std::size_t i >
  ConstantType< i > &constant ()
  {
    return *std::get< i >( constants_ );
  }
  ConstantTupleType constants_;
  std::tuple<  > coefficients_;
};

} // namespace UFLLocalFunctions_37174cfc9d6bf565336cac0d2ea785f5

PYBIND11_MODULE( localfunction_37174cfc9d6bf565336cac0d2ea785f5_a524c1196983e65de1c06d7d6afdeb44, module )
{
  typedef UFLLocalFunctions_37174cfc9d6bf565336cac0d2ea785f5::UFLLocalFunction< typename Dune::FemPy::GridPart< Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true > > > LocalFunctionType;
  if constexpr( LocalFunctionType::gridPartValid )
  {
      auto cls = Dune::Python::insertClass<LocalFunctionType>(module,"UFLLocalFunction",Dune::Python::GenerateTypeName("UFLLocalFunctions_37174cfc9d6bf565336cac0d2ea785f5::UFLLocalFunction< typename Dune::FemPy::GridPart< Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true > > >"), Dune::Python::IncludeFiles({"python/dune/generated/localfunction_37174cfc9d6bf565336cac0d2ea785f5_a524c1196983e65de1c06d7d6afdeb44.cc"})).first;
      Dune::FemPy::registerUFLLocalFunction( module, cls );
      cls.def( pybind11::init( [] ( pybind11::object gridView, const std::string &name, int order ) {return new LocalFunctionType( Dune::FemPy::gridPart<Dune::Fem::FilteredGridPart< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > >, Dune::Fem::SimpleFilter< Dune::FemPy::GridPart< Dune::Fem::AdaptiveLeafGridPart< Dune::ALUGrid< 2, 2, Dune::simplex > > > >, true >>(gridView),name,order); } ), pybind11::keep_alive< 1, 2 >() );
      cls.def_property_readonly( "virtualized", [] ( LocalFunctionType& ) -> bool { return true;});
  }
}

#endif
