| FEAT 3
    Finite Element Analysis Toolbox | 
Inverse Trafo mapping class template. More...
#include <inverse_mapping.hpp>
| Public Types | |
| typedef DataType_ | DataType | 
| the datatype to be used  More... | |
| typedef InvMapDataType::DomainPointType | DomainPointType | 
| the domain point type  More... | |
| typedef InvMapDataType::ImagePointType | ImagePointType | 
| the image point type  More... | |
| typedef InverseMappingData< DataType, shape_dim, world_dim > | InvMapDataType | 
| the inverse mapping data type  More... | |
| typedef TrafoType::ShapeType | ShapeType | 
| the shape type  More... | |
| typedef Trafo_ | TrafoType | 
| the underlying trafo type  More... | |
| Public Member Functions | |
| InverseMapping (const TrafoType &trafo, DataType bbox_tol=DataType(1E-2), DataType domain_tol=DataType(1E-4)) | |
| Constructor.  More... | |
| virtual | ~InverseMapping () | 
| virtual destructor  More... | |
| bool | find_candidate_cells (std::vector< Index > &cells, const ImagePointType &img_point) const | 
| Determines a set of candidate cells by a bounding-box test.  More... | |
| void | init_bounding_boxes (DataType bbox_tol) | 
| Initializes the cell bounding boxes array.  More... | |
| bool | test_domain_point (const DomainPointType &dom_point) const | 
| Tests whether a given domain point is on the reference element.  More... | |
| InvMapDataType | unmap_point (const ImagePointType &img_point, bool ignore_failures=false) const | 
| Unmaps a given image point.  More... | |
| InvMapDataType | unmap_point (const ImagePointType &img_point, const std::vector< Index > &cells, bool ignore_failures=false) const | 
| Unmaps a given image point.  More... | |
| bool | unmap_point_by_newton (DomainPointType &dom_point, const ImagePointType &img_point, const Index cell) const | 
| Unmaps a given point on a particular cell by Newton iteration.  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 Types | |
| typedef Tiny::Matrix< DataType_, 2, world_dim > | BBox | 
| our bounding box type  More... | |
| Protected Attributes | |
| std::vector< BBox > | _bboxes | 
| the array of cell bounding boxes  More... | |
| DataType | _domain_tol | 
| tolerance for unmapped domain coordinates  More... | |
| Index | _newton_max_iter | 
| maximum number of newton iterations for unmapping  More... | |
| DataType | _newton_tol | 
| absolute tolerance for newton iteration  More... | |
| const TrafoType & | _trafo | 
| the trafo mapping  More... | |
Inverse Trafo mapping class template.
This class template implements an "inverse trafo mapping", which is capable of unmapping points, i.e. it can determine the cells and reference coordinates that can be mapped onto a given input point using the "normal" transformation.
| Trafo_ | The type of the trafo mapping that is to be inverted. | 
| DataType_ | The datatype that is used for internal calculations. | 
Definition at line 156 of file inverse_mapping.hpp.
| 
 | protected | 
our bounding box type
Definition at line 180 of file inverse_mapping.hpp.
| typedef DataType_ FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::DataType | 
the datatype to be used
Definition at line 162 of file inverse_mapping.hpp.
| typedef InvMapDataType::DomainPointType FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::DomainPointType | 
the domain point type
Definition at line 176 of file inverse_mapping.hpp.
| typedef InvMapDataType::ImagePointType FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::ImagePointType | 
the image point type
Definition at line 174 of file inverse_mapping.hpp.
| typedef InverseMappingData<DataType, shape_dim, world_dim> FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::InvMapDataType | 
the inverse mapping data type
Definition at line 171 of file inverse_mapping.hpp.
| typedef TrafoType::ShapeType FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::ShapeType | 
the shape type
Definition at line 164 of file inverse_mapping.hpp.
| typedef Trafo_ FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::TrafoType | 
the underlying trafo type
Definition at line 160 of file inverse_mapping.hpp.
| 
 | inlineexplicit | 
