Reference documentation for deal.II version 9.6.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Portable::MatrixFree< dim, Number > Class Template Reference

#include <deal.II/matrix_free/portable_matrix_free.h>

Inheritance diagram for Portable::MatrixFree< dim, Number >:

Classes

struct  AdditionalData
 
struct  Data
 

Public Types

using jacobian_type = Tensor<2, dim, Tensor<1, dim, Number>>
 
using point_type = Point<dim, Number>
 
using CellFilter
 

Public Member Functions

 MatrixFree ()
 
unsigned int get_padding_length () const
 
template<typename IteratorFiltersType >
void reinit (const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const AffineConstraints< Number > &constraints, const Quadrature< 1 > &quad, const IteratorFiltersType &iterator_filter, const AdditionalData &additional_data=AdditionalData())
 
void reinit (const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const AffineConstraints< Number > &constraints, const Quadrature< 1 > &quad, const AdditionalData &additional_data=AdditionalData())
 
void reinit (const DoFHandler< dim > &dof_handler, const AffineConstraints< Number > &constraints, const Quadrature< 1 > &quad, const AdditionalData &additional_data=AdditionalData())
 
Data get_data (unsigned int color) const
 
template<typename Functor , typename VectorType >
void cell_loop (const Functor &func, const VectorType &src, VectorType &dst) const
 
template<typename Functor >
void evaluate_coefficients (Functor func) const
 
template<typename VectorType >
void copy_constrained_values (const VectorType &src, VectorType &dst) const
 
template<typename VectorType >
void set_constrained_values (const Number val, VectorType &dst) const
 
void initialize_dof_vector (LinearAlgebra::CUDAWrappers::Vector< Number > &vec) const
 
void initialize_dof_vector (LinearAlgebra::distributed::Vector< Number, MemorySpace::Default > &vec) const
 
const std::vector< std::vector< CellFilter > > & get_colored_graph () const
 
const std::shared_ptr< const Utilities::MPI::Partitioner > & get_vector_partitioner () const
 
const DoFHandler< dim > & get_dof_handler () const
 
std::size_t memory_consumption () 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 ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

Private Types

using map_value_type = decltype(counter_map)::value_type
 
using map_iterator = decltype(counter_map)::iterator
 

Private Member Functions

template<typename IteratorFiltersType >
void internal_reinit (const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const AffineConstraints< Number > &constraints, const Quadrature< 1 > &quad, const IteratorFiltersType &iterator_filter, const std::shared_ptr< const MPI_Comm > &comm, const AdditionalData additional_data)
 
template<typename Functor , typename VectorType >
void serial_cell_loop (const Functor &func, const VectorType &src, VectorType &dst) const
 
template<typename Functor >
void distributed_cell_loop (const Functor &func, const LinearAlgebra::distributed::Vector< Number, MemorySpace::Default > &src, LinearAlgebra::distributed::Vector< Number, MemorySpace::Default > &dst) const
 
template<typename Functor >
void distributed_cell_loop (const Functor &func, const LinearAlgebra::CUDAWrappers::Vector< Number > &src, LinearAlgebra::CUDAWrappers::Vector< Number > &dst) const
 
void check_no_subscribers () const noexcept
 

Private Attributes

int my_id
 
bool use_coloring
 
bool overlap_communication_computation
 
types::global_dof_index n_dofs
 
unsigned int fe_degree
 
unsigned int dofs_per_cell
 
unsigned int n_constrained_dofs
 
unsigned int q_points_per_cell
 
unsigned int n_colors
 
std::vector< unsigned intn_cells
 
std::vector< Kokkos::View< point_type **, MemorySpace::Default::kokkos_space > > q_points
 
std::vector< Kokkos::View< types::global_dof_index **, MemorySpace::Default::kokkos_space > > local_to_global
 
std::vector< Kokkos::View< Number **[dim][dim], MemorySpace::Default::kokkos_space > > inv_jacobian
 
std::vector< Kokkos::View< Number **, MemorySpace::Default::kokkos_space > > JxW
 
Kokkos::View< types::global_dof_index *, MemorySpace::Default::kokkos_spaceconstrained_dofs
 
std::vector< Kokkos::View<::internal::MatrixFreeFunctions::ConstraintKinds *, MemorySpace::Default::kokkos_space > > constraint_mask
 
