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
@@ -0,0 +1,135 @@
|
|
1
|
+
#ifndef GUARD_e4557ecff74fe5b37313674e67db2782
|
2
|
+
#define GUARD_e4557ecff74fe5b37313674e67db2782
|
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_e4557ecff74fe5b37313674e67db2782
|
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 double Conc8;
|
43
|
+
typedef std::tuple< std::shared_ptr< Conc8 > > ConstantTupleType;
|
44
|
+
template< std::size_t i >
|
45
|
+
using ConstantsRangeType = typename std::tuple_element_t< i, ConstantTupleType >::element_type;
|
46
|
+
typedef std::tuple<> CoefficientTupleType;
|
47
|
+
static constexpr bool gridPartValid = true;
|
48
|
+
template< std::size_t i >
|
49
|
+
using CoefficientType = std::tuple_element_t< i, CoefficientTupleType >;
|
50
|
+
template< std::size_t i >
|
51
|
+
using ConstantType = typename std::tuple_element_t< i, ConstantTupleType >::element_type;
|
52
|
+
using BaseType::entity;
|
53
|
+
using BaseType::geometry;
|
54
|
+
|
55
|
+
UFLLocalFunction ( const GridPartType &gridPart, const std::string &name, int order, const Dune::Fem::ParameterReader ¶meter = Dune::Fem::Parameter::container() )
|
56
|
+
: BaseType(gridPart,name,order)
|
57
|
+
{
|
58
|
+
std::get< 0 >( constants_ ) = std::make_shared< Conc8 >( (Conc8(0)) );
|
59
|
+
}
|
60
|
+
|
61
|
+
void bind ( const IntersectionType &intersection, Side side )
|
62
|
+
{
|
63
|
+
BaseType::bind(intersection, side);
|
64
|
+
}
|
65
|
+
|
66
|
+
void bind ( const EntityType &entity )
|
67
|
+
{
|
68
|
+
BaseType::bind(entity);
|
69
|
+
}
|
70
|
+
|
71
|
+
void unbind ()
|
72
|
+
{
|
73
|
+
BaseType::unbind();
|
74
|
+
}
|
75
|
+
|
76
|
+
template< class Point >
|
77
|
+
void evaluate ( const Point &x, typename FunctionSpaceType::RangeType &result ) const
|
78
|
+
{
|
79
|
+
double tmp0 = constant< 0 >();
|
80
|
+
result[ 0 ] = tmp0;
|
81
|
+
}
|
82
|
+
|
83
|
+
template< class Point >
|
84
|
+
void jacobian ( const Point &x, typename FunctionSpaceType::JacobianRangeType &result ) const
|
85
|
+
{
|
86
|
+
result=typename FunctionSpaceType::JacobianRangeType(0);
|
87
|
+
}
|
88
|
+
|
89
|
+
template< class Point >
|
90
|
+
void hessian ( const Point &x, typename FunctionSpaceType::HessianRangeType &result ) const
|
91
|
+
{
|
92
|
+
result=typename FunctionSpaceType::HessianRangeType(0);
|
93
|
+
}
|
94
|
+
|
95
|
+
template< std::size_t i >
|
96
|
+
const ConstantType< i > &constant () const
|
97
|
+
{
|
98
|
+
return *std::get< i >( constants_ );
|
99
|
+
}
|
100
|
+
|
101
|
+
template< std::size_t i >
|
102
|
+
ConstantType< i > &constant ()
|
103
|
+
{
|
104
|
+
return *std::get< i >( constants_ );
|
105
|
+
}
|
106
|
+
|
107
|
+
const Conc8 &conc8 () const
|
108
|
+
{
|
109
|
+
return *std::get< 0 >( constants_ );
|
110
|
+
}
|
111
|
+
|
112
|
+
Conc8 &conc8 ()
|
113
|
+
{
|
114
|
+
return *std::get< 0 >( constants_ );
|
115
|
+
}
|
116
|
+
ConstantTupleType constants_;
|
117
|
+
std::tuple< > coefficients_;
|
118
|
+
};
|
119
|
+
|
120
|
+
} // namespace UFLLocalFunctions_e4557ecff74fe5b37313674e67db2782
|
121
|
+
|
122
|
+
PYBIND11_MODULE( localfunction_e4557ecff74fe5b37313674e67db2782_a524c1196983e65de1c06d7d6afdeb44, module )
|
123
|
+
{
|
124
|
+
typedef UFLLocalFunctions_e4557ecff74fe5b37313674e67db2782::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;
|
125
|
+
if constexpr( LocalFunctionType::gridPartValid )
|
126
|
+
{
|
127
|
+
auto cls = Dune::Python::insertClass<LocalFunctionType>(module,"UFLLocalFunction",Dune::Python::GenerateTypeName("UFLLocalFunctions_e4557ecff74fe5b37313674e67db2782::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_e4557ecff74fe5b37313674e67db2782_a524c1196983e65de1c06d7d6afdeb44.cc"})).first;
|
128
|
+
Dune::FemPy::registerUFLLocalFunction( module, cls );
|
129
|
+
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 >() );
|
130
|
+
cls.def_property( "c8", [] ( LocalFunctionType &self ) -> UFLLocalFunctions_e4557ecff74fe5b37313674e67db2782::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 > > >::Conc8 { return self.conc8(); }, [] ( LocalFunctionType &self, const UFLLocalFunctions_e4557ecff74fe5b37313674e67db2782::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 > > >::Conc8 &v ) { self.conc8() = v; } );
|
131
|
+
cls.def_property_readonly( "virtualized", [] ( LocalFunctionType& ) -> bool { return true;});
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
#endif
|
@@ -1,15 +1,10 @@
|
|
1
|
-
#ifndef
|
2
|
-
#define
|
1
|
+
#ifndef GUARD_e69118a51208cfab8a028711e966e76c
|
2
|
+
#define GUARD_e69118a51208cfab8a028711e966e76c
|
3
3
|
|
4
4
|
#define USING_DUNE_PYTHON 1
|
5
5
|
#include <config.h>
|
6
|
-
#include <dune/
|
7
|
-
#include <dune/
|
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>
|
6
|
+
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
7
|
+
#include <dune/grid/yaspgrid.hh>
|
13
8
|
#include <dune/python/grid/hierarchical.hh>
|
14
9
|
#include <dune/fem/function/localfunction/bindable.hh>
|
15
10
|
#include <dune/fem/common/intersectionside.hh>
|
@@ -19,7 +14,7 @@
|
|
19
14
|
#include <dune/common/exceptions.hh>
|
20
15
|
#include <dune/fempy/py/ufllocalfunction.hh>
|
21
16
|
|
22
|
-
namespace
|
17
|
+
namespace UFLLocalFunctions_e69118a51208cfab8a028711e966e76c
|
23
18
|
{
|
24
19
|
|
25
20
|
// UFLLocalFunction
|
@@ -71,23 +66,23 @@ struct UFLLocalFunction
|
|
71
66
|
template< class Point >
|
72
67
|
void evaluate ( const Point &x, typename FunctionSpaceType::RangeType &result ) const
|
73
68
|
{
|
74
|
-
using std::
|
69
|
+
using std::min;
|
75
70
|
using std::sqrt;
|
76
71
|
GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
|
77
|
-
const auto tmp1 =
|
72
|
+
const auto tmp1 = 0.2 + tmp0[ 0 ];
|
78
73
|
const auto tmp2 = tmp1 * tmp1;
|
79
|
-
const auto tmp3 = tmp0[
|
74
|
+
const auto tmp3 = tmp0[ 1 ] * tmp0[ 1 ];
|
80
75
|
const auto tmp4 = tmp3 + tmp2;
|
81
76
|
const auto tmp5 = 1e-10 + tmp4;
|
82
77
|
const auto tmp6 = std::sqrt( tmp5 );
|
83
78
|
const auto tmp7 = -0.5 + tmp6;
|
84
|
-
const auto tmp8 = -
|
85
|
-
const auto tmp9 =
|
79
|
+
const auto tmp8 = -0.2 + tmp0[ 0 ];
|
80
|
+
const auto tmp9 = tmp8 * tmp8;
|
86
81
|
const auto tmp10 = tmp3 + tmp9;
|
87
82
|
const auto tmp11 = 1e-10 + tmp10;
|
88
83
|
const auto tmp12 = std::sqrt( tmp11 );
|
89
|
-
const auto tmp13 = -
|
90
|
-
const auto tmp14 = std::
|
84
|
+
const auto tmp13 = -0.5 + tmp12;
|
85
|
+
const auto tmp14 = std::min( tmp13, tmp7 );
|
91
86
|
result[ 0 ] = tmp14;
|
92
87
|
}
|
93
88
|
|
@@ -96,40 +91,38 @@ struct UFLLocalFunction
|
|
96
91
|
{
|
97
92
|
using std::sqrt;
|
98
93
|
GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
|
99
|
-
const auto tmp1 =
|
94
|
+
const auto tmp1 = 0.2 + tmp0[ 0 ];
|
100
95
|
const auto tmp2 = tmp1 * tmp1;
|
101
|
-
const auto tmp3 = tmp0[
|
96
|
+
const auto tmp3 = tmp0[ 1 ] * tmp0[ 1 ];
|
102
97
|
const auto tmp4 = tmp3 + tmp2;
|
103
98
|
const auto tmp5 = 1e-10 + tmp4;
|
104
99
|
const auto tmp6 = std::sqrt( tmp5 );
|
105
100
|
const auto tmp7 = -0.5 + tmp6;
|
106
|
-
const auto tmp8 = -
|
107
|
-
const auto tmp9 =
|
101
|
+
const auto tmp8 = -0.2 + tmp0[ 0 ];
|
102
|
+
const auto tmp9 = tmp8 * tmp8;
|
108
103
|
const auto tmp10 = tmp3 + tmp9;
|
109
104
|
const auto tmp11 = 1e-10 + tmp10;
|
110
105
|
const auto tmp12 = std::sqrt( tmp11 );
|
111
|
-
const auto tmp13 = -
|
106
|
+
const auto tmp13 = -0.5 + tmp12;
|
112
107
|
const auto tmp14 = 2 * tmp12;
|
113
|
-
const auto tmp15 =
|
108
|
+
const auto tmp15 = tmp8 + tmp8;
|
114
109
|
const auto tmp16 = tmp15 / tmp14;
|
115
|
-
const auto tmp17 = tmp16 * (tmp13
|
110
|
+
const auto tmp17 = tmp16 * (tmp13 < tmp7 ? 1 : 0.0);
|
116
111
|
const auto tmp18 = 2 * tmp6;
|
117
|
-
const auto tmp19 =
|
118
|
-
const auto tmp20 =
|
119
|
-
const auto tmp21 = -1 * (tmp13
|
112
|
+
const auto tmp19 = tmp1 + tmp1;
|
113
|
+
const auto tmp20 = tmp19 / tmp18;
|
114
|
+
const auto tmp21 = -1 * (tmp13 < tmp7 ? 1 : 0.0);
|
120
115
|
const auto tmp22 = 1.0 + tmp21;
|
121
116
|
const auto tmp23 = tmp22 * tmp20;
|
122
117
|
const auto tmp24 = tmp23 + tmp17;
|
123
118
|
const auto tmp25 = tmp0[ 1 ] + tmp0[ 1 ];
|
124
119
|
const auto tmp26 = tmp25 / tmp14;
|
125
|
-
const auto tmp27 = tmp26 * (tmp13
|
126
|
-
const auto tmp28 =
|
127
|
-
const auto tmp29 =
|
128
|
-
const auto tmp30 =
|
129
|
-
const auto tmp31 = tmp22 * tmp30;
|
130
|
-
const auto tmp32 = tmp31 + tmp27;
|
120
|
+
const auto tmp27 = tmp26 * (tmp13 < tmp7 ? 1 : 0.0);
|
121
|
+
const auto tmp28 = tmp25 / tmp18;
|
122
|
+
const auto tmp29 = tmp22 * tmp28;
|
123
|
+
const auto tmp30 = tmp29 + tmp27;
|
131
124
|
(result[ 0 ])[ 0 ] = tmp24;
|
132
|
-
(result[ 0 ])[ 1 ] =
|
125
|
+
(result[ 0 ])[ 1 ] = tmp30;
|
133
126
|
}
|
134
127
|
|
135
128
|
template< class Point >
|
@@ -137,37 +130,37 @@ struct UFLLocalFunction
|
|
137
130
|
{
|
138
131
|
using std::sqrt;
|
139
132
|
GlobalCoordinateType tmp0 = geometry().global( Dune::Fem::coordinate( x ) );
|
140
|
-
const auto tmp1 =
|
133
|
+
const auto tmp1 = 0.2 + tmp0[ 0 ];
|
141
134
|
const auto tmp2 = tmp1 * tmp1;
|
142
|
-
const auto tmp3 = tmp0[
|
135
|
+
const auto tmp3 = tmp0[ 1 ] * tmp0[ 1 ];
|
143
136
|
const auto tmp4 = tmp3 + tmp2;
|
144
137
|
const auto tmp5 = 1e-10 + tmp4;
|
145
138
|
const auto tmp6 = std::sqrt( tmp5 );
|
146
139
|
const auto tmp7 = -0.5 + tmp6;
|
147
|
-
const auto tmp8 = -
|
148
|
-
const auto tmp9 =
|
140
|
+
const auto tmp8 = -0.2 + tmp0[ 0 ];
|
141
|
+
const auto tmp9 = tmp8 * tmp8;
|
149
142
|
const auto tmp10 = tmp3 + tmp9;
|
150
143
|
const auto tmp11 = 1e-10 + tmp10;
|
151
144
|
const auto tmp12 = std::sqrt( tmp11 );
|
152
|
-
const auto tmp13 = -
|
145
|
+
const auto tmp13 = -0.5 + tmp12;
|
153
146
|
const auto tmp14 = 2 * tmp12;
|
154
|
-
const auto tmp15 =
|
147
|
+
const auto tmp15 = tmp8 + tmp8;
|
155
148
|
const auto tmp16 = tmp15 / tmp14;
|
156
149
|
const auto tmp17 = 2 * tmp16;
|
157
150
|
const auto tmp18 = tmp17 * tmp16;
|
158
151
|
const auto tmp19 = -1 * tmp18;
|
159
152
|
const auto tmp20 = 2 + tmp19;
|
160
153
|
const auto tmp21 = tmp20 / tmp14;
|
161
|
-
const auto tmp22 = tmp21 * (tmp13
|
154
|
+
const auto tmp22 = tmp21 * (tmp13 < tmp7 ? 1 : 0.0);
|
162
155
|
const auto tmp23 = 2 * tmp6;
|
163
|
-
const auto tmp24 =
|
164
|
-
const auto tmp25 =
|
165
|
-
const auto tmp26 =
|
166
|
-
const auto tmp27 =
|
167
|
-
const auto tmp28 =
|
168
|
-
const auto tmp29 =
|
169
|
-
const auto tmp30 =
|
170
|
-
const auto tmp31 = -1 * (tmp13
|
156
|
+
const auto tmp24 = tmp1 + tmp1;
|
157
|
+
const auto tmp25 = tmp24 / tmp23;
|
158
|
+
const auto tmp26 = 2 * tmp25;
|
159
|
+
const auto tmp27 = tmp26 * tmp25;
|
160
|
+
const auto tmp28 = -1 * tmp27;
|
161
|
+
const auto tmp29 = 2 + tmp28;
|
162
|
+
const auto tmp30 = tmp29 / tmp23;
|
163
|
+
const auto tmp31 = -1 * (tmp13 < tmp7 ? 1 : 0.0);
|
171
164
|
const auto tmp32 = 1.0 + tmp31;
|
172
165
|
const auto tmp33 = tmp32 * tmp30;
|
173
166
|
const auto tmp34 = tmp33 + tmp22;
|
@@ -177,42 +170,38 @@ struct UFLLocalFunction
|
|
177
170
|
const auto tmp38 = tmp37 * tmp16;
|
178
171
|
const auto tmp39 = -1 * tmp38;
|
179
172
|
const auto tmp40 = tmp39 / tmp14;
|
180
|
-
const auto tmp41 = tmp40 * (tmp13
|
181
|
-
const auto tmp42 =
|
182
|
-
const auto tmp43 =
|
183
|
-
const auto tmp44 =
|
184
|
-
const auto tmp45 =
|
185
|
-
const auto tmp46 =
|
186
|
-
const auto tmp47 =
|
187
|
-
const auto tmp48 =
|
188
|
-
const auto tmp49 =
|
189
|
-
const auto tmp50 =
|
190
|
-
const auto tmp51 =
|
191
|
-
const auto tmp52 =
|
192
|
-
const auto tmp53 =
|
193
|
-
const auto tmp54 =
|
194
|
-
const auto tmp55 =
|
195
|
-
const auto tmp56 =
|
196
|
-
const auto tmp57 = tmp56
|
197
|
-
const auto tmp58 =
|
198
|
-
const auto tmp59 =
|
199
|
-
const auto tmp60 =
|
200
|
-
const auto tmp61 =
|
201
|
-
const auto tmp62 =
|
202
|
-
const auto tmp63 =
|
203
|
-
const auto tmp64 =
|
204
|
-
const auto tmp65 =
|
205
|
-
const auto tmp66 =
|
206
|
-
const auto tmp67 =
|
207
|
-
const auto tmp68 =
|
208
|
-
const auto tmp69 = tmp68 / tmp23;
|
209
|
-
const auto tmp70 = -1 * tmp69;
|
210
|
-
const auto tmp71 = tmp32 * tmp70;
|
211
|
-
const auto tmp72 = tmp71 + tmp65;
|
173
|
+
const auto tmp41 = tmp40 * (tmp13 < tmp7 ? 1 : 0.0);
|
174
|
+
const auto tmp42 = tmp35 / tmp23;
|
175
|
+
const auto tmp43 = 2 * tmp42;
|
176
|
+
const auto tmp44 = tmp43 * tmp25;
|
177
|
+
const auto tmp45 = -1 * tmp44;
|
178
|
+
const auto tmp46 = tmp45 / tmp23;
|
179
|
+
const auto tmp47 = tmp32 * tmp46;
|
180
|
+
const auto tmp48 = tmp47 + tmp41;
|
181
|
+
const auto tmp49 = tmp17 * tmp36;
|
182
|
+
const auto tmp50 = -1 * tmp49;
|
183
|
+
const auto tmp51 = tmp50 / tmp14;
|
184
|
+
const auto tmp52 = tmp51 * (tmp13 < tmp7 ? 1 : 0.0);
|
185
|
+
const auto tmp53 = tmp26 * tmp42;
|
186
|
+
const auto tmp54 = -1 * tmp53;
|
187
|
+
const auto tmp55 = tmp54 / tmp23;
|
188
|
+
const auto tmp56 = tmp32 * tmp55;
|
189
|
+
const auto tmp57 = tmp56 + tmp52;
|
190
|
+
const auto tmp58 = tmp37 * tmp36;
|
191
|
+
const auto tmp59 = -1 * tmp58;
|
192
|
+
const auto tmp60 = 2 + tmp59;
|
193
|
+
const auto tmp61 = tmp60 / tmp14;
|
194
|
+
const auto tmp62 = tmp61 * (tmp13 < tmp7 ? 1 : 0.0);
|
195
|
+
const auto tmp63 = tmp43 * tmp42;
|
196
|
+
const auto tmp64 = -1 * tmp63;
|
197
|
+
const auto tmp65 = 2 + tmp64;
|
198
|
+
const auto tmp66 = tmp65 / tmp23;
|
199
|
+
const auto tmp67 = tmp32 * tmp66;
|
200
|
+
const auto tmp68 = tmp67 + tmp62;
|
212
201
|
((result[ 0 ])[ 0 ])[ 0 ] = tmp34;
|
213
|
-
((result[ 0 ])[ 0 ])[ 1 ] =
|
214
|
-
((result[ 0 ])[ 1 ])[ 0 ] =
|
215
|
-
((result[ 0 ])[ 1 ])[ 1 ] =
|
202
|
+
((result[ 0 ])[ 0 ])[ 1 ] = tmp48;
|
203
|
+
((result[ 0 ])[ 1 ])[ 0 ] = tmp57;
|
204
|
+
((result[ 0 ])[ 1 ])[ 1 ] = tmp68;
|
216
205
|
}
|
217
206
|
|
218
207
|
template< std::size_t i >
|
@@ -230,16 +219,16 @@ struct UFLLocalFunction
|
|
230
219
|
std::tuple< > coefficients_;
|
231
220
|
};
|
232
221
|
|
233
|
-
} // namespace
|
222
|
+
} // namespace UFLLocalFunctions_e69118a51208cfab8a028711e966e76c
|
234
223
|
|
235
|
-
PYBIND11_MODULE(
|
224
|
+
PYBIND11_MODULE( localfunction_e69118a51208cfab8a028711e966e76c_19659fe2f2f74bcfb5d532f1a0d38be9, module )
|
236
225
|
{
|
237
|
-
typedef
|
226
|
+
typedef UFLLocalFunctions_e69118a51208cfab8a028711e966e76c::UFLLocalFunction< typename Dune::FemPy::GridPart< Dune::YaspGrid< 2, Dune::EquidistantOffsetCoordinates< double, 2 > >::LeafGridView > > LocalFunctionType;
|
238
227
|
if constexpr( LocalFunctionType::gridPartValid )
|
239
228
|
{
|
240
|
-
auto cls = Dune::Python::insertClass<LocalFunctionType>(module,"UFLLocalFunction",Dune::Python::GenerateTypeName("
|
229
|
+
auto cls = Dune::Python::insertClass<LocalFunctionType>(module,"UFLLocalFunction",Dune::Python::GenerateTypeName("UFLLocalFunctions_e69118a51208cfab8a028711e966e76c::UFLLocalFunction< typename Dune::FemPy::GridPart< Dune::YaspGrid< 2, Dune::EquidistantOffsetCoordinates< double, 2 > >::LeafGridView > >"), Dune::Python::IncludeFiles({"python/dune/generated/localfunction_e69118a51208cfab8a028711e966e76c_19659fe2f2f74bcfb5d532f1a0d38be9.cc"})).first;
|
241
230
|
Dune::FemPy::registerUFLLocalFunction( module, cls );
|
242
|
-
cls.def( pybind11::init( [] ( pybind11::object gridView, const std::string &name, int order ) {return new LocalFunctionType( Dune::FemPy::gridPart<Dune::
|
231
|
+
cls.def( pybind11::init( [] ( pybind11::object gridView, const std::string &name, int order ) {return new LocalFunctionType( Dune::FemPy::gridPart<Dune::YaspGrid< 2, Dune::EquidistantOffsetCoordinates< double, 2 > >::LeafGridView>(gridView),name,order); } ), pybind11::keep_alive< 1, 2 >() );
|
243
232
|
cls.def_property_readonly( "virtualized", [] ( LocalFunctionType& ) -> bool { return true;});
|
244
233
|
}
|
245
234
|
}
|