ngsolve 6.2.2506.post74.dev0__cp314-cp314-macosx_10_15_universal2.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.
Potentially problematic release.
This version of ngsolve might be problematic. Click here for more details.
- netgen/include/analytic_integrals.hpp +10 -0
- netgen/include/arnoldi.hpp +55 -0
- netgen/include/bandmatrix.hpp +334 -0
- netgen/include/basematrix.hpp +957 -0
- netgen/include/basevector.hpp +1268 -0
- netgen/include/bdbequations.hpp +2805 -0
- netgen/include/bdbintegrator.hpp +1660 -0
- netgen/include/bem_diffops.hpp +475 -0
- netgen/include/bessel.hpp +1064 -0
- netgen/include/bilinearform.hpp +963 -0
- netgen/include/bla.hpp +29 -0
- netgen/include/blockalloc.hpp +95 -0
- netgen/include/blockjacobi.hpp +328 -0
- netgen/include/bspline.hpp +116 -0
- netgen/include/calcinverse.hpp +141 -0
- netgen/include/cg.hpp +368 -0
- netgen/include/chebyshev.hpp +44 -0
- netgen/include/cholesky.hpp +720 -0
- netgen/include/clapack.h +7254 -0
- netgen/include/code_generation.hpp +296 -0
- netgen/include/coefficient.hpp +2033 -0
- netgen/include/coefficient_impl.hpp +19 -0
- netgen/include/coefficient_stdmath.hpp +167 -0
- netgen/include/commutingAMG.hpp +106 -0
- netgen/include/comp.hpp +79 -0
- netgen/include/compatibility.hpp +41 -0
- netgen/include/complex_wrapper.hpp +73 -0
- netgen/include/compressedfespace.hpp +110 -0
- netgen/include/contact.hpp +235 -0
- netgen/include/diagonalmatrix.hpp +154 -0
- netgen/include/differentialoperator.hpp +276 -0
- netgen/include/diffop.hpp +1286 -0
- netgen/include/diffop_impl.hpp +328 -0
- netgen/include/diffopwithfactor.hpp +123 -0
- netgen/include/discontinuous.hpp +84 -0
- netgen/include/dump.hpp +949 -0
- netgen/include/ectypes.hpp +121 -0
- netgen/include/eigen.hpp +60 -0
- netgen/include/eigensystem.hpp +18 -0
- netgen/include/elasticity_equations.hpp +595 -0
- netgen/include/elementbyelement.hpp +195 -0
- netgen/include/elementtopology.hpp +1760 -0
- netgen/include/elementtransformation.hpp +339 -0
- netgen/include/evalfunc.hpp +405 -0
- netgen/include/expr.hpp +1686 -0
- netgen/include/facetfe.hpp +175 -0
- netgen/include/facetfespace.hpp +180 -0
- netgen/include/facethofe.hpp +111 -0
- netgen/include/facetsurffespace.hpp +112 -0
- netgen/include/fe_interfaces.hpp +32 -0
- netgen/include/fem.hpp +87 -0
- netgen/include/fesconvert.hpp +14 -0
- netgen/include/fespace.hpp +1449 -0
- netgen/include/finiteelement.hpp +286 -0
- netgen/include/globalinterfacespace.hpp +77 -0
- netgen/include/globalspace.hpp +115 -0
- netgen/include/gridfunction.hpp +525 -0
- netgen/include/h1amg.hpp +124 -0
- netgen/include/h1hofe.hpp +188 -0
- netgen/include/h1hofe_impl.hpp +1262 -0
- netgen/include/h1hofefo.hpp +148 -0
- netgen/include/h1hofefo_impl.hpp +185 -0
- netgen/include/h1hofespace.hpp +167 -0
- netgen/include/h1lofe.hpp +1240 -0
- netgen/include/h1lumping.hpp +41 -0
- netgen/include/hcurl_equations.hpp +1381 -0
- netgen/include/hcurlcurlfe.hpp +2241 -0
- netgen/include/hcurlcurlfespace.hpp +78 -0
- netgen/include/hcurlfe.hpp +259 -0
- netgen/include/hcurlfe_utils.hpp +107 -0
- netgen/include/hcurlhdiv_dshape.hpp +857 -0
- netgen/include/hcurlhdivfes.hpp +308 -0
- netgen/include/hcurlhofe.hpp +175 -0
- netgen/include/hcurlhofe_impl.hpp +1871 -0
- netgen/include/hcurlhofespace.hpp +193 -0
- netgen/include/hcurllofe.hpp +1146 -0
- netgen/include/hdiv_equations.hpp +880 -0
- netgen/include/hdivdivfe.hpp +2923 -0
- netgen/include/hdivdivsurfacespace.hpp +76 -0
- netgen/include/hdivfe.hpp +206 -0
- netgen/include/hdivfe_utils.hpp +717 -0
- netgen/include/hdivfes.hpp +75 -0
- netgen/include/hdivhofe.hpp +447 -0
- netgen/include/hdivhofe_impl.hpp +1107 -0
- netgen/include/hdivhofefo.hpp +229 -0
- netgen/include/hdivhofespace.hpp +177 -0
- netgen/include/hdivhosurfacefespace.hpp +106 -0
- netgen/include/hdivlofe.hpp +773 -0
- netgen/include/hidden.hpp +74 -0
- netgen/include/householder.hpp +181 -0
- netgen/include/hypre_ams_precond.hpp +123 -0
- netgen/include/hypre_precond.hpp +73 -0
- netgen/include/integrator.hpp +2012 -0
- netgen/include/integratorcf.hpp +253 -0
- netgen/include/interpolate.hpp +49 -0
- netgen/include/intrule.hpp +2542 -0
- netgen/include/intrules_SauterSchwab.hpp +25 -0
- netgen/include/irspace.hpp +49 -0
- netgen/include/jacobi.hpp +153 -0
- netgen/include/kernels.hpp +762 -0
- netgen/include/l2hofe.hpp +194 -0
- netgen/include/l2hofe_impl.hpp +564 -0
- netgen/include/l2hofefo.hpp +542 -0
- netgen/include/l2hofespace.hpp +344 -0
- netgen/include/la.hpp +38 -0
- netgen/include/linearform.hpp +266 -0
- netgen/include/matrix.hpp +2140 -0
- netgen/include/memusage.hpp +41 -0
- netgen/include/meshaccess.hpp +1359 -0
- netgen/include/mgpre.hpp +204 -0
- netgen/include/mp_coefficient.hpp +145 -0
- netgen/include/mptools.hpp +2281 -0
- netgen/include/multigrid.hpp +42 -0
- netgen/include/multivector.hpp +447 -0
- netgen/include/mumpsinverse.hpp +187 -0
- netgen/include/mycomplex.hpp +361 -0
- netgen/include/ng_lapack.hpp +1661 -0
- netgen/include/ngblas.hpp +1232 -0
- netgen/include/ngs_defines.hpp +30 -0
- netgen/include/ngs_stdcpp_include.hpp +106 -0
- netgen/include/ngs_utils.hpp +121 -0
- netgen/include/ngsobject.hpp +1019 -0
- netgen/include/ngsstream.hpp +113 -0
- netgen/include/ngstd.hpp +72 -0
- netgen/include/nodalhofe.hpp +96 -0
- netgen/include/nodalhofe_impl.hpp +141 -0
- netgen/include/normalfacetfe.hpp +223 -0
- netgen/include/normalfacetfespace.hpp +98 -0
- netgen/include/normalfacetsurfacefespace.hpp +84 -0
- netgen/include/order.hpp +251 -0
- netgen/include/parallel_matrices.hpp +222 -0
- netgen/include/paralleldofs.hpp +340 -0
- netgen/include/parallelngs.hpp +23 -0
- netgen/include/parallelvector.hpp +269 -0
- netgen/include/pardisoinverse.hpp +200 -0
- netgen/include/periodic.hpp +129 -0
- netgen/include/plateaufespace.hpp +25 -0
- netgen/include/pml.hpp +275 -0
- netgen/include/pmltrafo.hpp +631 -0
- netgen/include/postproc.hpp +142 -0
- netgen/include/potentialtools.hpp +22 -0
- netgen/include/precomp.hpp +60 -0
- netgen/include/preconditioner.hpp +602 -0
- netgen/include/prolongation.hpp +377 -0
- netgen/include/python_comp.hpp +107 -0
- netgen/include/python_fem.hpp +89 -0
- netgen/include/python_linalg.hpp +58 -0
- netgen/include/python_ngstd.hpp +386 -0
- netgen/include/recursive_pol.hpp +4896 -0
- netgen/include/recursive_pol_tet.hpp +395 -0
- netgen/include/recursive_pol_trig.hpp +492 -0
- netgen/include/reorderedfespace.hpp +81 -0
- netgen/include/sample_sort.hpp +105 -0
- netgen/include/scalarfe.hpp +335 -0
- netgen/include/shapefunction_utils.hpp +113 -0
- netgen/include/simd_complex.hpp +329 -0
- netgen/include/smoother.hpp +253 -0
- netgen/include/solve.hpp +89 -0
- netgen/include/sparsecholesky.hpp +313 -0
- netgen/include/sparsematrix.hpp +1038 -0
- netgen/include/sparsematrix_dyn.hpp +90 -0
- netgen/include/sparsematrix_impl.hpp +1013 -0
- netgen/include/special_matrix.hpp +463 -0
- netgen/include/specialelement.hpp +125 -0
- netgen/include/statushandler.hpp +33 -0
- netgen/include/stringops.hpp +12 -0
- netgen/include/superluinverse.hpp +136 -0
- netgen/include/symbolicintegrator.hpp +850 -0
- netgen/include/symmetricmatrix.hpp +144 -0
- netgen/include/tangentialfacetfe.hpp +224 -0
- netgen/include/tangentialfacetfespace.hpp +91 -0
- netgen/include/tensor.hpp +522 -0
- netgen/include/tensorcoefficient.hpp +446 -0
- netgen/include/tensorproductintegrator.hpp +113 -0
- netgen/include/thcurlfe.hpp +128 -0
- netgen/include/thcurlfe_impl.hpp +380 -0
- netgen/include/thdivfe.hpp +80 -0
- netgen/include/thdivfe_impl.hpp +492 -0
- netgen/include/tpdiffop.hpp +461 -0
- netgen/include/tpfes.hpp +133 -0
- netgen/include/tpintrule.hpp +224 -0
- netgen/include/triangular.hpp +465 -0
- netgen/include/tscalarfe.hpp +245 -0
- netgen/include/tscalarfe_impl.hpp +1029 -0
- netgen/include/umfpackinverse.hpp +148 -0
- netgen/include/vector.hpp +1273 -0
- netgen/include/voxelcoefficientfunction.hpp +41 -0
- netgen/include/vtkoutput.hpp +198 -0
- netgen/include/vvector.hpp +208 -0
- netgen/include/webgui.hpp +92 -0
- netgen/libngbla.dylib +0 -0
- netgen/libngcomp.dylib +0 -0
- netgen/libngfem.dylib +0 -0
- netgen/libngla.dylib +0 -0
- netgen/libngsbem.dylib +0 -0
- netgen/libngsolve.dylib +0 -0
- netgen/libngstd.dylib +0 -0
- ngsolve/TensorProductTools.py +210 -0
- ngsolve/__console.py +94 -0
- ngsolve/__expr.py +181 -0
- ngsolve/__init__.py +148 -0
- ngsolve/__init__.pyi +233 -0
- ngsolve/_scikit_build_core_dependencies.py +30 -0
- ngsolve/bla.pyi +1153 -0
- ngsolve/bvp.py +78 -0
- ngsolve/bvp.pyi +32 -0
- ngsolve/cmake/NGSolveConfig.cmake +102 -0
- ngsolve/cmake/ngsolve-targets-release.cmake +79 -0
- ngsolve/cmake/ngsolve-targets.cmake +163 -0
- ngsolve/comp/__init__.pyi +5449 -0
- ngsolve/comp/pml.pyi +89 -0
- ngsolve/config/__init__.py +1 -0
- ngsolve/config/__init__.pyi +43 -0
- ngsolve/config/__main__.py +4 -0
- ngsolve/config/config.py +60 -0
- ngsolve/config/config.pyi +45 -0
- ngsolve/demos/TensorProduct/__init__.py +0 -0
- ngsolve/demos/TensorProduct/tp_dg_1d_1d.py +80 -0
- ngsolve/demos/TensorProduct/tp_dg_1d_2d.py +73 -0
- ngsolve/demos/TensorProduct/tp_dg_2d_1d.py +72 -0
- ngsolve/demos/TensorProduct/tp_dg_2d_2d.py +66 -0
- ngsolve/demos/__init__.py +0 -0
- ngsolve/demos/howto/__init__.py +0 -0
- ngsolve/demos/howto/hhj.py +44 -0
- ngsolve/demos/howto/hybrid_dg.py +53 -0
- ngsolve/demos/howto/mixed.py +30 -0
- ngsolve/demos/howto/nonlin.py +29 -0
- ngsolve/demos/howto/pickling.py +26 -0
- ngsolve/demos/howto/pml.py +31 -0
- ngsolve/demos/howto/taskmanager.py +20 -0
- ngsolve/demos/howto/tdnns.py +47 -0
- ngsolve/demos/howto/timeDG-skeleton.py +45 -0
- ngsolve/demos/howto/timeDG.py +38 -0
- ngsolve/demos/howto/timeDGlap.py +42 -0
- ngsolve/demos/howto/timeDGwave.py +61 -0
- ngsolve/demos/intro/__init__.py +0 -0
- ngsolve/demos/intro/adaptive.py +123 -0
- ngsolve/demos/intro/cmagnet.py +59 -0
- ngsolve/demos/intro/elasticity.py +76 -0
- ngsolve/demos/intro/navierstokes.py +74 -0
- ngsolve/demos/intro/poisson.ipynb +170 -0
- ngsolve/demos/intro/poisson.py +41 -0
- ngsolve/demos/mpi/__init__.py +0 -0
- ngsolve/demos/mpi/mpi_cmagnet.py +87 -0
- ngsolve/demos/mpi/mpi_navierstokes.py +117 -0
- ngsolve/demos/mpi/mpi_poisson.py +89 -0
- ngsolve/demos/mpi/mpi_timeDG.py +82 -0
- ngsolve/directsolvers.py +26 -0
- ngsolve/directsolvers.pyi +15 -0
- ngsolve/eigenvalues.py +364 -0
- ngsolve/eigenvalues.pyi +30 -0
- ngsolve/fem.pyi +1647 -0
- ngsolve/internal.py +89 -0
- ngsolve/krylovspace.py +1013 -0
- ngsolve/krylovspace.pyi +298 -0
- ngsolve/la.pyi +1230 -0
- ngsolve/meshes.py +748 -0
- ngsolve/ngs2petsc.py +310 -0
- ngsolve/ngscxx.py +42 -0
- ngsolve/ngslib.so +0 -0
- ngsolve/ngstd.pyi +59 -0
- ngsolve/nonlinearsolvers.py +203 -0
- ngsolve/nonlinearsolvers.pyi +95 -0
- ngsolve/preconditioners.py +11 -0
- ngsolve/preconditioners.pyi +7 -0
- ngsolve/solve.pyi +109 -0
- ngsolve/solve_implementation.py +168 -0
- ngsolve/solve_implementation.pyi +42 -0
- ngsolve/solvers.py +7 -0
- ngsolve/solvers.pyi +14 -0
- ngsolve/timestepping.py +185 -0
- ngsolve/timestepping.pyi +28 -0
- ngsolve/timing.py +108 -0
- ngsolve/timing.pyi +54 -0
- ngsolve/utils.py +167 -0
- ngsolve/utils.pyi +273 -0
- ngsolve/webgui.py +670 -0
- ngsolve-6.2.2506.post74.dev0.data/data/Netgen.icns +0 -0
- ngsolve-6.2.2506.post74.dev0.data/data/bin/ngscxx +17 -0
- ngsolve-6.2.2506.post74.dev0.data/data/bin/ngsld +13 -0
- ngsolve-6.2.2506.post74.dev0.data/data/bin/ngsolve.tcl +648 -0
- ngsolve-6.2.2506.post74.dev0.data/data/bin/ngspy +2 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/beam.geo +17 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/beam.vol +240 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/chip.in2d +41 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/chip.vol +614 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/coil.geo +12 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/coil.vol +2560 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/coilshield.geo +24 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/coilshield.vol +3179 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/cube.geo +19 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/cube.vol +1832 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d10_DGdoubleglazing.pde +50 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d11_chip_nitsche.pde +40 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d1_square.pde +43 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d2_chip.pde +35 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d3_helmholtz.pde +22 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d4_cube.pde +46 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d5_beam.pde +74 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d6_shaft.pde +73 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d7_coil.pde +50 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d8_coilshield.pde +49 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/d9_hybridDG.pde +72 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/doubleglazing.in2d +27 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/doubleglazing.vol +737 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/shaft.geo +73 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/shaft.vol +4291 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/square.in2d +17 -0
- ngsolve-6.2.2506.post74.dev0.data/data/share/ngsolve/square.vol +149 -0
- ngsolve-6.2.2506.post74.dev0.dist-info/METADATA +13 -0
- ngsolve-6.2.2506.post74.dev0.dist-info/RECORD +315 -0
- ngsolve-6.2.2506.post74.dev0.dist-info/WHEEL +5 -0
- ngsolve-6.2.2506.post74.dev0.dist-info/licenses/LICENSE +504 -0
- ngsolve-6.2.2506.post74.dev0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
#ifndef FILE_L2HOFE_IMPL
|
|
2
|
+
#define FILE_L2HOFE_IMPL
|
|
3
|
+
|
|
4
|
+
/*********************************************************************/
|
|
5
|
+
/* File: l2hofe.hpp */
|
|
6
|
+
/* Author: Start */
|
|
7
|
+
/* Date: 6. Feb. 2003 */
|
|
8
|
+
/*********************************************************************/
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
#include "l2hofe.hpp"
|
|
12
|
+
|
|
13
|
+
namespace ngfem
|
|
14
|
+
{
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
#ifndef __CUDA_ARCH__
|
|
18
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
19
|
+
typename L2HighOrderFE<ET,SHAPES,BASE>::TPRECOMP L2HighOrderFE<ET,SHAPES,BASE>::precomp;
|
|
20
|
+
|
|
21
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
22
|
+
typename L2HighOrderFE<ET,SHAPES,BASE>::TPRECOMP_TRACE L2HighOrderFE<ET,SHAPES,BASE>::precomp_trace(320);
|
|
23
|
+
|
|
24
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
25
|
+
typename L2HighOrderFE<ET,SHAPES,BASE>::TPRECOMP_GRAD L2HighOrderFE<ET,SHAPES,BASE>::precomp_grad(40);
|
|
26
|
+
#endif
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
33
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
34
|
+
PrecomputeTrace ()
|
|
35
|
+
{
|
|
36
|
+
#ifndef __CUDA_ARCH__
|
|
37
|
+
for (int f = 0; f < ElementTopology::GetNFacets(ET); f++)
|
|
38
|
+
{
|
|
39
|
+
int classnr = ET_trait<ET>::GetFacetClassNr (f, vnums);
|
|
40
|
+
if (precomp_trace.Used (IVec<2> (order, classnr)))
|
|
41
|
+
continue;
|
|
42
|
+
|
|
43
|
+
ELEMENT_TYPE etfacet = ElementTopology::GetFacetType (ET, f);
|
|
44
|
+
int nf;
|
|
45
|
+
switch (etfacet)
|
|
46
|
+
{
|
|
47
|
+
case ET_POINT: nf = 1; break;
|
|
48
|
+
case ET_SEGM: nf = order+1; break;
|
|
49
|
+
case ET_TRIG: nf = (order+1)*(order+2)/2; break;
|
|
50
|
+
case ET_QUAD: nf = sqr(order+1); break;
|
|
51
|
+
default: nf = 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
Matrix<> * trace = new Matrix<>(nf, ndof);
|
|
55
|
+
DGFiniteElement<ET>::CalcTraceMatrix (f, *trace);
|
|
56
|
+
precomp_trace.Set (IVec<2> (order, classnr), trace);
|
|
57
|
+
}
|
|
58
|
+
#endif
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
63
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
64
|
+
PrecomputeGrad ()
|
|
65
|
+
{
|
|
66
|
+
#ifndef __CUDA_ARCH__
|
|
67
|
+
int classnr = ET_trait<ET>::GetClassNr (vnums);
|
|
68
|
+
|
|
69
|
+
if (precomp_grad.Used (IVec<2> (order, classnr)))
|
|
70
|
+
return;
|
|
71
|
+
|
|
72
|
+
Matrix<> * gmat = new Matrix<>(ndof*DIM, ndof);
|
|
73
|
+
DGFiniteElement<ET>::CalcGradientMatrix (*gmat);
|
|
74
|
+
precomp_grad.Set (IVec<2> (order, classnr), gmat);
|
|
75
|
+
#endif
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
81
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
82
|
+
PrecomputeShapes (const IntegrationRule & ir)
|
|
83
|
+
{
|
|
84
|
+
#ifndef __CUDA_ARCH__
|
|
85
|
+
int classnr = ET_trait<ET>::GetClassNr (vnums);
|
|
86
|
+
|
|
87
|
+
if (precomp.Get (classnr, order, ir.GetNIP())) return;
|
|
88
|
+
|
|
89
|
+
PrecomputedScalShapes<DIM> * pre = new PrecomputedScalShapes<DIM> (ir.GetNIP(), ndof);
|
|
90
|
+
|
|
91
|
+
MatrixFixWidth<DIM> dshapes(ndof);
|
|
92
|
+
for (int i = 0; i < ir.GetNIP(); i++)
|
|
93
|
+
{
|
|
94
|
+
this->CalcShape (ir[i], pre->shapes.Row(i));
|
|
95
|
+
this->CalcDShape (ir[i], dshapes);
|
|
96
|
+
pre->dshapes.Rows (DIM*i, DIM*(i+1)) = Trans (dshapes);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
precomp.Add (classnr, order, ir.GetNIP(), pre);
|
|
100
|
+
#endif
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
106
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
107
|
+
Evaluate (const IntegrationRule & ir, BareSliceVector<double> coefs, FlatVector<double> vals) const
|
|
108
|
+
{
|
|
109
|
+
#ifndef __CUDA_ARCH__
|
|
110
|
+
int classnr = ET_trait<ET>::GetClassNr (vnums);
|
|
111
|
+
PrecomputedScalShapes<DIM> * pre = precomp.Get (classnr, order, ir.GetNIP());
|
|
112
|
+
if (pre)
|
|
113
|
+
vals = pre->shapes * coefs;
|
|
114
|
+
else
|
|
115
|
+
#endif
|
|
116
|
+
BASE :: Evaluate (ir, coefs, vals);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
120
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
121
|
+
EvaluateTrans (const IntegrationRule & ir, BareSliceVector<> values, BareSliceVector<> coefs) const
|
|
122
|
+
{
|
|
123
|
+
#ifndef __CUDA_ARCH__
|
|
124
|
+
int classnr = ET_trait<ET>::GetClassNr (vnums);
|
|
125
|
+
PrecomputedScalShapes<DIM> * pre = precomp.Get (classnr, order, ir.GetNIP());
|
|
126
|
+
|
|
127
|
+
if (pre)
|
|
128
|
+
coefs.Range(0,ndof) = Trans(pre->shapes)*values;
|
|
129
|
+
else
|
|
130
|
+
#endif
|
|
131
|
+
BASE :: EvaluateTrans (ir, values, coefs);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
135
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
136
|
+
EvaluateGrad (const IntegrationRule & ir, BareSliceVector<> coefs, FlatMatrixFixWidth<DIM> values) const
|
|
137
|
+
{
|
|
138
|
+
#ifndef __CUDA_ARCH__
|
|
139
|
+
int classnr = ET_trait<ET>::GetClassNr (vnums);
|
|
140
|
+
|
|
141
|
+
PrecomputedScalShapes<DIM> * pre = precomp.Get (classnr, order, ir.GetNIP());
|
|
142
|
+
if (pre)
|
|
143
|
+
{
|
|
144
|
+
FlatVector<> vval(DIM*values.Height(), &values(0,0));
|
|
145
|
+
vval = pre->dshapes * coefs;
|
|
146
|
+
}
|
|
147
|
+
else
|
|
148
|
+
#endif
|
|
149
|
+
BASE :: EvaluateGrad (ir, coefs, values);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
153
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
154
|
+
EvaluateGradTrans (const IntegrationRule & ir, BareSliceMatrix<> values, BareSliceVector<> coefs) const
|
|
155
|
+
{
|
|
156
|
+
#ifndef __CUDA_ARCH__
|
|
157
|
+
int classnr = ET_trait<ET>::GetClassNr (vnums);
|
|
158
|
+
|
|
159
|
+
PrecomputedScalShapes<DIM> * pre = precomp.Get (classnr, order, ir.GetNIP());
|
|
160
|
+
if (pre)
|
|
161
|
+
coefs.Range(0,ndof) = Trans (pre->dshapes) * FlatVector<> (DIM*ndof, &values(0,0)); // values.Height !!!
|
|
162
|
+
else
|
|
163
|
+
#endif
|
|
164
|
+
BASE :: EvaluateGradTrans (ir, values, coefs);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
169
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
170
|
+
GetGradient (FlatVector<> coefs, FlatMatrixFixWidth<DIM> grad) const
|
|
171
|
+
{
|
|
172
|
+
#ifndef __CUDA_ARCH__
|
|
173
|
+
int classnr = ET_trait<ET>::GetClassNr (vnums);
|
|
174
|
+
int bnr, pos;
|
|
175
|
+
if (precomp_grad.Used (IVec<2> (order, classnr), bnr, pos))
|
|
176
|
+
{
|
|
177
|
+
FlatMatrix<> gmat = *precomp_grad.Get (bnr, pos);
|
|
178
|
+
FlatVector<> vgrad(grad.Height()*DIM, &grad(0,0));
|
|
179
|
+
// vgrad = gmat * coefs;
|
|
180
|
+
MultMatVec (gmat, coefs, vgrad);
|
|
181
|
+
}
|
|
182
|
+
else
|
|
183
|
+
#endif
|
|
184
|
+
DGFiniteElement<ET>::GetGradient (coefs, grad);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
188
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
189
|
+
GetGradientTrans (FlatMatrixFixWidth<DIM> grad, FlatVector<> coefs) const
|
|
190
|
+
{
|
|
191
|
+
#ifndef __CUDA_ARCH__
|
|
192
|
+
int classnr = ET_trait<ET>::GetClassNr (vnums);
|
|
193
|
+
int bnr, pos;
|
|
194
|
+
if (precomp_grad.Used (IVec<2> (order, classnr), bnr, pos))
|
|
195
|
+
{
|
|
196
|
+
FlatMatrix<> gmat = *precomp_grad.Get (bnr, pos);
|
|
197
|
+
FlatVector<> vgrad(grad.Height()*DIM, &grad(0,0));
|
|
198
|
+
// coefs = Trans(gmat) * vgrad;
|
|
199
|
+
MultMatTransVec (gmat, vgrad, coefs);
|
|
200
|
+
}
|
|
201
|
+
else
|
|
202
|
+
#endif
|
|
203
|
+
DGFiniteElement<ET>::GetGradientTrans (grad, coefs);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
215
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
216
|
+
GetTrace (int facet, FlatVector<> coefs, FlatVector<> fcoefs) const
|
|
217
|
+
{
|
|
218
|
+
#ifndef __CUDA_ARCH__
|
|
219
|
+
int classnr = ET_trait<ET>::GetFacetClassNr (facet, vnums);
|
|
220
|
+
int bnr, pos;
|
|
221
|
+
if (precomp_trace.Used (IVec<2> (order, classnr), bnr, pos))
|
|
222
|
+
{
|
|
223
|
+
FlatMatrix<> trace = *precomp_trace.Get (bnr, pos);
|
|
224
|
+
// fcoefs = trace * coefs;
|
|
225
|
+
MultMatVec (trace, coefs, fcoefs);
|
|
226
|
+
}
|
|
227
|
+
else
|
|
228
|
+
#endif
|
|
229
|
+
DGFiniteElement<ET>::GetTrace (facet, coefs, fcoefs);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
233
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
234
|
+
GetTraceTrans (int facet, FlatVector<> fcoefs, FlatVector<> coefs) const
|
|
235
|
+
{
|
|
236
|
+
#ifndef __CUDA_ARCH__
|
|
237
|
+
int classnr = ET_trait<ET>::GetFacetClassNr (facet, vnums);
|
|
238
|
+
if (precomp_trace.Used (IVec<2> (order, classnr)))
|
|
239
|
+
{
|
|
240
|
+
FlatMatrix<> trace = *precomp_trace.Get (IVec<2> (order, classnr));
|
|
241
|
+
// coefs = Trans(*precomp_trace.Get (IVec<2> (order, classnr))) * fcoefs;
|
|
242
|
+
MultMatTransVec (trace, fcoefs, coefs);
|
|
243
|
+
}
|
|
244
|
+
else
|
|
245
|
+
#endif
|
|
246
|
+
DGFiniteElement<ET>::GetTraceTrans (facet, fcoefs, coefs);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
template <ELEMENT_TYPE ET, class SHAPES, class BASE>
|
|
251
|
+
void L2HighOrderFE<ET,SHAPES,BASE> ::
|
|
252
|
+
GetDiagMassMatrix (FlatVector<> mass) const
|
|
253
|
+
{
|
|
254
|
+
switch (ET)
|
|
255
|
+
{
|
|
256
|
+
case ET_POINT:
|
|
257
|
+
mass(0) = 1;
|
|
258
|
+
break;
|
|
259
|
+
|
|
260
|
+
case ET_SEGM:
|
|
261
|
+
for (int ix = 0; ix <= order; ix++)
|
|
262
|
+
mass(ix) = 1.0 / (2 * ix + 1);
|
|
263
|
+
break;
|
|
264
|
+
|
|
265
|
+
case ET_TRIG:
|
|
266
|
+
for (int ix = 0, ii = 0; ix <= order; ix++)
|
|
267
|
+
for (int iy = 0; iy <= order - ix; iy++, ii++)
|
|
268
|
+
mass(ii) = 1.0 / ((2 * ix + 1) * (2 * ix + 2 * iy + 2));
|
|
269
|
+
break;
|
|
270
|
+
|
|
271
|
+
case ET_QUAD:
|
|
272
|
+
for (int ix = 0, ii = 0; ix <= order; ix++)
|
|
273
|
+
for (int iy = 0; iy <= order; iy++, ii++)
|
|
274
|
+
mass(ii) = 1.0 / ((2 * ix + 1) * (2 * iy + 1));
|
|
275
|
+
break;
|
|
276
|
+
|
|
277
|
+
case ET_TET:
|
|
278
|
+
for (int ix = 0, ii = 0; ix <= order; ix++)
|
|
279
|
+
for (int iy = 0; iy <= order - ix; iy++)
|
|
280
|
+
for (int iz = 0; iz <= order - ix-iy; iz++, ii++)
|
|
281
|
+
mass(ii) = 1.0 / ((2 * ix + 1) * (2 * ix + 2 * iy + 2) * (2 * ix + 2 * iy + 2 * iz + 3));
|
|
282
|
+
break;
|
|
283
|
+
|
|
284
|
+
case ET_HEX:
|
|
285
|
+
for (int ix = 0, ii = 0; ix <= order; ix++)
|
|
286
|
+
for (int iy = 0; iy <= order; iy++)
|
|
287
|
+
for (int iz = 0; iz <= order; iz++, ii++)
|
|
288
|
+
mass(ii) = 1.0 / ((2 * ix + 1) * (2 * iy + 1) * (2 * iz + 1));
|
|
289
|
+
break;
|
|
290
|
+
|
|
291
|
+
default:
|
|
292
|
+
DGFiniteElement<ET>::GetDiagMassMatrix (mass);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
template <ELEMENT_TYPE ET>
|
|
308
|
+
class L2HighOrderFE_Shape : public L2HighOrderFE<ET>
|
|
309
|
+
{
|
|
310
|
+
using L2HighOrderFE<ET>::vnums;
|
|
311
|
+
using L2HighOrderFE<ET>::order;
|
|
312
|
+
using L2HighOrderFE<ET>::order_inner;
|
|
313
|
+
using L2HighOrderFE<ET>::GetFaceSort;
|
|
314
|
+
using L2HighOrderFE<ET>::GetEdgeSort;
|
|
315
|
+
using L2HighOrderFE<ET>::DIM;
|
|
316
|
+
public:
|
|
317
|
+
template<typename Tx, typename TFA>
|
|
318
|
+
INLINE void T_CalcShape (TIP<DIM,Tx> ip, TFA & shape) const;
|
|
319
|
+
|
|
320
|
+
template<typename Tx, typename TFA>
|
|
321
|
+
INLINE void T_CalcDualShape (TIP<DIM,Tx> ip, TFA & shape) const
|
|
322
|
+
{
|
|
323
|
+
if (ip.vb == VOL)
|
|
324
|
+
T_CalcShape (ip, shape);
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
/* *********************** Point **********************/
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
template<> template<typename Tx, typename TFA>
|
|
335
|
+
void L2HighOrderFE_Shape<ET_POINT> ::
|
|
336
|
+
T_CalcShape (TIP<0,Tx> ip, TFA & shape) const
|
|
337
|
+
{
|
|
338
|
+
shape[0] = Tx(1.0);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
/* *********************** Segment **********************/
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
template<> template<typename Tx, typename TFA>
|
|
347
|
+
void L2HighOrderFE_Shape<ET_SEGM> ::
|
|
348
|
+
T_CalcShape (TIP<1,Tx> ip, TFA & shape) const
|
|
349
|
+
{
|
|
350
|
+
Tx lam[2] = { ip.x, 1-ip.x };
|
|
351
|
+
IVec<2> e = GetEdgeSort (0, vnums);
|
|
352
|
+
LegendrePolynomial (order, lam[e[1]]-lam[e[0]], shape);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
/* *********************** Triangle **********************/
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
template<> template<typename Tx, typename TFA>
|
|
361
|
+
void L2HighOrderFE_Shape<ET_TRIG> ::
|
|
362
|
+
T_CalcShape (TIP<DIM,Tx> ip, TFA & shape) const
|
|
363
|
+
{
|
|
364
|
+
Tx lam[3] = { ip.x, ip.y, 1-ip.x-ip.y };
|
|
365
|
+
IVec<4> f = GetFaceSort (0, vnums);
|
|
366
|
+
size_t p = order_inner[0];
|
|
367
|
+
DubinerBasis::Eval (p, lam[f[0]], lam[f[1]], shape);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
/* *********************** Quad **********************/
|
|
374
|
+
|
|
375
|
+
template<> template<typename Tx, typename TFA>
|
|
376
|
+
void L2HighOrderFE_Shape<ET_QUAD> ::
|
|
377
|
+
T_CalcShape (TIP<2,Tx> ip, TFA & shape) const
|
|
378
|
+
{
|
|
379
|
+
Tx x = ip.x, y = ip.y;
|
|
380
|
+
Tx sigma[4] = {(1-x)+(1-y),x+(1-y),x+y,(1-x)+y};
|
|
381
|
+
|
|
382
|
+
IVec<4> f = GetFaceSort (0, vnums);
|
|
383
|
+
|
|
384
|
+
Tx xi = sigma[f[0]]-sigma[f[1]];
|
|
385
|
+
Tx eta = sigma[f[0]]-sigma[f[3]];
|
|
386
|
+
|
|
387
|
+
int p=order_inner[0];
|
|
388
|
+
int q=order_inner[1];
|
|
389
|
+
|
|
390
|
+
STACK_ARRAY(Tx, mem, p+q+2);
|
|
391
|
+
Tx * polx = &mem[0];
|
|
392
|
+
Tx * poly = &mem[p+1];
|
|
393
|
+
|
|
394
|
+
LegendrePolynomial (p, xi, polx);
|
|
395
|
+
LegendrePolynomial (q, eta, poly);
|
|
396
|
+
|
|
397
|
+
for (size_t i = 0, ii = 0; i <= p; i++)
|
|
398
|
+
for (size_t j = 0; j <= q; j++)
|
|
399
|
+
shape[ii++] = polx[i] * poly[j];
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
/* *********************** Tet **********************/
|
|
404
|
+
|
|
405
|
+
template<> template<typename Tx, typename TFA>
|
|
406
|
+
void L2HighOrderFE_Shape<ET_TET> ::
|
|
407
|
+
T_CalcShape (TIP<3,Tx> ip, TFA & shape) const
|
|
408
|
+
{
|
|
409
|
+
Tx lami[4] = { ip.x, ip.y, ip.z, 1-ip.x-ip.y-ip.z };
|
|
410
|
+
|
|
411
|
+
unsigned char sort[4] = { 0, 1, 2, 3 };
|
|
412
|
+
|
|
413
|
+
if (vnums[sort[0]] > vnums[sort[1]]) Swap (sort[0], sort[1]);
|
|
414
|
+
if (vnums[sort[2]] > vnums[sort[3]]) Swap (sort[2], sort[3]);
|
|
415
|
+
if (vnums[sort[0]] > vnums[sort[2]]) Swap (sort[0], sort[2]);
|
|
416
|
+
if (vnums[sort[1]] > vnums[sort[3]]) Swap (sort[1], sort[3]);
|
|
417
|
+
if (vnums[sort[1]] > vnums[sort[2]]) Swap (sort[1], sort[2]);
|
|
418
|
+
|
|
419
|
+
Tx lamis[4];
|
|
420
|
+
for (int i = 0; i < 4; i++)
|
|
421
|
+
lamis[i] = lami[sort[i]];
|
|
422
|
+
|
|
423
|
+
DubinerBasis3D::Eval (this->order, lamis[0], lamis[1], lamis[2], shape);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
/* *********************** Prism **********************/
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
template<> template<typename Tx, typename TFA>
|
|
432
|
+
void L2HighOrderFE_Shape<ET_PRISM> ::
|
|
433
|
+
T_CalcShape (TIP<3,Tx> ip, TFA & shape) const
|
|
434
|
+
{
|
|
435
|
+
Tx lami[3] = { ip.x, ip.y, 1-ip.x-ip.y }; // hx[0], hx[1], 1-hx[0]-hx[1] };
|
|
436
|
+
|
|
437
|
+
int sort[3];
|
|
438
|
+
for (int i = 0; i < 3; i++) sort[i] = i;
|
|
439
|
+
|
|
440
|
+
if (vnums[sort[0]] > vnums[sort[1]]) Swap (sort[0], sort[1]);
|
|
441
|
+
if (vnums[sort[1]] > vnums[sort[2]]) Swap (sort[1], sort[2]);
|
|
442
|
+
if (vnums[sort[0]] > vnums[sort[1]]) Swap (sort[0], sort[1]);
|
|
443
|
+
|
|
444
|
+
Tx lamis[3];
|
|
445
|
+
for (int i = 0; i < 3; i++)
|
|
446
|
+
lamis[i] = lami[sort[i]];
|
|
447
|
+
|
|
448
|
+
Tx x = lamis[0];
|
|
449
|
+
// Tx y = lamis[1];
|
|
450
|
+
Tx z = ip.z; // hx[2];
|
|
451
|
+
|
|
452
|
+
int p=order_inner[0];
|
|
453
|
+
int q=order_inner[1];
|
|
454
|
+
|
|
455
|
+
ArrayMem<Tx, 20> memx(sqr(p+1));
|
|
456
|
+
FlatMatrix<Tx> polsx(p+1, &memx[0]);
|
|
457
|
+
|
|
458
|
+
VectorMem<10, Tx> polsy(p+1);
|
|
459
|
+
VectorMem<10, Tx> polsz(q+1);
|
|
460
|
+
|
|
461
|
+
for (int i = 0; i <= p; i++)
|
|
462
|
+
// JacobiPolynomial (p, 2*x-1, 2*i+1, 0, polsx.Row(i));
|
|
463
|
+
JacobiPolynomialAlpha (p, 2*x-1, 2*i+1, polsx.Row(i));
|
|
464
|
+
|
|
465
|
+
// ScaledLegendrePolynomial (order, lamis[1]-lamis[2], lamis[1]+lamis[2], polsy);
|
|
466
|
+
LegendrePolynomial::EvalScaled (p, lamis[1]-lamis[2], lamis[1]+lamis[2], polsy);
|
|
467
|
+
LegendrePolynomial (q, 2*z-1, polsz);
|
|
468
|
+
|
|
469
|
+
int ii = 0;
|
|
470
|
+
for (int k = 0; k <= q; k++)
|
|
471
|
+
for (int i = 0; i <= p; i++)
|
|
472
|
+
for (int j = 0; j <= p-i; j++)
|
|
473
|
+
shape[ii++] = polsx(j,i) * polsy(j) * polsz(k);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
/* *********************** Pyramid **********************/
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
template<> template<typename Tx, typename TFA>
|
|
483
|
+
void L2HighOrderFE_Shape<ET_PYRAMID> ::
|
|
484
|
+
T_CalcShape (TIP<3,Tx> ip, TFA & shape) const
|
|
485
|
+
{
|
|
486
|
+
Tx x = ip.x;
|
|
487
|
+
Tx y = ip.y;
|
|
488
|
+
Tx z = ip.z;
|
|
489
|
+
|
|
490
|
+
// if (z == 1) z -= 1e-8;
|
|
491
|
+
z *= (1-1e-8);
|
|
492
|
+
Tx xt = 2 * (x / (1-z)) - 1;
|
|
493
|
+
Tx yt = 2 * (y / (1-z)) - 1;
|
|
494
|
+
|
|
495
|
+
VectorMem<10, Tx> polsx(order+1);
|
|
496
|
+
VectorMem<10, Tx> polsy(order+1);
|
|
497
|
+
|
|
498
|
+
ArrayMem<Tx, 20> memz(sqr(order+1));
|
|
499
|
+
FlatMatrix<Tx> polsz(order+1, &memz[0]);
|
|
500
|
+
|
|
501
|
+
Tx fac(1.0);
|
|
502
|
+
for (int i = 0; i <= order; i++)
|
|
503
|
+
{
|
|
504
|
+
// JacobiPolynomial (order, 2*z-1, 2*i+2, 0, polsz.Row(i));
|
|
505
|
+
JacobiPolynomialAlpha (order, 2*z-1, 2*i+2, polsz.Row(i));
|
|
506
|
+
polsz.Row(i) *= fac;
|
|
507
|
+
fac *= (1-z);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
LegendrePolynomial (order, xt, polsx);
|
|
511
|
+
LegendrePolynomial (order, yt, polsy);
|
|
512
|
+
|
|
513
|
+
int ii = 0;
|
|
514
|
+
for (int iz = 0; iz <= order; iz++)
|
|
515
|
+
for (int ix = 0; ix <= order-iz; ix++)
|
|
516
|
+
for (int iy = 0; iy <= order-iz; iy++, ii++)
|
|
517
|
+
shape[ii] = polsx(ix) * polsy(iy) * polsz(max2(ix,iy), iz);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/* *********************** Pyramid **********************/
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
template<> template<typename Tx, typename TFA>
|
|
524
|
+
void L2HighOrderFE_Shape<ET_HEXAMID> ::
|
|
525
|
+
T_CalcShape (TIP<3,Tx> ip, TFA & shape) const
|
|
526
|
+
{
|
|
527
|
+
throw Exception("L2-hexamid not implemented");
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
/* *********************** Hex **********************/
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
template<> template<typename Tx, typename TFA>
|
|
535
|
+
void L2HighOrderFE_Shape<ET_HEX> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape) const
|
|
536
|
+
{
|
|
537
|
+
Tx x = ip.x, y = ip.y, z = ip.z;
|
|
538
|
+
|
|
539
|
+
// no orientation necessary
|
|
540
|
+
int p=order_inner[0];
|
|
541
|
+
int q=order_inner[1];
|
|
542
|
+
int r=order_inner[2];
|
|
543
|
+
|
|
544
|
+
STACK_ARRAY(Tx, mem, p+q+r+3);
|
|
545
|
+
Tx * polx = &mem[0];
|
|
546
|
+
Tx * poly = &mem[p+1];
|
|
547
|
+
Tx * polz = &mem[p+q+2];
|
|
548
|
+
|
|
549
|
+
LegendrePolynomial (p, 2*x-1, polx);
|
|
550
|
+
LegendrePolynomial (q, 2*y-1, poly);
|
|
551
|
+
LegendrePolynomial (r, 2*z-1, polz);
|
|
552
|
+
|
|
553
|
+
for (int i = 0, ii = 0; i <= p; i++)
|
|
554
|
+
for (int j = 0; j <= q; j++)
|
|
555
|
+
{
|
|
556
|
+
Tx hval = polx[i] * poly[j];
|
|
557
|
+
for (int k = 0; k <= r; k++)
|
|
558
|
+
shape[ii++] = hval * polz[k];
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
#endif
|