Reference documentation for deal.II version 9.5.0
|
#include <deal.II/non_matching/mapping_info.h>
Classes | |
struct | AdditionalData |
Public Types | |
using | VectorizedArrayType = typename ::internal::VectorizedArrayTrait< Number >::vectorized_value_type |
Public Member Functions | |
MappingInfo (const Mapping< dim > &mapping, const UpdateFlags update_flags, const AdditionalData additional_data=AdditionalData()) | |
void | reinit (const typename Triangulation< dim, spacedim >::cell_iterator &cell, const std::vector< Point< dim > > &unit_points) |
void | reinit (const typename Triangulation< dim, spacedim >::cell_iterator &cell, const ArrayView< const Point< dim > > &unit_points) |
void | reinit (const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Quadrature< dim > &quadrature) |
template<typename ContainerType > | |
void | reinit_cells (const ContainerType &cell_iterator_range, const std::vector< std::vector< Point< dim > > > &unit_points_vector, const unsigned int n_unfiltered_cells=numbers::invalid_unsigned_int) |
template<typename ContainerType > | |
void | reinit_cells (const ContainerType &cell_iterator_range, const std::vector< Quadrature< dim > > &quadrature_vector, const unsigned int n_unfiltered_cells=numbers::invalid_unsigned_int) |
template<typename Iterator > | |
void | reinit_surface (const IteratorRange< Iterator > &cell_iterator_range, const std::vector< ImmersedSurfaceQuadrature< dim > > &quadrature_vector, const unsigned int n_unfiltered_cells=numbers::invalid_unsigned_int) |
template<typename Iterator > | |
void | reinit_faces (const IteratorRange< Iterator > &cell_iterator_range, const std::vector< std::vector< Quadrature< dim - 1 > > > &quadrature_vector, const unsigned int n_unfiltered_cells=numbers::invalid_unsigned_int) |
bool | is_face_state () const |
const Point< dim, VectorizedArrayType > * | get_unit_point (const unsigned int offset) const |
const Point< dim - 1, VectorizedArrayType > * | get_unit_point_faces (const unsigned int offset) const |
const DerivativeForm< 1, dim, spacedim, Number > * | get_jacobian (const unsigned int offset) const |
const DerivativeForm< 1, spacedim, dim, Number > * | get_inverse_jacobian (const unsigned int offset) const |
const Tensor< 1, spacedim, Number > * | get_normal_vector (const unsigned int offset) const |
const Number * | get_JxW (const unsigned int offset) const |
const Point< dim, Number > * | get_real_point (const unsigned int offset) const |
const Mapping< dim, spacedim > & | get_mapping () const |
UpdateFlags | get_update_flags () const |
UpdateFlags | get_update_flags_mapping () const |
boost::signals2::connection | connect_is_reinitialized (const std::function< void()> &set_is_reinitialized) |
unsigned int | compute_unit_point_index_offset (const unsigned int cell_index, const unsigned int face_number) const |
unsigned int | compute_data_index_offset (const unsigned int cell_index, const unsigned int face_number) const |
unsigned int | get_n_q_points_unvectorized (const unsigned int cell_index, const unsigned int face_number) const |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Subscriptor functionality | |
Classes derived from Subscriptor provide a facility to subscribe to this object. This is mostly used by the SmartPointer class. | |
void | subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
void | unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
unsigned int | n_subscriptions () const |
template<typename StreamType > | |
void | list_subscribers (StreamType &stream) const |
void | list_subscribers () const |
Static Public Member Functions | |
static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
Private Types | |
enum class | State { invalid , single_cell , cell_vector , faces_on_cells_in_vector } |
using | MappingData = ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > |
using | map_value_type = decltype(counter_map)::value_type |
using | map_iterator = decltype(counter_map)::iterator |
Private Member Functions | |
template<typename NumberType > | |
unsigned int | compute_n_q_points (const unsigned int n_q_points_unvectorized) |
void | clear () |
void | resize_unit_points (const unsigned int n_unit_point_batches) |
void | resize_unit_points_faces (const unsigned int n_unit_point_batches) |
void | resize_data_fields (const unsigned int n_data_point_batches) |
void | store_unit_points (const unsigned int unit_points_index_offset, const unsigned int n_q_points, const unsigned int n_q_points_unvectorized, const std::vector< Point< dim > > &points) |
void | store_unit_points_faces (const unsigned int unit_points_index_offset, const unsigned int n_q_points, const unsigned int n_q_points_unvectorized, const std::vector< Point< dim - 1 > > &points) |
void | store_mapping_data (const unsigned int unit_points_index_offset, const unsigned int n_q_points, const unsigned int n_q_points_unvectorized, const MappingData &mapping_data, const std::vector< double > &weights) |
unsigned int | compute_compressed_cell_index (const unsigned int cell_index) const |
unsigned int | compute_geometry_index_offset (const unsigned int cell_index, const unsigned int face_number) const |
void | check_no_subscribers () const noexcept |
Static Private Attributes | |
static std::mutex | mutex |
This class provides the mapping information computation and mapping data storage to be used together with FEPointEvaluation.
MappingInfo is vectorized across quadrature points, which means data can be provided in vectorized format.
Two different modes are available: partially vectorized and fully vectorized across quadrature points. Partially vectorized (scalar Number template argument) means the computed mapping data is provided in scalar format and only unit points are provided vectorized (for seamless interaction with FEPointEvaluation). Fully vectorized (vectorized Number template argument, e.g. VectorizedArray<double>) provides both mapping data and unit points in vectorized format. The Number template parameter of MappingInfo and FEPointEvaluation has to be identical.
Definition at line 201 of file mapping_info.h.
using NonMatching::MappingInfo< dim, spacedim, Number >::VectorizedArrayType = typename ::internal::VectorizedArrayTrait< Number>::vectorized_value_type |
The VectorizedArray type the unit points are stored in inside this class.
Definition at line 207 of file mapping_info.h.
|
private |
Definition at line 426 of file mapping_info.h.
|
privateinherited |
The data type used in counter_map.
Definition at line 230 of file subscriptor.h.
|
privateinherited |
The iterator type used in counter_map.
Definition at line 235 of file subscriptor.h.
|
strongprivate |
Enum class for reinitialized states.
Enumerator | |
---|---|
invalid | |
single_cell | |
cell_vector | |
faces_on_cells_in_vector |
Definition at line 505 of file mapping_info.h.
NonMatching::MappingInfo< dim, spacedim, Number >::MappingInfo | ( | const Mapping< dim > & | mapping, |
const UpdateFlags | update_flags, | ||
const AdditionalData | additional_data = AdditionalData() |
||
) |
Constructor.
mapping | The Mapping class describing the geometry of a cell. |
update_flags | Specify the quantities to be computed by the mapping during the call of reinit(). These update flags are also handed to a FEEvaluation object if you construct it with this MappingInfo object. |
additional_data | Additional data for the class to specify the behavior during reinitialization. |
Definition at line 642 of file mapping_info.h.
void NonMatching::MappingInfo< dim, spacedim, Number >::reinit | ( | const typename Triangulation< dim, spacedim >::cell_iterator & | cell, |
const std::vector< Point< dim > > & | unit_points | ||
) |
Compute the mapping information for the incoming cell and unit points. This overload is needed to resolve ambiguity.
Definition at line 695 of file mapping_info.h.
void NonMatching::MappingInfo< dim, spacedim, Number >::reinit | ( | const typename Triangulation< dim, spacedim >::cell_iterator & | cell, |
const ArrayView< const Point< dim > > & | unit_points | ||
) |
Compute the mapping information for the incoming cell and unit points.
Definition at line 706 of file mapping_info.h.
void NonMatching::MappingInfo< dim, spacedim, Number >::reinit | ( | const typename Triangulation< dim, spacedim >::cell_iterator & | cell, |
const Quadrature< dim > & | quadrature | ||
) |
Compute the mapping information for the given cell and quadrature formula. As opposed to the other reinit
function, this method allows to access a JxW
factor at the points.
Definition at line 719 of file mapping_info.h.
void NonMatching::MappingInfo< dim, spacedim, Number >::reinit_cells | ( | const ContainerType & | cell_iterator_range, |
const std::vector< std::vector< Point< dim > > > & | unit_points_vector, | ||
const unsigned int | n_unfiltered_cells = numbers::invalid_unsigned_int |
||
) |
Compute the mapping information for the incoming iterable container of cell iterators and corresponding vector of unit points.
It is possible to give an IteratorRange<FilteredIterator> to this function and together with n_unfiltered_cells
specified this object can compress its storage while giving you access to the underlying data with the "unfiltered" index. The default argument for n_unfiltered_cells
disables this built-in compression.
Definition at line 770 of file mapping_info.h.
void NonMatching::MappingInfo< dim, spacedim, Number >::reinit_cells | ( | const ContainerType & | cell_iterator_range, |
const std::vector< Quadrature< dim > > & | quadrature_vector, | ||
const unsigned int | n_unfiltered_cells = numbers::invalid_unsigned_int |
||
) |
Compute the mapping information for the incoming iterable container of cell iterators and corresponding vector of quadratures. As opposed to the other reinit
function, this method allows to access a JxW
factor at the points.
Definition at line 793 of file mapping_info.h.
void NonMatching::MappingInfo< dim, spacedim, Number >::reinit_surface | ( | const IteratorRange< Iterator > & | cell_iterator_range, |
const std::vector< ImmersedSurfaceQuadrature< dim > > & | quadrature_vector, | ||
const unsigned int | n_unfiltered_cells = numbers::invalid_unsigned_int |
||
) |
Compute the mapping information for the incoming vector of cells and corresponding vector of ImmersedSurfaceQuadrature.
Definition at line 890 of file mapping_info.h.
void NonMatching::MappingInfo< dim, spacedim, Number >::reinit_faces | ( | const IteratorRange< Iterator > & | cell_iterator_range, |
const std::vector< std::vector< Quadrature< dim - 1 > > > & | quadrature_vector, | ||
const unsigned int | n_unfiltered_cells = numbers::invalid_unsigned_int |
||
) |
Compute the mapping information for all faces of the incoming vector of cells and corresponding vector of quadratures.
Definition at line 995 of file mapping_info.h.
bool NonMatching::MappingInfo< dim, spacedim, Number >::is_face_state |
Return if this MappingInfo object is reinitialized for faces (by reinit_faces()) or not.
Definition at line 1137 of file mapping_info.h.
|
inline |
Getter function for unit points. The offset can be obtained with compute_unit_point_index_offset().
Definition at line 1386 of file mapping_info.h.
|
inline |
Getter function for unit points on faces. The offset can be obtained with compute_unit_point_index_offset().
Definition at line 1398 of file mapping_info.h.
|
inline |
Getter function for Jacobians. The offset can be obtained with compute_data_index_offset().
Definition at line 1466 of file mapping_info.h.
|
inline |
Getter function for inverse Jacobians. The offset can be obtained with compute_data_index_offset().
Definition at line 1476 of file mapping_info.h.
|
inline |
Getter function for normal vectors. The offset can be obtained with compute_data_index_offset().
Definition at line 1485 of file mapping_info.h.
|
inline |
Getter function for Jacobian times quadrature weight (JxW). The offset can be obtained with compute_data_index_offset().
Definition at line 1495 of file mapping_info.h.
|
inline |
Getter function for real points. The offset can be obtained with compute_data_index_offset().
Definition at line 1408 of file mapping_info.h.
const Mapping< dim, spacedim > & NonMatching::MappingInfo< dim, spacedim, Number >::get_mapping |
Getter function for underlying mapping.
Definition at line 1504 of file mapping_info.h.
UpdateFlags NonMatching::MappingInfo< dim, spacedim, Number >::get_update_flags |
Getter function for the update flags.
Definition at line 1513 of file mapping_info.h.
UpdateFlags NonMatching::MappingInfo< dim, spacedim, Number >::get_update_flags_mapping |
Getter function for the mapping update flags.
Definition at line 1522 of file mapping_info.h.
boost::signals2::connection NonMatching::MappingInfo< dim, spacedim, Number >::connect_is_reinitialized | ( | const std::function< void()> & | set_is_reinitialized | ) |
Connects to is_reinitialized().
Definition at line 1531 of file mapping_info.h.
unsigned int NonMatching::MappingInfo< dim, spacedim, Number >::compute_unit_point_index_offset | ( | const unsigned int | cell_index, |
const unsigned int | face_number | ||
) | const |
Compute the unit points index offset for the current cell/face.
Definition at line 1418 of file mapping_info.h.
unsigned int NonMatching::MappingInfo< dim, spacedim, Number >::compute_data_index_offset | ( | const unsigned int | cell_index, |
const unsigned int | face_number | ||
) | const |
Compute the data index offset for the current cell/face.
Definition at line 1442 of file mapping_info.h.
unsigned int NonMatching::MappingInfo< dim, spacedim, Number >::get_n_q_points_unvectorized | ( | const unsigned int | cell_index, |
const unsigned int | face_number | ||
) | const |
Get number of unvectorized quadrature points.
Definition at line 1146 of file mapping_info.h.
|
private |
Compute number of quadrature point batches depending on NumberType.
Definition at line 1170 of file mapping_info.h.
|
private |
Clears fields to make the object reusable.
Definition at line 684 of file mapping_info.h.
|
private |
Resize the unit_point data field.
Definition at line 1345 of file mapping_info.h.
|
private |
Resize the unit_point_faces data field.
Definition at line 1355 of file mapping_info.h.
|
private |
Resize the mapping data fields.
Definition at line 1365 of file mapping_info.h.
|
private |
Store the unit points.
Definition at line 1234 of file mapping_info.h.
|
private |
Store the unit points on faces.
Definition at line 1259 of file mapping_info.h.
|
private |
Store the requested mapping data.
Definition at line 1284 of file mapping_info.h.
|
private |
Compute the compressed cell index.
Definition at line 1216 of file mapping_info.h.
|
private |
Compute the geometry index offset of the current cell/face.
Definition at line 1187 of file mapping_info.h.
|
inherited |
Subscribes a user of the object by storing the pointer validity
. The subscriber may be identified by text supplied as identifier
.
Definition at line 136 of file subscriptor.cc.
|
inherited |
Unsubscribes a user from the object.
identifier
and the validity
pointer must be the same as the one supplied to subscribe(). Definition at line 156 of file subscriptor.cc.
|
inlineinherited |
Return the present number of subscriptions to this object. This allows to use this class for reference counted lifetime determination where the last one to unsubscribe also deletes the object.
Definition at line 300 of file subscriptor.h.
|
inlineinherited |
List the subscribers to the input stream
.
Definition at line 317 of file subscriptor.h.
|
inherited |
List the subscribers to deallog
.
Definition at line 204 of file subscriptor.cc.
|
inlineinherited |
Read or write the data of this object to or from a stream for the purpose of serialization using the BOOST serialization library.
This function does not actually serialize any of the member variables of this class. The reason is that what this class stores is only who subscribes to this object, but who does so at the time of storing the contents of this object does not necessarily have anything to do with who subscribes to the object when it is restored. Consequently, we do not want to overwrite the subscribers at the time of restoring, and then there is no reason to write the subscribers out in the first place.
Definition at line 309 of file subscriptor.h.
|
privatenoexceptinherited |
Check that there are no objects subscribing to this object. If this check passes then it is safe to destroy the current object. It this check fails then this function will either abort or print an error message to deallog (by using the AssertNothrow mechanism), but will not throw an exception.
Definition at line 53 of file subscriptor.cc.
|
private |
Enum class that stores the currently initialized state upon the last call of reinit().
Definition at line 517 of file mapping_info.h.
|
private |
The reference points specified at reinit().
Indexed by unit_points_index
.
Definition at line 524 of file mapping_info.h.
|
private |
The reference points on faces specified at reinit().
Indexed by unit_points_index
.
Definition at line 531 of file mapping_info.h.
|
private |
Offset to point to the first unit point of a cell/face.
Definition at line 536 of file mapping_info.h.
|
private |
A pointer to the internal data of the underlying mapping.
Definition at line 542 of file mapping_info.h.
|
private |
A pointer to the underlying mapping.
Definition at line 547 of file mapping_info.h.
|
private |
The desired update flags for the evaluation.
Definition at line 552 of file mapping_info.h.
|
private |
The update flags for the desired mapping information.
Definition at line 557 of file mapping_info.h.
|
private |
AdditionalData for this object.
Definition at line 562 of file mapping_info.h.
|
private |
Stores the index offset into the arrays JxW_values
, jacobians
, inverse_jacobians
and normal_vectors
.
Definition at line 568 of file mapping_info.h.
|
private |
The storage of the Jacobian determinant times the quadrature weight on quadrature points.
Indexed by data_index_offsets
.
Definition at line 576 of file mapping_info.h.
|
private |
Stores the normal vectors.
Indexed by data_index_offsets
.
Definition at line 583 of file mapping_info.h.
|
private |
The storage of contravariant transformation on quadrature points, i.e., the Jacobians of the transformation from the unit to the real cell.
Indexed by data_index_offsets
.
Definition at line 591 of file mapping_info.h.
|
private |
The storage of covariant transformation on quadrature points, i.e., the inverse Jacobians of the transformation from the unit to the real cell.
Indexed by data_index_offsets
.
Definition at line 600 of file mapping_info.h.
|
private |
The mapped real points.
Indexed by data_index_offsets
.
Definition at line 607 of file mapping_info.h.
|
private |
Number of unvectorized unit points per geometric entity (cell/face).
Definition at line 612 of file mapping_info.h.
|
private |
Offset to point to the first element of a cell in internal data containers.
Definition at line 618 of file mapping_info.h.
|
private |
A vector that converts the cell index to a compressed cell index for e.g. a filtered IteratorRange.
Definition at line 624 of file mapping_info.h.
|
private |
A bool that determines weather cell index compression should be done.
Definition at line 629 of file mapping_info.h.
|
private |
This signal is triggered right after this object is reinitialized, to let dependent objects know that they need to reinitialize as well.
Definition at line 635 of file mapping_info.h.
|
mutableprivateinherited |
Store the number of objects which subscribed to this object. Initially, this number is zero, and upon destruction it shall be zero again (i.e. all objects which subscribed should have unsubscribed again).
The creator (and owner) of an object is counted in the map below if HE manages to supply identification.
We use the mutable
keyword in order to allow subscription to constant objects also.
This counter may be read from and written to concurrently in multithreaded code: hence we use the std::atomic
class template.
Definition at line 219 of file subscriptor.h.
|
mutableprivateinherited |
In this map, we count subscriptions for each different identification string supplied to subscribe().
Definition at line 225 of file subscriptor.h.
|
mutableprivateinherited |
In this vector, we store pointers to the validity bool in the SmartPointer objects that subscribe to this class.
Definition at line 241 of file subscriptor.h.
|
mutableprivateinherited |
Pointer to the typeinfo object of this object, from which we can later deduce the class name. Since this information on the derived class is neither available in the destructor, nor in the constructor, we obtain it in between and store it here.
Definition at line 249 of file subscriptor.h.
|
staticprivateinherited |
A mutex used to ensure data consistency when printing out the list of subscribers.
Definition at line 271 of file subscriptor.h.