ngsolve 6.2.2506.post216.dev0__cp314-cp314-manylinux_2_28_x86_64.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.
- ngsolve-6.2.2506.post216.dev0.data/data/bin/ngs_nvcc +22 -0
- ngsolve-6.2.2506.post216.dev0.data/data/bin/ngs_nvlink +17 -0
- ngsolve-6.2.2506.post216.dev0.data/data/bin/ngscxx +15 -0
- ngsolve-6.2.2506.post216.dev0.data/data/bin/ngsld +11 -0
- ngsolve-6.2.2506.post216.dev0.data/data/bin/ngsolve.tcl +648 -0
- ngsolve-6.2.2506.post216.dev0.data/data/bin/ngspy +2 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/analytic_integrals.hpp +10 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/arnoldi.hpp +55 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bandmatrix.hpp +334 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/basematrix.hpp +963 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/basevector.hpp +1268 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bdbequations.hpp +2807 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bdbintegrator.hpp +1660 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bem_diffops.hpp +475 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bessel.hpp +1064 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bilinearform.hpp +966 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bla.hpp +29 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/blockalloc.hpp +95 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/blockjacobi.hpp +328 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bspline.hpp +116 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/calcinverse.hpp +141 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cg.hpp +368 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/chebyshev.hpp +44 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cholesky.hpp +720 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/clapack.h +7254 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/code_generation.hpp +296 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/coefficient.hpp +2033 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/coefficient_impl.hpp +19 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/coefficient_stdmath.hpp +167 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/commutingAMG.hpp +106 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/comp.hpp +79 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/compatibility.hpp +41 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/complex_wrapper.hpp +101 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/compressedfespace.hpp +110 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/contact.hpp +239 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cuda_core.hpp +216 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cuda_linalg.hpp +185 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cuda_ngbla.hpp +317 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cuda_ngstd.hpp +414 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cuda_profiler.hpp +240 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/diagonalmatrix.hpp +160 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/differentialoperator.hpp +276 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/diffop.hpp +1286 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/diffop_impl.hpp +328 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/diffopwithfactor.hpp +123 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/discontinuous.hpp +84 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/dump.hpp +949 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ectypes.hpp +121 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/eigen.hpp +60 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/eigensystem.hpp +18 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/elasticity_equations.hpp +595 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/elementbyelement.hpp +201 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/elementtopology.hpp +1760 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/elementtransformation.hpp +339 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/evalfunc.hpp +405 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/expr.hpp +1693 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/facetfe.hpp +175 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/facetfespace.hpp +180 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/facethofe.hpp +111 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/facetsurffespace.hpp +112 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/fe_interfaces.hpp +32 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/fem.hpp +87 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/fesconvert.hpp +14 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/fespace.hpp +1454 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/finiteelement.hpp +286 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/globalinterfacespace.hpp +77 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/globalspace.hpp +115 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/gridfunction.hpp +525 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1amg.hpp +124 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1hofe.hpp +188 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1hofe_impl.hpp +1262 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1hofefo.hpp +148 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1hofefo_impl.hpp +185 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1hofespace.hpp +167 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1lofe.hpp +1240 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1lumping.hpp +41 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurl_equations.hpp +1381 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlcurlfe.hpp +2241 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlcurlfespace.hpp +78 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlfe.hpp +259 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlfe_utils.hpp +107 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlhdiv_dshape.hpp +857 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlhdivfes.hpp +308 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlhofe.hpp +175 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlhofe_impl.hpp +1871 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlhofespace.hpp +193 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurllofe.hpp +1146 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdiv_equations.hpp +880 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivdivfe.hpp +2923 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivdivsurfacespace.hpp +76 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivfe.hpp +206 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivfe_utils.hpp +717 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivfes.hpp +75 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivhofe.hpp +447 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivhofe_impl.hpp +1107 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivhofefo.hpp +229 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivhofespace.hpp +177 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivhosurfacefespace.hpp +106 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivlofe.hpp +773 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hidden.hpp +74 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/householder.hpp +181 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hypre_ams_precond.hpp +123 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hypre_precond.hpp +73 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/integrator.hpp +2012 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/integratorcf.hpp +253 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/interpolate.hpp +49 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/intrule.hpp +2542 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/intrules_SauterSchwab.hpp +25 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/irspace.hpp +49 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/jacobi.hpp +153 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/kernels.hpp +724 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/l2hofe.hpp +194 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/l2hofe_impl.hpp +564 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/l2hofefo.hpp +542 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/l2hofespace.hpp +344 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/la.hpp +38 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/linalg_kernels.hpp +70 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/linearform.hpp +266 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/matrix.hpp +2145 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/memusage.hpp +41 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/meshaccess.hpp +1359 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/mgpre.hpp +204 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/mp_coefficient.hpp +145 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/mptools.hpp +2281 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/multigrid.hpp +42 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/multivector.hpp +447 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/mumpsinverse.hpp +187 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/mycomplex.hpp +361 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ng_lapack.hpp +1661 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngblas.hpp +1232 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngs_defines.hpp +30 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngs_stdcpp_include.hpp +106 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngs_utils.hpp +121 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngsobject.hpp +1019 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngsstream.hpp +113 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngstd.hpp +72 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/nodalhofe.hpp +96 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/nodalhofe_impl.hpp +141 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/normalfacetfe.hpp +223 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/normalfacetfespace.hpp +98 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/normalfacetsurfacefespace.hpp +84 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/order.hpp +251 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/parallel_matrices.hpp +222 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/paralleldofs.hpp +340 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/parallelngs.hpp +23 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/parallelvector.hpp +269 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/pardisoinverse.hpp +200 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/periodic.hpp +129 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/plateaufespace.hpp +25 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/pml.hpp +275 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/pmltrafo.hpp +631 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/postproc.hpp +142 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/potentialtools.hpp +22 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/precomp.hpp +60 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/preconditioner.hpp +602 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/prolongation.hpp +380 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/python_comp.hpp +107 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/python_fem.hpp +89 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/python_linalg.hpp +58 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/python_ngstd.hpp +386 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/recursive_pol.hpp +4896 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/recursive_pol_tet.hpp +395 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/recursive_pol_trig.hpp +492 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/reorderedfespace.hpp +81 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sample_sort.hpp +105 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/scalarfe.hpp +335 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/shapefunction_utils.hpp +113 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/simd_complex.hpp +329 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/smoother.hpp +253 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/solve.hpp +89 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sparsecholesky.hpp +317 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sparsefactorization_interface.hpp +159 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sparsematrix.hpp +1052 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sparsematrix_dyn.hpp +90 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sparsematrix_impl.hpp +1055 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/special_matrix.hpp +463 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/specialelement.hpp +125 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/statushandler.hpp +33 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/stringops.hpp +12 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/superluinverse.hpp +136 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/symbolicintegrator.hpp +850 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/symmetricmatrix.hpp +144 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tangentialfacetfe.hpp +224 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tangentialfacetfespace.hpp +91 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tensor.hpp +522 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tensorcoefficient.hpp +446 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tensorproductintegrator.hpp +113 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/thcurlfe.hpp +128 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/thcurlfe_impl.hpp +380 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/thdivfe.hpp +80 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/thdivfe_impl.hpp +492 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tpdiffop.hpp +461 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tpfes.hpp +133 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tpintrule.hpp +224 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/triangular.hpp +465 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tscalarfe.hpp +245 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tscalarfe_impl.hpp +1029 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/umfpackinverse.hpp +148 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/unifiedvector.hpp +103 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/vector.hpp +1452 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/voxelcoefficientfunction.hpp +41 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/vtkoutput.hpp +198 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/vvector.hpp +208 -0
- ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/webgui.hpp +92 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/cmake/ngsolve/NGSolveConfig.cmake +102 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/cmake/ngsolve/ngsolve-targets-release.cmake +89 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/cmake/ngsolve/ngsolve-targets.cmake +180 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngbla.so +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngcomp.so +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngfem.so +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngla.so +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngsbem.so +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngscudalib.so +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngsolve.so +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngstd.so +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/TensorProductTools.py +210 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/__console.py +94 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/__expr.py +181 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/__init__.py +148 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/_scikit_build_core_dependencies.py +30 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/bvp.py +78 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/config/__init__.py +1 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/config/__main__.py +4 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/config/config.py +60 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/__init__.py +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_1d_1d.py +80 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_1d_2d.py +73 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_2d_1d.py +72 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_2d_2d.py +66 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/__init__.py +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/__init__.py +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/hhj.py +44 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/hybrid_dg.py +53 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/mixed.py +30 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/nonlin.py +29 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/pickling.py +26 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/pml.py +31 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/taskmanager.py +20 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/tdnns.py +47 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDG-skeleton.py +45 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDG.py +38 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDGlap.py +42 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDGwave.py +61 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/__init__.py +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/adaptive.py +123 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/cmagnet.py +59 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/elasticity.py +76 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/navierstokes.py +74 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/poisson.ipynb +170 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/poisson.py +41 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/__init__.py +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_cmagnet.py +87 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_navierstokes.py +117 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_poisson.py +89 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_timeDG.py +82 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/directsolvers.py +14 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/eigenvalues.py +364 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/internal.py +89 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/krylovspace.py +1182 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/meshes.py +748 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngs2petsc.py +310 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngscuda.so +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngscxx.py +42 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngslib.so +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/nonlinearsolvers.py +203 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/preconditioners.py +11 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/solve_implementation.py +168 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/solvers/__init__.py +7 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/solvers/cudss.py +112 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/timestepping.py +185 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/timing.py +108 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/utils.py +167 -0
- ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/webgui.py +671 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/beam.geo +17 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/beam.vol +240 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/chip.in2d +41 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/chip.vol +614 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/coil.geo +12 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/coil.vol +2560 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/coilshield.geo +24 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/coilshield.vol +3179 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/cube.geo +19 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/cube.vol +1832 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d10_DGdoubleglazing.pde +50 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d11_chip_nitsche.pde +40 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d1_square.pde +43 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d2_chip.pde +35 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d3_helmholtz.pde +22 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d4_cube.pde +46 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d5_beam.pde +74 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d6_shaft.pde +73 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d7_coil.pde +50 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d8_coilshield.pde +49 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d9_hybridDG.pde +72 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/doubleglazing.in2d +27 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/doubleglazing.vol +737 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/shaft.geo +73 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/shaft.vol +4291 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/square.in2d +17 -0
- ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/square.vol +149 -0
- ngsolve-6.2.2506.post216.dev0.dist-info/METADATA +14 -0
- ngsolve-6.2.2506.post216.dev0.dist-info/RECORD +306 -0
- ngsolve-6.2.2506.post216.dev0.dist-info/WHEEL +5 -0
- ngsolve-6.2.2506.post216.dev0.dist-info/licenses/LICENSE +504 -0
- ngsolve-6.2.2506.post216.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1660 @@
|
|
|
1
|
+
#ifndef FILE_BDBINTEGRATOR
|
|
2
|
+
#define FILE_BDBINTEGRATOR
|
|
3
|
+
|
|
4
|
+
/*********************************************************************/
|
|
5
|
+
/* File: bdbintegrator.hpp */
|
|
6
|
+
/* Author: Joachim Schoeberl */
|
|
7
|
+
/* Date: 25. Mar. 2000 */
|
|
8
|
+
/*********************************************************************/
|
|
9
|
+
|
|
10
|
+
// #include "fastmat.hpp"
|
|
11
|
+
|
|
12
|
+
#include "integrator.hpp"
|
|
13
|
+
#include "diffop.hpp"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
namespace ngfem
|
|
17
|
+
{
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
Coefficient tensor.
|
|
26
|
+
Base-class for template-polymorphismus.
|
|
27
|
+
Provides application and transpose-application
|
|
28
|
+
*/
|
|
29
|
+
template <class DMO, int DIM_DMAT>
|
|
30
|
+
class DMatOp
|
|
31
|
+
{
|
|
32
|
+
public:
|
|
33
|
+
// typedef double TSCAL;
|
|
34
|
+
/// is coefficient tensor symmetric ?
|
|
35
|
+
enum { SYMMETRIC = 1 };
|
|
36
|
+
|
|
37
|
+
template <typename SCAL>
|
|
38
|
+
static Mat<DIM_DMAT,DIM_DMAT,SCAL> GetMatrixType(SCAL s) { return SCAL(0); }
|
|
39
|
+
|
|
40
|
+
template <typename FEL, typename MIR, typename MAT>
|
|
41
|
+
void GenerateMatrixIR (const FEL & fel, const MIR & mir,
|
|
42
|
+
const FlatArray<MAT> & dmats,
|
|
43
|
+
LocalHeap & lh) const
|
|
44
|
+
{
|
|
45
|
+
for (int i = 0; i < mir.IR().GetNIP(); i++)
|
|
46
|
+
static_cast<const DMO*>(this) -> GenerateMatrix (fel, mir[i], dmats[i], lh);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/// generate linearized matrix in linearization point vec
|
|
51
|
+
template <typename FEL, typename MIP, typename VEC, typename MAT>
|
|
52
|
+
void GenerateLinearizedMatrix (const FEL & fel, const MIP & mip, VEC & vec,
|
|
53
|
+
MAT & mat, LocalHeap & lh) const
|
|
54
|
+
{
|
|
55
|
+
static_cast<const DMO*>(this) -> GenerateMatrix (fel, mip, mat, lh);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/// apply coefficient matrix.
|
|
59
|
+
template <typename FEL, typename MIP, class TVX, class TVY>
|
|
60
|
+
void Apply (const FEL & fel, const MIP & mip,
|
|
61
|
+
const TVX & x, TVY && y,
|
|
62
|
+
LocalHeap & lh) const
|
|
63
|
+
{
|
|
64
|
+
Mat<DMO::DIM_DMAT, DMO::DIM_DMAT, double> mat;
|
|
65
|
+
static_cast<const DMO*>(this) -> GenerateMatrix (fel, mip, mat, lh);
|
|
66
|
+
y = mat * x;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
template <typename FEL, typename MIP, class TVX, class TVY>
|
|
71
|
+
void ApplyLinearized (const FEL & fel, const MIP & mip,
|
|
72
|
+
const TVX & lin, const TVX & x, TVY & y,
|
|
73
|
+
LocalHeap & lh) const
|
|
74
|
+
{
|
|
75
|
+
Mat<DMO::DIM_DMAT, DMO::DIM_DMAT, typename TVX::TSCAL> mat;
|
|
76
|
+
static_cast<const DMO*>(this) -> GenerateLinearizedMatrix (fel, mip, lin, mat, lh);
|
|
77
|
+
y = mat * x;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
template <typename FEL, typename MIP, class TVX>
|
|
81
|
+
void Apply1 (const FEL & fel, const MIP & mip,
|
|
82
|
+
TVX && x, LocalHeap & lh) const
|
|
83
|
+
{
|
|
84
|
+
Vec<DMO::DIM_DMAT, typename remove_reference<TVX>::type::TSCAL> y;
|
|
85
|
+
static_cast<const DMO*>(this) -> Apply (fel, mip, x, y, lh);
|
|
86
|
+
x = y;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
template <typename FEL, typename MIR, typename TVX>
|
|
90
|
+
void ApplyIR (const FEL & fel, const MIR & mir,
|
|
91
|
+
TVX & x, LocalHeap & lh) const
|
|
92
|
+
{
|
|
93
|
+
for (int i = 0; i < mir.Size(); i++)
|
|
94
|
+
static_cast<const DMO*>(this) -> Apply1 (fel, mir[i], x.Row(i), lh);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
template <typename FEL, typename MIP, class TVX, class TVY>
|
|
99
|
+
void ApplyInv (const FEL & fel, const MIP & mip,
|
|
100
|
+
const TVX & x, TVY && y,
|
|
101
|
+
LocalHeap & lh) const
|
|
102
|
+
{
|
|
103
|
+
Mat<DMO::DIM_DMAT, DMO::DIM_DMAT, double> mat;
|
|
104
|
+
Mat<DMO::DIM_DMAT, DMO::DIM_DMAT, double> inv;
|
|
105
|
+
|
|
106
|
+
static_cast<const DMO*>(this) -> GenerateMatrix (fel, mip, mat, lh);
|
|
107
|
+
CalcInverse (mat, inv);
|
|
108
|
+
y = inv * x;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/// apply transpose coefficient tensor
|
|
112
|
+
template <typename FEL, typename MIP, class TVX, class TVY>
|
|
113
|
+
void ApplyTrans (const FEL & fel, const MIP & mip,
|
|
114
|
+
const TVX & x, TVY & y,
|
|
115
|
+
LocalHeap & lh) const
|
|
116
|
+
{
|
|
117
|
+
Mat<DMO::DIM_DMAT, DMO::DIM_DMAT, double> mat;
|
|
118
|
+
static_cast<const DMO*>(this) -> GenerateMatrix (fel, mip, mat, lh);
|
|
119
|
+
y = Trans (mat) * x;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/// computes energy
|
|
123
|
+
template <typename FEL, typename MIP, class TVX>
|
|
124
|
+
double Energy (const FEL & fel, const MIP & mip,
|
|
125
|
+
const TVX & x, LocalHeap & lh) const
|
|
126
|
+
{
|
|
127
|
+
TVX y;
|
|
128
|
+
static_cast<const DMO*>(this) -> Apply (fel, mip, x, y, lh);
|
|
129
|
+
return 0.5 * InnerProduct (x,y);
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
/*
|
|
135
|
+
template <int H, int DIST, typename T1, typename T2, typename T3>
|
|
136
|
+
void FastMat (FlatMatrixFixHeight<H,T1,DIST> a,
|
|
137
|
+
FlatMatrixFixHeight<H,T2,DIST> b,
|
|
138
|
+
FlatMatrix<T3> c)
|
|
139
|
+
{
|
|
140
|
+
FastMat<H> (a.Width(), DIST, a.Data(), b.Data(), c.Data());
|
|
141
|
+
}
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
template <class DMATOP> // , int DIM_ELEMENT, int DIM_SPACE>
|
|
146
|
+
class T_BDBIntegrator_DMat : public BilinearFormIntegrator
|
|
147
|
+
{
|
|
148
|
+
protected:
|
|
149
|
+
DMATOP dmatop;
|
|
150
|
+
DifferentialOperator * diffop = NULL;
|
|
151
|
+
enum { DIM_DMAT = DMATOP::DIM_DMAT };
|
|
152
|
+
|
|
153
|
+
public:
|
|
154
|
+
|
|
155
|
+
T_BDBIntegrator_DMat (const Array<shared_ptr<CoefficientFunction>> & coeffs);
|
|
156
|
+
// : dmatop(coeffs) { ; }
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
/*
|
|
160
|
+
T_BDBIntegrator_DMat (shared_ptr<CoefficientFunction> & c1)
|
|
161
|
+
: dmatop(c1) { ; }
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
/*
|
|
165
|
+
template <typename ... TMORE>
|
|
166
|
+
T_BDBIntegrator_DMat (shared_ptr<CoefficientFunction> c1, TMORE ... more_coefs);
|
|
167
|
+
// : dmatop(c1, more_coefs ...) { ; }
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
/*
|
|
171
|
+
T_BDBIntegrator_DMat (const CoefficientFunction * coef)
|
|
172
|
+
: dmatop(shared_ptr<CoefficientFunction> (const_cast<CoefficientFunction*>(coef), NOOP_Deleter))
|
|
173
|
+
{ ; }
|
|
174
|
+
*/
|
|
175
|
+
///
|
|
176
|
+
T_BDBIntegrator_DMat (const DMATOP & admat);
|
|
177
|
+
// : dmatop(admat) { ; }
|
|
178
|
+
|
|
179
|
+
virtual ~T_BDBIntegrator_DMat () { delete diffop; }
|
|
180
|
+
|
|
181
|
+
virtual xbool IsSymmetric () const override
|
|
182
|
+
{ return DMATOP::SYMMETRIC; }
|
|
183
|
+
|
|
184
|
+
virtual int DimFlux () const override
|
|
185
|
+
{ return DMATOP::DIM_DMAT; }
|
|
186
|
+
|
|
187
|
+
DMATOP & DMat () { return dmatop; }
|
|
188
|
+
const DMATOP & DMat () const { return dmatop; }
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
int GetIntegrationOrder (const FiniteElement & fel,
|
|
192
|
+
const bool use_higher_integration_order = false) const
|
|
193
|
+
{
|
|
194
|
+
int order = 2 * fel.Order();
|
|
195
|
+
|
|
196
|
+
ELEMENT_TYPE et = fel.ElementType();
|
|
197
|
+
|
|
198
|
+
if (et == ET_TET || et == ET_TRIG || et == ET_SEGM)
|
|
199
|
+
order -= 2 * diffop->DiffOrder();
|
|
200
|
+
|
|
201
|
+
if (common_integration_order >= 0)
|
|
202
|
+
order = common_integration_order;
|
|
203
|
+
|
|
204
|
+
if (integration_order >= 0)
|
|
205
|
+
order = integration_order;
|
|
206
|
+
|
|
207
|
+
if(use_higher_integration_order && higher_integration_order > order)
|
|
208
|
+
order = higher_integration_order;
|
|
209
|
+
|
|
210
|
+
return order;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
IntegrationRule GetIntegrationRule (const FiniteElement & fel,
|
|
215
|
+
const bool use_higher_integration_order = false) const
|
|
216
|
+
{
|
|
217
|
+
// return std::move(IntegrationRule (fel.ElementType(), GetIntegrationOrder(fel, use_higher_integration_order)));
|
|
218
|
+
// return IntegrationRule (fel.ElementType(), GetIntegrationOrder(fel, use_higher_integration_order));
|
|
219
|
+
return { fel.ElementType(), GetIntegrationOrder(fel, use_higher_integration_order) };
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
virtual void ApplyDMat (const FiniteElement & bfel,
|
|
225
|
+
const BaseMappedIntegrationPoint & bmip,
|
|
226
|
+
FlatVector<double> elx,
|
|
227
|
+
FlatVector<double> eldx,
|
|
228
|
+
LocalHeap & lh) const override
|
|
229
|
+
{
|
|
230
|
+
dmatop.Apply(bfel, bmip,
|
|
231
|
+
// static_cast<const MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE> &>(bmip),
|
|
232
|
+
elx, eldx ,lh);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
virtual void ApplyDMat (const FiniteElement & bfel,
|
|
236
|
+
const BaseMappedIntegrationPoint & bmip,
|
|
237
|
+
FlatVector<Complex> elx,
|
|
238
|
+
FlatVector<Complex> eldx,
|
|
239
|
+
LocalHeap & lh) const override
|
|
240
|
+
{
|
|
241
|
+
dmatop.Apply(bfel, bmip,
|
|
242
|
+
// static_cast<const MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE> &>(bmip),
|
|
243
|
+
elx,eldx,lh);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
virtual void ApplyDMat (const FiniteElement & bfel,
|
|
247
|
+
const BaseMappedIntegrationRule & bmir,
|
|
248
|
+
FlatMatrix<double> elx,
|
|
249
|
+
FlatMatrix<double> eldx,
|
|
250
|
+
LocalHeap & lh) const override
|
|
251
|
+
{
|
|
252
|
+
// const MappedIntegrationRule<DIM_ELEMENT,DIM_SPACE> & mir =
|
|
253
|
+
// static_cast<const MappedIntegrationRule<DIM_ELEMENT,DIM_SPACE>&> (bmir);
|
|
254
|
+
|
|
255
|
+
for (int i = 0; i < bmir.Size(); i++)
|
|
256
|
+
dmatop.Apply (bfel, bmir[i], elx.Row(i), eldx.Row(i), lh);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
virtual void ApplyDMatInv (const FiniteElement & bfel,
|
|
260
|
+
const BaseMappedIntegrationRule & bmir,
|
|
261
|
+
FlatMatrix<double> elx,
|
|
262
|
+
FlatMatrix<double> eldx,
|
|
263
|
+
LocalHeap & lh) const override
|
|
264
|
+
{
|
|
265
|
+
// const MappedIntegrationRule<DIM_ELEMENT,DIM_SPACE> & mir =
|
|
266
|
+
// static_cast<const MappedIntegrationRule<DIM_ELEMENT,DIM_SPACE>&> (bmir);
|
|
267
|
+
|
|
268
|
+
for (int i = 0; i < bmir.Size(); i++)
|
|
269
|
+
dmatop.ApplyInv (bfel, bmir[i], elx.Row(i), eldx.Row(i), lh);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
virtual void ApplyDMat (const FiniteElement & bfel,
|
|
274
|
+
const BaseMappedIntegrationRule & bmir,
|
|
275
|
+
FlatMatrix<Complex> elx,
|
|
276
|
+
FlatMatrix<Complex> eldx,
|
|
277
|
+
LocalHeap & lh) const override
|
|
278
|
+
{
|
|
279
|
+
// const MappedIntegrationRule<DIM_ELEMENT,DIM_SPACE> & mir =
|
|
280
|
+
// static_cast<const MappedIntegrationRule<DIM_ELEMENT,DIM_SPACE>&> (bmir);
|
|
281
|
+
|
|
282
|
+
for (int i = 0; i < bmir.Size(); i++)
|
|
283
|
+
dmatop.Apply (bfel, bmir[i], elx.Row(i), eldx.Row(i), lh);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
virtual void
|
|
291
|
+
CalcFlux (const FiniteElement & fel,
|
|
292
|
+
const BaseMappedIntegrationPoint & bmip,
|
|
293
|
+
BareSliceVector<double> elx,
|
|
294
|
+
FlatVector<double> flux,
|
|
295
|
+
bool applyd,
|
|
296
|
+
LocalHeap & lh) const override
|
|
297
|
+
{
|
|
298
|
+
diffop -> Apply (fel, bmip, elx, flux, lh);
|
|
299
|
+
|
|
300
|
+
FlatVec<DMATOP::DIM_DMAT,double> hflux(&flux(0));
|
|
301
|
+
if (applyd)
|
|
302
|
+
dmatop.Apply1 (fel, bmip, hflux, lh);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
virtual void
|
|
306
|
+
CalcFlux (const FiniteElement & fel,
|
|
307
|
+
const BaseMappedIntegrationRule & bmir,
|
|
308
|
+
BareSliceVector<double> elx,
|
|
309
|
+
BareSliceMatrix<double> flux,
|
|
310
|
+
bool applyd,
|
|
311
|
+
LocalHeap & lh) const override
|
|
312
|
+
{
|
|
313
|
+
diffop->Apply (fel, bmir, elx, flux, lh);
|
|
314
|
+
|
|
315
|
+
FlatMatrixFixWidth<DMATOP::DIM_DMAT,double> hflux(bmir.Size(), &flux(0,0));
|
|
316
|
+
if (applyd)
|
|
317
|
+
dmatop.ApplyIR (fel, bmir, hflux, lh);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
virtual void
|
|
321
|
+
CalcFlux (const FiniteElement & fel,
|
|
322
|
+
const BaseMappedIntegrationPoint & bmip,
|
|
323
|
+
BareSliceVector<Complex> elx,
|
|
324
|
+
FlatVector<Complex> flux,
|
|
325
|
+
bool applyd,
|
|
326
|
+
LocalHeap & lh) const override
|
|
327
|
+
{
|
|
328
|
+
diffop->Apply (fel, bmip, elx, flux, lh);
|
|
329
|
+
|
|
330
|
+
FlatVec<DMATOP::DIM_DMAT,Complex> hflux(&flux(0));
|
|
331
|
+
if (applyd)
|
|
332
|
+
dmatop.Apply1 (fel, bmip, hflux, lh);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
virtual void
|
|
336
|
+
CalcFlux (const FiniteElement & fel,
|
|
337
|
+
const BaseMappedIntegrationRule & bmir,
|
|
338
|
+
BareSliceVector<Complex> elx,
|
|
339
|
+
BareSliceMatrix<Complex> flux,
|
|
340
|
+
bool applyd,
|
|
341
|
+
LocalHeap & lh) const override
|
|
342
|
+
{
|
|
343
|
+
diffop->Apply (fel, bmir, elx, flux, lh);
|
|
344
|
+
|
|
345
|
+
FlatMatrixFixWidth<DMATOP::DIM_DMAT,Complex> hflux(bmir.Size(), &flux(0,0));
|
|
346
|
+
if (applyd)
|
|
347
|
+
dmatop.ApplyIR (fel, bmir, hflux, lh);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
virtual void
|
|
354
|
+
CalcFluxMulti (const FiniteElement & fel,
|
|
355
|
+
const BaseMappedIntegrationPoint & mip,
|
|
356
|
+
int m,
|
|
357
|
+
FlatVector<double> elx,
|
|
358
|
+
FlatVector<double> flux,
|
|
359
|
+
bool applyd,
|
|
360
|
+
LocalHeap & lh) const override
|
|
361
|
+
{
|
|
362
|
+
int ndof = fel.GetNDof();
|
|
363
|
+
int dimension = this->GetDimension();
|
|
364
|
+
FlatMatrixFixHeight<DIM_DMAT> bmat (ndof * dimension, lh);
|
|
365
|
+
|
|
366
|
+
diffop->CalcMatrix (fel, mip, bmat, lh);
|
|
367
|
+
|
|
368
|
+
if (applyd)
|
|
369
|
+
{
|
|
370
|
+
Vec<DIM_DMAT> hv1;
|
|
371
|
+
Mat<DIM_DMAT,DIM_DMAT> dmat;
|
|
372
|
+
dmatop.GenerateMatrix (fel, mip, dmat, lh);
|
|
373
|
+
|
|
374
|
+
for (int i = 0; i < m; i++)
|
|
375
|
+
{
|
|
376
|
+
SliceVector<double> slice_x (ndof*dimension, m, &const_cast<double&> (elx(i)));
|
|
377
|
+
SliceVector<double> slice_flux (DIM_DMAT, m, &flux(i));
|
|
378
|
+
hv1 = bmat * slice_x;
|
|
379
|
+
slice_flux = dmat * hv1;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
else
|
|
383
|
+
{
|
|
384
|
+
for (int i = 0; i < m; i++)
|
|
385
|
+
{
|
|
386
|
+
// SliceVector<double> slice_x (ndof*DIM, m, &const_cast<double&> (elx(i)));
|
|
387
|
+
SliceVector<double> slice_x (ndof*dimension, m, &elx(i));
|
|
388
|
+
SliceVector<double> slice_flux (DIM_DMAT, m, &flux(i));
|
|
389
|
+
slice_flux = bmat * slice_x;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
virtual void
|
|
397
|
+
ApplyBTrans (const FiniteElement & fel,
|
|
398
|
+
const BaseMappedIntegrationPoint & bmip,
|
|
399
|
+
FlatVector<double> elx,
|
|
400
|
+
FlatVector<double> ely,
|
|
401
|
+
LocalHeap & lh) const override
|
|
402
|
+
{
|
|
403
|
+
diffop->ApplyTrans (fel, bmip, elx, ely, lh);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
virtual void
|
|
408
|
+
ApplyBTrans (const FiniteElement & fel,
|
|
409
|
+
const BaseMappedIntegrationPoint & bmip,
|
|
410
|
+
FlatVector<Complex> elx,
|
|
411
|
+
FlatVector<Complex> ely,
|
|
412
|
+
LocalHeap & lh) const override
|
|
413
|
+
{
|
|
414
|
+
diffop->ApplyTrans (fel, bmip, elx, ely, lh);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
virtual void
|
|
419
|
+
ApplyBTrans (const FiniteElement & fel,
|
|
420
|
+
const BaseMappedIntegrationRule & bmir,
|
|
421
|
+
FlatMatrix<double> elx,
|
|
422
|
+
FlatVector<double> ely,
|
|
423
|
+
LocalHeap & lh) const override
|
|
424
|
+
{
|
|
425
|
+
// const MappedIntegrationRule<DIM_ELEMENT,DIM_SPACE> & mir =
|
|
426
|
+
// static_cast<const MappedIntegrationRule<DIM_ELEMENT,DIM_SPACE>&> (bmir);
|
|
427
|
+
diffop->ApplyTrans (fel, bmir, elx, ely, lh);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
virtual void
|
|
432
|
+
ApplyElementMatrix (const FiniteElement & bfel,
|
|
433
|
+
const ElementTransformation & eltrans,
|
|
434
|
+
const FlatVector<double> elx,
|
|
435
|
+
FlatVector<double> ely,
|
|
436
|
+
void * precomputed,
|
|
437
|
+
LocalHeap & lh) const override
|
|
438
|
+
{
|
|
439
|
+
T_ApplyElementMatrix<double> (bfel, eltrans, elx, ely, precomputed, lh);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
virtual void
|
|
443
|
+
ApplyElementMatrix (const FiniteElement & bfel,
|
|
444
|
+
const ElementTransformation & eltrans,
|
|
445
|
+
FlatVector<Complex> elx,
|
|
446
|
+
FlatVector<Complex> ely,
|
|
447
|
+
void * precomputed,
|
|
448
|
+
LocalHeap & lh) const override
|
|
449
|
+
{
|
|
450
|
+
T_ApplyElementMatrix<Complex> (bfel, eltrans, elx, ely, precomputed, lh);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
template <typename TSCAL>
|
|
455
|
+
void T_ApplyElementMatrix (const FiniteElement & fel,
|
|
456
|
+
const ElementTransformation & eltrans,
|
|
457
|
+
FlatVector<TSCAL> elx,
|
|
458
|
+
FlatVector<TSCAL> ely,
|
|
459
|
+
void * precomputed,
|
|
460
|
+
LocalHeap & lh) const
|
|
461
|
+
{
|
|
462
|
+
const IntegrationRule & ir = GetIntegrationRule (fel,eltrans.HigherIntegrationOrderSet());
|
|
463
|
+
BaseMappedIntegrationRule & mir = eltrans(ir, lh);
|
|
464
|
+
|
|
465
|
+
FlatMatrixFixWidth<DMATOP::DIM_DMAT, TSCAL> hv1(ir.GetNIP(), lh);
|
|
466
|
+
diffop->Apply (fel, mir, elx, hv1, lh);
|
|
467
|
+
dmatop.ApplyIR (fel, mir, hv1, lh);
|
|
468
|
+
for (int i = 0; i < mir.Size(); i++)
|
|
469
|
+
hv1.Row(i) *= mir[i].GetWeight();
|
|
470
|
+
diffop->ApplyTrans (fel, mir, hv1, ely, lh);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
///
|
|
475
|
+
virtual void
|
|
476
|
+
ApplyMixedElementMatrix (const FiniteElement & bfel1,
|
|
477
|
+
const FiniteElement & bfel2,
|
|
478
|
+
const ElementTransformation & eltrans,
|
|
479
|
+
FlatVector<double> elx,
|
|
480
|
+
FlatVector<double> ely,
|
|
481
|
+
LocalHeap & lh) const
|
|
482
|
+
{
|
|
483
|
+
HeapReset hr1 (lh);
|
|
484
|
+
|
|
485
|
+
ely = 0;
|
|
486
|
+
|
|
487
|
+
Vec<DIM_DMAT,double> hv1;
|
|
488
|
+
Vec<DIM_DMAT,double> hv2;
|
|
489
|
+
|
|
490
|
+
FlatVector<double> hely (ely.Size(), lh);
|
|
491
|
+
|
|
492
|
+
const IntegrationRule & ir = GetIntegrationRule (bfel2,eltrans.HigherIntegrationOrderSet());
|
|
493
|
+
|
|
494
|
+
for (int i = 0; i < ir.GetNIP(); i++)
|
|
495
|
+
{
|
|
496
|
+
HeapReset hr (lh);
|
|
497
|
+
BaseMappedIntegrationPoint & mip = eltrans(ir[i], lh);
|
|
498
|
+
// MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE> mip (ir[i], eltrans);
|
|
499
|
+
|
|
500
|
+
diffop->Apply (bfel1, mip, elx, hv1, lh);
|
|
501
|
+
dmatop.Apply (bfel1, mip, hv1, hv2, lh);
|
|
502
|
+
diffop->ApplyTrans (bfel2, mip, hv2, hely, lh);
|
|
503
|
+
|
|
504
|
+
ely += mip.GetWeight() * hely;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
virtual void
|
|
513
|
+
CalcElementMatrixDiag (const FiniteElement & fel,
|
|
514
|
+
const ElementTransformation & eltrans,
|
|
515
|
+
FlatVector<double> diag,
|
|
516
|
+
LocalHeap & lh) const override
|
|
517
|
+
{
|
|
518
|
+
try
|
|
519
|
+
{
|
|
520
|
+
// diag.AssignMemory (ndof*DIM, lh);
|
|
521
|
+
diag = 0.0;
|
|
522
|
+
|
|
523
|
+
FlatMatrixFixHeight<DIM_DMAT, double> bmat (diag.Size(), lh);
|
|
524
|
+
Mat<DIM_DMAT,DIM_DMAT> dmat;
|
|
525
|
+
|
|
526
|
+
const IntegrationRule & ir = GetIntegrationRule (fel,eltrans.HigherIntegrationOrderSet());
|
|
527
|
+
|
|
528
|
+
for (int i = 0; i < ir.GetNIP(); i++)
|
|
529
|
+
{
|
|
530
|
+
HeapReset hr(lh);
|
|
531
|
+
BaseMappedIntegrationPoint & mip = eltrans(ir[i], lh);
|
|
532
|
+
|
|
533
|
+
diffop->CalcMatrix (fel, mip, bmat, lh);
|
|
534
|
+
dmatop.GenerateMatrix (fel, mip, dmat, lh);
|
|
535
|
+
|
|
536
|
+
double fac = mip.GetWeight();
|
|
537
|
+
for (int j = 0; j < diag.Size(); j++)
|
|
538
|
+
{
|
|
539
|
+
Vec<DIM_DMAT> hv = dmat * bmat.Col(j);
|
|
540
|
+
diag(j) += fac * InnerProduct (bmat.Col(j), hv);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
catch (Exception & e)
|
|
546
|
+
{
|
|
547
|
+
e.Append ("in CalcElementMatrixDiag, type = ");
|
|
548
|
+
e.Append (typeid(*this).name());
|
|
549
|
+
e.Append ("\n");
|
|
550
|
+
throw;
|
|
551
|
+
}
|
|
552
|
+
catch (exception & e)
|
|
553
|
+
{
|
|
554
|
+
Exception e2(e.what());
|
|
555
|
+
e2.Append ("\nin CalcElementMatrixDiag, type = ");
|
|
556
|
+
e2.Append (typeid(*this).name());
|
|
557
|
+
e2.Append ("\n");
|
|
558
|
+
throw e2;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
/*
|
|
569
|
+
template <class DMATOP, int DIM_ELEMENT, int DIM_SPACE>
|
|
570
|
+
T_BDBIntegrator_DMat<DMATOP,DIM_ELEMENT, DIM_SPACE>::
|
|
571
|
+
T_BDBIntegrator_DMat (const Array<shared_ptr<CoefficientFunction>> & coeffs)
|
|
572
|
+
: dmatop(coeffs) { ; }
|
|
573
|
+
|
|
574
|
+
template <class DMATOP, int DIM_ELEMENT, int DIM_SPACE> template <typename ... TMORE>
|
|
575
|
+
T_BDBIntegrator_DMat<DMATOP,DIM_ELEMENT, DIM_SPACE>::
|
|
576
|
+
T_BDBIntegrator_DMat (shared_ptr<CoefficientFunction> c1, TMORE ... more_coefs)
|
|
577
|
+
: dmatop(c1, more_coefs ...) { ; }
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
template <class DMATOP, int DIM_ELEMENT, int DIM_SPACE>
|
|
581
|
+
T_BDBIntegrator_DMat<DMATOP,DIM_ELEMENT, DIM_SPACE>::
|
|
582
|
+
T_BDBIntegrator_DMat (const DMATOP & admat)
|
|
583
|
+
: dmatop(admat) { ; }
|
|
584
|
+
*/
|
|
585
|
+
|
|
586
|
+
template <class DMATOP>
|
|
587
|
+
T_BDBIntegrator_DMat<DMATOP>::
|
|
588
|
+
T_BDBIntegrator_DMat (const Array<shared_ptr<CoefficientFunction>> & coeffs)
|
|
589
|
+
: dmatop(coeffs) { ; }
|
|
590
|
+
|
|
591
|
+
/*
|
|
592
|
+
template <class DMATOP> template <typename ... TMORE>
|
|
593
|
+
T_BDBIntegrator_DMat<DMATOP>::
|
|
594
|
+
T_BDBIntegrator_DMat (shared_ptr<CoefficientFunction> c1, TMORE ... more_coefs)
|
|
595
|
+
: dmatop(c1, more_coefs ...) { ; }
|
|
596
|
+
*/
|
|
597
|
+
|
|
598
|
+
template <class DMATOP>
|
|
599
|
+
T_BDBIntegrator_DMat<DMATOP>::
|
|
600
|
+
T_BDBIntegrator_DMat (const DMATOP & admat)
|
|
601
|
+
: dmatop(admat) { ; }
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
Element assembling.
|
|
609
|
+
Assembling for bilinear-forms of type $\int (B v) : D (B u) dx$. \\
|
|
610
|
+
Template argument DiffOp provides differential operator, i.e. B matrix,
|
|
611
|
+
(e.g. gradient, strain operator, curl,...) \\
|
|
612
|
+
DmatOp provides d-matrix (e.g. diagonal, anisotropic, plane stress, ...) \\
|
|
613
|
+
FEL is element type to assemble matrix for (ScalarFiniteElement,
|
|
614
|
+
HCurlFiniteElement, FE_Trig1, ...)
|
|
615
|
+
*/
|
|
616
|
+
template <class DIFFOP, class DMATOP, class FEL = FiniteElement>
|
|
617
|
+
class T_BDBIntegrator : public T_BDBIntegrator_DMat<DMATOP /* , DIFFOP::DIM_ELEMENT, DIFFOP::DIM_SPACE */ >
|
|
618
|
+
{
|
|
619
|
+
protected:
|
|
620
|
+
typedef T_BDBIntegrator_DMat<DMATOP /* , DIFFOP::DIM_ELEMENT, DIFFOP::DIM_SPACE */ > BASE;
|
|
621
|
+
|
|
622
|
+
using BASE::diffop;
|
|
623
|
+
|
|
624
|
+
public:
|
|
625
|
+
|
|
626
|
+
enum { DIM_SPACE = DIFFOP::DIM_SPACE };
|
|
627
|
+
enum { DIM_ELEMENT = DIFFOP::DIM_ELEMENT };
|
|
628
|
+
enum { DIM_DMAT = DIFFOP::DIM_DMAT };
|
|
629
|
+
enum { DIM = DIFFOP::DIM };
|
|
630
|
+
|
|
631
|
+
using BASE::Name;
|
|
632
|
+
using BASE::integration_order;
|
|
633
|
+
using BASE::higher_integration_order;
|
|
634
|
+
using BASE::common_integration_order;
|
|
635
|
+
using BASE::GetIntegrationOrder;
|
|
636
|
+
using BASE::GetIntegrationRule;
|
|
637
|
+
|
|
638
|
+
using BASE::dmatop;
|
|
639
|
+
|
|
640
|
+
/// inherited constructors
|
|
641
|
+
// using BASE::T_BDBIntegrator_DMat;
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
T_BDBIntegrator (const Array<shared_ptr<CoefficientFunction>> & coeffs)
|
|
645
|
+
: BASE(coeffs)
|
|
646
|
+
{
|
|
647
|
+
diffop = new T_DifferentialOperator<DIFFOP>;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
T_BDBIntegrator (const shared_ptr<CoefficientFunction> & c1)
|
|
651
|
+
: BASE(c1)
|
|
652
|
+
{
|
|
653
|
+
diffop = new T_DifferentialOperator<DIFFOP>;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/*
|
|
657
|
+
template <typename ... TMORE>
|
|
658
|
+
T_BDBIntegrator (shared_ptr<CoefficientFunction> c1, TMORE ... more_coefs)
|
|
659
|
+
: BASE(c1, more_coefs ...)
|
|
660
|
+
{
|
|
661
|
+
diffop = new T_DifferentialOperator<DIFFOP>;
|
|
662
|
+
}
|
|
663
|
+
*/
|
|
664
|
+
|
|
665
|
+
/*
|
|
666
|
+
T_BDBIntegrator (const CoefficientFunction * coef)
|
|
667
|
+
: BASE (coef)
|
|
668
|
+
{
|
|
669
|
+
diffop = new T_DifferentialOperator<DIFFOP>;
|
|
670
|
+
}
|
|
671
|
+
*/
|
|
672
|
+
|
|
673
|
+
T_BDBIntegrator (const DMATOP & admat)
|
|
674
|
+
: BASE(admat)
|
|
675
|
+
{
|
|
676
|
+
diffop = new T_DifferentialOperator<DIFFOP>;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
/*
|
|
682
|
+
template <typename ... ARGS>
|
|
683
|
+
T_BDBIntegrator (ARGS ... args)
|
|
684
|
+
: BASE(args...)
|
|
685
|
+
{
|
|
686
|
+
diffop = make_shared<T_DifferentialOperator<DIFFOP>>();
|
|
687
|
+
}
|
|
688
|
+
*/
|
|
689
|
+
|
|
690
|
+
///
|
|
691
|
+
virtual ~T_BDBIntegrator () { ; }
|
|
692
|
+
|
|
693
|
+
///
|
|
694
|
+
virtual int GetDimension () const { return DIM; }
|
|
695
|
+
|
|
696
|
+
///
|
|
697
|
+
//virtual bool BoundaryForm () const
|
|
698
|
+
//{ return int(DIM_SPACE) > int(DIM_ELEMENT); }
|
|
699
|
+
virtual VorB VB() const
|
|
700
|
+
{ return VorB(int(DIM_SPACE)-int(DIM_ELEMENT)); }
|
|
701
|
+
virtual int DimElement () const
|
|
702
|
+
{ return DIM_ELEMENT; }
|
|
703
|
+
|
|
704
|
+
virtual int DimSpace () const
|
|
705
|
+
{ return DIM_SPACE; }
|
|
706
|
+
|
|
707
|
+
virtual void CheckElement (const FiniteElement & el) const
|
|
708
|
+
{
|
|
709
|
+
if (!dynamic_cast<const FEL*> (&el) )
|
|
710
|
+
{
|
|
711
|
+
string err("Element does not match integrator\n");
|
|
712
|
+
err += "element type is ";
|
|
713
|
+
err += typeid(el).name();
|
|
714
|
+
err += " expected type is ";
|
|
715
|
+
err += typeid(FEL).name();
|
|
716
|
+
err += " integrator is ";
|
|
717
|
+
err += Name();
|
|
718
|
+
throw Exception (err);
|
|
719
|
+
/*
|
|
720
|
+
throw Exception (string ("Element does not match integrator\n") +
|
|
721
|
+
string ("element type is ") + typeid(el).name() +
|
|
722
|
+
string (" expected type is ") + typeid(FEL).name() +
|
|
723
|
+
string (" integrator is ") + Name());
|
|
724
|
+
*/
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
virtual void
|
|
729
|
+
CalcElementMatrix (const FiniteElement & bfel,
|
|
730
|
+
const ElementTransformation & eltrans,
|
|
731
|
+
FlatMatrix<double> elmat,
|
|
732
|
+
LocalHeap & lh) const
|
|
733
|
+
{
|
|
734
|
+
T_CalcElementMatrix<double> (bfel, eltrans, elmat, lh);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
virtual void
|
|
738
|
+
CalcElementMatrix (const FiniteElement & bfel,
|
|
739
|
+
const ElementTransformation & eltrans,
|
|
740
|
+
FlatMatrix<Complex> elmat,
|
|
741
|
+
LocalHeap & lh) const
|
|
742
|
+
{
|
|
743
|
+
T_CalcElementMatrix<Complex> (bfel, eltrans, elmat, lh);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
#ifdef TEXT_BOOK_VERSION
|
|
748
|
+
|
|
749
|
+
template <typename TSCAL>
|
|
750
|
+
void T_CalcElementMatrix (const FiniteElement & fel,
|
|
751
|
+
const ElementTransformation & eltrans,
|
|
752
|
+
FlatMatrix<TSCAL> elmat,
|
|
753
|
+
LocalHeap & lh) const
|
|
754
|
+
{
|
|
755
|
+
try
|
|
756
|
+
{
|
|
757
|
+
// const FEL & fel = static_cast<const FEL&> (bfel);
|
|
758
|
+
int ndof = fel.GetNDof();
|
|
759
|
+
|
|
760
|
+
elmat = 0;
|
|
761
|
+
|
|
762
|
+
FlatMatrixFixHeight<DIM_DMAT, TSCAL> bmat (ndof * DIM, lh);
|
|
763
|
+
FlatMatrixFixHeight<DIM_DMAT, TSCAL> dbmat (ndof * DIM, lh);
|
|
764
|
+
Mat<DIM_DMAT,DIM_DMAT,TSCAL> dmat;
|
|
765
|
+
|
|
766
|
+
const IntegrationRule & ir = GetIntegrationRule (fel,eltrans.HigherIntegrationOrderSet());
|
|
767
|
+
|
|
768
|
+
for (int i = 0 ; i < ir.GetNIP(); i++)
|
|
769
|
+
{
|
|
770
|
+
HeapReset hr(lh);
|
|
771
|
+
|
|
772
|
+
MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE>
|
|
773
|
+
mip(ir[i], eltrans, lh);
|
|
774
|
+
|
|
775
|
+
dmatop.GenerateMatrix (fel, mip, dmat, lh);
|
|
776
|
+
|
|
777
|
+
DIFFOP::GenerateMatrix (fel, mip, bmat, lh);
|
|
778
|
+
double fac = mip.GetMeasure() * mip.IP().Weight();
|
|
779
|
+
|
|
780
|
+
dbmat = fac * (dmat * bmat);
|
|
781
|
+
elmat += Trans (bmat) * dbmat;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
catch (Exception & e)
|
|
786
|
+
{
|
|
787
|
+
e.Append ("in CalcElementMatrix - textbook, type = ");
|
|
788
|
+
e.Append (typeid(*this).name());
|
|
789
|
+
e.Append ("\n");
|
|
790
|
+
throw;
|
|
791
|
+
}
|
|
792
|
+
catch (exception & e)
|
|
793
|
+
{
|
|
794
|
+
Exception e2(e.what());
|
|
795
|
+
e2.Append ("\nin CalcElementMatrix - textbook, type = ");
|
|
796
|
+
e2.Append (typeid(*this).name());
|
|
797
|
+
e2.Append ("\n");
|
|
798
|
+
throw e2;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
#endif
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
#ifdef __SSE3__
|
|
807
|
+
// #define BLOCK_VERSION
|
|
808
|
+
#endif
|
|
809
|
+
|
|
810
|
+
// #ifdef __MIC__
|
|
811
|
+
// #define BLOCK_VERSION
|
|
812
|
+
// #endif
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
#ifdef BLOCK_VERSION
|
|
817
|
+
|
|
818
|
+
template <typename TSCAL>
|
|
819
|
+
void T_CalcElementMatrix (const FiniteElement & fel,
|
|
820
|
+
const ElementTransformation & eltrans,
|
|
821
|
+
FlatMatrix<TSCAL> elmat,
|
|
822
|
+
LocalHeap & lh) const
|
|
823
|
+
{
|
|
824
|
+
// static Timer timer(string ("Elementmatrix, ") + Name()); RegionTimer reg (timer);
|
|
825
|
+
try
|
|
826
|
+
{
|
|
827
|
+
int ndof = fel.GetNDof();
|
|
828
|
+
elmat = 0;
|
|
829
|
+
|
|
830
|
+
enum { BLOCK = 4 * (6 / DIM_DMAT + 1) };
|
|
831
|
+
|
|
832
|
+
HeapReset hr1(lh);
|
|
833
|
+
|
|
834
|
+
#ifdef __MIC__
|
|
835
|
+
enum { ROUNDUP = (DIM_DMAT*BLOCK+7) & (-8) };
|
|
836
|
+
#else
|
|
837
|
+
enum { ROUNDUP = (DIM_DMAT*BLOCK+3) & (-4) };
|
|
838
|
+
#endif
|
|
839
|
+
|
|
840
|
+
FlatMatrixFixHeight<DIM_DMAT*BLOCK, double, ROUNDUP> bbmat (ndof * DIM, lh);
|
|
841
|
+
FlatMatrixFixHeight<DIM_DMAT*BLOCK, TSCAL, ROUNDUP> bdbmat (ndof * DIM, lh);
|
|
842
|
+
|
|
843
|
+
typedef decltype (DMATOP::GetMatrixType(TSCAL(0))) TDMAT;
|
|
844
|
+
|
|
845
|
+
IntegrationRule ir(fel.ElementType(),
|
|
846
|
+
GetIntegrationOrder(fel,eltrans.HigherIntegrationOrderSet()));
|
|
847
|
+
|
|
848
|
+
MappedIntegrationRule<DIM_ELEMENT, DIM_SPACE> mir(ir, eltrans, lh);
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
FlatArray<TDMAT> dmats(ir.GetNIP(), lh);
|
|
852
|
+
dmatop.GenerateMatrixIR (fel, mir, dmats, lh);
|
|
853
|
+
|
|
854
|
+
int i = 0;
|
|
855
|
+
for (int i1 = 0; i1 < ir.GetNIP() / BLOCK; i1++)
|
|
856
|
+
{
|
|
857
|
+
DIFFOP::GenerateMatrixIR (fel, mir.Range(i,i+BLOCK), bbmat, lh);
|
|
858
|
+
|
|
859
|
+
for (int i2 = 0; i2 < BLOCK; i2++)
|
|
860
|
+
{
|
|
861
|
+
IntRange rows (i2*DIM_DMAT, (i2+1)*DIM_DMAT);
|
|
862
|
+
TDMAT dmat = mir[i+i2].GetWeight() * dmats[i+i2];
|
|
863
|
+
bdbmat.Rows(rows) = dmat * bbmat.Rows(rows);
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
i += BLOCK;
|
|
867
|
+
|
|
868
|
+
if (DMATOP::SYMMETRIC)
|
|
869
|
+
FastMat (bdbmat, bbmat, elmat);
|
|
870
|
+
else
|
|
871
|
+
elmat += Trans (bbmat.Rows(0,DIM_DMAT*BLOCK)) * bdbmat.Rows(0,DIM_DMAT*BLOCK);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
int rest = ir.GetNIP()-i;
|
|
875
|
+
if (rest > 0)
|
|
876
|
+
{
|
|
877
|
+
DIFFOP::GenerateMatrixIR (fel, mir.Range(i,ir.GetNIP()), bbmat, lh);
|
|
878
|
+
for (int i2 = 0; i2 < rest; i2++)
|
|
879
|
+
{
|
|
880
|
+
IntRange rows (i2*DIM_DMAT, (i2+1)*DIM_DMAT);
|
|
881
|
+
TDMAT dmat = mir[i+i2].GetWeight() * dmats[i+i2];
|
|
882
|
+
bdbmat.Rows(rows) = dmat * bbmat.Rows(rows);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
if (DMATOP::SYMMETRIC)
|
|
886
|
+
{
|
|
887
|
+
/*
|
|
888
|
+
int j = 0;
|
|
889
|
+
for ( ; j <= rest-4; j += 4)
|
|
890
|
+
FastMat (FlatMatrixFixHeight<4*DIM_DMAT,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j*DIM_DMAT)),
|
|
891
|
+
FlatMatrixFixHeight<4*DIM_DMAT,double, ROUNDUP> (ndof*DIM, &bbmat(j*DIM_DMAT)),
|
|
892
|
+
elmat);
|
|
893
|
+
if (j <= rest-2)
|
|
894
|
+
{
|
|
895
|
+
FastMat (FlatMatrixFixHeight<2*DIM_DMAT,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j*DIM_DMAT)),
|
|
896
|
+
FlatMatrixFixHeight<2*DIM_DMAT,double, ROUNDUP> (ndof*DIM, &bbmat(j*DIM_DMAT)),
|
|
897
|
+
elmat);
|
|
898
|
+
j += 2;
|
|
899
|
+
}
|
|
900
|
+
if (j <= rest-1)
|
|
901
|
+
FastMat (FlatMatrixFixHeight<DIM_DMAT,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j*DIM_DMAT)),
|
|
902
|
+
FlatMatrixFixHeight<DIM_DMAT,double, ROUNDUP> (ndof*DIM, &bbmat(j*DIM_DMAT)),
|
|
903
|
+
elmat);
|
|
904
|
+
*/
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
int j = 0;
|
|
908
|
+
int rd = rest*DIM_DMAT;
|
|
909
|
+
|
|
910
|
+
for ( ; j <= rd-8; j += 8)
|
|
911
|
+
/*
|
|
912
|
+
FastMat (FlatMatrixFixHeight<8,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j)),
|
|
913
|
+
FlatMatrixFixHeight<8,double, ROUNDUP> (ndof*DIM, &bbmat(j)),
|
|
914
|
+
elmat);
|
|
915
|
+
*/
|
|
916
|
+
FastMat(bdbmat.template Rows<8>(j), bbmat.template Rows<8>(j), elmat);
|
|
917
|
+
|
|
918
|
+
switch (rd - j)
|
|
919
|
+
{
|
|
920
|
+
case 1:
|
|
921
|
+
/*
|
|
922
|
+
FastMat (FlatMatrixFixHeight<1,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j)),
|
|
923
|
+
FlatMatrixFixHeight<1,double, ROUNDUP> (ndof*DIM, &bbmat(j)),
|
|
924
|
+
elmat);
|
|
925
|
+
*/
|
|
926
|
+
FastMat(bdbmat.template Rows<1>(j), bbmat.template Rows<1>(j), elmat);
|
|
927
|
+
break;
|
|
928
|
+
case 2:
|
|
929
|
+
/*
|
|
930
|
+
FastMat (FlatMatrixFixHeight<2,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j)),
|
|
931
|
+
FlatMatrixFixHeight<2,double, ROUNDUP> (ndof*DIM, &bbmat(j)),
|
|
932
|
+
elmat);
|
|
933
|
+
*/
|
|
934
|
+
FastMat(bdbmat.template Rows<2>(j), bbmat.template Rows<2>(j), elmat);
|
|
935
|
+
break;
|
|
936
|
+
case 3:
|
|
937
|
+
/*
|
|
938
|
+
FastMat (FlatMatrixFixHeight<3,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j)),
|
|
939
|
+
FlatMatrixFixHeight<3,double, ROUNDUP> (ndof*DIM, &bbmat(j)),
|
|
940
|
+
elmat);
|
|
941
|
+
*/
|
|
942
|
+
FastMat (bdbmat.template Rows<3>(j), bbmat.template Rows<3>(j), elmat);
|
|
943
|
+
break;
|
|
944
|
+
case 4:
|
|
945
|
+
/*
|
|
946
|
+
FastMat (FlatMatrixFixHeight<4,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j)),
|
|
947
|
+
FlatMatrixFixHeight<4,double, ROUNDUP> (ndof*DIM, &bbmat(j)),
|
|
948
|
+
elmat);
|
|
949
|
+
*/
|
|
950
|
+
FastMat(bdbmat.template Rows<4>(j), bbmat.template Rows<4>(j), elmat);
|
|
951
|
+
break;
|
|
952
|
+
case 5:
|
|
953
|
+
/*
|
|
954
|
+
FastMat (FlatMatrixFixHeight<5,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j)),
|
|
955
|
+
FlatMatrixFixHeight<5,double, ROUNDUP> (ndof*DIM, &bbmat(j)),
|
|
956
|
+
elmat);
|
|
957
|
+
*/
|
|
958
|
+
FastMat(bdbmat.template Rows<5>(j), bbmat.template Rows<5>(j), elmat);
|
|
959
|
+
break;
|
|
960
|
+
case 6:
|
|
961
|
+
/*
|
|
962
|
+
FastMat (FlatMatrixFixHeight<6,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j)),
|
|
963
|
+
FlatMatrixFixHeight<6,double, ROUNDUP> (ndof*DIM, &bbmat(j)),
|
|
964
|
+
elmat);
|
|
965
|
+
*/
|
|
966
|
+
FastMat(bdbmat.template Rows<6>(j), bbmat.template Rows<6>(j), elmat);
|
|
967
|
+
break;
|
|
968
|
+
case 7:
|
|
969
|
+
/*
|
|
970
|
+
FastMat (FlatMatrixFixHeight<7,TSCAL, ROUNDUP> (ndof*DIM, &bdbmat(j)),
|
|
971
|
+
FlatMatrixFixHeight<7,double, ROUNDUP> (ndof*DIM, &bbmat(j)),
|
|
972
|
+
elmat);
|
|
973
|
+
*/
|
|
974
|
+
FastMat(bdbmat.template Rows<7>(j), bbmat.template Rows<7>(j), elmat);
|
|
975
|
+
break;
|
|
976
|
+
default:
|
|
977
|
+
;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
else
|
|
981
|
+
elmat += Trans (bbmat.Rows(0,rest*DIM_DMAT)) * bdbmat.Rows(0,rest*DIM_DMAT);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
if (DMATOP::SYMMETRIC)
|
|
986
|
+
{
|
|
987
|
+
for (int i = 0; i < elmat.Height(); i++)
|
|
988
|
+
for (int j = 0; j < i; j++)
|
|
989
|
+
elmat(j,i) = elmat(i,j);
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
ir.NothingToDelete();
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
catch (Exception & e)
|
|
996
|
+
{
|
|
997
|
+
e.Append ("in CalcElementMatrix - blockversion, type = ");
|
|
998
|
+
e.Append (typeid(*this).name());
|
|
999
|
+
e.Append ("\n");
|
|
1000
|
+
throw;
|
|
1001
|
+
}
|
|
1002
|
+
catch (exception & e)
|
|
1003
|
+
{
|
|
1004
|
+
Exception e2(e.what());
|
|
1005
|
+
e2.Append ("\nin CalcElementMatrix - blockversion, type = ");
|
|
1006
|
+
e2.Append (typeid(*this).name());
|
|
1007
|
+
e2.Append ("\n");
|
|
1008
|
+
throw e2;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
#else // blockversion
|
|
1015
|
+
// one matrix matrix multiplication
|
|
1016
|
+
///
|
|
1017
|
+
template <typename TSCAL>
|
|
1018
|
+
void T_CalcElementMatrix (const FiniteElement & fel,
|
|
1019
|
+
const ElementTransformation & eltrans,
|
|
1020
|
+
FlatMatrix<TSCAL> elmat,
|
|
1021
|
+
LocalHeap & lh) const
|
|
1022
|
+
{
|
|
1023
|
+
// static Timer timer (string ("Elementmatrix, ") + Name(), NoTracing);
|
|
1024
|
+
// static Timer timer2 (string ("Elementmatrix, ") + Name() + ", Lapack", NoTracing, NoTiming);
|
|
1025
|
+
// RegionTimer reg (timer);
|
|
1026
|
+
|
|
1027
|
+
// try
|
|
1028
|
+
{
|
|
1029
|
+
// const FEL & fel = static_cast<const FEL&> (bfel);
|
|
1030
|
+
int ndof = fel.GetNDof();
|
|
1031
|
+
|
|
1032
|
+
HeapReset hr(lh);
|
|
1033
|
+
|
|
1034
|
+
const IntegrationRule & ir = GetIntegrationRule (fel,eltrans.HigherIntegrationOrderSet());
|
|
1035
|
+
MappedIntegrationRule<DIM_ELEMENT, DIM_SPACE> mir(ir, eltrans, lh);
|
|
1036
|
+
|
|
1037
|
+
FlatMatrixFixHeight<DIM_DMAT> bmat (ndof * DIM, lh);
|
|
1038
|
+
Mat<DIM_DMAT,DIM_DMAT,TSCAL> dmat;
|
|
1039
|
+
|
|
1040
|
+
FlatMatrix<TSCAL> bbmat (ndof * DIM, DIM_DMAT*ir.GetNIP(), lh);
|
|
1041
|
+
FlatMatrix<TSCAL> bdbmat (ndof * DIM, DIM_DMAT*ir.GetNIP(), lh);
|
|
1042
|
+
|
|
1043
|
+
for (int i = 0; i < ir.GetNIP(); i++)
|
|
1044
|
+
{
|
|
1045
|
+
HeapReset hr(lh);
|
|
1046
|
+
const MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE> & mip = mir[i];
|
|
1047
|
+
|
|
1048
|
+
DIFFOP::GenerateMatrix (fel, mip, bmat, lh);
|
|
1049
|
+
dmatop.GenerateMatrix (fel, mip, dmat, lh);
|
|
1050
|
+
dmat *= mip.GetWeight();
|
|
1051
|
+
|
|
1052
|
+
bbmat.Cols(i*DIM_DMAT, (i+1)*DIM_DMAT) = Trans (bmat);
|
|
1053
|
+
bdbmat.Cols(i*DIM_DMAT, (i+1)*DIM_DMAT) = Trans (dmat * bmat);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
// RegionTimer reg2 (timer2);
|
|
1057
|
+
|
|
1058
|
+
if (ndof < 20)
|
|
1059
|
+
{
|
|
1060
|
+
if (DMATOP::SYMMETRIC)
|
|
1061
|
+
elmat = Symmetric ( bdbmat * Trans (bbmat));
|
|
1062
|
+
else
|
|
1063
|
+
elmat = bbmat * Trans (bdbmat);
|
|
1064
|
+
}
|
|
1065
|
+
else
|
|
1066
|
+
elmat = bbmat * Trans(bdbmat) | Lapack;
|
|
1067
|
+
|
|
1068
|
+
// timer.AddFlops (long(elmat.Height())*long(elmat.Width())*bbmat.Width());
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
/*
|
|
1072
|
+
catch (Exception & e)
|
|
1073
|
+
{
|
|
1074
|
+
e.Append (string ("in CalcElementMatrix - lapack, type = ") + typeid(*this).name() + "\n");
|
|
1075
|
+
throw;
|
|
1076
|
+
}
|
|
1077
|
+
catch (exception & e)
|
|
1078
|
+
{
|
|
1079
|
+
Exception e2(e.what());
|
|
1080
|
+
e2.Append (string ("\nin CalcElementMatrix - lapack, type = ") + typeid(*this).name() + "\n");
|
|
1081
|
+
throw e2;
|
|
1082
|
+
}
|
|
1083
|
+
*/
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
#endif
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
};
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
template <class DIFFOP, class DMATOP, class FEL = FiniteElement>
|
|
1116
|
+
class T_NonlinearBDBIntegrator : public T_BDBIntegrator<DIFFOP, DMATOP, FEL>
|
|
1117
|
+
{
|
|
1118
|
+
protected:
|
|
1119
|
+
enum { DIM_SPACE = DIFFOP::DIM_SPACE };
|
|
1120
|
+
enum { DIM_ELEMENT = DIFFOP::DIM_ELEMENT };
|
|
1121
|
+
enum { DIM_DMAT = DIFFOP::DIM_DMAT };
|
|
1122
|
+
enum { DIM = DIFFOP::DIM };
|
|
1123
|
+
|
|
1124
|
+
using T_BDBIntegrator<DIFFOP,DMATOP,FEL>::GetIntegrationRule;
|
|
1125
|
+
using T_BDBIntegrator<DIFFOP,DMATOP,FEL>::diffop;
|
|
1126
|
+
|
|
1127
|
+
public:
|
|
1128
|
+
///
|
|
1129
|
+
T_NonlinearBDBIntegrator (const DMATOP & admat)
|
|
1130
|
+
: T_BDBIntegrator<DIFFOP,DMATOP,FEL> (admat)
|
|
1131
|
+
{ ; }
|
|
1132
|
+
|
|
1133
|
+
///
|
|
1134
|
+
virtual ~T_NonlinearBDBIntegrator ()
|
|
1135
|
+
{ ; }
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
virtual void
|
|
1139
|
+
CalcLinearizedElementMatrix (const FiniteElement & fel,
|
|
1140
|
+
const ElementTransformation & eltrans,
|
|
1141
|
+
FlatVector<double> elveclin,
|
|
1142
|
+
FlatMatrix<double> elmat,
|
|
1143
|
+
LocalHeap & lh) const
|
|
1144
|
+
{
|
|
1145
|
+
// static Timer maintimer (string ("NonlinearBDB, CalcLinearized, ") + this->Name(), NoTracing);
|
|
1146
|
+
// static Timer bdbtimer ("NonlinearBDB, bdb product", NoTracing, NoTiming);
|
|
1147
|
+
// RegionTimer reg(maintimer);
|
|
1148
|
+
|
|
1149
|
+
try
|
|
1150
|
+
{
|
|
1151
|
+
int ndof = fel.GetNDof();
|
|
1152
|
+
|
|
1153
|
+
elmat = 0;
|
|
1154
|
+
|
|
1155
|
+
FlatMatrixFixHeight<DIM_DMAT, double> bmat (ndof * DIM, lh);
|
|
1156
|
+
FlatMatrixFixHeight<DIM_DMAT, double> dbmat (ndof * DIM, lh);
|
|
1157
|
+
Vec<DIM_DMAT,double> hvlin;
|
|
1158
|
+
|
|
1159
|
+
Mat<DIM_DMAT,DIM_DMAT> dmat;
|
|
1160
|
+
|
|
1161
|
+
const IntegrationRule & ir = GetIntegrationRule (fel);
|
|
1162
|
+
|
|
1163
|
+
for (int i = 0; i < ir.GetNIP(); i++)
|
|
1164
|
+
{
|
|
1165
|
+
HeapReset hr(lh);
|
|
1166
|
+
|
|
1167
|
+
MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE> mip(ir[i], eltrans);
|
|
1168
|
+
|
|
1169
|
+
DIFFOP::Apply (fel, mip, elveclin, hvlin, lh);
|
|
1170
|
+
DIFFOP::GenerateMatrix (fel, mip, bmat, lh);
|
|
1171
|
+
|
|
1172
|
+
this->dmatop . GenerateLinearizedMatrix (fel, mip, hvlin, dmat, lh);
|
|
1173
|
+
|
|
1174
|
+
double fac = mip.GetWeight();
|
|
1175
|
+
|
|
1176
|
+
{
|
|
1177
|
+
// NgProfiler::RegionTimer reg(bdbtimer);
|
|
1178
|
+
dbmat = fac * (dmat * bmat);
|
|
1179
|
+
elmat += Trans (bmat) * dbmat;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
catch (Exception & e)
|
|
1185
|
+
{
|
|
1186
|
+
e.Append ("in CalcLinearizedElementMatrix, type = ");
|
|
1187
|
+
e.Append (typeid(*this).name());
|
|
1188
|
+
e.Append ("\n");
|
|
1189
|
+
throw;
|
|
1190
|
+
}
|
|
1191
|
+
catch (exception & e)
|
|
1192
|
+
{
|
|
1193
|
+
Exception e2(e.what());
|
|
1194
|
+
e2.Append ("\nin CalcLinearizedElementMatrix, type = ");
|
|
1195
|
+
e2.Append (typeid(*this).name());
|
|
1196
|
+
e2.Append ("\n");
|
|
1197
|
+
throw e2;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
virtual void
|
|
1204
|
+
CalcLinearizedElementMatrix (const FiniteElement & bfel,
|
|
1205
|
+
const ElementTransformation & eltrans,
|
|
1206
|
+
FlatVector<Complex> elveclin,
|
|
1207
|
+
FlatMatrix<Complex> elmat,
|
|
1208
|
+
LocalHeap & lh) const
|
|
1209
|
+
{
|
|
1210
|
+
// static Timer maintimer (string ("NonlinearBDB, CalcLinearized<Complex>, ") + this->Name(), NoTracing);
|
|
1211
|
+
// static Timer bdbtimer ("NonlinearBDB, bdb product", NoTracing, NoTiming);
|
|
1212
|
+
// RegionTimer reg(maintimer);
|
|
1213
|
+
|
|
1214
|
+
try
|
|
1215
|
+
{
|
|
1216
|
+
const FEL & fel = static_cast<const FEL&> (bfel);
|
|
1217
|
+
int ndof = fel.GetNDof();
|
|
1218
|
+
|
|
1219
|
+
elmat = 0;
|
|
1220
|
+
|
|
1221
|
+
FlatMatrixFixHeight<DIM_DMAT, Complex> bmat (ndof * DIM, lh);
|
|
1222
|
+
FlatMatrixFixHeight<DIM_DMAT, Complex> dbmat (ndof * DIM, lh);
|
|
1223
|
+
Vec<DIM_DMAT,Complex> hvlin;
|
|
1224
|
+
|
|
1225
|
+
Mat<DIM_DMAT,DIM_DMAT, Complex> dmat;
|
|
1226
|
+
|
|
1227
|
+
const IntegrationRule & ir = GetIntegrationRule (fel);
|
|
1228
|
+
MappedIntegrationRule<DIM_ELEMENT, DIM_SPACE> mir(ir, eltrans, lh);
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
FlatMatrix<Complex> bbmat (ndof * DIM, DIM_DMAT*ir.GetNIP(), lh);
|
|
1232
|
+
FlatMatrix<Complex> bdbmat (ndof * DIM, DIM_DMAT*ir.GetNIP(), lh);
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
for (int i = 0; i < ir.GetNIP(); i++)
|
|
1236
|
+
{
|
|
1237
|
+
HeapReset hr(lh);
|
|
1238
|
+
|
|
1239
|
+
MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE> & mip = mir[i];
|
|
1240
|
+
|
|
1241
|
+
diffop->Apply (fel, mip, elveclin, hvlin, lh);
|
|
1242
|
+
DIFFOP::GenerateMatrix (fel, mip, bmat, lh);
|
|
1243
|
+
this->dmatop . GenerateLinearizedMatrix (fel, mip, hvlin, dmat, lh);
|
|
1244
|
+
|
|
1245
|
+
dmat *= mip.GetWeight();
|
|
1246
|
+
bbmat.Cols(i*DIM_DMAT, (i+1)*DIM_DMAT) = Trans (bmat);
|
|
1247
|
+
bdbmat.Cols(i*DIM_DMAT, (i+1)*DIM_DMAT) = Trans (dmat * bmat);
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
// RegionTimer reg(bdbtimer);
|
|
1252
|
+
|
|
1253
|
+
if (ndof < 20)
|
|
1254
|
+
{
|
|
1255
|
+
if (DMATOP::SYMMETRIC)
|
|
1256
|
+
elmat = Symmetric ( bdbmat * Trans (bbmat));
|
|
1257
|
+
else
|
|
1258
|
+
elmat = bbmat * Trans (bdbmat);
|
|
1259
|
+
}
|
|
1260
|
+
else
|
|
1261
|
+
// LapackMultABt (bbmat, bdbmat, elmat);
|
|
1262
|
+
// LapackMult (bbmat, Trans(bdbmat), elmat);
|
|
1263
|
+
elmat = bbmat * Trans (bdbmat) | Lapack;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
catch (Exception & e)
|
|
1267
|
+
{
|
|
1268
|
+
e.Append ("in CalcLinearizedElementMatrix, type = ");
|
|
1269
|
+
e.Append (typeid(*this).name());
|
|
1270
|
+
e.Append ("\n");
|
|
1271
|
+
throw;
|
|
1272
|
+
}
|
|
1273
|
+
catch (exception & e)
|
|
1274
|
+
{
|
|
1275
|
+
Exception e2(e.what());
|
|
1276
|
+
e2.Append ("\nin CalcLinearizedElementMatrix, type = ");
|
|
1277
|
+
e2.Append (typeid(*this).name());
|
|
1278
|
+
e2.Append ("\n");
|
|
1279
|
+
throw e2;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
///
|
|
1290
|
+
virtual void
|
|
1291
|
+
ApplyLinearizedElementMatrix (const FiniteElement & fel,
|
|
1292
|
+
const ElementTransformation & eltrans,
|
|
1293
|
+
FlatVector<double> ellin,
|
|
1294
|
+
FlatVector<double> elx,
|
|
1295
|
+
FlatVector<double> ely,
|
|
1296
|
+
LocalHeap & lh) const
|
|
1297
|
+
{
|
|
1298
|
+
// const FEL & fel = dynamic_cast<const FEL&> (bfel);
|
|
1299
|
+
int ndof = fel.GetNDof ();
|
|
1300
|
+
|
|
1301
|
+
ely = 0;
|
|
1302
|
+
|
|
1303
|
+
Vec<DIM_DMAT,double> hvlin;
|
|
1304
|
+
Vec<DIM_DMAT,double> hvx;
|
|
1305
|
+
Vec<DIM_DMAT,double> hvy;
|
|
1306
|
+
|
|
1307
|
+
FlatVector<double> hely (ndof*DIM, lh);
|
|
1308
|
+
|
|
1309
|
+
const IntegrationRule & ir = GetIntegrationRule (fel);
|
|
1310
|
+
|
|
1311
|
+
for (int i = 0; i < ir.GetNIP(); i++)
|
|
1312
|
+
{
|
|
1313
|
+
const IntegrationPoint & ip = ir[i];
|
|
1314
|
+
|
|
1315
|
+
MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE> mip (ir[i], eltrans);
|
|
1316
|
+
|
|
1317
|
+
diffop->Apply (fel, mip, ellin, hvlin, lh);
|
|
1318
|
+
diffop->Apply (fel, mip, elx, hvx, lh);
|
|
1319
|
+
this->dmatop.ApplyLinearized (fel, mip, hvlin, hvx, hvy, lh);
|
|
1320
|
+
diffop->ApplyTrans (fel, mip, hvy, hely, lh);
|
|
1321
|
+
|
|
1322
|
+
double fac = fabs (mip.GetJacobiDet()) * ip.Weight();
|
|
1323
|
+
ely += fac * hely;
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
///
|
|
1330
|
+
virtual void
|
|
1331
|
+
ApplyLinearizedElementMatrix (const FiniteElement & bfel,
|
|
1332
|
+
const ElementTransformation & eltrans,
|
|
1333
|
+
FlatVector<Complex> ellin,
|
|
1334
|
+
FlatVector<Complex> elx,
|
|
1335
|
+
FlatVector<Complex> ely,
|
|
1336
|
+
LocalHeap & lh) const
|
|
1337
|
+
{
|
|
1338
|
+
const FEL & fel = dynamic_cast<const FEL&> (bfel);
|
|
1339
|
+
int ndof = fel.GetNDof ();
|
|
1340
|
+
|
|
1341
|
+
ely = 0;
|
|
1342
|
+
|
|
1343
|
+
Vec<DIM_DMAT,Complex> hvlin;
|
|
1344
|
+
Vec<DIM_DMAT,Complex> hvx;
|
|
1345
|
+
Vec<DIM_DMAT,Complex> hvy;
|
|
1346
|
+
|
|
1347
|
+
FlatVector<Complex> hely (ndof*DIM, lh);
|
|
1348
|
+
|
|
1349
|
+
/*
|
|
1350
|
+
int order = IntegrationOrder (fel);
|
|
1351
|
+
const IntegrationRule & ir =
|
|
1352
|
+
GetIntegrationRules().SelectIntegrationRule (fel.ElementType(), order);
|
|
1353
|
+
*/
|
|
1354
|
+
const IntegrationRule & ir = GetIntegrationRule (fel);
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
for (int i = 0; i < ir.GetNIP(); i++)
|
|
1359
|
+
{
|
|
1360
|
+
MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE> mip (ir[i], eltrans);
|
|
1361
|
+
|
|
1362
|
+
DIFFOP::Apply (fel, mip, ellin, hvlin, lh);
|
|
1363
|
+
DIFFOP::Apply (fel, mip, elx, hvx, lh);
|
|
1364
|
+
this->dmatop.ApplyLinearized (fel, mip, hvlin, hvx, hvy, lh);
|
|
1365
|
+
DIFFOP::ApplyTrans (fel, mip, hvy, hely, lh);
|
|
1366
|
+
|
|
1367
|
+
double fac = fabs (mip.GetJacobiDet()) * mip.IP().Weight();
|
|
1368
|
+
ely += fac * hely;
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
virtual double Energy (const FiniteElement & bfel,
|
|
1375
|
+
const ElementTransformation & eltrans,
|
|
1376
|
+
FlatVector<double> elx,
|
|
1377
|
+
LocalHeap & lh) const
|
|
1378
|
+
{
|
|
1379
|
+
const FEL & fel = dynamic_cast<const FEL&> (bfel);
|
|
1380
|
+
|
|
1381
|
+
Vec<DIM_DMAT,double> hvx;
|
|
1382
|
+
const IntegrationRule & ir = GetIntegrationRule (fel);
|
|
1383
|
+
|
|
1384
|
+
double energy = 0;
|
|
1385
|
+
|
|
1386
|
+
for (int i = 0; i < ir.GetNIP(); i++)
|
|
1387
|
+
{
|
|
1388
|
+
const IntegrationPoint & ip = ir[i];
|
|
1389
|
+
|
|
1390
|
+
MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE> mip (ir[i], eltrans);
|
|
1391
|
+
DIFFOP::Apply (fel, mip, elx, hvx, lh);
|
|
1392
|
+
|
|
1393
|
+
double fac = fabs (mip.GetJacobiDet()) * ip.Weight();
|
|
1394
|
+
energy += fac * this->dmatop.Energy (fel, mip, hvx, lh);
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
return energy;
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
};
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
Element vector assembling.
|
|
1429
|
+
Assembling for linear-forms of type $\int D (B u) dx$.
|
|
1430
|
+
*/
|
|
1431
|
+
template <class DIFFOP, class DVecOp, class FEL = FiniteElement>
|
|
1432
|
+
class T_BIntegrator : public LinearFormIntegrator
|
|
1433
|
+
{
|
|
1434
|
+
protected:
|
|
1435
|
+
DVecOp dvecop;
|
|
1436
|
+
// DifferentialOperator * diffop = new T_DifferentialOperator<DIFFOP>;
|
|
1437
|
+
unique_ptr<DifferentialOperator> diffop = make_unique<T_DifferentialOperator<DIFFOP>>();
|
|
1438
|
+
public:
|
|
1439
|
+
enum { DIM_SPACE = DIFFOP::DIM_SPACE };
|
|
1440
|
+
enum { DIM_ELEMENT = DIFFOP::DIM_ELEMENT };
|
|
1441
|
+
enum { DIM_DMAT = DIFFOP::DIM_DMAT };
|
|
1442
|
+
enum { DIM = DIFFOP::DIM };
|
|
1443
|
+
// typedef typename DVecOp::TSCAL TSCAL;
|
|
1444
|
+
|
|
1445
|
+
///
|
|
1446
|
+
T_BIntegrator (const Array<shared_ptr<CoefficientFunction>> & coeffs)
|
|
1447
|
+
: dvecop(coeffs)
|
|
1448
|
+
{ ; }
|
|
1449
|
+
|
|
1450
|
+
T_BIntegrator (shared_ptr<CoefficientFunction> coef)
|
|
1451
|
+
: dvecop(coef)
|
|
1452
|
+
{ ; }
|
|
1453
|
+
|
|
1454
|
+
T_BIntegrator (const CoefficientFunction * coef)
|
|
1455
|
+
: dvecop(shared_ptr<CoefficientFunction> (const_cast<CoefficientFunction*>(coef), NOOP_Deleter))
|
|
1456
|
+
{ ; }
|
|
1457
|
+
|
|
1458
|
+
T_BIntegrator (const DVecOp & advec)
|
|
1459
|
+
: dvecop(advec)
|
|
1460
|
+
{ ; }
|
|
1461
|
+
|
|
1462
|
+
///
|
|
1463
|
+
virtual ~T_BIntegrator ()
|
|
1464
|
+
{ ; }
|
|
1465
|
+
///
|
|
1466
|
+
void CheckElement (const FiniteElement & el) const override
|
|
1467
|
+
{
|
|
1468
|
+
if (!dynamic_cast<const FEL*> (&el) )
|
|
1469
|
+
{
|
|
1470
|
+
string err("Element does not match integrator\n");
|
|
1471
|
+
err += "element type is ";
|
|
1472
|
+
err += typeid(el).name();
|
|
1473
|
+
err += " expected type is ";
|
|
1474
|
+
err += typeid(FEL).name();
|
|
1475
|
+
err += " integrator is ";
|
|
1476
|
+
err += Name();
|
|
1477
|
+
throw Exception (err);
|
|
1478
|
+
/*
|
|
1479
|
+
throw Exception (string ("Element does not match integrator\n") +
|
|
1480
|
+
string ("element type is ") + typeid(el).name() +
|
|
1481
|
+
string (" expected type is ") + typeid(FEL).name() +
|
|
1482
|
+
string ("integrator is ") + Name());
|
|
1483
|
+
*/
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
}
|
|
1487
|
+
///
|
|
1488
|
+
//virtual bool BoundaryForm () const
|
|
1489
|
+
//{ return int(DIM_SPACE) > int(DIM_ELEMENT); }
|
|
1490
|
+
VorB VB() const override
|
|
1491
|
+
{ return VorB(int(DIM_SPACE)-int(DIM_ELEMENT)); }
|
|
1492
|
+
int DimElement () const override
|
|
1493
|
+
{ return DIM_ELEMENT; }
|
|
1494
|
+
|
|
1495
|
+
int DimSpace () const override
|
|
1496
|
+
{ return DIM_SPACE; }
|
|
1497
|
+
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
void
|
|
1501
|
+
CalcElementVector (const FiniteElement & bfel,
|
|
1502
|
+
const ElementTransformation & eltrans,
|
|
1503
|
+
FlatVector<double> elvec,
|
|
1504
|
+
LocalHeap & lh) const override
|
|
1505
|
+
{
|
|
1506
|
+
T_CalcElementVector<double> (bfel, eltrans, elvec, lh);
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
void
|
|
1510
|
+
CalcElementVector (const FiniteElement & bfel,
|
|
1511
|
+
const ElementTransformation & eltrans,
|
|
1512
|
+
FlatVector<Complex> elvec,
|
|
1513
|
+
LocalHeap & lh) const override
|
|
1514
|
+
{
|
|
1515
|
+
T_CalcElementVector<Complex> (bfel, eltrans, elvec, lh);
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
///
|
|
1520
|
+
template <typename TSCAL>
|
|
1521
|
+
void T_CalcElementVector (const FiniteElement & fel,
|
|
1522
|
+
const ElementTransformation & eltrans,
|
|
1523
|
+
FlatVector<TSCAL> elvec,
|
|
1524
|
+
LocalHeap & lh) const
|
|
1525
|
+
{
|
|
1526
|
+
try
|
|
1527
|
+
{
|
|
1528
|
+
IntegrationRule ir(fel.ElementType(), IntegrationOrder(fel));
|
|
1529
|
+
MappedIntegrationRule<DIM_ELEMENT, DIM_SPACE> mir(ir, eltrans, lh);
|
|
1530
|
+
|
|
1531
|
+
FlatMatrixFixWidth<DIM_DMAT, TSCAL> dvecs(ir.GetNIP(), lh);
|
|
1532
|
+
dvecop.GenerateVectorIR (fel, mir, dvecs, lh);
|
|
1533
|
+
for (int i = 0; i < ir.GetNIP(); i++)
|
|
1534
|
+
dvecs.Row(i) *= mir[i].GetWeight();
|
|
1535
|
+
|
|
1536
|
+
// DIFFOP::ApplyTransIR (fel, mir, dvecs, elvec, lh);
|
|
1537
|
+
diffop->ApplyTrans (fel, mir, dvecs, elvec, lh);
|
|
1538
|
+
}
|
|
1539
|
+
catch (Exception & e)
|
|
1540
|
+
{
|
|
1541
|
+
e.Append (string ("in CalcElementVector <")+typeid(TSCAL).name()+
|
|
1542
|
+
">, type = " + typeid(*this).name() + "\n");
|
|
1543
|
+
throw;
|
|
1544
|
+
}
|
|
1545
|
+
catch (exception & e)
|
|
1546
|
+
{
|
|
1547
|
+
Exception e2(e.what());
|
|
1548
|
+
e2.Append ("\nin CalcElementVector, type = ");
|
|
1549
|
+
e2.Append (typeid(*this).name());
|
|
1550
|
+
e2.Append ("\n");
|
|
1551
|
+
throw e2;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
virtual void
|
|
1560
|
+
CalcElementVectorIndependent (const FiniteElement & gfel,
|
|
1561
|
+
const BaseMappedIntegrationPoint & s_mip,
|
|
1562
|
+
const BaseMappedIntegrationPoint & g_mip,
|
|
1563
|
+
FlatVector<double> & elvec,
|
|
1564
|
+
LocalHeap & lh,
|
|
1565
|
+
const bool curveint = false) const override
|
|
1566
|
+
{
|
|
1567
|
+
T_CalcElementVectorIndependent (gfel, s_mip, g_mip, elvec, lh, curveint);
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
virtual void
|
|
1571
|
+
CalcElementVectorIndependent (const FiniteElement & gfel,
|
|
1572
|
+
const BaseMappedIntegrationPoint & s_mip,
|
|
1573
|
+
const BaseMappedIntegrationPoint & g_mip,
|
|
1574
|
+
FlatVector<Complex> & elvec,
|
|
1575
|
+
LocalHeap & lh,
|
|
1576
|
+
const bool curveint = false) const override
|
|
1577
|
+
{
|
|
1578
|
+
T_CalcElementVectorIndependent (gfel, s_mip, g_mip, elvec, lh, curveint);
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
|
|
1582
|
+
template <typename TSCAL>
|
|
1583
|
+
void T_CalcElementVectorIndependent (const FiniteElement & gfel,
|
|
1584
|
+
const BaseMappedIntegrationPoint & s_mip,
|
|
1585
|
+
const BaseMappedIntegrationPoint & g_mip,
|
|
1586
|
+
FlatVector<TSCAL> & elvec,
|
|
1587
|
+
LocalHeap & lh,
|
|
1588
|
+
const bool curveint = false) const
|
|
1589
|
+
{
|
|
1590
|
+
const FEL & fel = dynamic_cast<const FEL&> (gfel);
|
|
1591
|
+
int ndof = fel.GetNDof();
|
|
1592
|
+
|
|
1593
|
+
elvec.AssignMemory (ndof * DIM, lh);
|
|
1594
|
+
//elvec = 0;
|
|
1595
|
+
|
|
1596
|
+
Vec<DIM_DMAT, TSCAL> dvec;
|
|
1597
|
+
|
|
1598
|
+
const MappedIntegrationPoint< DIM_SPACE, DIM_SPACE > & d_g_mip
|
|
1599
|
+
(static_cast<const MappedIntegrationPoint< DIM_SPACE, DIM_SPACE > &>(g_mip));
|
|
1600
|
+
|
|
1601
|
+
if(curveint)
|
|
1602
|
+
{
|
|
1603
|
+
const MappedIntegrationPoint< 1, DIM_SPACE > & d_s_mip
|
|
1604
|
+
(static_cast<const MappedIntegrationPoint< 1, DIM_SPACE > &>(s_mip));
|
|
1605
|
+
|
|
1606
|
+
dvecop.GenerateVector (fel, d_s_mip, dvec, lh);
|
|
1607
|
+
}
|
|
1608
|
+
else
|
|
1609
|
+
{
|
|
1610
|
+
enum { HDIM = (DIM_SPACE > 1) ? DIM_SPACE-1 : 1 };
|
|
1611
|
+
|
|
1612
|
+
const MappedIntegrationPoint< HDIM, DIM_SPACE > & d_s_mip
|
|
1613
|
+
(static_cast<const MappedIntegrationPoint< HDIM, DIM_SPACE > &>(s_mip));
|
|
1614
|
+
|
|
1615
|
+
dvecop.GenerateVector (fel, d_s_mip, dvec, lh);
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
diffop->ApplyTrans (fel, d_g_mip, dvec, elvec, lh);
|
|
1619
|
+
|
|
1620
|
+
//(*testout) << "dvec " << dvec << " elvec " << elvec << endl;
|
|
1621
|
+
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
|
|
1625
|
+
|
|
1626
|
+
|
|
1627
|
+
int IntegrationOrder (const FiniteElement & fel) const
|
|
1628
|
+
{
|
|
1629
|
+
// int order = fel.Order()+2; // low order case
|
|
1630
|
+
int order = 2*fel.Order()+1; // high order case
|
|
1631
|
+
|
|
1632
|
+
ELEMENT_TYPE et = fel.ElementType();
|
|
1633
|
+
|
|
1634
|
+
if (et == ET_TET || et == ET_TRIG || et == ET_SEGM)
|
|
1635
|
+
order -= DIFFOP::DIFFORDER;
|
|
1636
|
+
|
|
1637
|
+
/*
|
|
1638
|
+
if (common_integration_order >= 0)
|
|
1639
|
+
order = common_integration_order;
|
|
1640
|
+
*/
|
|
1641
|
+
if (integration_order >= 0)
|
|
1642
|
+
order = integration_order;
|
|
1643
|
+
|
|
1644
|
+
return order;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
|
|
1648
|
+
///
|
|
1649
|
+
int GetDimension () const override { return DIM; }
|
|
1650
|
+
|
|
1651
|
+
///
|
|
1652
|
+
string Name () const override { return "B integrator"; }
|
|
1653
|
+
};
|
|
1654
|
+
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
#endif
|