ddfem 1.0.9__py3-none-any.whl → 1.0.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. ddfem/__init__.py +1 -1
  2. ddfem/__main__.py +1 -1
  3. ddfem/data/2.11.dev20250709/boundary.modules +1 -1
  4. ddfem/data/2.11.dev20250709/hierarchicalgrid_472c2c2d007bf5604887ab2f16b7eb13.cc +30 -0
  5. ddfem/data/2.11.dev20250709/integrands_00ee9b3b89e4e44212e5b7ad7948a24ev1_3_a524c1196983e65de1c06d7d6afdeb44.cc +587 -0
  6. ddfem/data/2.11.dev20250709/{integrands_5e1afa60a15644998389a84306246ea5v1_3_a524c1196983e65de1c06d7d6afdeb44.cc → integrands_2e6d4e3b5cff269867d26022ac7cee09v1_3_a524c1196983e65de1c06d7d6afdeb44.cc} +8 -8
  7. ddfem/data/2.11.dev20250709/{integrands_2e5e6f48655bd358419554a0857f697bv1_3_a524c1196983e65de1c06d7d6afdeb44.cc → integrands_59ef814e4fbd86ef9c0aeac61e84e9a7v1_3_a524c1196983e65de1c06d7d6afdeb44.cc} +8 -8
  8. ddfem/data/2.11.dev20250709/{integrands_563572f4cb20b041e8198ba7d5f88584v1_3_a524c1196983e65de1c06d7d6afdeb44.cc → integrands_96ea175da69be26acf1a8d94dc0b3c93v1_3_a524c1196983e65de1c06d7d6afdeb44.cc} +8 -8
  9. ddfem/data/2.11.dev20250709/{integrands_2339be3c67df1d67b18125c34ced69c2v1_3_a524c1196983e65de1c06d7d6afdeb44.cc → integrands_bf510277401791ad5e30831b49a8ed7cv1_3_a524c1196983e65de1c06d7d6afdeb44.cc} +25 -14
  10. ddfem/data/2.11.dev20250709/intro.modules +26 -23
  11. ddfem/data/2.11.dev20250709/localfunction_0cb4ca9e24e2891510640b0737aaab21_a524c1196983e65de1c06d7d6afdeb44.cc +170 -0
  12. ddfem/data/2.11.dev20250709/localfunction_0f7b2106478c5d2af781b1f377a180d2_a524c1196983e65de1c06d7d6afdeb44.cc +393 -0
  13. ddfem/data/2.11.dev20250709/localfunction_1460b632dc5919e94a2147108f4f34f4_19659fe2f2f74bcfb5d532f1a0d38be9.cc +468 -0
  14. ddfem/data/2.11.dev20250709/localfunction_161bbe6dde741c6e3f90c2919b8d17a4_19659fe2f2f74bcfb5d532f1a0d38be9.cc +171 -0
  15. ddfem/data/2.11.dev20250709/localfunction_268716e3e3ec528038367ee04d335ea1_19659fe2f2f74bcfb5d532f1a0d38be9.cc +289 -0
  16. ddfem/data/2.11.dev20250709/localfunction_29566243d89228735978e58471af60be_19659fe2f2f74bcfb5d532f1a0d38be9.cc +246 -0
  17. ddfem/data/2.11.dev20250709/localfunction_2a890b2a64788a92607670296c0d37ac_19659fe2f2f74bcfb5d532f1a0d38be9.cc +311 -0
  18. ddfem/data/2.11.dev20250709/localfunction_2a97db5a6a479d02138a836cb0890cf2_a524c1196983e65de1c06d7d6afdeb44.cc +173 -0
  19. ddfem/data/2.11.dev20250709/localfunction_2bbefabe87db948827d02bdb8d69a7d1_19659fe2f2f74bcfb5d532f1a0d38be9.cc +240 -0
  20. ddfem/data/2.11.dev20250709/localfunction_34a46b87fa5c0a5a4f0bc44949f2eda9_19659fe2f2f74bcfb5d532f1a0d38be9.cc +239 -0
  21. ddfem/data/2.11.dev20250709/localfunction_3c10414582133a0fa8e341c4544a97c7_19659fe2f2f74bcfb5d532f1a0d38be9.cc +220 -0
  22. ddfem/data/2.11.dev20250709/localfunction_3dfb73430ddb90a26b6f50f85e52e2a4_19659fe2f2f74bcfb5d532f1a0d38be9.cc +216 -0
  23. ddfem/data/2.11.dev20250709/localfunction_4484607e3f9bd9999dbd7bb9d595a7b2_a524c1196983e65de1c06d7d6afdeb44.cc +173 -0
  24. ddfem/data/2.11.dev20250709/localfunction_465e17370f4344b8997151adacf7aec6_19659fe2f2f74bcfb5d532f1a0d38be9.cc +403 -0
  25. ddfem/data/2.11.dev20250709/localfunction_57e9651c5364ef528f41cf138e126115_19659fe2f2f74bcfb5d532f1a0d38be9.cc +272 -0
  26. ddfem/data/2.11.dev20250709/localfunction_5c2a00bf7ec417475a0a378ed462beeb_19659fe2f2f74bcfb5d532f1a0d38be9.cc +350 -0
  27. ddfem/data/2.11.dev20250709/localfunction_5d71e054c405bc6584738437908af804_19659fe2f2f74bcfb5d532f1a0d38be9.cc +364 -0
  28. ddfem/data/2.11.dev20250709/localfunction_6343878b30d190cc70b631d882009dec_19659fe2f2f74bcfb5d532f1a0d38be9.cc +342 -0
  29. ddfem/data/2.11.dev20250709/localfunction_639a3f3873411f43337e687cb070368f_19659fe2f2f74bcfb5d532f1a0d38be9.cc +230 -0
  30. ddfem/data/2.11.dev20250709/localfunction_65bda5736a84d4aa0ef2d48ebcc90ed5_a524c1196983e65de1c06d7d6afdeb44.cc +173 -0
  31. ddfem/data/2.11.dev20250709/localfunction_6661b21a0e1340a9a9f7b32da595f130_19659fe2f2f74bcfb5d532f1a0d38be9.cc +468 -0
  32. ddfem/data/2.11.dev20250709/localfunction_75e876499fa3b7abc096aa08f88a1c2d_19659fe2f2f74bcfb5d532f1a0d38be9.cc +213 -0
  33. ddfem/data/2.11.dev20250709/localfunction_7d81d496538f240d504e5597484ee746_a524c1196983e65de1c06d7d6afdeb44.cc +462 -0
  34. ddfem/data/2.11.dev20250709/localfunction_8647b4efdf8a37595f73652bc1905df2_19659fe2f2f74bcfb5d532f1a0d38be9.cc +335 -0
  35. ddfem/data/2.11.dev20250709/localfunction_98b04b00bb93b8c6da99c91867e597ca_a524c1196983e65de1c06d7d6afdeb44.cc +639 -0
  36. ddfem/data/2.11.dev20250709/localfunction_98b32c4b5bc0d8083f3d2c394aa33429_19659fe2f2f74bcfb5d532f1a0d38be9.cc +340 -0
  37. ddfem/data/2.11.dev20250709/localfunction_9b741917efb5aa6a09e375272e4ae3aa_19659fe2f2f74bcfb5d532f1a0d38be9.cc +317 -0
  38. ddfem/data/2.11.dev20250709/localfunction_a369aff055312b472a92ee7e257534ff_19659fe2f2f74bcfb5d532f1a0d38be9.cc +392 -0
  39. ddfem/data/2.11.dev20250709/{localfunction_e4557ecff74fe5b37313674e67db2782_a524c1196983e65de1c06d7d6afdeb44.cc → localfunction_a46a988b5d8571e80fd401a36d7341b7_a524c1196983e65de1c06d7d6afdeb44.cc} +64 -29
  40. ddfem/data/2.11.dev20250709/localfunction_a6cc88a79948487ce95a6c3f22487b36_19659fe2f2f74bcfb5d532f1a0d38be9.cc +395 -0
  41. ddfem/data/2.11.dev20250709/localfunction_a9bb07439605d560b583608f20441342_a524c1196983e65de1c06d7d6afdeb44.cc +173 -0
  42. ddfem/data/2.11.dev20250709/localfunction_aa506761997f291dfd2e62b678f010b2_19659fe2f2f74bcfb5d532f1a0d38be9.cc +280 -0
  43. ddfem/data/2.11.dev20250709/localfunction_b5edf0c36f0fc96cc6f5f3677c6557a1_19659fe2f2f74bcfb5d532f1a0d38be9.cc +214 -0
  44. ddfem/data/2.11.dev20250709/{localfunction_c5ebc4ae4b5d3bad6be770eb08c50d08_19659fe2f2f74bcfb5d532f1a0d38be9.cc → localfunction_c3d0902cf8bb4b86b62a2293de2b74e9_19659fe2f2f74bcfb5d532f1a0d38be9.cc} +29 -29
  45. ddfem/data/2.11.dev20250709/localfunction_cf4a29dc25e72137baf2f8fb8b8d3c50_19659fe2f2f74bcfb5d532f1a0d38be9.cc +267 -0
  46. ddfem/data/2.11.dev20250709/localfunction_d0f33c2dc1ae0e619d85a7621c8e83a6_a524c1196983e65de1c06d7d6afdeb44.cc +325 -0
  47. ddfem/data/2.11.dev20250709/localfunction_d40efa41ac661ff77278d2ae4812b06d_19659fe2f2f74bcfb5d532f1a0d38be9.cc +377 -0
  48. ddfem/data/2.11.dev20250709/localfunction_e85b93fe9b8fcd40ee82782fc600b65b_a524c1196983e65de1c06d7d6afdeb44.cc +247 -0
  49. ddfem/data/2.11.dev20250709/localfunction_e9c8d4f4cedd30cab76a588b95bbccab_19659fe2f2f74bcfb5d532f1a0d38be9.cc +325 -0
  50. ddfem/data/2.11.dev20250709/localfunction_f0d3fe89de368f7ea295a1982a807bd8_19659fe2f2f74bcfb5d532f1a0d38be9.cc +281 -0
  51. ddfem/data/2.11.dev20250709/localfunction_fb15e1ad2c62e6660c67949fcf166d81_19659fe2f2f74bcfb5d532f1a0d38be9.cc +339 -0
  52. ddfem/data/2.11.dev20250709/localfunction_fb17410b0b5d479dce9ffc6f9d61ab37_19659fe2f2f74bcfb5d532f1a0d38be9.cc +317 -0
  53. ddfem/data/2.11.dev20250709/referenceelements_fe266b8abf61f4601198949ea6b0dfd3.cc +24 -0
  54. ddfem/data/2.11.dev20250709/yaspcoordinates_dim3_ctdouble.cc +55 -0
  55. ddfem/geometry/primitive_base.py +1 -1
  56. ddfem-1.0.10.dist-info/METADATA +101 -0
  57. {ddfem-1.0.9.dist-info → ddfem-1.0.10.dist-info}/RECORD +60 -18
  58. ddfem/data/2.11.dev20250709/integrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3_a524c1196983e65de1c06d7d6afdeb44.cc +0 -453
  59. ddfem/data/2.11.dev20250709/localfunction_f4583c5cc10d24a8bdedf7510ce9da7b_a524c1196983e65de1c06d7d6afdeb44.cc +0 -299
  60. ddfem-1.0.9.dist-info/METADATA +0 -46
  61. {ddfem-1.0.9.dist-info → ddfem-1.0.10.dist-info}/WHEEL +0 -0
  62. {ddfem-1.0.9.dist-info → ddfem-1.0.10.dist-info}/licenses/LICENSE +0 -0
  63. {ddfem-1.0.9.dist-info → ddfem-1.0.10.dist-info}/top_level.txt +0 -0