Kokkos::View< Number *, MemorySpace::Default::kokkos_spaceshape_values
 
Kokkos::View< Number *, MemorySpace::Default::kokkos_spaceshape_gradients
 
Kokkos::View< Number *, MemorySpace::Default::kokkos_spaceco_shape_gradients
 
Kokkos::View< Number *, MemorySpace::Default::kokkos_spaceconstraint_weights
 
std::shared_ptr< const Utilities::MPI::Partitionerpartitioner
 
unsigned int padding_length
 
std::vector< unsigned introw_start
 
const DoFHandler< dim > * dof_handler
 
std::vector< std::vector< CellFilter > > graph
 
std::atomic< unsigned intcounter
 
std::map< std::string, unsigned intcounter_map
 
std::vector< std::atomic< bool > * > validity_pointers
 
const std::type_info * object_info
 

Static Private Attributes

static std::mutex mutex
 

Friends

class internal::ReinitHelper< dim, Number >
 

Related Symbols

(Note that these are not member symbols.)

template<int dim, typename Number >
DataHost< dim, Number > copy_mf_data_to_host (const typename::Portable::MatrixFree< dim, Number >::Data &data, const UpdateFlags &update_flags)
 

Detailed Description

template<int dim, typename Number = double>
class Portable::MatrixFree< dim, Number >

This class collects all the data that is stored for the matrix free implementation. The storage scheme is tailored towards several loops performed with the same data, i.e., typically doing many matrix-vector products or residual computations on the same mesh.

This class does not implement any operations involving finite element basis functions, i.e., regarding the operation performed on the cells. For these operations, the class FEEvaluation is designed to use the data collected in this class.

This class implements a loop over all cells (cell_loop()). This loop is scheduled in such a way that cells that share degrees of freedom are not worked on simultaneously, which implies that it is possible to write to vectors in parallel without having to explicitly synchronize access to these vectors and matrices. This class does not implement any shape values, all it does is to cache the respective data. To implement finite element operations, use the class Portable::FEEvaluation.

This class traverse the cells in a different order than the usual Triangulation class in deal.II.

Note
Only float and double are supported.

Definition at line 93 of file portable_matrix_free.h.

Member Typedef Documentation

◆ jacobian_type

template<int dim, typename Number = double>
using Portable::MatrixFree< dim, Number >::jacobian_type = Tensor<2, dim, Tensor<1, dim, Number>>

Definition at line 96 of file portable_matrix_free.h.

◆ point_type

template<int dim, typename Number = double>
using Portable::MatrixFree< dim, Number >::point_type = Point<dim, Number>

Definition at line 97 of file portable_matrix_free.h.

◆ CellFilter

template<int dim, typename Number = double>
using Portable::MatrixFree< dim, Number >::CellFilter

◆ map_value_type

using Subscriptor::map_value_type = decltype(counter_map)::value_type
privateinherited

The data type used in counter_map.

Definition at line 229 of file subscriptor.h.

◆ map_iterator

using Subscriptor::map_iterator = decltype(counter_map)::iterator
privateinherited

The iterator type used in counter_map.

Definition at line 234 of file subscriptor.h.

Constructor & Destructor Documentation

◆ MatrixFree()

template<int dim, typename Number = double>
Portable::MatrixFree< dim, Number >::MatrixFree ( )

Default constructor.

Member Function Documentation

◆ get_padding_length()

template<int dim, typename Number = double>
unsigned int Portable::MatrixFree< dim, Number >::get_padding_length ( ) const

Return the length of the padding.

◆ reinit() [1/3]

template<int dim, typename Number = double>
template<typename IteratorFiltersType >
void Portable::MatrixFree< dim, Number >::reinit ( const Mapping< dim > & mapping,
const DoFHandler< dim > & dof_handler,
const AffineConstraints< Number > & constraints,
const Quadrature< 1 > & quad,
const IteratorFiltersType & iterator_filter,
const AdditionalData & additional_data = AdditionalData() )

Extracts the information needed to perform loops over cells. The DoFHandler and AffineConstraints objects describe the layout of degrees of freedom, the DoFHandler and the mapping describe the transformation from unit to real cell, and the finite element underlying the DoFHandler together with the quadrature formula describe the local operations. This function takes an IteratorFilters object (predicate) to loop over a subset of the active cells. When using MPI, the predicate should filter out non locally owned cells.

