| 361 | public: |
| 362 | MeshSizeCF () : CoefficientFunctionNoDerivative(1, false) { ; } |
| 363 | virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override |
| 364 | { |
| 365 | if (ip.IP().FacetNr() != -1) // on a boundary facet of the element |
| 366 | { |
| 367 | double det = 1; |
| 368 | switch (ip.DimSpace()) |
| 369 | { |
| 370 | case 1: det = fabs (static_cast<const MappedIntegrationPoint<1,1>&> (ip).GetJacobiDet()); break; |
| 371 | case 2: det = fabs (static_cast<const MappedIntegrationPoint<2,2>&> (ip).GetJacobiDet()); break; |
| 372 | case 3: det = fabs (static_cast<const MappedIntegrationPoint<3,3>&> (ip).GetJacobiDet()); break; |
| 373 | default: |
| 374 | throw Exception("Illegal dimension in MeshSizeCF"); |
| 375 | } |
| 376 | return det/ip.GetMeasure(); |
| 377 | } |
| 378 | |
| 379 | // switch (ip.DimSpace() - int(ip.VB())) |
| 380 | switch (ip.DimElement()) |
| 381 | { |
| 382 | case 0: throw Exception ("don't have mesh-size on 0-D boundary"); |
| 383 | case 1: return fabs (static_cast<const ScalMappedIntegrationPoint<>&> (ip).GetJacobiDet()); |
| 384 | case 2: return pow (fabs (static_cast<const ScalMappedIntegrationPoint<>&> (ip).GetJacobiDet()), 1.0/2); |
| 385 | case 3: default: |
| 386 | return pow (fabs (static_cast<const ScalMappedIntegrationPoint<>&> (ip).GetJacobiDet()), 1.0/3); |
| 387 | } |
| 388 | // return pow(ip.GetMeasure(), 1.0/(ip.DimSpace()); |
| 389 | } |
| 390 | |
| 391 | using CoefficientFunctionNoDerivative::Evaluate; |
| 392 | virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir, BareSliceMatrix<SIMD<double>> values) const override |
no test coverage detected