|
FEAT 3
Finite Element Analysis Toolbox
|
Accelerated inverse mapping for multigrid hierarchies. More...
#include <inverse_mapping.hpp>
Public Types | |
| using | CFMappingType = CFMappingType_ |
| the type of mapping between mesh levels More... | |
| using | DataType = typename InverseMappingType::DataType |
| the datatype to be used More... | |
| using | DomainPointType = typename InvMapDataType::DomainPointType |
| the domain point type More... | |
| using | ImagePointType = typename InvMapDataType::ImagePointType |
| the image point type More... | |
| using | InverseMappingType = InverseMappingType_ |
| the type of the inverse mapping on each level More... | |
| using | InvMapDataType = typename InverseMappingType::InvMapDataType |
| the inverse mapping data type More... | |
| using | ShapeType = typename InverseMappingType::ShapeType |
| the shape type More... | |
| using | TrafoType = typename InverseMappingType::TrafoType |
| the underlying trafo type More... | |
Public Member Functions | |
| HierarchicalInverseMapping ()=default | |
| Constructor. | |
| HierarchicalInverseMapping (const HierarchicalInverseMapping &other)=delete | |
| Copy constructor. | |
| HierarchicalInverseMapping (HierarchicalInverseMapping &&other)=default | |
| Move constructor. | |
| virtual | ~HierarchicalInverseMapping ()=default |
| virtual destructor | |
| const TrafoType & | get_trafo () const |
| Return a reference to the underlying trafo on the finest level. More... | |
| HierarchicalInverseMapping & | operator= (const HierarchicalInverseMapping &other)=delete |
| Copy-assignment operator. | |
| HierarchicalInverseMapping & | operator= (HierarchicalInverseMapping &&other)=default |
| Move-assignment operator. | |
| void | push_level (const InverseMappingType &imapping) |
| Push the coarse level into the hierarchy. More... | |
| void | push_level (const InverseMappingType &imapping, const CFMappingType_ &cf_mapping) |
| Push a fine level into the hierarchy. More... | |
| InvMapDataType | unmap_point (const ImagePointType &img_point, bool ignore_failures=false) const |
| Unmaps a given image point. More... | |
Static Public Attributes | |
| static constexpr int | shape_dim = ShapeType::dimension |
| the shape dimension More... | |
| static constexpr int | world_dim = TrafoType::world_dim |
| the world dimension More... | |
Protected Attributes | |
| std::deque< CFMappingType_ > | _coarse_fine_mappings |
| deque of mapping between levels More... | |
| std::deque< std::reference_wrapper< const InverseMappingType > > | _mappings |
| deque of inverse mapping for each level More... | |
Static Private Member Functions | |
| static bool | try_unmap (const InverseMappingType &mapping, DomainPointType &domain_point, const ImagePointType &img_point, const Index cell, const bool ignore_failures=false) |
| Try to unmap a point. More... | |
Accelerated inverse mapping for multigrid hierarchies.
This class provides an accelerated inverse mapping for situations in which a multigrid hierarchy is available. This accelerated mapping works by first unmapping the given point on the coarse mesh and then successively checking child-cells to determine all cells on the finest mesh that contain the given point.
Definition at line 607 of file inverse_mapping.hpp.
| using FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::CFMappingType = CFMappingType_ |
the type of mapping between mesh levels
Definition at line 630 of file inverse_mapping.hpp.
| using FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::DataType = typename InverseMappingType::DataType |
the datatype to be used
Definition at line 615 of file inverse_mapping.hpp.
| using FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::DomainPointType = typename InvMapDataType::DomainPointType |
the domain point type
Definition at line 628 of file inverse_mapping.hpp.
| using FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::ImagePointType = typename InvMapDataType::ImagePointType |
the image point type
Definition at line 626 of file inverse_mapping.hpp.
| using FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::InverseMappingType = InverseMappingType_ |
the type of the inverse mapping on each level
Definition at line 611 of file inverse_mapping.hpp.
| using FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::InvMapDataType = typename InverseMappingType::InvMapDataType |
the inverse mapping data type
Definition at line 624 of file inverse_mapping.hpp.
| using FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::ShapeType = typename InverseMappingType::ShapeType |
the shape type
Definition at line 617 of file inverse_mapping.hpp.
| using FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::TrafoType = typename InverseMappingType::TrafoType |
the underlying trafo type
Definition at line 613 of file inverse_mapping.hpp.
|
inline |
Return a reference to the underlying trafo on the finest level.
Definition at line 699 of file inverse_mapping.hpp.
References FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::_mappings.
|
inline |
Push the coarse level into the hierarchy.
| [in] | imapping | Inverse mapping on coarse level |
Must be called before any other levels are pushed into the hierarchy.
Definition at line 668 of file inverse_mapping.hpp.
References FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::_mappings, and XASSERT.
|
inline |
Push a fine level into the hierarchy.
Must be called after the coarse level was pushed into the hierarchy.
| [in] | imapping | Inverse mapping for new level |
| [in] | cf_mapping | Mapping from previously finest level to this new level |
Definition at line 687 of file inverse_mapping.hpp.
References FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::_coarse_fine_mappings, FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::_mappings, and XASSERT.
|
inlinestaticprivate |
Try to unmap a point.
| [in] | mapping | Inverse mapping to unmap with |
| [out] | domain_point | Unmapped point |
| [in] | img_point | Point on mesh to unmap |
| [in] | cell | Cell to try to unmap on |
| [in] | ignore_failures | Specifies whether to ignore cells on which the Newton iteration broke down. If set to false, an InverseMappingError will be thrown if Newton fails to converge, otherwise the corresponding cell will be skipped. |
Definition at line 804 of file inverse_mapping.hpp.
References FEAT::img_point.
Referenced by FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::unmap_point().
|
inline |
Unmaps a given image point.
This function "unmaps" a point given in real world coordinates, i.e. this function determines the set of cells that intersect with the given point and also computes the corresponding domain points for each of these cells.
img_point could not be unmapped for a candidate cell, unless ignore_failures was set to true. This usually indicates that the mesh has quite ill-formed cell shapes, which cause the Newton iteration to diverge – especially, if the point to be tested is not on the candidate cell, but outside of it.\Note You should be sure that at least on cell in the given Cell array does indeed contain the inquired point. Else you the more costly overload function above
| [in] | img_point | The image point that is to be unmapped. |
| [in] | ignore_failures | Specifies whether to ignore cells on which the Newton iteration broke down. If set to false, an InverseMappingError will be thrown if Newton fails to converge, otherwise the corresponding cell will be skipped. |
img_point. Definition at line 734 of file inverse_mapping.hpp.
References FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::_coarse_fine_mappings, FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::_mappings, FEAT::img_point, FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::try_unmap(), and XASSERT.
|
protected |
deque of mapping between levels
Definition at line 636 of file inverse_mapping.hpp.
Referenced by FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::push_level(), and FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::unmap_point().
|
protected |
deque of inverse mapping for each level
Definition at line 634 of file inverse_mapping.hpp.
Referenced by FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::get_trafo(), FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::push_level(), and FEAT::Trafo::HierarchicalInverseMapping< InverseMappingType_, CFMappingType_ >::unmap_point().
|
staticconstexpr |
the shape dimension
Definition at line 619 of file inverse_mapping.hpp.
|
staticconstexpr |
the world dimension
Definition at line 621 of file inverse_mapping.hpp.