◆ reinit() [2/3]

template<int dim, typename Number = double>
void Portable::MatrixFree< dim, Number >::reinit ( const Mapping< dim > & mapping,
const DoFHandler< dim > & dof_handler,
const AffineConstraints< Number > & constraints,
const Quadrature< 1 > & quad,
const AdditionalData & additional_data = AdditionalData() )

Same as above using Iterators::LocallyOwnedCell() as predicate.

◆ reinit() [3/3]

template<int dim, typename Number = double>
void Portable::MatrixFree< dim, Number >::reinit ( const DoFHandler< dim > & dof_handler,
const AffineConstraints< Number > & constraints,
const Quadrature< 1 > & quad,
const AdditionalData & additional_data = AdditionalData() )

Initializes the data structures. Same as above but using a Q1 mapping.

◆ get_data()

template<int dim, typename Number = double>
Data Portable::MatrixFree< dim, Number >::get_data ( unsigned int color) const

Return the Data structure associated with color.

◆ cell_loop()

template<int dim, typename Number = double>
template<typename Functor , typename VectorType >
void Portable::MatrixFree< dim, Number >::cell_loop ( const Functor & func,
const VectorType & src,
VectorType & dst ) const

This method runs the loop over all cells and apply the local operation on each element in parallel. func is a functor which is applied on each color.

func needs to define

DEAL_II_HOST_DEVICE void operator()(
const unsigned int cell,
const typename Portable::MatrixFree<dim, Number>::Data *gpu_data,
const Number * src,
Number * dst) const;
static const unsigned int n_dofs_1d;
static const unsigned int n_local_dofs;
static const unsigned int n_q_points;
#define DEAL_II_HOST_DEVICE
Definition numbers.h:34

◆ evaluate_coefficients()

template<int dim, typename Number = double>
template<typename Functor >
void Portable::MatrixFree< dim, Number >::evaluate_coefficients ( Functor func) const

This method runs the loop over all cells and apply the local operation on each element in parallel. This function is very similar to cell_loop() but it uses a simpler functor.

func needs to define

DEAL_II_HOST_DEVICE void operator()(
const unsigned int cell,
const typename Portable::MatrixFree<dim, Number>::Data *gpu_data);
static const unsigned int n_dofs_1d;
static const unsigned int n_local_dofs;
static const unsigned int n_q_points;

◆ copy_constrained_values()

template<int dim, typename Number = double>
template<typename VectorType >
void Portable::MatrixFree< dim, Number >::copy_constrained_values ( const VectorType & src,
VectorType & dst ) const

Copy the values of the constrained entries from src to dst. This is used to impose zero Dirichlet boundary condition.

◆ set_constrained_values()

template<int dim, typename Number = double>
template<typename VectorType >
void Portable::MatrixFree< dim, Number >::set_constrained_values ( const Number val,
VectorType & dst ) const

Set the entries in dst corresponding to constrained values to val. The main purpose of this function is to set the constrained entries of the source vector used in cell_loop() to zero.

◆ initialize_dof_vector() [1/2]

template<int dim, typename Number = double>
void Portable::MatrixFree< dim, Number >::initialize_dof_vector ( LinearAlgebra::CUDAWrappers::Vector< Number > & vec) const

Initialize a serial vector. The size corresponds to the number of degrees of freedom in the DoFHandler object.

◆ initialize_dof_vector() [2/2]

template<int dim, typename Number = double>
void Portable::MatrixFree< dim, Number >::initialize_dof_vector ( LinearAlgebra::distributed::Vector< Number, MemorySpace::Default > & vec) const

Initialize a distributed vector. The local elements correspond to the locally owned degrees of freedom and the ghost elements correspond to the (additional) locally relevant dofs.

◆ get_colored_graph()

template<int dim, typename Number = double>
const std::vector< std::vector< CellFilter > > & Portable::MatrixFree< dim, Number >::get_colored_graph ( ) const

Return the colored graph of locally owned active cells.

◆ get_vector_partitioner()

template<int dim, typename Number = double>
const std::shared_ptr< const Utilities::MPI::Partitioner > & Portable::MatrixFree< dim, Number >::get_vector_partitioner ( ) const

