ddfem 1.0.7__py3-none-any.whl → 1.0.9__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.
- ddfem/__main__.py +43 -7
- ddfem/data/2.11.dev20250709/boundary.modules +9 -0
- ddfem/data/2.11.dev20250709/femscheme_ddd4458a70dff1f9762ec5a96ca4ba9c.cc +43 -0
- ddfem/data/2.11.dev20250709/femspace_90f0a9524a8cb701e8ee5027b7658a0e_0faf32f13b591f4f60f83c591507b9be.cc +40 -0
- ddfem/data/2.11.dev20250709/geometry.modules +84 -0
- ddfem/data/2.11.dev20250709/hierarchicalgrid_966e2a5c8356c5b278ccd3acad180f0a.cc +30 -0
- ddfem/data/{2.11.dev20250326/integrands_c7ee79ef352597693466ebc895f89b17v1_3_a524c1196983e65de1c06d7d6afdeb44.cc → 2.11.dev20250709/integrands_2e5e6f48655bd358419554a0857f697bv1_3_a524c1196983e65de1c06d7d6afdeb44.cc} +8 -8
- ddfem/data/{2.11.dev20250326/integrands_35d2bd9aedbe0c70a7d3804f461aa3a2v1_3_a524c1196983e65de1c06d7d6afdeb44.cc → 2.11.dev20250709/integrands_563572f4cb20b041e8198ba7d5f88584v1_3_a524c1196983e65de1c06d7d6afdeb44.cc} +8 -8
- ddfem/data/{2.11.dev20250326/integrands_8d076606b6431bd52818b74371b326fev1_3_a524c1196983e65de1c06d7d6afdeb44.cc → 2.11.dev20250709/integrands_5e1afa60a15644998389a84306246ea5v1_3_a524c1196983e65de1c06d7d6afdeb44.cc} +8 -8
- ddfem/data/2.11.dev20250709/integrands_ed7208bd651abb351e34c9990e0313bcv1_3_a524c1196983e65de1c06d7d6afdeb44.cc +427 -0
- ddfem/data/{2.11.dev20250326/integrands_6da979bc28230b7c9b9703e3f1014016v1_3_a524c1196983e65de1c06d7d6afdeb44.cc → 2.11.dev20250709/integrands_f3ca00a2ef95c9a48de9ec1b807b1b30v1_3_a524c1196983e65de1c06d7d6afdeb44.cc} +8 -8
- ddfem/data/2.11.dev20250709/intro.modules +109 -0
- ddfem/data/2.11.dev20250709/localfunction_c5ebc4ae4b5d3bad6be770eb08c50d08_19659fe2f2f74bcfb5d532f1a0d38be9.cc +1131 -0
- ddfem/data/2.11.dev20250709/localfunction_e4557ecff74fe5b37313674e67db2782_a524c1196983e65de1c06d7d6afdeb44.cc +135 -0
- ddfem/data/{2.11.dev20250326/localfunction_e85b93fe9b8fcd40ee82782fc600b65b_a524c1196983e65de1c06d7d6afdeb44.cc → 2.11.dev20250709/localfunction_e69118a51208cfab8a028711e966e76c_19659fe2f2f74bcfb5d532f1a0d38be9.cc} +78 -89
- ddfem/data/2.11.dev20250709/localfunction_f4583c5cc10d24a8bdedf7510ce9da7b_a524c1196983e65de1c06d7d6afdeb44.cc +299 -0
- ddfem/data/2.11.dev20250709/localfunction_fc22d5adaf3b9563160dc2aec55e8ba1_19659fe2f2f74bcfb5d532f1a0d38be9.cc +113 -0
- ddfem/data/2.11.dev20250709/transformers.modules +13 -0
- ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/view_a524c1196983e65de1c06d7d6afdeb44.cc +1 -1
- ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/view_af122c1df944c95cd395ec0f91d0f970.cc +1 -1
- ddfem/data/2.11.dev20250709/yaspcoordinates_dim2_ctdouble.cc +55 -0
- ddfem/data/generate.py +5 -4
- ddfem/geometry/__init__.py +2 -0
- ddfem/plot.py +6 -3
- {ddfem-1.0.7.dist-info → ddfem-1.0.9.dist-info}/METADATA +12 -5
- {ddfem-1.0.7.dist-info → ddfem-1.0.9.dist-info}/RECORD +62 -60
- ddfem/data/2.11.dev20250326/localfunction_0cb4ca9e24e2891510640b0737aaab21_a524c1196983e65de1c06d7d6afdeb44.cc +0 -170
- ddfem/data/2.11.dev20250326/localfunction_0f7b2106478c5d2af781b1f377a180d2_a524c1196983e65de1c06d7d6afdeb44.cc +0 -393
- ddfem/data/2.11.dev20250326/localfunction_2021505441469e99dd3c9b164e083239_a524c1196983e65de1c06d7d6afdeb44.cc +0 -620
- ddfem/data/2.11.dev20250326/localfunction_2a97db5a6a479d02138a836cb0890cf2_a524c1196983e65de1c06d7d6afdeb44.cc +0 -173
- ddfem/data/2.11.dev20250326/localfunction_4484607e3f9bd9999dbd7bb9d595a7b2_a524c1196983e65de1c06d7d6afdeb44.cc +0 -173
- ddfem/data/2.11.dev20250326/localfunction_6363af791dde11d699a9a3d876cc5d9a_a524c1196983e65de1c06d7d6afdeb44.cc +0 -549
- ddfem/data/2.11.dev20250326/localfunction_65bda5736a84d4aa0ef2d48ebcc90ed5_a524c1196983e65de1c06d7d6afdeb44.cc +0 -173
- ddfem/data/2.11.dev20250326/localfunction_7d81d496538f240d504e5597484ee746_a524c1196983e65de1c06d7d6afdeb44.cc +0 -462
- ddfem/data/2.11.dev20250326/localfunction_a46a988b5d8571e80fd401a36d7341b7_a524c1196983e65de1c06d7d6afdeb44.cc +0 -170
- ddfem/data/2.11.dev20250326/localfunction_a9bb07439605d560b583608f20441342_a524c1196983e65de1c06d7d6afdeb44.cc +0 -173
- ddfem/data/2.11.dev20250326/localfunction_d0f33c2dc1ae0e619d85a7621c8e83a6_a524c1196983e65de1c06d7d6afdeb44.cc +0 -325
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/adapt_010e1455a389aa01992af42c0a3f4b14.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/femscheme_f2a3cb32a864b08c0236366e732fb908.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/femspace_4ff9049b6f297245e5d33296d14cd684_d5b136dbe3c5077b69c99b8c322eb563.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/hierarchicalgrid_d827e80243feae36e8b9006bb24207e7.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/indexset_e9c0cdc96a4fc702a0969c29910954e6.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/integrands_008eefa148b772fa3192dd3c1728c140v1_3_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/integrands_2339be3c67df1d67b18125c34ced69c2v1_3_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/integrands_3bde0abfafcf45a3cff4d1029568ab5cv1_3_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_00f2e5593eeb23f01906255d67244f6e_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_10ad0a2d88c74db5f4bf5f81e138974f_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_191355e6250b2d2e260d96f519ad9976_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_1d13146d4bff10e178aba773fe2a9f1d_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_1d27a90a52b9053192c9cc902283f79b_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_228c55d163ca194a905826bcc20fcbc0_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_3e323e81c52891c0ecb656eac273e52f_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_42ff56710f3bd510798ecabb32a6cbf0_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_42ff56710f3bd510798ecabb32a6cbf0_af122c1df944c95cd395ec0f91d0f970.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_82d7cb9338bf118426fac2abf41a91a4_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_83d9e6dd70d1c31c973224e210cc36b4_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_86a0670f34bf2ac8155423a1c1bc2e75_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_a854465b265a1a51dacb4f71f7eeb06b_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_a8c726f728cd35d137188b33301aeef1_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_ae8173bdb67b8ea50ce75c3912841100_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_aeb3d963412cdc65630e0a4c3c0dde0f_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_b8239bf849ec7c1903f627833e6dac5a_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_bcafb581216501f273e23c0e26cd57af_af122c1df944c95cd395ec0f91d0f970.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_bdfb7ddf42a423f7d0791458634d4b8f_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_d75993d7ae5919d23117b153e900840d_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_f4b1d42cbb447375f39ed834570cd3f0_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/localfunction_f626cd43dc8558135fe0b32cde016644_a524c1196983e65de1c06d7d6afdeb44.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/referenceelements_0fff57b283123cc055345ec95574c857.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/referenceelements_de274310a0055100b832a0e8892b0258.cc +0 -0
- /ddfem/data/{2.11.dev20250326 → 2.11.dev20250709}/referenceelements_f4457f35395151d83a965d4cf5fce70d.cc +0 -0
- {ddfem-1.0.7.dist-info → ddfem-1.0.9.dist-info}/WHEEL +0 -0
- {ddfem-1.0.7.dist-info → ddfem-1.0.9.dist-info}/licenses/LICENSE +0 -0
- {ddfem-1.0.7.dist-info → ddfem-1.0.9.dist-info}/top_level.txt +0 -0
@@ -1,173 +0,0 @@
|
|
1
|
-
#ifndef GUARD_2a97db5a6a479d02138a836cb0890cf2
|
2
|
-
#define GUARD_2a97db5a6a479d02138a836cb0890cf2
|
3
|
-
|
4
|
-
#define USING_DUNE_PYTHON 1
|
5
|
-
#include <config.h>
|
6
|
-
#include <dune/alugrid/dgf.hh>
|
7
|
-
#include <dune/alugrid/grid.hh>
|
8
|
-
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
9
|
-
#include <dune/fem/gridpart/filter/simple.hh>
|
10
|
-
#include <dune/fem/gridpart/filteredgridpart.hh>
|
11
|
-
#include <dune/fempy/py/gridview.hh>
|
12
|
-
#include <dune/python/grid/gridview.hh>
|
13
|
-
#include <dune/python/grid/hierarchical.hh>
|
14
|
-
#include <dune/fem/function/localfunction/bindable.hh>
|
15
|
-
#include <dune/fem/common/intersectionside.hh>
|
16
|
-
#include <dune/python/pybind11/pybind11.h>
|
17
|
-
#include <dune/python/pybind11/extensions.h>
|
18
|
-
#include <dune/fempy/py/grid/gridpart.hh>
|
19
|
-
#include <dune/common/exceptions.hh>
|
20
|
-
#include <dune/fempy/py/ufllocalfunction.hh>
|
21
|
-
|
22
|
-
namespace UFLLocalFunctions_2a97db5a6a479d02138a836cb0890cf2
|
23
|
-
{
|
24
|
-
|
25
|
-
// UFLLocalFunction
|
26
|
-
// ----------------
|
27
|
-
|
28
|
-
template< class GridPart >
|
29
|
-
struct UFLLocalFunction
|
30
|
-
: public Dune::Fem::BindableGridFunctionWithSpace<GridPart,Dune::Dim<1>>
|
31
|
-
{
|
32
|
-
typedef GridPart GridPartType;
|
33
|
-
typedef typename GridPartType::GridViewType GridView;
|
34
|
-
typedef typename GridView::ctype ctype;
|
35
|
-
typedef Dune::Fem::BindableGridFunctionWithSpace<GridPart,Dune::Dim<1>> BaseType;
|
36
|
-
typedef Dune::Fem::GridFunctionSpace<GridPartType,Dune::Dim<1>> FunctionSpaceType;
|
37
|
-
typedef typename GridPartType::template Codim< 0 >::EntityType EntityType;
|
38
|
-
typedef typename GridPartType::IntersectionType IntersectionType;
|
39
|
-
typedef typename EntityType::Geometry Geometry;
|
40
|
-
typedef typename Geometry::GlobalCoordinate GlobalCoordinateType;
|
41
|
-
typedef Dune::Fem::IntersectionSide Side;
|
42
|
-
typedef std::tuple<> ConstantTupleType;
|
43
|
-
typedef std::tuple<> CoefficientTupleType;
|
44
|
-
static constexpr bool gridPartValid = true;
|
45
|
-
template< std::size_t i >
|
46
|
-
using CoefficientType = std::tuple_element_t< i, CoefficientTupleType >;
|
47
|
-
template< std::size_t i >
|
48
|
-
using ConstantType = typename std::tuple_element_t< i, ConstantTupleType >::element_type;
|
49
|
-
using BaseType::entity;
|
50
|
-
using BaseType::geometry;
|
51
|
-
|
52
|
-
UFLLocalFunction ( const GridPartType &gridPart, const std::string &name, int order, const Dune::Fem::ParameterReader ¶meter = Dune::Fem::Parameter::container() )
|
53
|
-
: BaseType(gridPart,name,order)
|
54
|
-
{}
|
55
|
-
|
56
|
-
void bind ( const IntersectionType &intersection, Side side )
|
57
|
-
{
|
58
|
-
BaseType::bind(intersection, side);
|
59
|
-
}
|
60
|
-
|
61
|
-
void bind ( const EntityType &entity )
|
62
|
-
{
|
63
|
-
BaseType::bind(entity);
|
64
|
-
}
|
65
|
-
|
66
|
-
void unbind ()
|
67
|
-
{
|
68
|
-
BaseType::unbind();
|
69
|
-
}
|
70
|
-
|
71
|
-
template< class Point >
|
72
|
-
void evaluate ( const Point &x, typename FunctionSpaceType::RangeType &result ) const
|
73
|
-
{
|
74
|
-
using std::sqrt;
|
75
|
-
GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
|
76
|
-
const auto tmp1 = 0.8 + tmp0[ 1 ];
|
77
|
-
const auto tmp2 = tmp1 * tmp1;
|
78
|
-
const auto tmp3 = tmp0[ 0 ] * tmp0[ 0 ];
|
79
|
-
const auto tmp4 = tmp3 + tmp2;
|
80
|
-
const auto tmp5 = 1e-10 + tmp4;
|
81
|
-
const auto tmp6 = std::sqrt( tmp5 );
|
82
|
-
const auto tmp7 = -0.5 + tmp6;
|
83
|
-
result[ 0 ] = tmp7;
|
84
|
-
}
|
85
|
-
|
86
|
-
template< class Point >
|
87
|
-
void jacobian ( const Point &x, typename FunctionSpaceType::JacobianRangeType &result ) const
|
88
|
-
{
|
89
|
-
using std::sqrt;
|
90
|
-
GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
|
91
|
-
const auto tmp1 = 0.8 + tmp0[ 1 ];
|
92
|
-
const auto tmp2 = tmp1 * tmp1;
|
93
|
-
const auto tmp3 = tmp0[ 0 ] * tmp0[ 0 ];
|
94
|
-
const auto tmp4 = tmp3 + tmp2;
|
95
|
-
const auto tmp5 = 1e-10 + tmp4;
|
96
|
-
const auto tmp6 = std::sqrt( tmp5 );
|
97
|
-
const auto tmp7 = 2 * tmp6;
|
98
|
-
const auto tmp8 = tmp0[ 0 ] + tmp0[ 0 ];
|
99
|
-
const auto tmp9 = tmp8 / tmp7;
|
100
|
-
const auto tmp10 = tmp1 + tmp1;
|
101
|
-
const auto tmp11 = tmp10 / tmp7;
|
102
|
-
(result[ 0 ])[ 0 ] = tmp9;
|
103
|
-
(result[ 0 ])[ 1 ] = tmp11;
|
104
|
-
}
|
105
|
-
|
106
|
-
template< class Point >
|
107
|
-
void hessian ( const Point &x, typename FunctionSpaceType::HessianRangeType &result ) const
|
108
|
-
{
|
109
|
-
using std::sqrt;
|
110
|
-
GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
|
111
|
-
const auto tmp1 = 0.8 + tmp0[ 1 ];
|
112
|
-
const auto tmp2 = tmp1 * tmp1;
|
113
|
-
const auto tmp3 = tmp0[ 0 ] * tmp0[ 0 ];
|
114
|
-
const auto tmp4 = tmp3 + tmp2;
|
115
|
-
const auto tmp5 = 1e-10 + tmp4;
|
116
|
-
const auto tmp6 = std::sqrt( tmp5 );
|
117
|
-
const auto tmp7 = 2 * tmp6;
|
118
|
-
const auto tmp8 = tmp0[ 0 ] + tmp0[ 0 ];
|
119
|
-
const auto tmp9 = tmp8 / tmp7;
|
120
|
-
const auto tmp10 = 2 * tmp9;
|
121
|
-
const auto tmp11 = tmp10 * tmp9;
|
122
|
-
const auto tmp12 = -1 * tmp11;
|
123
|
-
const auto tmp13 = 2 + tmp12;
|
124
|
-
const auto tmp14 = tmp13 / tmp7;
|
125
|
-
const auto tmp15 = tmp1 + tmp1;
|
126
|
-
const auto tmp16 = tmp15 / tmp7;
|
127
|
-
const auto tmp17 = 2 * tmp16;
|
128
|
-
const auto tmp18 = tmp17 * tmp9;
|
129
|
-
const auto tmp19 = -1 * tmp18;
|
130
|
-
const auto tmp20 = tmp19 / tmp7;
|
131
|
-
const auto tmp21 = tmp10 * tmp16;
|
132
|
-
const auto tmp22 = -1 * tmp21;
|
133
|
-
const auto tmp23 = tmp22 / tmp7;
|
134
|
-
const auto tmp24 = tmp17 * tmp16;
|
135
|
-
const auto tmp25 = -1 * tmp24;
|
136
|
-
const auto tmp26 = 2 + tmp25;
|
137
|
-
const auto tmp27 = tmp26 / tmp7;
|
138
|
-
((result[ 0 ])[ 0 ])[ 0 ] = tmp14;
|
139
|
-
((result[ 0 ])[ 0 ])[ 1 ] = tmp20;
|
140
|
-
((result[ 0 ])[ 1 ])[ 0 ] = tmp23;
|
141
|
-
((result[ 0 ])[ 1 ])[ 1 ] = tmp27;
|
142
|
-
}
|
143
|
-
|
144
|
-
template< std::size_t i >
|
145
|
-
const ConstantType< i > &constant () const
|
146
|
-
{
|
147
|
-
return *std::get< i >( constants_ );
|
148
|
-
}
|
149
|
-
|
150
|
-
template< std::size_t i >
|
151
|
-
ConstantType< i > &constant ()
|
152
|
-
{
|
153
|
-
return *std::get< i >( constants_ );
|
154
|
-
}
|
155
|
-
ConstantTupleType constants_;
|
156
|
-
std::tuple< > coefficients_;
|
157
|
-
};
|
158
|
-
|
159
|
-
} // namespace UFLLocalFunctions_2a97db5a6a479d02138a836cb0890cf2
|
160
|
-
|
161
|
-
PYBIND11_MODULE( localfunction_2a97db5a6a479d02138a836cb0890cf2_a524c1196983e65de1c06d7d6afdeb44, module )
|
162
|
-
{
|
163
|
-
typedef UFLLocalFunctions_2a97db5a6a479d02138a836cb0890cf2::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;
|
164
|
-
if constexpr( LocalFunctionType::gridPartValid )
|
165
|
-
{
|
166
|
-
auto cls = Dune::Python::insertClass<LocalFunctionType>(module,"UFLLocalFunction",Dune::Python::GenerateTypeName("UFLLocalFunctions_2a97db5a6a479d02138a836cb0890cf2::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_2a97db5a6a479d02138a836cb0890cf2_a524c1196983e65de1c06d7d6afdeb44.cc"})).first;
|
167
|
-
Dune::FemPy::registerUFLLocalFunction( module, cls );
|
168
|
-
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 >() );
|
169
|
-
cls.def_property_readonly( "virtualized", [] ( LocalFunctionType& ) -> bool { return true;});
|
170
|
-
}
|
171
|
-
}
|
172
|
-
|
173
|
-
#endif
|
@@ -1,173 +0,0 @@
|
|
1
|
-
#ifndef GUARD_4484607e3f9bd9999dbd7bb9d595a7b2
|
2
|
-
#define GUARD_4484607e3f9bd9999dbd7bb9d595a7b2
|
3
|
-
|
4
|
-
#define USING_DUNE_PYTHON 1
|
5
|
-
#include <config.h>
|
6
|
-
#include <dune/alugrid/dgf.hh>
|
7
|
-
#include <dune/alugrid/grid.hh>
|
8
|
-
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
9
|
-
#include <dune/fem/gridpart/filter/simple.hh>
|
10
|
-
#include <dune/fem/gridpart/filteredgridpart.hh>
|
11
|
-
#include <dune/fempy/py/gridview.hh>
|
12
|
-
#include <dune/python/grid/gridview.hh>
|
13
|
-
#include <dune/python/grid/hierarchical.hh>
|
14
|
-
#include <dune/fem/function/localfunction/bindable.hh>
|
15
|
-
#include <dune/fem/common/intersectionside.hh>
|
16
|
-
#include <dune/python/pybind11/pybind11.h>
|
17
|
-
#include <dune/python/pybind11/extensions.h>
|
18
|
-
#include <dune/fempy/py/grid/gridpart.hh>
|
19
|
-
#include <dune/common/exceptions.hh>
|
20
|
-
#include <dune/fempy/py/ufllocalfunction.hh>
|
21
|
-
|
22
|
-
namespace UFLLocalFunctions_4484607e3f9bd9999dbd7bb9d595a7b2
|
23
|
-
{
|
24
|
-
|
25
|
-
// UFLLocalFunction
|
26
|
-
// ----------------
|
27
|
-
|
28
|
-
template< class GridPart >
|
29
|
-
struct UFLLocalFunction
|
30
|
-
: public Dune::Fem::BindableGridFunctionWithSpace<GridPart,Dune::Dim<1>>
|
31
|
-
{
|
32
|
-
typedef GridPart GridPartType;
|
33
|
-
typedef typename GridPartType::GridViewType GridView;
|
34
|
-
typedef typename GridView::ctype ctype;
|
35
|
-
typedef Dune::Fem::BindableGridFunctionWithSpace<GridPart,Dune::Dim<1>> BaseType;
|
36
|
-
typedef Dune::Fem::GridFunctionSpace<GridPartType,Dune::Dim<1>> FunctionSpaceType;
|
37
|
-
typedef typename GridPartType::template Codim< 0 >::EntityType EntityType;
|
38
|
-
typedef typename GridPartType::IntersectionType IntersectionType;
|
39
|
-
typedef typename EntityType::Geometry Geometry;
|
40
|
-
typedef typename Geometry::GlobalCoordinate GlobalCoordinateType;
|
41
|
-
typedef Dune::Fem::IntersectionSide Side;
|
42
|
-
typedef std::tuple<> ConstantTupleType;
|
43
|
-
typedef std::tuple<> CoefficientTupleType;
|
44
|
-
static constexpr bool gridPartValid = true;
|
45
|
-
template< std::size_t i >
|
46
|
-
using CoefficientType = std::tuple_element_t< i, CoefficientTupleType >;
|
47
|
-
template< std::size_t i >
|
48
|
-
using ConstantType = typename std::tuple_element_t< i, ConstantTupleType >::element_type;
|
49
|
-
using BaseType::entity;
|
50
|
-
using BaseType::geometry;
|
51
|
-
|
52
|
-
UFLLocalFunction ( const GridPartType &gridPart, const std::string &name, int order, const Dune::Fem::ParameterReader ¶meter = Dune::Fem::Parameter::container() )
|
53
|
-
: BaseType(gridPart,name,order)
|
54
|
-
{}
|
55
|
-
|
56
|
-
void bind ( const IntersectionType &intersection, Side side )
|
57
|
-
{
|
58
|
-
BaseType::bind(intersection, side);
|
59
|
-
}
|
60
|
-
|
61
|
-
void bind ( const EntityType &entity )
|
62
|
-
{
|
63
|
-
BaseType::bind(entity);
|
64
|
-
}
|
65
|
-
|
66
|
-
void unbind ()
|
67
|
-
{
|
68
|
-
BaseType::unbind();
|
69
|
-
}
|
70
|
-
|
71
|
-
template< class Point >
|
72
|
-
void evaluate ( const Point &x, typename FunctionSpaceType::RangeType &result ) const
|
73
|
-
{
|
74
|
-
using std::sqrt;
|
75
|
-
GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
|
76
|
-
const auto tmp1 = -0.8 + tmp0[ 1 ];
|
77
|
-
const auto tmp2 = tmp1 * tmp1;
|
78
|
-
const auto tmp3 = tmp0[ 0 ] * tmp0[ 0 ];
|
79
|
-
const auto tmp4 = tmp3 + tmp2;
|
80
|
-
const auto tmp5 = 1e-10 + tmp4;
|
81
|
-
const auto tmp6 = std::sqrt( tmp5 );
|
82
|
-
const auto tmp7 = -0.5 + tmp6;
|
83
|
-
result[ 0 ] = tmp7;
|
84
|
-
}
|
85
|
-
|
86
|
-
template< class Point >
|
87
|
-
void jacobian ( const Point &x, typename FunctionSpaceType::JacobianRangeType &result ) const
|
88
|
-
{
|
89
|
-
using std::sqrt;
|
90
|
-
GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
|
91
|
-
const auto tmp1 = -0.8 + tmp0[ 1 ];
|
92
|
-
const auto tmp2 = tmp1 * tmp1;
|
93
|
-
const auto tmp3 = tmp0[ 0 ] * tmp0[ 0 ];
|
94
|
-
const auto tmp4 = tmp3 + tmp2;
|
95
|
-
const auto tmp5 = 1e-10 + tmp4;
|
96
|
-
const auto tmp6 = std::sqrt( tmp5 );
|
97
|
-
const auto tmp7 = 2 * tmp6;
|
98
|
-
const auto tmp8 = tmp0[ 0 ] + tmp0[ 0 ];
|
99
|
-
const auto tmp9 = tmp8 / tmp7;
|
100
|
-
const auto tmp10 = tmp1 + tmp1;
|
101
|
-
const auto tmp11 = tmp10 / tmp7;
|
102
|
-
(result[ 0 ])[ 0 ] = tmp9;
|
103
|
-
(result[ 0 ])[ 1 ] = tmp11;
|
104
|
-
}
|
105
|
-
|
106
|
-
template< class Point >
|
107
|
-
void hessian ( const Point &x, typename FunctionSpaceType::HessianRangeType &result ) const
|
108
|
-
{
|
109
|
-
using std::sqrt;
|
110
|
-
GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
|
111
|
-
const auto tmp1 = -0.8 + tmp0[ 1 ];
|
112
|
-
const auto tmp2 = tmp1 * tmp1;
|
113
|
-
const auto tmp3 = tmp0[ 0 ] * tmp0[ 0 ];
|
114
|
-
const auto tmp4 = tmp3 + tmp2;
|
115
|
-
const auto tmp5 = 1e-10 + tmp4;
|
116
|
-
const auto tmp6 = std::sqrt( tmp5 );
|
117
|
-
const auto tmp7 = 2 * tmp6;
|
118
|
-
const auto tmp8 = tmp0[ 0 ] + tmp0[ 0 ];
|
119
|
-
const auto tmp9 = tmp8 / tmp7;
|
120
|
-
const auto tmp10 = 2 * tmp9;
|
121
|
-
const auto tmp11 = tmp10 * tmp9;
|
122
|
-
const auto tmp12 = -1 * tmp11;
|
123
|
-
const auto tmp13 = 2 + tmp12;
|
124
|
-
const auto tmp14 = tmp13 / tmp7;
|
125
|
-
const auto tmp15 = tmp1 + tmp1;
|
126
|
-
const auto tmp16 = tmp15 / tmp7;
|
127
|
-
const auto tmp17 = 2 * tmp16;
|
128
|
-
const auto tmp18 = tmp17 * tmp9;
|
129
|
-
const auto tmp19 = -1 * tmp18;
|
130
|
-
const auto tmp20 = tmp19 / tmp7;
|
131
|
-
const auto tmp21 = tmp10 * tmp16;
|
132
|
-
const auto tmp22 = -1 * tmp21;
|
133
|
-
const auto tmp23 = tmp22 / tmp7;
|
134
|
-
const auto tmp24 = tmp17 * tmp16;
|
135
|
-
const auto tmp25 = -1 * tmp24;
|
136
|
-
const auto tmp26 = 2 + tmp25;
|
137
|
-
const auto tmp27 = tmp26 / tmp7;
|
138
|
-
((result[ 0 ])[ 0 ])[ 0 ] = tmp14;
|
139
|
-
((result[ 0 ])[ 0 ])[ 1 ] = tmp20;
|
140
|
-
((result[ 0 ])[ 1 ])[ 0 ] = tmp23;
|
141
|
-
((result[ 0 ])[ 1 ])[ 1 ] = tmp27;
|
142
|
-
}
|
143
|
-
|
144
|
-
template< std::size_t i >
|
145
|
-
const ConstantType< i > &constant () const
|
146
|
-
{
|
147
|
-
return *std::get< i >( constants_ );
|
148
|
-
}
|
149
|
-
|
150
|
-
template< std::size_t i >
|
151
|
-
ConstantType< i > &constant ()
|
152
|
-
{
|
153
|
-
return *std::get< i >( constants_ );
|
154
|
-
}
|
155
|
-
ConstantTupleType constants_;
|
156
|
-
std::tuple< > coefficients_;
|
157
|
-
};
|
158
|
-
|
159
|
-
} // namespace UFLLocalFunctions_4484607e3f9bd9999dbd7bb9d595a7b2
|
160
|
-
|
161
|
-
PYBIND11_MODULE( localfunction_4484607e3f9bd9999dbd7bb9d595a7b2_a524c1196983e65de1c06d7d6afdeb44, module )
|
162
|
-
{
|
163
|
-
typedef UFLLocalFunctions_4484607e3f9bd9999dbd7bb9d595a7b2::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;
|
164
|
-
if constexpr( LocalFunctionType::gridPartValid )
|
165
|
-
{
|
166
|
-
auto cls = Dune::Python::insertClass<LocalFunctionType>(module,"UFLLocalFunction",Dune::Python::GenerateTypeName("UFLLocalFunctions_4484607e3f9bd9999dbd7bb9d595a7b2::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_4484607e3f9bd9999dbd7bb9d595a7b2_a524c1196983e65de1c06d7d6afdeb44.cc"})).first;
|
167
|
-
Dune::FemPy::registerUFLLocalFunction( module, cls );
|
168
|
-
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 >() );
|
169
|
-
cls.def_property_readonly( "virtualized", [] ( LocalFunctionType& ) -> bool { return true;});
|
170
|
-
}
|
171
|
-
}
|
172
|
-
|
173
|
-
#endif
|