@@ -1,453 +0,0 @@
1
- #ifndef GuardIntegrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3
2
- #define GuardIntegrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3
3
- #define USING_DUNE_PYTHON 1
4
- #include <config.h>
5
- #include <dune/alugrid/dgf.hh>
6
- #include <dune/alugrid/grid.hh>
7
- #include <dune/fem/gridpart/adaptiveleafgridpart.hh>
8
- #include <dune/fem/gridpart/filter/simple.hh>
9
- #include <dune/fem/gridpart/filteredgridpart.hh>
10
- #include <dune/fempy/py/gridview.hh>
11
- #include <dune/python/grid/gridview.hh>
12
- #include <dune/python/grid/hierarchical.hh>
13
- #include <cmath>
14
- #include <tuple>
15
- #include <dune/python/pybind11/pybind11.h>
16
- #include <dune/python/pybind11/extensions.h>
17
- #include <dune/fempy/py/grid/gridpart.hh>
18
- #include <dune/fempy/geometry/edgelength.hh>
19
- #include <dune/fempy/function/virtualizedgridfunction.hh>
20
- #include <dune/fempy/function/simplegridfunction.hh>
21
- #include <dune/fem/misc/gridfunctionview.hh>
22
- #include <dune/fempy/py/integrands.hh>
23
-
24
- namespace Integrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3
25
- {
26
-
27
-
28
-
29
-
30
- // Integrands
31
- // ----------
32
-
33
- template< class GridPart, class Coeffbndproj, class Coeffextproj, class Coeffsdfprojfull, class CoeffsdfprojfullA, class Coeffphidomain >
34
- struct Integrands
35
- {
36
- typedef GridPart GridPartType;
37
- typedef typename GridPartType::GridViewType GridView;
38
- typedef typename GridView::ctype ctype;
39
- typedef typename GridPartType::template Codim< 0 >::EntityType EntityType;
40
- typedef typename GridPartType::IntersectionType IntersectionType;
41
- typedef typename EntityType::Geometry Geometry;
42
- typedef typename Geometry::GlobalCoordinate GlobalCoordinateType;
43
- typedef Dune::Fem::IntersectionSide Side;
44
- typedef double Conepsilon;
45
- typedef std::tuple< std::shared_ptr< Conepsilon > > ConstantTupleType;
46
- template< std::size_t i >
47
- using ConstantsRangeType = typename std::tuple_element_t< i, ConstantTupleType >::element_type;
48
- typedef std::tuple< Dune::Fem::GridFunctionSpace< GridPartType, Dune::FieldVector< double, 2 > >, Dune::Fem::GridFunctionSpace< GridPartType, Dune::FieldVector< double, 2 > >, Dune::Fem::GridFunctionSpace< GridPartType, Dune::FieldVector< double, 1 > >, Dune::Fem::GridFunctionSpace< GridPartType, Dune::FieldVector< double, 1 > >, Dune::Fem::GridFunctionSpace< GridPartType, Dune::FieldVector< double, 1 > > > CoefficientFunctionSpaceTupleType;
49
- typedef std::tuple< Coeffbndproj, Coeffextproj, Coeffsdfprojfull, CoeffsdfprojfullA, Coeffphidomain > CoefficientTupleType;
50
- template< std::size_t i >
51
- using CoefficientFunctionSpaceType = std::tuple_element_t< i, CoefficientFunctionSpaceTupleType >;
52
- template< std::size_t i >
53
- using CoefficientRangeType = typename CoefficientFunctionSpaceType< i >::RangeType;
54
- template< std::size_t i >
55
- using CoefficientJacobianRangeType = typename CoefficientFunctionSpaceType< i >::JacobianRangeType;
56
- static constexpr bool gridPartValid = Dune::Fem::checkGridPartValid<GridPartType,Dune::Fem::ConstLocalFunction<Coeffbndproj>>() && Dune::Fem::checkGridPartValid<GridPartType,Dune::Fem::ConstLocalFunction<Coeffextproj>>() && Dune::Fem::checkGridPartValid<GridPartType,Dune::Fem::ConstLocalFunction<Coeffsdfprojfull>>() && Dune::Fem::checkGridPartValid<GridPartType,Dune::Fem::ConstLocalFunction<CoeffsdfprojfullA>>() && Dune::Fem::checkGridPartValid<GridPartType,Dune::Fem::ConstLocalFunction<Coeffphidomain>>();
57
- template< std::size_t i >
58
- using CoefficientType = std::tuple_element_t< i, CoefficientTupleType >;
59
- template< std::size_t i >
60
- using ConstantType = typename std::tuple_element_t< i, ConstantTupleType >::element_type;
61
-
62
- Integrands ( const Coeffbndproj &coeffbndproj, const Coeffextproj &coeffextproj, const Coeffsdfprojfull &coeffsdfprojfull, const CoeffsdfprojfullA &coeffsdfprojfullA, const Coeffphidomain &coeffphidomain, const Dune::Fem::ParameterReader &parameter = Dune::Fem::Parameter::container() )
63
- : coefficients_( Dune::Fem::ConstLocalFunction< Coeffbndproj >( coeffbndproj ), Dune::Fem::ConstLocalFunction< Coeffextproj >( coeffextproj ), Dune::Fem::ConstLocalFunction< Coeffsdfprojfull >( coeffsdfprojfull ), Dune::Fem::ConstLocalFunction< CoeffsdfprojfullA >( coeffsdfprojfullA ), Dune::Fem::ConstLocalFunction< Coeffphidomain >( coeffphidomain ) )
64
- {
65
- std::get< 0 >( constants_ ) = std::make_shared< Conepsilon >( (Conepsilon(0)) );
66
- }
67
-
68
- bool init ( const EntityType &entity )
69
- {
70
- entity_ = entity;
71
- std::get< 0 >( coefficients_ ).bind( this->entity() );
72
- std::get< 1 >( coefficients_ ).bind( this->entity() );
73
- std::get< 2 >( coefficients_ ).bind( this->entity() );
74
- std::get< 3 >( coefficients_ ).bind( this->entity() );
75
- std::get< 4 >( coefficients_ ).bind( this->entity() );
76
- return true;
77
- }
78
-
79
- void unbind ()
80
- {
81
- std::get< 0 >( coefficients_ ).unbind();
82
- std::get< 1 >( coefficients_ ).unbind();
83
- std::get< 2 >( coefficients_ ).unbind();
84
- std::get< 3 >( coefficients_ ).unbind();
85
- std::get< 4 >( coefficients_ ).unbind();
86
- }
87
-
88
- bool init ( const IntersectionType &intersection )
89
- {
90
- intersection_ = intersection;
91
- return (intersection.boundary() && init( intersection.inside() ));
92
- }
93
- typedef std::tuple< Dune::FieldVector< double, 1 >, Dune::FieldMatrix< double, 1, 2 > > DomainValueType;
94
- typedef std::tuple< Dune::FieldVector< double, 1 >, Dune::FieldMatrix< double, 1, 2 > > RangeValueType;
95
- static constexpr bool _nonlinear = false;
96
-
97
- bool nonlinear () const
98
- {
99
- return _nonlinear;
100
- }
101
-
102
- template< class Point >
103
- RangeValueType interior ( const Point &x, const DomainValueType &u ) const
104
- {
105
- using std::pow;
106
- using std::sin;
107
- double tmp0 = constant< 0 >();
108
- const auto tmp1 = std::pow( tmp0, 3 );
109
- typename CoefficientFunctionSpaceType< 3 >::RangeType tmp2 = evaluateCoefficient< 3 >( x );
110
- const auto tmp3 = 1e-10 + tmp2[ 0 ];
111
- typename CoefficientFunctionSpaceType< 0 >::RangeType tmp4 = evaluateCoefficient< 0 >( x );
112
- const auto tmp5 = 3.141592653589793 * tmp4[ 1 ];
113
- const auto tmp6 = std::sin( tmp5 );
114
- const auto tmp7 = 3.141592653589793 * tmp4[ 0 ];
115
- const auto tmp8 = std::sin( tmp7 );
116
- const auto tmp9 = tmp8 * tmp6;
117
- const auto tmp10 = -1 * tmp9;
118
- const auto tmp11 = std::get< 0 >( u );
119
- const auto tmp12 = tmp11[ 0 ] + tmp10;
120
- const auto tmp13 = tmp2[ 0 ] * tmp12;
121
- const auto tmp14 = tmp13 / tmp3;
122
- typename CoefficientFunctionSpaceType< 4 >::RangeType tmp15 = evaluateCoefficient< 4 >( x );
123
- const auto tmp16 = -1 * tmp15[ 0 ];
124
- const auto tmp17 = 1 + tmp16;
125
- const auto tmp18 = tmp17 * tmp14;
126
- const auto tmp19 = tmp18 / tmp1;
127
- const auto tmp20 = -1 * tmp19;
128
- const auto tmp21 = 3 * tmp20;
129
- const auto tmp22 = -1 * tmp21;
130
- const auto tmp23 = 0.1 * tmp20;
131
- const auto tmp24 = 0.01 * tmp11[ 0 ];
132
- const auto tmp25 = -1 * tmp24;
133
- typename CoefficientFunctionSpaceType< 1 >::RangeType tmp26 = evaluateCoefficient< 1 >( x );
134
- const auto tmp27 = tmp26[ 1 ] * tmp26[ 1 ];
135
- const auto tmp28 = tmp26[ 0 ] * tmp26[ 0 ];
136
- const auto tmp29 = tmp28 + tmp27;
137
- const auto tmp30 = -1 * tmp29;
138
- const auto tmp31 = 1 + tmp30;
139
- const auto tmp32 = 0.1 * tmp31;
140
- const auto tmp33 = tmp32 + tmp25;
141
- const auto tmp34 = tmp15[ 0 ] * tmp33;
142
- const auto tmp35 = tmp34 + tmp23;
143
- const auto tmp36 = -1 * tmp35;
144
- const auto tmp37 = tmp36 + tmp22;
145
- const auto tmp38 = 3 * tmp26[ 1 ];
146
- const auto tmp39 = tmp11[ 0 ] * tmp38;
147
- const auto tmp40 = tmp15[ 0 ] * tmp39;
148
- const auto tmp41 = -1 * tmp40;
149
- const auto tmp42 = 0.05 * tmp29;
150
- const auto tmp43 = -1 * tmp42;
151
- const auto tmp44 = 0.1 + tmp43;
152
- const auto tmp45 = std::get< 1 >( u );
153
- const auto tmp46 = (tmp45[ 0 ])[ 0 ] * tmp44;
154
- const auto tmp47 = tmp15[ 0 ] * tmp46;
155
- const auto tmp48 = tmp47 + tmp41;
156
- const auto tmp49 = -1 * tmp26[ 0 ];
157
- const auto tmp50 = 3 * tmp49;
158
- const auto tmp51 = tmp11[ 0 ] * tmp50;
159
- const auto tmp52 = tmp15[ 0 ] * tmp51;
160
- const auto tmp53 = -1 * tmp52;
161
- const auto tmp54 = (tmp45[ 0 ])[ 1 ] * tmp44;
162
- const auto tmp55 = tmp15[ 0 ] * tmp54;
163
- const auto tmp56 = tmp55 + tmp53;
164
- return RangeValueType{ { tmp37 }, { { tmp48, tmp56 } } };
165
- }
166
-
167
- template< class Point >
168
- auto linearizedInterior ( const Point &x, const DomainValueType &u ) const
169
- {
170
- using std::pow;
171
- double tmp0 = constant< 0 >();
172
- const auto tmp1 = std::pow( tmp0, 3 );
173
- typename CoefficientFunctionSpaceType< 3 >::RangeType tmp2 = evaluateCoefficient< 3 >( x );
174
- const auto tmp3 = 1e-10 + tmp2[ 0 ];
175
- const auto tmp4 = tmp2[ 0 ] / tmp3;
176
- typename CoefficientFunctionSpaceType< 4 >::RangeType tmp5 = evaluateCoefficient< 4 >( x );
177
- const auto tmp6 = -1 * tmp5[ 0 ];
178
- const auto tmp7 = 1 + tmp6;
179
- const auto tmp8 = tmp7 * tmp4;
180
- const auto tmp9 = tmp8 / tmp1;
181
- const auto tmp10 = -1 * tmp9;
182
- const auto tmp11 = 3 * tmp10;
183
- const auto tmp12 = -1 * tmp11;
184
- const auto tmp13 = 0.1 * tmp10;
185
- const auto tmp14 = -0.01 * tmp5[ 0 ];
186
- const auto tmp15 = tmp14 + tmp13;
187
- const auto tmp16 = -1 * tmp15;
188
- const auto tmp17 = tmp16 + tmp12;
189
- typename CoefficientFunctionSpaceType< 1 >::RangeType tmp18 = evaluateCoefficient< 1 >( x );
190
- const auto tmp19 = 3 * tmp18[ 1 ];
191
- const auto tmp20 = tmp5[ 0 ] * tmp19;
192
- const auto tmp21 = -1 * tmp20;
193
- const auto tmp22 = -1 * tmp18[ 0 ];
194
- const auto tmp23 = 3 * tmp22;
195
- const auto tmp24 = tmp5[ 0 ] * tmp23;
196
- const auto tmp25 = -1 * tmp24;
197
- const auto tmp26 = tmp18[ 1 ] * tmp18[ 1 ];
198
- const auto tmp27 = tmp18[ 0 ] * tmp18[ 0 ];
199
- const auto tmp28 = tmp27 + tmp26;
200
- const auto tmp29 = 0.05 * tmp28;
201
- const auto tmp30 = -1 * tmp29;
202
- const auto tmp31 = 0.1 + tmp30;
203
- const auto tmp32 = tmp5[ 0 ] * tmp31;
204
- return [ tmp17, tmp21, tmp25, tmp32 ] ( const DomainValueType &phi ) {
205
- return RangeValueType{ { tmp17 * (std::get< 0 >( phi ))[ 0 ] }, { { tmp21 * (std::get< 0 >( phi ))[ 0 ] + tmp32 * ((std::get< 1 >( phi ))[ 0 ])[ 0 ], tmp25 * (std::get< 0 >( phi ))[ 0 ] + tmp32 * ((std::get< 1 >( phi ))[ 0 ])[ 1 ] } } };
206
- };
207
- }
208
- typedef Dune::FieldVector< double, 1 > RRangeType;
209
- typedef Dune::FieldMatrix< double, 1, GridPartType::dimension > RJacobianRangeType;
210
- typedef Dune::Fem::BoundaryIdProvider< typename GridPartType::GridType > BoundaryIdProviderType;
211
- typedef std::array<int,1> DirichletComponentType;
212
-
213
- bool hasDirichletBoundary () const
214
- {
215
- return true;
216
- }
217
-
218
- bool isDirichletIntersection ( const IntersectionType &intersection, DirichletComponentType &dirichletComponent ) const
219
- {
220
- const int bndId = BoundaryIdProviderType::boundaryId( intersection );
221
- {
222
- std::fill( dirichletComponent.begin(), dirichletComponent.end(), bndId );
223
- }
224
- switch( bndId )
225
- {
226
- default:
227
- {
228
- int domainId;
229
- {
230
- using std::max;
231
- using std::min;
232
- using std::sqrt;
233
- auto tmp0 = intersection.geometry().center( );
234
- const auto tmp1 = tmp0[ 1 ] * tmp0[ 1 ];
235
- const auto tmp2 = tmp0[ 0 ] * tmp0[ 0 ];
236
- const auto tmp3 = tmp2 + tmp1;
237
- const auto tmp4 = 1e-10 + tmp3;
238
- const auto tmp5 = std::sqrt( tmp4 );
239
- const auto tmp6 = -1.4 + tmp5;
240
- const auto tmp7 = 1 + tmp0[ 0 ];
241
- const auto tmp8 = tmp7 * tmp7;
242
- const auto tmp9 = tmp1 + tmp8;
243
- const auto tmp10 = 1e-10 + tmp9;
244
- const auto tmp11 = std::sqrt( tmp10 );
245
- const auto tmp12 = -0.5 + tmp11;
246
- const auto tmp13 = -1 + tmp0[ 0 ];
247
- const auto tmp14 = tmp13 * tmp13;
248
- const auto tmp15 = tmp1 + tmp14;
249
- const auto tmp16 = 1e-10 + tmp15;
250
- const auto tmp17 = std::sqrt( tmp16 );
251
- const auto tmp18 = -0.5 + tmp17;
252
- const auto tmp19 = 0.8 + tmp0[ 1 ];
253
- const auto tmp20 = tmp19 * tmp19;
254
- const auto tmp21 = tmp2 + tmp20;
255
- const auto tmp22 = 1e-10 + tmp21;
256
- const auto tmp23 = std::sqrt( tmp22 );
257
- const auto tmp24 = -0.5 + tmp23;
258
- const auto tmp25 = -1 * tmp24;
259
- const auto tmp26 = -0.8 + tmp0[ 1 ];
260
- const auto tmp27 = tmp26 * tmp26;
261
- const auto tmp28 = tmp2 + tmp27;
262
- const auto tmp29 = 1e-10 + tmp28;
263
- const auto tmp30 = std::sqrt( tmp29 );
264
- const auto tmp31 = -0.5 + tmp30;
265
- const auto tmp32 = -1 * tmp31;
266
- const auto tmp33 = -1 + tmp5;
267
- const auto tmp34 = std::max( tmp33, tmp32 );
268
- const auto tmp35 = std::max( tmp34, tmp25 );
269
- const auto tmp36 = std::min( tmp35, tmp18 );
270
- const auto tmp37 = std::min( tmp36, tmp12 );
271
- const auto tmp38 = std::max( tmp37, tmp6 );
272
- domainId = (tmp38 <= 0.0 ? 1 : 0.0) < 0.5;
273
- if (domainId)
274
- {
275
- std::fill( dirichletComponent.begin(), dirichletComponent.end(), 2 );
276
- return true;
277
- }
278
- }
279
- return false;
280
- }
281
- }
282
- }
283
-
284
- template< class Point >
285
- void dirichlet ( int bndId, const Point &x, RRangeType &result ) const
286
- {
287
- switch( bndId )
288
- {
289
- case 2:
290
- {
291
- using std::sin;
292
- typename CoefficientFunctionSpaceType< 2 >::RangeType tmp0 = evaluateCoefficient< 2 >( x );
293
- const auto tmp1 = 1e-10 + tmp0[ 0 ];
294
- typename CoefficientFunctionSpaceType< 0 >::RangeType tmp2 = evaluateCoefficient< 0 >( x );
295
- const auto tmp3 = 3.141592653589793 * tmp2[ 1 ];
296
- const auto tmp4 = std::sin( tmp3 );
297
- const auto tmp5 = 3.141592653589793 * tmp2[ 0 ];
298
- const auto tmp6 = std::sin( tmp5 );
299
- const auto tmp7 = tmp6 * tmp4;
300
- const auto tmp8 = -1 * tmp7;
301
- const auto tmp9 = tmp0[ 0 ] * tmp8;
302
- const auto tmp10 = tmp9 / tmp1;
303
- const auto tmp11 = -1 * tmp10;
304
- result[ 0 ] = tmp11;
305
- }
306
- break;
307
- default:
308
- {
309
- result = RRangeType( 0 );
310
- }
311
- }
312
- }
313
-
314
- template< class Point >
315
- void dDirichlet ( int bndId, const Point &x, RJacobianRangeType &result ) const
316
- {
317
- switch( bndId )
318
- {
319
- case 2:
320
- {
321
- using std::cos;
322
- using std::sin;
323
- typename CoefficientFunctionSpaceType< 2 >::RangeType tmp0 = evaluateCoefficient< 2 >( x );
324
- const auto tmp1 = 1e-10 + tmp0[ 0 ];
325
- typename CoefficientFunctionSpaceType< 0 >::RangeType tmp2 = evaluateCoefficient< 0 >( x );
326
- const auto tmp3 = 3.141592653589793 * tmp2[ 1 ];
327
- const auto tmp4 = std::sin( tmp3 );
328
- const auto tmp5 = 3.141592653589793 * tmp2[ 0 ];
329
- const auto tmp6 = std::sin( tmp5 );
330
- const auto tmp7 = tmp6 * tmp4;
331
- const auto tmp8 = -1 * tmp7;
332
- const auto tmp9 = tmp0[ 0 ] * tmp8;
333
- const auto tmp10 = tmp9 / tmp1;
334
- typename CoefficientFunctionSpaceType< 2 >::JacobianRangeType tmp11 = jacobianCoefficient< 2 >( x );
335
- const auto tmp12 = (tmp11[ 0 ])[ 0 ] * tmp10;
336
- const auto tmp13 = -1 * tmp12;
337
- const auto tmp14 = (tmp11[ 0 ])[ 0 ] * tmp8;
338
- const auto tmp15 = std::cos( tmp5 );
339
- typename CoefficientFunctionSpaceType< 0 >::JacobianRangeType tmp16 = jacobianCoefficient< 0 >( x );
340
- const auto tmp17 = 3.141592653589793 * (tmp16[ 0 ])[ 0 ];
341
- const auto tmp18 = tmp17 * tmp15;
342
- const auto tmp19 = tmp18 * tmp4;
343
- const auto tmp20 = std::cos( tmp3 );
344
- const auto tmp21 = 3.141592653589793 * (tmp16[ 1 ])[ 0 ];
345
- const auto tmp22 = tmp21 * tmp20;
346
- const auto tmp23 = tmp22 * tmp6;
347
- const auto tmp24 = tmp23 + tmp19;
348
- const auto tmp25 = -1 * tmp24;
349
- const auto tmp26 = tmp0[ 0 ] * tmp25;
350
- const auto tmp27 = tmp26 + tmp14;
351
- const auto tmp28 = tmp27 + tmp13;
352
- const auto tmp29 = tmp28 / tmp1;
353
- const auto tmp30 = -1 * tmp29;
354
- const auto tmp31 = (tmp11[ 0 ])[ 1 ] * tmp10;
355
- const auto tmp32 = -1 * tmp31;
356
- const auto tmp33 = (tmp11[ 0 ])[ 1 ] * tmp8;
357
- const auto tmp34 = 3.141592653589793 * (tmp16[ 0 ])[ 1 ];
358
- const auto tmp35 = tmp34 * tmp15;
359
- const auto tmp36 = tmp35 * tmp4;
360
- const auto tmp37 = 3.141592653589793 * (tmp16[ 1 ])[ 1 ];
361
- const auto tmp38 = tmp37 * tmp20;
362
- const auto tmp39 = tmp38 * tmp6;
363
- const auto tmp40 = tmp39 + tmp36;
364
- const auto tmp41 = -1 * tmp40;
365
- const auto tmp42 = tmp0[ 0 ] * tmp41;
366
- const auto tmp43 = tmp42 + tmp33;
367
- const auto tmp44 = tmp43 + tmp32;
368
- const auto tmp45 = tmp44 / tmp1;
369
- const auto tmp46 = -1 * tmp45;
370
- (result[ 0 ])[ 0 ] = tmp30;
371
- (result[ 0 ])[ 1 ] = tmp46;
372
- }
373
- break;
374
- default:
375
- {
376
- result = RJacobianRangeType( 0 );
377
- }
378
- }
379
- }
380
-
381
- template< std::size_t i >
382
- const ConstantType< i > &constant () const
383
- {
384
- return *std::get< i >( constants_ );
385
- }
386
-
387
- template< std::size_t i >
388
- ConstantType< i > &constant ()
389
- {
390
- return *std::get< i >( constants_ );
391
- }
392
-
393
- const Conepsilon &conepsilon () const
394
- {
395
- return *std::get< 0 >( constants_ );
396
- }
397
-
398
- Conepsilon &conepsilon ()
399
- {
400
- return *std::get< 0 >( constants_ );
401
- }
402
-
403
- const EntityType &entity () const
404
- {
405
- return entity_;
406
- }
407
-
408
- template< std::size_t i, class Point >
409
- typename CoefficientFunctionSpaceType< i >::RangeType evaluateCoefficient ( const Point &x ) const
410
- {
411
- typename CoefficientFunctionSpaceType< i >::RangeType result;
412
- std::get< i >( coefficients_ ).evaluate( x, result );;
413
- return result;
414
- }
415
-
416
- template< std::size_t i, class Point >
417
- typename CoefficientFunctionSpaceType< i >::JacobianRangeType jacobianCoefficient ( const Point &x ) const
418
- {
419
- typename CoefficientFunctionSpaceType< i >::JacobianRangeType result;
420
- std::get< i >( coefficients_ ).jacobian( x, result );;
421
- return result;
422
- }
423
-
424
- template< std::size_t i, class Point >
425
- typename CoefficientFunctionSpaceType< i >::HessianRangeType hessianCoefficient ( const Point &x ) const
426
- {
427
- typename CoefficientFunctionSpaceType< i >::HessianRangeType result;
428
- std::get< i >( coefficients_ ).hessian( x, result );;
429
- return result;
430
- }
431
- EntityType entity_;
432
- IntersectionType intersection_;
433
- ConstantTupleType constants_;
434
- std::tuple< Dune::Fem::ConstLocalFunction< Coeffbndproj >, Dune::Fem::ConstLocalFunction< Coeffextproj >, Dune::Fem::ConstLocalFunction< Coeffsdfprojfull >, Dune::Fem::ConstLocalFunction< CoeffsdfprojfullA >, Dune::Fem::ConstLocalFunction< Coeffphidomain > > coefficients_;
435
- };
436
-
437
- } // namespace Integrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3
438
-
439
- PYBIND11_MODULE( integrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3_a524c1196983e65de1c06d7d6afdeb44, module )
440
- {
441
- typedef 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 > > GridPart;
442
- typedef Integrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3::Integrands< GridPart, Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 2 > >, Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 2 > >, Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 1 > >, Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 1 > >, Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 1 > > > Integrands;
443
- if constexpr( Integrands::gridPartValid )
444
- {
445
- auto cls = Dune::Python::insertClass<Integrands>(module,"Integrands",Dune::Python::GenerateTypeName("Integrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3::Integrands< GridPart, Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 2 > >, Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 2 > >, Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 1 > >, Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 1 > >, Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 1 > > >"), Dune::Python::IncludeFiles({"python/dune/generated/integrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3_a524c1196983e65de1c06d7d6afdeb44.cc"})).first;
446
- Dune::FemPy::registerIntegrands< Integrands >( module, cls );
447
- cls.def( pybind11::init( [] ( const Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 2 > > &coeffbndproj, const Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 2 > > &coeffextproj, const Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 1 > > &coeffsdfprojfull, const Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 1 > > &coeffsdfprojfullA, const Dune::FemPy::VirtualizedGridFunction< 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::FieldVector< double, 1 > > &coeffphidomain ) { return new Integrands( coeffbndproj, coeffextproj, coeffsdfprojfull, coeffsdfprojfullA, coeffphidomain ); } ), pybind11::keep_alive< 1, 2 >(), pybind11::keep_alive< 1, 3 >(), pybind11::keep_alive< 1, 4 >(), pybind11::keep_alive< 1, 5 >(), pybind11::keep_alive< 1, 6 >() );
448
- cls.def_property( "epsilon", [] ( Integrands &self ) -> Integrands::Conepsilon { return self.conepsilon(); }, [] ( Integrands &self, const Integrands::Conepsilon &v ) { self.conepsilon() = v; } );
449
- cls.def_property_readonly( "virtualized", [] ( Integrands& ) -> bool { return true;});
450
- cls.def_property_readonly( "hasDirichletBoundary", [] ( Integrands& ) -> bool { return true;});
451
- }
452
- }
453
- #endif // GuardIntegrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3