Return the partitioner that represents the locally owned data and the ghost indices where access is needed to for the cell loop. The partitioner is constructed from the locally owned dofs and ghost dofs given by the respective fields. If you want to have specific information about these objects, you can query them with the respective access functions. If you just want to initialize a (parallel) vector, you should usually prefer this data structure as the data exchange information can be reused from one vector to another.

◆ get_dof_handler()

template<int dim, typename Number = double>
const DoFHandler< dim > & Portable::MatrixFree< dim, Number >::get_dof_handler ( ) const

Return the DoFHandler.

◆ memory_consumption()

template<int dim, typename Number = double>
std::size_t Portable::MatrixFree< dim, Number >::memory_consumption ( ) const

Return an approximation of the memory consumption of this class in bytes.

◆ internal_reinit()

template<int dim, typename Number = double>
template<typename IteratorFiltersType >
void Portable::MatrixFree< dim, Number >::internal_reinit ( const Mapping< dim > & mapping,
const DoFHandler< dim > & dof_handler,
const AffineConstraints< Number > & constraints,
const Quadrature< 1 > & quad,
const IteratorFiltersType & iterator_filter,
const std::shared_ptr< const MPI_Comm > & comm,
const AdditionalData additional_data )
private

Initializes the data structures.

◆ serial_cell_loop()

template<int dim, typename Number = double>
template<typename Functor , typename VectorType >
void Portable::MatrixFree< dim, Number >::serial_cell_loop ( const Functor & func,
const VectorType & src,
VectorType & dst ) const
private

Helper function. Loop over all the cells and apply the functor on each element in parallel. This function is used when MPI is not used.

◆ distributed_cell_loop() [1/2]

template<int dim, typename Number = double>
template<typename Functor >
void Portable::MatrixFree< dim, Number >::distributed_cell_loop ( const Functor & func,
const LinearAlgebra::distributed::Vector< Number, MemorySpace::Default > & src,
LinearAlgebra::distributed::Vector< Number, MemorySpace::Default > & dst ) const
private

Helper function. Loop over all the cells and apply the functor on each element in parallel. This function is used when MPI is used.

◆ distributed_cell_loop() [2/2]

template<int dim, typename Number = double>
template<typename Functor >
void Portable::MatrixFree< dim, Number >::distributed_cell_loop ( const Functor & func,
const LinearAlgebra::CUDAWrappers::Vector< Number > & src,
LinearAlgebra::CUDAWrappers::Vector< Number > & dst ) const
private

This function should never be called. Calling it results in an internal error. This function exists only because cell_loop needs distributed_cell_loop() to exist for LinearAlgebra::CUDAWrappers::Vector.

◆ subscribe()

void Subscriptor::subscribe ( std::atomic< bool > *const validity,
const std::string & identifier = "" ) const
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 135 of file subscriptor.cc.

◆ unsubscribe()

void Subscriptor::unsubscribe ( std::atomic< bool > *const validity,
const std::string & identifier = "" ) const
inherited

Unsubscribes a user from the object.

Note
The identifier and the validity pointer must be the same as the one supplied to subscribe().

Definition at line 155 of file subscriptor.cc.

◆ n_subscriptions()

unsigned int Subscriptor::n_subscriptions ( ) const
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.

◆ list_subscribers() [1/2]

template<typename StreamType >
void Subscriptor::list_subscribers ( StreamType & stream) const
inlineinherited

List the subscribers to the input stream.

Definition at line 317 of file subscriptor.h.

◆ list_subscribers() [2/2]

void Subscriptor::list_subscribers ( ) const
inherited

List the subscribers to deallog.

Definition at line 203 of file subscriptor.cc.

◆ serialize()

template<class Archive >
void Subscriptor::serialize ( Archive & ar,
const unsigned int version )
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.

◆ check_no_subscribers()

void Subscriptor::check_no_subscribers ( ) const
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.

Note
Since this function is just a consistency check it does nothing in release mode.
If this function is called when there is an uncaught exception then, rather than aborting, this function prints an error message to the standard error stream and returns.

Definition at line 52 of file subscriptor.cc.

Friends And Related Symbol Documentation

◆ internal::ReinitHelper< dim, Number >

template<int dim, typename Number = double>
friend class internal::ReinitHelper< dim, Number >
friend