Constructor.
| [in] | trafo | The resident trafo mapping that is to be inverted. | 
| [in] | bbox_tol | The bounding box tolerance used for building the cell bounding boxes. | 
| [in] | domain_tol | The coordinate tolerance for the unmapped domain points. | 
This constructor automatically initializes the bounding boxes and sets the default parameters for the Newton iteration to:
Definition at line 210 of file inverse_mapping.hpp.
References FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::init_bounding_boxes().
| 
 | inlinevirtual | 
virtual destructor
Definition at line 223 of file inverse_mapping.hpp.
| 
 | inline | 
Determines a set of candidate cells by a bounding-box test.
This function determines a set of "candidate" cells which may intersect with a given image point by applying a simple bounding-box test.
| [out] | cells | A transient vector that receives the indices of all found candidate cells. | 
| [in] | img_point | The image point for which the candidates are to be found. | 
true, if at least one candidate cell was found, otherwise false. Definition at line 463 of file inverse_mapping.hpp.
References FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::_bboxes, FEAT::img_point, and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::shape_dim.
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point().
| 
 | inline | 
Initializes the cell bounding boxes array.
| [in] | bbox_tol | The bounding box tolerance used for building the cell bounding boxes. | 
Definition at line 237 of file inverse_mapping.hpp.
References FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::_bboxes, FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::_trafo, FEAT::Math::minimax(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::world_dim.
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::InverseMapping().
| 
 | inline | 
Tests whether a given domain point is on the reference element.
| [in] | dom_point | The domain point that is to be tested. | 
true, if dom_point is on the reference element, otherwise false. Definition at line 566 of file inverse_mapping.hpp.
References FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::_domain_tol, and FEAT::dom_point.
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::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.
This function performs several steps:
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.| [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 317 of file inverse_mapping.hpp.
References FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::cells, FEAT::dom_point, FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::dom_points, FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::find_candidate_cells(), FEAT::img_point, FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::img_point, FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::test_domain_point(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point_by_newton().
Referenced by FEAT::Assembly::DiscreteEvaluator::eval_fe_function(), and FEAT::Assembly::DiscreteEvaluator::eval_fe_gradient().
| 
 | 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.
This function performs several steps:
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] | cell | A transient reference to a vector of indices containing the possible candidates which may contain the image point. | 
| [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 400 of file inverse_mapping.hpp.
References FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::cells, FEAT::dom_point, FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::dom_points, FEAT::img_point, FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::img_point, FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::test_domain_point(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point_by_newton().
| 
 | inline | 
Unmaps a given point on a particular cell by Newton iteration.
| [out] | dom_point | The domain point that is to be computed. | 
| [in] | img_point | The image point that is to be unmapped. | 
| [in] | cell | The index of the cell on which img_pointis to be unmapped. | 
true, if the Newton iteration successfully unmapped the input point, or false, if the Newton iteration did not converge. Definition at line 505 of file inverse_mapping.hpp.
References FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::_newton_max_iter, FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::_newton_tol, FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::_trafo, FEAT::dom_point, FEAT::img_point, FEAT::jac_inv, FEAT::Tiny::Vector< T_, n_, s_ >::norm_euclid_sqr(), FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::shape_dim, and FEAT::Math::sqr().
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point().
| 
 | protected | 
the array of cell bounding boxes
Definition at line 184 of file inverse_mapping.hpp.
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::find_candidate_cells(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::init_bounding_boxes().
| 
 | protected | 
tolerance for unmapped domain coordinates
Definition at line 186 of file inverse_mapping.hpp.
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::test_domain_point().
| 
 | protected | 
maximum number of newton iterations for unmapping
Definition at line 190 of file inverse_mapping.hpp.
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point_by_newton().
| 
 | protected | 
absolute tolerance for newton iteration
Definition at line 188 of file inverse_mapping.hpp.
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point_by_newton().
| 
 | protected | 
the trafo mapping
Definition at line 182 of file inverse_mapping.hpp.
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::init_bounding_boxes(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point_by_newton().
| 
 | staticconstexpr | 
the shape dimension
Definition at line 166 of file inverse_mapping.hpp.
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::find_candidate_cells(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point_by_newton().
| 
 | staticconstexpr | 
the world dimension
Definition at line 168 of file inverse_mapping.hpp.
Referenced by FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::init_bounding_boxes().