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,1240 @@
|
|
|
1
|
+
#ifndef FILE_H1LOFE
|
|
2
|
+
#define FILE_H1LOFE
|
|
3
|
+
|
|
4
|
+
/*********************************************************************/
|
|
5
|
+
/* File: h1lofe.hpp */
|
|
6
|
+
/* Author: Start */
|
|
7
|
+
/* Date: 29. Jun. 2009 */
|
|
8
|
+
/*********************************************************************/
|
|
9
|
+
|
|
10
|
+
#include "tscalarfe.hpp"
|
|
11
|
+
#include "coefficient.hpp"
|
|
12
|
+
|
|
13
|
+
#ifdef FILE_H1LOFE_CPP
|
|
14
|
+
#define H1LOFE_EXTERN
|
|
15
|
+
#include <tscalarfe_impl.hpp>
|
|
16
|
+
#else
|
|
17
|
+
#define H1LOFE_EXTERN extern
|
|
18
|
+
#endif
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
namespace ngfem
|
|
22
|
+
{
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
template <ELEMENT_TYPE ET, int ORDER>
|
|
26
|
+
class ScalarFE : public T_ScalarFiniteElement<ScalarFE<ET,ORDER>,ET>
|
|
27
|
+
{
|
|
28
|
+
typedef T_ScalarFiniteElement<ScalarFE<ET,ORDER>,ET> BASE;
|
|
29
|
+
public:
|
|
30
|
+
INLINE ScalarFE ()
|
|
31
|
+
{
|
|
32
|
+
this->ndof = ET_trait<ET>::PolDimension(ORDER);
|
|
33
|
+
this->order = ORDER;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static constexpr int DIM = ngfem::Dim(ET);
|
|
37
|
+
|
|
38
|
+
template<typename Tx, typename TFA>
|
|
39
|
+
static INLINE void T_CalcShape (TIP<DIM,Tx> ip, TFA & shape);
|
|
40
|
+
|
|
41
|
+
template<typename Tx, typename TFA>
|
|
42
|
+
INLINE void T_CalcDualShape (const TIP<DIM,Tx> ip, TFA & shape) const
|
|
43
|
+
{
|
|
44
|
+
if (ORDER == 0)
|
|
45
|
+
{
|
|
46
|
+
if (ip.vb == VOL)
|
|
47
|
+
shape[0] = 1;
|
|
48
|
+
else
|
|
49
|
+
shape[0] = 0;
|
|
50
|
+
}
|
|
51
|
+
else if (ORDER == 1)
|
|
52
|
+
{
|
|
53
|
+
if (int(ip.vb) == ET_trait<ET>::DIM)
|
|
54
|
+
shape[ip.facetnr] = 1;
|
|
55
|
+
}
|
|
56
|
+
else
|
|
57
|
+
throw Exception (string("CalcDualShape not overloaded for element ") + typeid(*this).name());
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
virtual bool DualityMassDiagonal () const override { return true; }
|
|
61
|
+
virtual bool GetDiagDualityMassInverse (FlatVector<> diag) const override
|
|
62
|
+
{
|
|
63
|
+
diag = 1;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
virtual void Interpolate (const ElementTransformation & trafo,
|
|
69
|
+
const class CoefficientFunction & func, SliceMatrix<> coefs,
|
|
70
|
+
LocalHeap & lh) const override
|
|
71
|
+
{
|
|
72
|
+
if (auto ipts = GetNodalPoints(); ipts.Size())
|
|
73
|
+
{
|
|
74
|
+
HeapReset hr(lh);
|
|
75
|
+
IntegrationRule ir(ipts.Size(), ipts.Data());
|
|
76
|
+
auto & mir = trafo(ir, lh);
|
|
77
|
+
func.Evaluate (mir, coefs);
|
|
78
|
+
}
|
|
79
|
+
else
|
|
80
|
+
BASE::Interpolate (trafo, func, coefs, lh);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
FlatArray<IntegrationPoint> GetNodalPoints() const
|
|
84
|
+
{
|
|
85
|
+
return { 0, nullptr };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
void CalcDualShape2 (const BaseMappedIntegrationPoint & mip, SliceVector<> shape) const
|
|
90
|
+
{
|
|
91
|
+
if (ORDER == 0)
|
|
92
|
+
{
|
|
93
|
+
if (mip.IP().VB() == VOL)
|
|
94
|
+
shape[0] = 1;
|
|
95
|
+
else
|
|
96
|
+
shape[0] = 0;
|
|
97
|
+
}
|
|
98
|
+
else if (ORDER == 1)
|
|
99
|
+
{
|
|
100
|
+
shape = 0.0;
|
|
101
|
+
if (int(mip.IP().VB()) == ET_trait<ET>::DIM)
|
|
102
|
+
shape[mip.IP().FacetNr()] = 1;
|
|
103
|
+
}
|
|
104
|
+
else
|
|
105
|
+
throw Exception (string("CalcDualShape not overloaded for element ") + typeid(*this).name());
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/*
|
|
110
|
+
class FE_Point : public T_ScalarFiniteElementFO<FE_Point,ET_POINT,1,0>
|
|
111
|
+
{
|
|
112
|
+
public:
|
|
113
|
+
template<typename Tx, typename TFA>
|
|
114
|
+
static INLINE void T_CalcShape (Tx x[], TFA & shape)
|
|
115
|
+
{
|
|
116
|
+
shape[0] = 1;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
template<> template<typename Tx, typename TFA>
|
|
122
|
+
void ScalarFE<ET_POINT,0> :: T_CalcShape (TIP<0,Tx> ip, TFA & shape)
|
|
123
|
+
{
|
|
124
|
+
shape[0] = Tx(1.0);
|
|
125
|
+
}
|
|
126
|
+
using FE_Point = ScalarFE<ET_POINT,0>;
|
|
127
|
+
|
|
128
|
+
template<> template<typename Tx, typename TFA>
|
|
129
|
+
void ScalarFE<ET_POINT,1> :: T_CalcShape (TIP<0,Tx> ip, TFA & shape)
|
|
130
|
+
{
|
|
131
|
+
shape[0] = Tx(1.0);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/*
|
|
135
|
+
class FE_Segm0 : public T_ScalarFiniteElementFO<FE_Segm0,ET_SEGM,1,0>
|
|
136
|
+
{
|
|
137
|
+
public:
|
|
138
|
+
template<typename Tx, typename TFA>
|
|
139
|
+
static INLINE void T_CalcShape (Tx x[1], TFA & shape)
|
|
140
|
+
{
|
|
141
|
+
shape[0] = 1;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
*/
|
|
145
|
+
template<> template<typename Tx, typename TFA>
|
|
146
|
+
void ScalarFE<ET_SEGM,0> :: T_CalcShape (TIP<1,Tx> ip, TFA & shape)
|
|
147
|
+
{
|
|
148
|
+
shape[0] = Tx(1.0);
|
|
149
|
+
}
|
|
150
|
+
using FE_Segm0 = ScalarFE<ET_SEGM,0>;
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
/*
|
|
154
|
+
class FE_Segm1 : public T_ScalarFiniteElementFO<FE_Segm1,ET_SEGM,2,1>
|
|
155
|
+
{
|
|
156
|
+
public:
|
|
157
|
+
NGS_DLL_HEADER FE_Segm1() { ; }
|
|
158
|
+
template<typename Tx, typename TFA>
|
|
159
|
+
static INLINE void T_CalcShape (Tx x[1], TFA & shape)
|
|
160
|
+
{
|
|
161
|
+
shape[0] = x[0];
|
|
162
|
+
shape[1] = 1-x[0];
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
template<> template<typename Tx, typename TFA>
|
|
168
|
+
void ScalarFE<ET_SEGM,1> :: T_CalcShape (TIP<1,Tx> ip, TFA & shape)
|
|
169
|
+
{
|
|
170
|
+
shape[0] = ip.x;
|
|
171
|
+
shape[1] = 1-ip.x;
|
|
172
|
+
}
|
|
173
|
+
using FE_Segm1 = ScalarFE<ET_SEGM,1>;
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
/*
|
|
177
|
+
class FE_Segm2 : public T_ScalarFiniteElementFO<FE_Segm2,ET_SEGM,3,2>
|
|
178
|
+
{
|
|
179
|
+
public:
|
|
180
|
+
NGS_DLL_HEADER FE_Segm2() { ; }
|
|
181
|
+
template<typename Tx, typename TFA>
|
|
182
|
+
static INLINE void T_CalcShape (Tx hx[1], TFA & shape)
|
|
183
|
+
{
|
|
184
|
+
Tx x = hx[0];
|
|
185
|
+
|
|
186
|
+
shape[0] = 2*x*x - x;
|
|
187
|
+
shape[1] = 2*x*x - 3*x + 1;
|
|
188
|
+
shape[2] = 4 * x * (1-x);
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
*/
|
|
192
|
+
template<> template<typename Tx, typename TFA>
|
|
193
|
+
void ScalarFE<ET_SEGM,2> :: T_CalcShape (TIP<1,Tx> ip, TFA & shape)
|
|
194
|
+
{
|
|
195
|
+
Tx x = ip.x;
|
|
196
|
+
shape[0] = 2*x*x - x;
|
|
197
|
+
shape[1] = 2*x*x - 3*x + 1;
|
|
198
|
+
shape[2] = 4 * x * (1-x);
|
|
199
|
+
}
|
|
200
|
+
using FE_Segm2 = ScalarFE<ET_SEGM,2>;
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
///
|
|
204
|
+
class FE_Segm2HB : public T_ScalarFiniteElementFO<FE_Segm2HB,ET_SEGM,3,2>
|
|
205
|
+
{
|
|
206
|
+
public:
|
|
207
|
+
template<typename Tx, typename TFA>
|
|
208
|
+
static INLINE void T_CalcShape (TIP<1,Tx> ip, TFA & shape)
|
|
209
|
+
{
|
|
210
|
+
Tx x = ip.x;
|
|
211
|
+
|
|
212
|
+
shape[0] = x;
|
|
213
|
+
shape[1] = 1-x;
|
|
214
|
+
shape[2] = 4 * x * (1-x);
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
///
|
|
220
|
+
class FE_Segm1L2 : public T_ScalarFiniteElementFO<FE_Segm1L2,ET_SEGM,2,1>
|
|
221
|
+
{
|
|
222
|
+
public:
|
|
223
|
+
template<typename Tx, typename TFA>
|
|
224
|
+
static INLINE void T_CalcShape (TIP<1,Tx> ip, TFA & shape)
|
|
225
|
+
{
|
|
226
|
+
shape[0] = Tx(1.0);
|
|
227
|
+
shape[1] = 2*ip.x-1;
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
///
|
|
232
|
+
class FE_Segm2L2 :public T_ScalarFiniteElementFO<FE_Segm2L2,ET_SEGM,3,2>
|
|
233
|
+
{
|
|
234
|
+
public:
|
|
235
|
+
template<typename Tx, typename TFA>
|
|
236
|
+
static INLINE void T_CalcShape (TIP<1,Tx> ip, TFA & shape)
|
|
237
|
+
{
|
|
238
|
+
Tx x = ip.x;
|
|
239
|
+
|
|
240
|
+
shape[0] = Tx(1.0);
|
|
241
|
+
shape[1] = 2*x-1;
|
|
242
|
+
shape[2] = (2*x-1)*(2*x-1)-1.0/3.0;
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
///
|
|
247
|
+
class FE_NcSegm1 :public T_ScalarFiniteElementFO<FE_NcSegm1,ET_SEGM,1,1>
|
|
248
|
+
{
|
|
249
|
+
public:
|
|
250
|
+
template<typename Tx, typename TFA>
|
|
251
|
+
static INLINE void T_CalcShape (TIP<1,Tx> ip, TFA & shape)
|
|
252
|
+
{
|
|
253
|
+
shape[0] = Tx(1.0);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
/// potential space for Nedelec IIb
|
|
258
|
+
class FE_Segm3Pot :public T_ScalarFiniteElementFO<FE_Segm3Pot,ET_SEGM,4,3>
|
|
259
|
+
{
|
|
260
|
+
public:
|
|
261
|
+
template<typename Tx, typename TFA>
|
|
262
|
+
static INLINE void T_CalcShape (TIP<1,Tx> ip, TFA & shape)
|
|
263
|
+
{
|
|
264
|
+
Tx x = ip.x;
|
|
265
|
+
Tx lam2 = 1-x;
|
|
266
|
+
|
|
267
|
+
shape[0] = x;
|
|
268
|
+
shape[1] = lam2;
|
|
269
|
+
shape[2] = 3 * x * lam2 * (lam2+x);
|
|
270
|
+
shape[3] = 7.5 * x * lam2 * (x-lam2);
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
/// segment of fixed order
|
|
276
|
+
template <int ORDER>
|
|
277
|
+
class FE_TSegmL2 : public T_ScalarFiniteElementFO<FE_TSegmL2<ORDER>, ET_SEGM, ORDER+1, ORDER>
|
|
278
|
+
{
|
|
279
|
+
public:
|
|
280
|
+
template<typename Tx, typename TFA>
|
|
281
|
+
static INLINE void T_CalcShape (TIP<1,Tx> ip, TFA & shape)
|
|
282
|
+
{
|
|
283
|
+
Tx x = ip.x;
|
|
284
|
+
|
|
285
|
+
if (ORDER >= 4)
|
|
286
|
+
LegendrePolynomial(ORDER, 2*x-1, shape);
|
|
287
|
+
else
|
|
288
|
+
{
|
|
289
|
+
if (ORDER >= 0) shape[0] = Tx(1.0);
|
|
290
|
+
if (ORDER >= 1) shape[1] = 2*x-1;
|
|
291
|
+
if (ORDER >= 2) shape[2] = (2*x-1)*(2*x-1)-1.0/3.0;
|
|
292
|
+
if (ORDER >= 3) shape[3] = (2*x-1)*(2*x-1)*(2*x-1);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
/* ***************************** Trig Elements *************************************** */
|
|
303
|
+
|
|
304
|
+
/*
|
|
305
|
+
///
|
|
306
|
+
class FE_Trig0 : public T_ScalarFiniteElement<FE_Trig0,ET_TRIG>
|
|
307
|
+
{
|
|
308
|
+
public:
|
|
309
|
+
FE_Trig0() { ndof = 1; order = 0; }
|
|
310
|
+
template<typename Tx, typename TFA>
|
|
311
|
+
INLINE void T_CalcShape (Tx x[2], TFA & shape) const
|
|
312
|
+
{
|
|
313
|
+
shape[0] = 1;
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
*/
|
|
317
|
+
|
|
318
|
+
template<> template<typename Tx, typename TFA>
|
|
319
|
+
void ScalarFE<ET_TRIG,0> :: T_CalcShape (TIP<2,Tx> ip, TFA & shape)
|
|
320
|
+
{
|
|
321
|
+
shape[0] = Tx(1.0);
|
|
322
|
+
}
|
|
323
|
+
using FE_Trig0 = ScalarFE<ET_TRIG,0>;
|
|
324
|
+
|
|
325
|
+
/*
|
|
326
|
+
///
|
|
327
|
+
class FE_Trig1 : public T_ScalarFiniteElement<FE_Trig1,ET_TRIG>
|
|
328
|
+
{
|
|
329
|
+
public:
|
|
330
|
+
FE_Trig1() { ndof = 3; order = 1;}
|
|
331
|
+
template<typename Tx, typename TFA>
|
|
332
|
+
INLINE void T_CalcShape (Tx x[2], TFA & shape) const
|
|
333
|
+
{
|
|
334
|
+
shape[0] = x[0];
|
|
335
|
+
shape[1] = x[1];
|
|
336
|
+
shape[2] = 1-x[0]-x[1];
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
*/
|
|
340
|
+
template<> template<typename Tx, typename TFA>
|
|
341
|
+
void ScalarFE<ET_TRIG,1> :: T_CalcShape (TIP<2,Tx> ip, TFA & shape)
|
|
342
|
+
{
|
|
343
|
+
Tx x = ip.x;
|
|
344
|
+
Tx y = ip.y;
|
|
345
|
+
|
|
346
|
+
shape[0] = x;
|
|
347
|
+
shape[1] = y;
|
|
348
|
+
shape[2] = 1-x-y;
|
|
349
|
+
}
|
|
350
|
+
using FE_Trig1 = ScalarFE<ET_TRIG,1>;
|
|
351
|
+
|
|
352
|
+
/*
|
|
353
|
+
class FE_Trig2 : public T_ScalarFiniteElement<FE_Trig2,ET_TRIG>
|
|
354
|
+
{
|
|
355
|
+
public:
|
|
356
|
+
FE_Trig2() { ndof = 6; order = 2;}
|
|
357
|
+
template<typename Tx, typename TFA>
|
|
358
|
+
INLINE void T_CalcShape (Tx hx[2], TFA & shape) const
|
|
359
|
+
{
|
|
360
|
+
Tx x = hx[0];
|
|
361
|
+
Tx y = hx[1];
|
|
362
|
+
Tx lam3 = 1-x-y;
|
|
363
|
+
|
|
364
|
+
shape[0] = x * (2*x-1);
|
|
365
|
+
shape[1] = y * (2*y-1);
|
|
366
|
+
shape[2] = lam3 * (2*lam3-1);
|
|
367
|
+
shape[3] = 4 * y * lam3;
|
|
368
|
+
shape[4] = 4 * x * lam3;
|
|
369
|
+
shape[5] = 4 * x * y;
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
template<> template<typename Tx, typename TFA>
|
|
375
|
+
void ScalarFE<ET_TRIG,2> :: T_CalcShape (TIP<2,Tx> ip, TFA & shape)
|
|
376
|
+
{
|
|
377
|
+
Tx x = ip.x;
|
|
378
|
+
Tx y = ip.y;
|
|
379
|
+
Tx lam3 = 1-x-y;
|
|
380
|
+
|
|
381
|
+
shape[0] = x * (2*x-1);
|
|
382
|
+
shape[1] = y * (2*y-1);
|
|
383
|
+
shape[2] = lam3 * (2*lam3-1);
|
|
384
|
+
shape[3] = 4 * y * lam3;
|
|
385
|
+
shape[4] = 4 * x * lam3;
|
|
386
|
+
shape[5] = 4 * x * y;
|
|
387
|
+
}
|
|
388
|
+
using FE_Trig2 = ScalarFE<ET_TRIG,2>;
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
class FE_Trig2HB : public T_ScalarFiniteElement<FE_Trig2HB,ET_TRIG>
|
|
392
|
+
{
|
|
393
|
+
public:
|
|
394
|
+
FE_Trig2HB() { ndof = 6; order = 2;}
|
|
395
|
+
template<typename Tx, typename TFA>
|
|
396
|
+
INLINE void T_CalcShape (TIP<2,Tx> ip, TFA & shape) const
|
|
397
|
+
{
|
|
398
|
+
Tx x = ip.x;
|
|
399
|
+
Tx y = ip.y;
|
|
400
|
+
Tx lam3 = 1-x-y;
|
|
401
|
+
|
|
402
|
+
shape[0] = x;
|
|
403
|
+
shape[1] = y;
|
|
404
|
+
shape[2] = lam3;
|
|
405
|
+
shape[3] = 4 * y * lam3;
|
|
406
|
+
shape[4] = 4 * x * lam3;
|
|
407
|
+
shape[5] = 4 * x * y;
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
class FE_NcTrig1 : public T_ScalarFiniteElement<FE_NcTrig1,ET_TRIG>
|
|
414
|
+
{
|
|
415
|
+
public:
|
|
416
|
+
FE_NcTrig1() { ndof = 3; order = 1;}
|
|
417
|
+
template<typename Tx, typename TFA>
|
|
418
|
+
static INLINE void T_CalcShape (TIP<2,Tx> ip, TFA & shape)
|
|
419
|
+
{
|
|
420
|
+
Tx x = ip.x;
|
|
421
|
+
Tx y = ip.y;
|
|
422
|
+
Tx lam3 = 1-x-y;
|
|
423
|
+
|
|
424
|
+
shape[0] = 1-2*y;
|
|
425
|
+
shape[1] = 1-2*x;
|
|
426
|
+
shape[2] = 1-2*lam3;
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
/* ***************************** Quad *************************************** */
|
|
434
|
+
|
|
435
|
+
template<> template<typename Tx, typename TFA>
|
|
436
|
+
void ScalarFE<ET_QUAD,0> :: T_CalcShape (TIP<2,Tx> ip, TFA & shape)
|
|
437
|
+
{
|
|
438
|
+
shape[0] = Tx(1.0);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/*
|
|
442
|
+
class FE_Quad0 : public T_ScalarFiniteElementFO<FE_Quad0,ET_QUAD,1,0>
|
|
443
|
+
{
|
|
444
|
+
public:
|
|
445
|
+
template<typename Tx, typename TFA>
|
|
446
|
+
static INLINE void T_CalcShape (Tx hx[2], TFA & shape)
|
|
447
|
+
{
|
|
448
|
+
shape[0] = 1.0;
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
*/
|
|
452
|
+
/*
|
|
453
|
+
/// quad of order 1
|
|
454
|
+
class FE_Quad1 : public T_ScalarFiniteElementFO<FE_Quad1,ET_QUAD,4,1>
|
|
455
|
+
{
|
|
456
|
+
public:
|
|
457
|
+
template<typename Tx, typename TFA>
|
|
458
|
+
static INLINE void T_CalcShape (Tx hx[2], TFA & shape)
|
|
459
|
+
{
|
|
460
|
+
Tx x = hx[0];
|
|
461
|
+
Tx y = hx[1];
|
|
462
|
+
|
|
463
|
+
shape[0] = (1-x) * (1-y);
|
|
464
|
+
shape[1] = x * (1-y);
|
|
465
|
+
shape[2] = x * y;
|
|
466
|
+
shape[3] = (1-x) * y;
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
*/
|
|
470
|
+
|
|
471
|
+
template<> template<typename Tx, typename TFA>
|
|
472
|
+
void ScalarFE<ET_QUAD,1> :: T_CalcShape (TIP<2,Tx> ip, TFA & shape)
|
|
473
|
+
{
|
|
474
|
+
Tx x = ip.x;
|
|
475
|
+
Tx y = ip.y;
|
|
476
|
+
|
|
477
|
+
shape[0] = (1-x) * (1-y);
|
|
478
|
+
shape[1] = x * (1-y);
|
|
479
|
+
shape[2] = x * y;
|
|
480
|
+
shape[3] = (1-x) * y;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
/// quad or order 2
|
|
485
|
+
class FE_Quad2 : public T_ScalarFiniteElementFO<FE_Quad2,ET_QUAD,9,2>
|
|
486
|
+
{
|
|
487
|
+
public:
|
|
488
|
+
template<typename Tx, typename TFA>
|
|
489
|
+
static INLINE void T_CalcShape (TIP<2,Tx> ip, TFA & shape)
|
|
490
|
+
{
|
|
491
|
+
Tx x = ip.x;
|
|
492
|
+
Tx y = ip.y;
|
|
493
|
+
|
|
494
|
+
Vec<3,Tx> px, py;
|
|
495
|
+
px(0) = (1-x) * (1-2*x);
|
|
496
|
+
px(1) = 4 * x * (1-x);
|
|
497
|
+
px(2) = x * (2*x-1);
|
|
498
|
+
py(0) = (1-y) * (1-2*y);
|
|
499
|
+
py(1) = 4 * y * (1-y);
|
|
500
|
+
py(2) = y * (2*y-1);
|
|
501
|
+
|
|
502
|
+
int ii = 0;
|
|
503
|
+
for (int i = 0; i < 3; i++)
|
|
504
|
+
for (int j = 0; j < 3; j++)
|
|
505
|
+
shape[ii++] = px(i) * py(j);
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
/// quad or order 2
|
|
510
|
+
class FE_Quad2Serendipity : public T_ScalarFiniteElementFO<FE_Quad2Serendipity,ET_QUAD,8,2>
|
|
511
|
+
{
|
|
512
|
+
public:
|
|
513
|
+
template<typename Tx, typename TFA>
|
|
514
|
+
static INLINE void T_CalcShape (TIP<2,Tx> ip, TFA & shape)
|
|
515
|
+
{
|
|
516
|
+
Tx x = ip.x;
|
|
517
|
+
Tx y = ip.y;
|
|
518
|
+
|
|
519
|
+
shape[0] = (1-x)*(1-y) - 2 * x*(1-x) * (1-y) - 2 * y*(1-y)*(1-x);
|
|
520
|
+
shape[1] = x*(1-y) - 2 * x*(1-x) * (1-y) - 2 * y*(1-y)*x;
|
|
521
|
+
shape[2] = x* y - 2 * x*(1-x) * y - 2 * y*(1-y)*x;
|
|
522
|
+
shape[3] = (1-x)* y - 2 * x*(1-x) * y - 2 * y*(1-y)*(1-x);
|
|
523
|
+
|
|
524
|
+
shape[4] = 4 * x*(1-x) * (1-y);
|
|
525
|
+
shape[5] = 4 * x*(1-x) * y;
|
|
526
|
+
shape[6] = 4 * y*(1-y) * (1-x);
|
|
527
|
+
shape[7] = 4 * y*(1-y) * x;
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
class FE_Quad2aniso : public T_ScalarFiniteElementFO<FE_Quad2aniso,ET_QUAD,6,2>
|
|
533
|
+
{
|
|
534
|
+
public:
|
|
535
|
+
template<typename Tx, typename TFA>
|
|
536
|
+
static INLINE void T_CalcShape (TIP<2,Tx> ip, TFA & shape)
|
|
537
|
+
{
|
|
538
|
+
Tx x = ip.x;
|
|
539
|
+
Tx y = ip.y;
|
|
540
|
+
|
|
541
|
+
shape[0] = (1-x)*(1-2*x) * (1-y);
|
|
542
|
+
shape[1] = x*(2*x-1) * (1-y);
|
|
543
|
+
shape[2] = x*(2*x-1) * y;
|
|
544
|
+
shape[3] = (1-x)*(1-2*x) * y;
|
|
545
|
+
shape[4] = 4*x*(1-x) * (1-y);
|
|
546
|
+
shape[5] = 4*x*(1-x) * y;
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
/* ***************************** Tet *************************************** */
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
/*
|
|
556
|
+
///
|
|
557
|
+
class FE_Tet0 : public T_ScalarFiniteElementFO<FE_Tet0,ET_TET,1,0>
|
|
558
|
+
{
|
|
559
|
+
public:
|
|
560
|
+
template<typename Tx, typename TFA>
|
|
561
|
+
static INLINE void T_CalcShape (Tx hx[3], TFA & shape)
|
|
562
|
+
{
|
|
563
|
+
shape[0] = 1;
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
*/
|
|
567
|
+
template<> template<typename Tx, typename TFA>
|
|
568
|
+
void ScalarFE<ET_TET,0> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
569
|
+
{
|
|
570
|
+
shape[0] = Tx(1.0);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
template<> template<typename Tx, typename TFA>
|
|
574
|
+
void ScalarFE<ET_TET,1> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
575
|
+
{
|
|
576
|
+
Tx x = ip.x;
|
|
577
|
+
Tx y = ip.y;
|
|
578
|
+
Tx z = ip.z;
|
|
579
|
+
|
|
580
|
+
shape[0] = x;
|
|
581
|
+
shape[1] = y;
|
|
582
|
+
shape[2] = z;
|
|
583
|
+
shape[3] = 1-x-y-z;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/*
|
|
587
|
+
class FE_Tet1 : public T_ScalarFiniteElementFO<FE_Tet1,ET_TET,4,1>
|
|
588
|
+
{
|
|
589
|
+
public:
|
|
590
|
+
template<typename Tx, typename TFA>
|
|
591
|
+
static INLINE void T_CalcShape (Tx hx[3], TFA & shape)
|
|
592
|
+
{
|
|
593
|
+
Tx x = hx[0];
|
|
594
|
+
Tx y = hx[1];
|
|
595
|
+
Tx z = hx[2];
|
|
596
|
+
|
|
597
|
+
shape[0] = x;
|
|
598
|
+
shape[1] = y;
|
|
599
|
+
shape[2] = z;
|
|
600
|
+
shape[3] = 1-x-y-z;
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
*/
|
|
604
|
+
|
|
605
|
+
///
|
|
606
|
+
// class FE_Tet2 : public T_ScalarFiniteElementFO<FE_Tet2,ET_TET,10,2>
|
|
607
|
+
// public:
|
|
608
|
+
// template<typename Tx, typename TFA>
|
|
609
|
+
// static INLINE void T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
610
|
+
|
|
611
|
+
template<> template<typename Tx, typename TFA>
|
|
612
|
+
void ScalarFE<ET_TET,2> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
613
|
+
{
|
|
614
|
+
Tx x = ip.x;
|
|
615
|
+
Tx y = ip.y;
|
|
616
|
+
Tx z = ip.z;
|
|
617
|
+
Tx lam4 = 1 - x - y - z;
|
|
618
|
+
|
|
619
|
+
shape[0] = 2 * x * x - x;
|
|
620
|
+
shape[1] = 2 * y * y - y;
|
|
621
|
+
shape[2] = 2 * z * z - z;
|
|
622
|
+
shape[3] = 2 * lam4 * lam4 - lam4;
|
|
623
|
+
|
|
624
|
+
shape[4] = 4 * x * y;
|
|
625
|
+
shape[5] = 4 * x * z;
|
|
626
|
+
shape[6] = 4 * x * lam4;
|
|
627
|
+
shape[7] = 4 * y * z;
|
|
628
|
+
shape[8] = 4 * y * lam4;
|
|
629
|
+
shape[9] = 4 * z * lam4;
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
///
|
|
635
|
+
class FE_Tet2HB : public T_ScalarFiniteElementFO<FE_Tet2HB,ET_TET,10,2>
|
|
636
|
+
{
|
|
637
|
+
public:
|
|
638
|
+
template<typename Tx, typename TFA>
|
|
639
|
+
static INLINE void T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
640
|
+
{
|
|
641
|
+
Tx x = ip.x;
|
|
642
|
+
Tx y = ip.y;
|
|
643
|
+
Tx z = ip.z;
|
|
644
|
+
Tx lam4 = 1 - x - y - z;
|
|
645
|
+
|
|
646
|
+
shape[0] = x;
|
|
647
|
+
shape[1] = y;
|
|
648
|
+
shape[2] = z;
|
|
649
|
+
shape[3] = lam4;
|
|
650
|
+
|
|
651
|
+
shape[4] = 4 * x * y;
|
|
652
|
+
shape[5] = 4 * x * z;
|
|
653
|
+
shape[6] = 4 * x * lam4;
|
|
654
|
+
shape[7] = 4 * y * z;
|
|
655
|
+
shape[8] = 4 * y * lam4;
|
|
656
|
+
shape[9] = 4 * z * lam4;
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
class FE_NcTet1 : public T_ScalarFiniteElementFO<FE_NcTet1,ET_TET,4,1>
|
|
663
|
+
{
|
|
664
|
+
public:
|
|
665
|
+
template<typename Tx, typename TFA>
|
|
666
|
+
static INLINE void T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
667
|
+
{
|
|
668
|
+
Tx x = ip.x;
|
|
669
|
+
Tx y = ip.y;
|
|
670
|
+
Tx z = ip.z;
|
|
671
|
+
Tx lam4 = 1-x-y-z;
|
|
672
|
+
|
|
673
|
+
shape[0] = 1-3*x;
|
|
674
|
+
shape[1] = 1-3*y;
|
|
675
|
+
shape[2] = 1-3*z;
|
|
676
|
+
shape[3] = 1-3*lam4;
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
/* ***************************** Prism *********************************** */
|
|
682
|
+
|
|
683
|
+
///
|
|
684
|
+
template<> template<typename Tx, typename TFA>
|
|
685
|
+
void ScalarFE<ET_PRISM,0> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
686
|
+
{
|
|
687
|
+
shape[0] = Tx(1);
|
|
688
|
+
}
|
|
689
|
+
using FE_Prism0 = ScalarFE<ET_PRISM,0>;
|
|
690
|
+
|
|
691
|
+
///
|
|
692
|
+
/*
|
|
693
|
+
class FE_Prism1 : public T_ScalarFiniteElementFO<FE_Prism1,ET_PRISM,6,1>
|
|
694
|
+
{
|
|
695
|
+
public:
|
|
696
|
+
template<typename Tx, typename TFA>
|
|
697
|
+
static INLINE void T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
698
|
+
{
|
|
699
|
+
Tx x = ip.x;
|
|
700
|
+
Tx y = ip.y;
|
|
701
|
+
Tx z = ip.z;
|
|
702
|
+
|
|
703
|
+
shape[0] = x * (1-z);
|
|
704
|
+
shape[1] = y * (1-z);
|
|
705
|
+
shape[2] = (1-x-y) * (1-z);
|
|
706
|
+
shape[3] = x * z;
|
|
707
|
+
shape[4] = y * z;
|
|
708
|
+
shape[5] = (1-x-y) * z;
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
*/
|
|
712
|
+
|
|
713
|
+
template<> template<typename Tx, typename TFA>
|
|
714
|
+
void ScalarFE<ET_PRISM,1> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
715
|
+
{
|
|
716
|
+
Tx x = ip.x;
|
|
717
|
+
Tx y = ip.y;
|
|
718
|
+
Tx z = ip.z;
|
|
719
|
+
|
|
720
|
+
shape[0] = x * (1-z);
|
|
721
|
+
shape[1] = y * (1-z);
|
|
722
|
+
shape[2] = (1-x-y) * (1-z);
|
|
723
|
+
shape[3] = x * z;
|
|
724
|
+
shape[4] = y * z;
|
|
725
|
+
shape[5] = (1-x-y) * z;
|
|
726
|
+
}
|
|
727
|
+
using FE_Prism1 = ScalarFE<ET_PRISM,1>;
|
|
728
|
+
|
|
729
|
+
///
|
|
730
|
+
class FE_Prism2 : public T_ScalarFiniteElementFO<FE_Prism2,ET_PRISM,18,2>
|
|
731
|
+
{
|
|
732
|
+
public:
|
|
733
|
+
template<typename Tx, typename TFA>
|
|
734
|
+
static INLINE void T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
735
|
+
{
|
|
736
|
+
Tx x = ip.x;
|
|
737
|
+
Tx y = ip.y;
|
|
738
|
+
Tx z = ip.z;
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
shape[0] = x * (1-z);
|
|
742
|
+
shape[1] = y * (1-z);
|
|
743
|
+
shape[2] = (1-x-y) * (1-z);
|
|
744
|
+
shape[3] = x * z;
|
|
745
|
+
shape[4] = y * z;
|
|
746
|
+
shape[5] = (1-x-y) * z;
|
|
747
|
+
|
|
748
|
+
shape[6] = 4 * x * (1-x-y) * (1-z);
|
|
749
|
+
shape[7] = 4 * x * y * (1-z);
|
|
750
|
+
shape[8] = 4 * y * (1-x-y) * (1-z);
|
|
751
|
+
shape[9] = 4 * x * (1-x-y) * z;
|
|
752
|
+
shape[10] = 4 * x * y * z;
|
|
753
|
+
shape[11] = 4 * y * (1-x-y) * z;
|
|
754
|
+
|
|
755
|
+
shape[12] = x * (1-z) * z;
|
|
756
|
+
shape[13] = y * (1-z) * z;
|
|
757
|
+
shape[14] = (1-x-y) * (1-z) * z;
|
|
758
|
+
shape[15] = 4 * x * (1-x-y) * (1-z) * z;
|
|
759
|
+
shape[16] = 4 * x * y * (1-z) * z;
|
|
760
|
+
shape[17] = 4 * y * (1-x-y) * (1-z) * z;
|
|
761
|
+
}
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
/// prism, order P2 in plane and P1 in z direction
|
|
767
|
+
class FE_Prism2aniso : public T_ScalarFiniteElementFO<FE_Prism2aniso,ET_PRISM,12,2>
|
|
768
|
+
{
|
|
769
|
+
public:
|
|
770
|
+
template<typename Tx, typename TFA>
|
|
771
|
+
static INLINE void T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
772
|
+
{
|
|
773
|
+
Tx x = ip.x;
|
|
774
|
+
Tx y = ip.y;
|
|
775
|
+
Tx z = ip.z;
|
|
776
|
+
|
|
777
|
+
Tx lam3 = 1-x-y;
|
|
778
|
+
|
|
779
|
+
shape[0] = x * (2*x-1) * (1-z);
|
|
780
|
+
shape[1] = y * (2*y-1) * (1-z);
|
|
781
|
+
shape[2] = lam3 * (2*lam3-1) * (1-z);
|
|
782
|
+
shape[3] = x * (2*x-1) * z;
|
|
783
|
+
shape[4] = y * (2*y-1) * z;
|
|
784
|
+
shape[5] = lam3 * (2*lam3-1) * z;
|
|
785
|
+
|
|
786
|
+
shape[6] = 4 * x * lam3 * (1-z);
|
|
787
|
+
shape[7] = 4 * x * y * (1-z);
|
|
788
|
+
shape[8] = 4 * y * lam3 * (1-z);
|
|
789
|
+
shape[9] = 4 * x * lam3 * z;
|
|
790
|
+
shape[10] = 4 * x * y * z;
|
|
791
|
+
shape[11] = 4 * y * lam3 * z;
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
class FE_Prism2HBaniso : public T_ScalarFiniteElementFO<FE_Prism2HBaniso,ET_PRISM,12,2>
|
|
798
|
+
{
|
|
799
|
+
public:
|
|
800
|
+
template<typename Tx, typename TFA>
|
|
801
|
+
static INLINE void T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
802
|
+
{
|
|
803
|
+
Tx x = ip.x;
|
|
804
|
+
Tx y = ip.y;
|
|
805
|
+
Tx z = ip.z;
|
|
806
|
+
|
|
807
|
+
shape[0] = x * (1-z);
|
|
808
|
+
shape[1] = y * (1-z);
|
|
809
|
+
shape[2] = (1-x-y) * (1-z);
|
|
810
|
+
shape[3] = x * z;
|
|
811
|
+
shape[4] = y * z;
|
|
812
|
+
shape[5] = (1-x-y) * z;
|
|
813
|
+
|
|
814
|
+
shape[6] = 4 * x * (1-x-y) * (1-z);
|
|
815
|
+
shape[7] = 4 * x * y * (1-z);
|
|
816
|
+
shape[8] = 4 * y * (1-x-y) * (1-z);
|
|
817
|
+
shape[9] = 4 * x * (1-x-y) * z;
|
|
818
|
+
shape[10] = 4 * x * y * z;
|
|
819
|
+
shape[11] = 4 * y * (1-x-y) * z;
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
/* ***************************** Hex *********************************** */
|
|
831
|
+
|
|
832
|
+
/// P0 hex element
|
|
833
|
+
template<> template<typename Tx, typename TFA>
|
|
834
|
+
void ScalarFE<ET_HEX,0> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
835
|
+
{
|
|
836
|
+
shape[0] = Tx(1);
|
|
837
|
+
}
|
|
838
|
+
using FE_Hex0 = ScalarFE<ET_HEX,0>;
|
|
839
|
+
|
|
840
|
+
/*
|
|
841
|
+
/// trilinear hex element
|
|
842
|
+
class FE_Hex1 : public T_ScalarFiniteElementFO<FE_Hex1,ET_HEX,8,1>
|
|
843
|
+
{
|
|
844
|
+
public:
|
|
845
|
+
template<typename Tx, typename TFA>
|
|
846
|
+
static INLINE void T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
847
|
+
{
|
|
848
|
+
Tx x = ip.x;
|
|
849
|
+
Tx y = ip.y;
|
|
850
|
+
Tx z = ip.z;
|
|
851
|
+
|
|
852
|
+
shape[0] = (1-x) * (1-y) * (1-z);
|
|
853
|
+
shape[1] = x * (1-y) * (1-z);
|
|
854
|
+
shape[2] = x * y * (1-z);
|
|
855
|
+
shape[3] = (1-x) * y * (1-z);
|
|
856
|
+
shape[4] = (1-x) * (1-y) * z ;
|
|
857
|
+
shape[5] = x * (1-y) * z ;
|
|
858
|
+
shape[6] = x * y * z ;
|
|
859
|
+
shape[7] = (1-x) * y * z ;
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
*/
|
|
863
|
+
|
|
864
|
+
template<> template<typename Tx, typename TFA>
|
|
865
|
+
void ScalarFE<ET_HEX,1> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
866
|
+
{
|
|
867
|
+
Tx x = ip.x;
|
|
868
|
+
Tx y = ip.y;
|
|
869
|
+
Tx z = ip.z;
|
|
870
|
+
|
|
871
|
+
shape[0] = (1-x) * (1-y) * (1-z);
|
|
872
|
+
shape[1] = x * (1-y) * (1-z);
|
|
873
|
+
shape[2] = x * y * (1-z);
|
|
874
|
+
shape[3] = (1-x) * y * (1-z);
|
|
875
|
+
shape[4] = (1-x) * (1-y) * z ;
|
|
876
|
+
shape[5] = x * (1-y) * z ;
|
|
877
|
+
shape[6] = x * y * z ;
|
|
878
|
+
shape[7] = (1-x) * y * z ;
|
|
879
|
+
};
|
|
880
|
+
using FE_Hex1 = ScalarFE<ET_HEX,1>;
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
class FE_Hex20 : public T_ScalarFiniteElementFO<FE_Hex20,ET_HEX,20,2>
|
|
884
|
+
{
|
|
885
|
+
public:
|
|
886
|
+
template<typename Tx, typename TFA>
|
|
887
|
+
static INLINE void T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
888
|
+
{
|
|
889
|
+
Tx x = ip.x;
|
|
890
|
+
Tx y = ip.y;
|
|
891
|
+
Tx z = ip.z;
|
|
892
|
+
|
|
893
|
+
Tx lam[8] = {(1-x)*(1-y)*(1-z),x*(1-y)*(1-z),x*y*(1-z),(1-x)*y*(1-z),
|
|
894
|
+
(1-x)*(1-y)*z,x*(1-y)*z,x*y*z,(1-x)*y*z};
|
|
895
|
+
Tx sigma[8]={(1-x)+(1-y)+(1-z),x+(1-y)+(1-z),x+y+(1-z),(1-x)+y+(1-z),
|
|
896
|
+
(1-x)+(1-y)+z,x+(1-y)+z,x+y+z,(1-x)+y+z};
|
|
897
|
+
|
|
898
|
+
Tx shapee[12];
|
|
899
|
+
|
|
900
|
+
static const int e[12][2] =
|
|
901
|
+
{
|
|
902
|
+
{ 0, 1 }, { 2, 3 }, { 3, 0 }, { 1, 2 },
|
|
903
|
+
{ 4, 5 }, { 6, 7 }, { 7, 4 }, { 5, 6 },
|
|
904
|
+
{ 0, 4 }, { 1, 5 }, { 2, 6 }, { 3, 7 },
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
for (int i = 0; i < 12; i++)
|
|
908
|
+
{
|
|
909
|
+
auto lame = lam[e[i][0]]+lam[e[i][1]];
|
|
910
|
+
auto xi = sigma[e[i][1]]-sigma[e[i][0]];
|
|
911
|
+
shapee[i] = (1-xi*xi)*lame;
|
|
912
|
+
}
|
|
913
|
+
for (int i = 0; i < 12; i++)
|
|
914
|
+
{
|
|
915
|
+
lam[e[i][0]] -= 0.5 * shapee[i];
|
|
916
|
+
lam[e[i][1]] -= 0.5 * shapee[i];
|
|
917
|
+
}
|
|
918
|
+
for (int i = 0; i < 8; i++)
|
|
919
|
+
shape[i] = lam[i];
|
|
920
|
+
for (int i = 0; i < 12; i++)
|
|
921
|
+
shape[i+8] = shapee[i];
|
|
922
|
+
}
|
|
923
|
+
};
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
/* ***************************** Pyramid *********************************** */
|
|
927
|
+
|
|
928
|
+
///
|
|
929
|
+
template<> template<typename Tx, typename TFA>
|
|
930
|
+
void ScalarFE<ET_PYRAMID,0> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
931
|
+
{
|
|
932
|
+
shape[0] = Tx(1.0);
|
|
933
|
+
}
|
|
934
|
+
using FE_Pyramid0 = ScalarFE<ET_PYRAMID,0>;
|
|
935
|
+
|
|
936
|
+
///
|
|
937
|
+
/*
|
|
938
|
+
class FE_Pyramid1 : public T_ScalarFiniteElementFO<FE_Pyramid1,ET_PYRAMID,5,1>
|
|
939
|
+
{
|
|
940
|
+
public:
|
|
941
|
+
template<typename Tx, typename TFA>
|
|
942
|
+
static INLINE void T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
943
|
+
{
|
|
944
|
+
Tx x = ip.x;
|
|
945
|
+
Tx y = ip.y;
|
|
946
|
+
Tx z = ip.z;
|
|
947
|
+
|
|
948
|
+
// if (z == 1) z -= 1e-10;
|
|
949
|
+
z -= 1e-10;
|
|
950
|
+
|
|
951
|
+
shape[0] = (1-z-x)*(1-z-y) / (1-z);
|
|
952
|
+
shape[1] = x*(1-z-y) / (1-z);
|
|
953
|
+
shape[2] = x*y / (1-z);
|
|
954
|
+
shape[3] = (1-z-x)*y / (1-z);
|
|
955
|
+
shape[4] = z;
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
*/
|
|
959
|
+
|
|
960
|
+
template<> template<typename Tx, typename TFA>
|
|
961
|
+
void ScalarFE<ET_PYRAMID,1> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
962
|
+
{
|
|
963
|
+
Tx x = ip.x;
|
|
964
|
+
Tx y = ip.y;
|
|
965
|
+
Tx z = ip.z;
|
|
966
|
+
|
|
967
|
+
// if (z == 1) z -= 1e-10;
|
|
968
|
+
z -= Tx(1e-10);
|
|
969
|
+
|
|
970
|
+
shape[0] = (1-z-x)*(1-z-y) / (1-z);
|
|
971
|
+
shape[1] = x*(1-z-y) / (1-z);
|
|
972
|
+
shape[2] = x*y / (1-z);
|
|
973
|
+
shape[3] = (1-z-x)*y / (1-z);
|
|
974
|
+
shape[4] = z;
|
|
975
|
+
}
|
|
976
|
+
using FE_Pyramid1 = ScalarFE<ET_PYRAMID,1>;
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
/* ***************************** Hexamid *********************************** */
|
|
983
|
+
|
|
984
|
+
///
|
|
985
|
+
template<> template<typename Tx, typename TFA>
|
|
986
|
+
void ScalarFE<ET_HEXAMID,0> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
987
|
+
{
|
|
988
|
+
shape[0] = Tx(1.0);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
template<> template<typename Tx, typename TFA>
|
|
992
|
+
void ScalarFE<ET_HEXAMID,1> :: T_CalcShape (TIP<3,Tx> ip, TFA & shape)
|
|
993
|
+
{
|
|
994
|
+
Tx y = ip.y;
|
|
995
|
+
Tx z = ip.z;
|
|
996
|
+
Tx den = (1-y)*(1-z);
|
|
997
|
+
den += Tx(1e-12);
|
|
998
|
+
Tx x = ip.x / den;
|
|
999
|
+
|
|
1000
|
+
shape[0] = (1-x)*(1-y)*(1-z);
|
|
1001
|
+
shape[1] = ( x)*(1-y)*(1-z);
|
|
1002
|
+
shape[2] = ( x)*( y)*(1-z);
|
|
1003
|
+
shape[3] = (1-x)*( y)*(1-z);
|
|
1004
|
+
shape[4] = (1-x)*(1-y)*( z);
|
|
1005
|
+
shape[5] = ( x)*(1-y)*( z);
|
|
1006
|
+
shape[6] = ( y)*( z);
|
|
1007
|
+
|
|
1008
|
+
/*
|
|
1009
|
+
// if (z == 1) z -= 1e-10;
|
|
1010
|
+
z -= 1e-10;
|
|
1011
|
+
|
|
1012
|
+
shape[0] = (1-z-x)*(1-z-y) / (1-z);
|
|
1013
|
+
shape[1] = x*(1-z-y) / (1-z);
|
|
1014
|
+
shape[2] = x*y / (1-z);
|
|
1015
|
+
shape[3] = (1-z-x)*y / (1-z);
|
|
1016
|
+
shape[4] = z;
|
|
1017
|
+
*/
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
#ifdef FILE_H1LOFE_CPP
|
|
1024
|
+
|
|
1025
|
+
template<>
|
|
1026
|
+
FlatArray<IntegrationPoint> ScalarFE<ET_TRIG,1> :: GetNodalPoints() const
|
|
1027
|
+
{
|
|
1028
|
+
static IntegrationPoint ipts[] = {
|
|
1029
|
+
{ 1., 0. }, { 0., 1. }, { 0., 0. }
|
|
1030
|
+
};
|
|
1031
|
+
|
|
1032
|
+
return { 3, &ipts[0] };
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
template<>
|
|
1036
|
+
FlatArray<IntegrationPoint> ScalarFE<ET_TET,1> :: GetNodalPoints() const
|
|
1037
|
+
{
|
|
1038
|
+
static IntegrationPoint ipts[] = {
|
|
1039
|
+
{ 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }
|
|
1040
|
+
};
|
|
1041
|
+
|
|
1042
|
+
return { 4, &ipts[0] };
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
template<>
|
|
1046
|
+
FlatArray<IntegrationPoint> ScalarFE<ET_TET,2> :: GetNodalPoints() const
|
|
1047
|
+
{
|
|
1048
|
+
static IntegrationPoint ipts[] = {
|
|
1049
|
+
{ 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 },
|
|
1050
|
+
{ 0.5, 0.5, 0 }, { 0.5, 0, 0.5 }, { 0.5, 0, 0 },
|
|
1051
|
+
{ 0, 0.5, 0.5 }, { 0, 0.5, 0 }, { 0, 0, 0.5 }
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
|
+
return { 10, &ipts[0] };
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
/*
|
|
1058
|
+
template<>
|
|
1059
|
+
void ScalarFE<ET_TET,1> :: Interpolate (const ElementTransformation & trafo,
|
|
1060
|
+
const class CoefficientFunction & func, SliceMatrix<> coefs,
|
|
1061
|
+
LocalHeap & lh) const
|
|
1062
|
+
{
|
|
1063
|
+
HeapReset hr(lh);
|
|
1064
|
+
IntegrationPoint ipts[] = {
|
|
1065
|
+
{ 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }
|
|
1066
|
+
};
|
|
1067
|
+
IntegrationRule ir(4, ipts);
|
|
1068
|
+
auto & mir = trafo(ir, lh);
|
|
1069
|
+
func.Evaluate (mir, coefs);
|
|
1070
|
+
}
|
|
1071
|
+
*/
|
|
1072
|
+
#endif
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Point,ET_POINT>;
|
|
1079
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Segm0,ET_SEGM>;
|
|
1080
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Segm1,ET_SEGM>;
|
|
1081
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Segm2,ET_SEGM>;
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Segm2HB,ET_SEGM>;
|
|
1085
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Segm1L2,ET_SEGM>;
|
|
1086
|
+
|
|
1087
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Segm2L2,ET_SEGM>;
|
|
1088
|
+
|
|
1089
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_NcSegm1,ET_SEGM>;
|
|
1090
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Segm3Pot,ET_SEGM>;
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_TSegmL2<0>,ET_SEGM>;
|
|
1094
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_TSegmL2<1>,ET_SEGM>;
|
|
1095
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_TSegmL2<2>,ET_SEGM>;
|
|
1096
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_TSegmL2<3>,ET_SEGM>;
|
|
1097
|
+
|
|
1098
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_POINT, 1>, ET_POINT, ScalarFiniteElement<0>>;
|
|
1099
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_TRIG, 2>, ET_TRIG, ScalarFiniteElement<2>>;
|
|
1100
|
+
|
|
1101
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_TRIG,0>,ET_TRIG>;
|
|
1102
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_TRIG,1>,ET_TRIG>;
|
|
1103
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Trig2,ET_TRIG>;
|
|
1104
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Trig2HB,ET_TRIG>;
|
|
1105
|
+
|
|
1106
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_NcTrig1,ET_TRIG>;
|
|
1107
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_QUAD,0>,ET_QUAD>;
|
|
1108
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_QUAD,1>,ET_QUAD>;
|
|
1109
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Quad2,ET_QUAD>;
|
|
1110
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Quad2aniso,ET_QUAD>;
|
|
1111
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Quad2Serendipity,ET_QUAD>;
|
|
1112
|
+
|
|
1113
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_TET,0>,ET_TET>;
|
|
1114
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_TET,1>,ET_TET>;
|
|
1115
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Tet1,ET_TET>;
|
|
1116
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_TET,2>,ET_TET>;
|
|
1117
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Tet2,ET_TET>;
|
|
1118
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Tet2HB,ET_TET>;
|
|
1119
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_NcTet1,ET_TET>;
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Prism0,ET_PRISM>;
|
|
1123
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Prism1,ET_PRISM>;
|
|
1124
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_PRISM,1>,ET_PRISM>;
|
|
1125
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Prism2,ET_PRISM>;
|
|
1126
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Prism2aniso,ET_PRISM>;
|
|
1127
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Prism2HBaniso,ET_PRISM>;
|
|
1128
|
+
|
|
1129
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_HEXAMID,0>,ET_HEXAMID>;
|
|
1130
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_HEXAMID,1>,ET_HEXAMID>;
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Hex0,ET_HEX>;
|
|
1134
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Hex1,ET_HEX>;
|
|
1135
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Hex20,ET_HEX>;
|
|
1136
|
+
|
|
1137
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Pyramid0,ET_PYRAMID>;
|
|
1138
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Pyramid1,ET_PYRAMID>;
|
|
1139
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<ScalarFE<ET_PYRAMID,1>,ET_PYRAMID>;
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Point,ET_POINT,1,0>;
|
|
1151
|
+
|
|
1152
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Segm0,ET_SEGM,1,0>;
|
|
1153
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Segm1,ET_SEGM,2,1>;
|
|
1154
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Segm2,ET_SEGM,3,2>;
|
|
1155
|
+
|
|
1156
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Segm2HB,ET_SEGM,3,2>;
|
|
1157
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Segm1L2,ET_SEGM,2,1>;
|
|
1158
|
+
|
|
1159
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Segm2L2,ET_SEGM,3,2>;
|
|
1160
|
+
|
|
1161
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_NcSegm1,ET_SEGM,1,1>;
|
|
1162
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Segm3Pot,ET_SEGM,4,3>;
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_TSegmL2<0>,ET_SEGM,1,0>;
|
|
1166
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_TSegmL2<1>,ET_SEGM,2,1>;
|
|
1167
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_TSegmL2<2>,ET_SEGM,3,2>;
|
|
1168
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_TSegmL2<3>,ET_SEGM,4,3>;
|
|
1169
|
+
|
|
1170
|
+
/*
|
|
1171
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Trig0,ET_TRIG>;
|
|
1172
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Trig1,ET_TRIG>;
|
|
1173
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Trig2,ET_TRIG>;
|
|
1174
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElement<FE_Trig2HB,ET_TRIG>;
|
|
1175
|
+
*/
|
|
1176
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElementFO<ScalarFE<ET_TRIG,0>,ET_TRIG,1,0>;
|
|
1177
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElementFO<ScalarFE<ET_TRIG,1>,ET_TRIG,3,1>;
|
|
1178
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_NcTrig1,ET_TRIG,3,1>;
|
|
1179
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElementFO<ScalarFE<ET_QUAD,0>,ET_QUAD,1,0>;
|
|
1180
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElementFO<ScalarFE<ET_QUAD,1>,ET_QUAD,4,1>;
|
|
1181
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Quad2,ET_QUAD,9,2>;
|
|
1182
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Quad2aniso,ET_QUAD,6,2>;
|
|
1183
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Quad2Serendipity,ET_QUAD,8,2>;
|
|
1184
|
+
|
|
1185
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElementFO<ScalarFE<ET_TET,0>,ET_TET,1,0>;
|
|
1186
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElementFO<ScalarFE<ET_TET,1>,ET_TET,4,1>;
|
|
1187
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Tet1,ET_TET,4,1>;
|
|
1188
|
+
// H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Tet2,ET_TET,10,2>;
|
|
1189
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Tet2HB,ET_TET,10,2>;
|
|
1190
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_NcTet1,ET_TET,4,1>;
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Prism0,ET_PRISM,1,0>;
|
|
1194
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Prism1,ET_PRISM,6,1>;
|
|
1195
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Prism2,ET_PRISM,18,2>;
|
|
1196
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Prism2aniso,ET_PRISM,12,2>;
|
|
1197
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Prism2HBaniso,ET_PRISM,12,2>;
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Hex0,ET_HEX,1,0>;
|
|
1201
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Hex1,ET_HEX,8,1>;
|
|
1202
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Hex20,ET_HEX,20,2>;
|
|
1203
|
+
|
|
1204
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Pyramid0,ET_PYRAMID,1,0>;
|
|
1205
|
+
H1LOFE_EXTERN template class T_ScalarFiniteElementFO<FE_Pyramid1,ET_PYRAMID,5,1>;
|
|
1206
|
+
|
|
1207
|
+
H1LOFE_EXTERN template class ScalarFE<ET_POINT,0>;
|
|
1208
|
+
H1LOFE_EXTERN template class ScalarFE<ET_POINT,1>;
|
|
1209
|
+
|
|
1210
|
+
H1LOFE_EXTERN template class ScalarFE<ET_SEGM,0>;
|
|
1211
|
+
H1LOFE_EXTERN template class ScalarFE<ET_SEGM,1>;
|
|
1212
|
+
|
|
1213
|
+
H1LOFE_EXTERN template class ScalarFE<ET_TRIG,0>;
|
|
1214
|
+
H1LOFE_EXTERN template class ScalarFE<ET_TRIG,1>;
|
|
1215
|
+
H1LOFE_EXTERN template class ScalarFE<ET_TRIG,2>;
|
|
1216
|
+
|
|
1217
|
+
H1LOFE_EXTERN template class ScalarFE<ET_QUAD,0>;
|
|
1218
|
+
H1LOFE_EXTERN template class ScalarFE<ET_QUAD,1>;
|
|
1219
|
+
|
|
1220
|
+
H1LOFE_EXTERN template class ScalarFE<ET_TET,0>;
|
|
1221
|
+
H1LOFE_EXTERN template class ScalarFE<ET_TET,1>;
|
|
1222
|
+
H1LOFE_EXTERN template class ScalarFE<ET_TET,2>;
|
|
1223
|
+
|
|
1224
|
+
H1LOFE_EXTERN template class ScalarFE<ET_PRISM,0>;
|
|
1225
|
+
H1LOFE_EXTERN template class ScalarFE<ET_PRISM,1>;
|
|
1226
|
+
|
|
1227
|
+
H1LOFE_EXTERN template class ScalarFE<ET_PYRAMID,0>;
|
|
1228
|
+
H1LOFE_EXTERN template class ScalarFE<ET_PYRAMID,1>;
|
|
1229
|
+
|
|
1230
|
+
H1LOFE_EXTERN template class ScalarFE<ET_HEXAMID,0>;
|
|
1231
|
+
H1LOFE_EXTERN template class ScalarFE<ET_HEXAMID,1>;
|
|
1232
|
+
|
|
1233
|
+
H1LOFE_EXTERN template class ScalarFE<ET_HEX,0>;
|
|
1234
|
+
H1LOFE_EXTERN template class ScalarFE<ET_HEX,1>;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
#endif
|