Definition at line 624 of file portable_matrix_free.h.

◆ copy_mf_data_to_host()

template<int dim, typename Number >
DataHost< dim, Number > copy_mf_data_to_host ( const typename ::Portable::MatrixFree< dim, Number >::Data & data,
const UpdateFlags & update_flags )
related

Copy data from the device to the host. update_flags should be identical to the one used in MatrixFree::AdditionalData.

Definition at line 772 of file portable_matrix_free.h.

Member Data Documentation

◆ my_id

template<int dim, typename Number = double>
int Portable::MatrixFree< dim, Number >::my_id
private

Unique ID associated with the object.

Definition at line 482 of file portable_matrix_free.h.

◆ use_coloring

template<int dim, typename Number = double>
bool Portable::MatrixFree< dim, Number >::use_coloring
private

If true, use graph coloring. Otherwise, use atomic operations. Graph coloring ensures bitwise reproducibility but is slower on Pascal and newer architectures.

Definition at line 489 of file portable_matrix_free.h.

◆ overlap_communication_computation

template<int dim, typename Number = double>
bool Portable::MatrixFree< dim, Number >::overlap_communication_computation
private

Overlap MPI communications with computation. This requires CUDA-aware MPI and use_coloring must be false.

Definition at line 495 of file portable_matrix_free.h.

◆ n_dofs

template<int dim, typename Number = double>
types::global_dof_index Portable::MatrixFree< dim, Number >::n_dofs
private

Total number of degrees of freedom.

Definition at line 500 of file portable_matrix_free.h.

◆ fe_degree

template<int dim, typename Number = double>
unsigned int Portable::MatrixFree< dim, Number >::fe_degree
private

Degree of the finite element used.

Definition at line 505 of file portable_matrix_free.h.

◆ dofs_per_cell

template<int dim, typename Number = double>
unsigned int Portable::MatrixFree< dim, Number >::dofs_per_cell
private

Number of degrees of freedom per cell.

Definition at line 510 of file portable_matrix_free.h.

◆ n_constrained_dofs

template<int dim, typename Number = double>
unsigned int Portable::MatrixFree< dim, Number >::n_constrained_dofs
private

Number of constrained degrees of freedom.

Definition at line 515 of file portable_matrix_free.h.

◆ q_points_per_cell

template<int dim, typename Number = double>
unsigned int Portable::MatrixFree< dim, Number >::q_points_per_cell
private

Number of quadrature points per cells.

Definition at line 520 of file portable_matrix_free.h.

◆ n_colors

template<int dim, typename Number = double>
unsigned int Portable::MatrixFree< dim, Number >::n_colors
private

Number of colors produced by the graph coloring algorithm.

Definition at line 525 of file portable_matrix_free.h.

◆ n_cells

template<int dim, typename Number = double>
std::vector<unsigned int> Portable::MatrixFree< dim, Number >::n_cells
private

Number of cells in each color.

Definition at line 530 of file portable_matrix_free.h.

◆ q_points

template<int dim, typename Number = double>
std::vector<Kokkos::View<point_type **, MemorySpace::Default::kokkos_space> > Portable::MatrixFree< dim, Number >::q_points
private

Vector of Kokkos::View to the quadrature points associated to the cells of each color.

Definition at line 537 of file portable_matrix_free.h.

◆ local_to_global

template<int dim, typename Number = double>
std::vector<Kokkos::View<types::global_dof_index **, MemorySpace::Default::kokkos_space> > Portable::MatrixFree< dim, Number >::local_to_global
private

Map the position in the local vector to the position in the global vector.

Definition at line 545 of file portable_matrix_free.h.

◆ inv_jacobian

template<int dim, typename Number = double>
std::vector< Kokkos::View<Number **[dim][dim], MemorySpace::Default::kokkos_space> > Portable::MatrixFree< dim, Number >::inv_jacobian
private

Vector of Kokkos::View of the inverse Jacobian associated to the cells of each color.

Definition at line 553 of file portable_matrix_free.h.

◆ JxW

template<int dim, typename Number = double>
std::vector<Kokkos::View<Number **, MemorySpace::Default::kokkos_space> > Portable::MatrixFree< dim, Number >::JxW
private

Vector of Kokkos::View to the Jacobian times the weights associated to the cells of each color.

Definition at line 560 of file portable_matrix_free.h.

◆ constrained_dofs

template<int dim, typename Number = double>
Kokkos::View<types::global_dof_index *, MemorySpace::Default::kokkos_space> Portable::MatrixFree< dim, Number >::constrained_dofs
private

Kokkos::View to the constrained degrees of freedom.

Definition at line 566 of file portable_matrix_free.h.

◆ constraint_mask

template<int dim, typename Number = double>
std::vector< Kokkos::View<::internal::MatrixFreeFunctions::ConstraintKinds *, MemorySpace::Default::kokkos_space> > Portable::MatrixFree< dim, Number >::constraint_mask
private

Mask deciding where constraints are set on a given cell.

Definition at line 574 of file portable_matrix_free.h.

◆ shape_values

template<int dim, typename Number = double>
Kokkos::View<Number *, MemorySpace::Default::kokkos_space> Portable::MatrixFree< dim, Number >::shape_values
private

Values of the shape functions.

Definition at line 579 of file portable_matrix_free.h.

◆ shape_gradients

template<int dim, typename Number = double>
Kokkos::View<Number *, MemorySpace::Default::kokkos_space> Portable::MatrixFree< dim, Number >::shape_gradients
private

Gradients of the shape functions.

Definition at line 584 of file portable_matrix_free.h.

◆ co_shape_gradients

template<int dim, typename Number = double>
Kokkos::View<Number *, MemorySpace::Default::kokkos_space> Portable::MatrixFree< dim, Number >::co_shape_gradients
private

Gradients of the shape functions for collocation methods.

Definition at line 590 of file portable_matrix_free.h.

◆ constraint_weights

template<int dim, typename Number = double>
Kokkos::View<Number *, MemorySpace::Default::kokkos_space> Portable::MatrixFree< dim, Number >::constraint_weights
private

Weights used when resolving hanginf nodes.

Definition at line 596 of file portable_matrix_free.h.

◆ partitioner

template<int dim, typename Number = double>
std::shared_ptr<const Utilities::MPI::Partitioner> Portable::MatrixFree< dim, Number >::partitioner
private

Shared pointer to a Partitioner for distributed Vectors used in cell_loop. When MPI is not used the pointer is null.

Definition at line 602 of file portable_matrix_free.h.

◆ padding_length

template<int dim, typename Number = double>
unsigned int Portable::MatrixFree< dim, Number >::padding_length
private

Length of the padding (closest power of two larger than or equal to the number of thread).

Definition at line 609 of file portable_matrix_free.h.

◆ row_start

template<int dim, typename Number = double>
std::vector<unsigned int> Portable::MatrixFree< dim, Number >::row_start
private

Row start of each color.

Definition at line 614 of file portable_matrix_free.h.

◆ dof_handler

template<int dim, typename Number = double>
const DoFHandler<dim>* Portable::MatrixFree< dim, Number >::dof_handler
private

Pointer to the DoFHandler associated with the object.

Definition at line 619 of file portable_matrix_free.h.

◆ graph

template<int dim, typename Number = double>
std::vector<std::vector<CellFilter> > Portable::MatrixFree< dim, Number >::graph
private

Colored graphed of locally owned active cells.

Definition at line 624 of file portable_matrix_free.h.

◆ counter

std::atomic<unsigned int> Subscriptor::counter
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 218 of file subscriptor.h.

◆ counter_map

std::map<std::string, unsigned int> Subscriptor::counter_map
mutableprivateinherited

In this map, we count subscriptions for each different identification string supplied to subscribe().

Definition at line 224 of file subscriptor.h.

◆ validity_pointers

std::vector<std::atomic<bool> *> Subscriptor::validity_pointers
mutableprivateinherited

In this vector, we store pointers to the validity bool in the SmartPointer objects that subscribe to this class.

Definition at line 240 of file subscriptor.h.

◆ object_info

const std::type_info* Subscriptor::object_info
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 248 of file subscriptor.h.

◆ mutex

std::mutex Subscriptor::mutex
staticprivateinherited

A mutex used to ensure data consistency when accessing the mutable members of this class. This lock is used in the subscribe() and unsubscribe() functions, as well as in list_subscribers().

Definition at line 271 of file subscriptor.h.


The documentation for this class was generated from the following file: