Reference documentation for deal.II version GIT 8ad845fa53 2023-12-10 20:50:02+00:00
\(\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\}}\)
Namespaces | Variables
concepts Namespace Reference

Namespaces

 internal
 

Variables

template<typename C >
concept is_contiguous_container
 
template<int dim, int spacedim>
concept is_valid_dim_spacedim
 
template<typename VectorType >
concept is_dealii_vector_type
 
template<typename VectorType >
concept is_writable_dealii_vector_type
 
template<typename VectorType >
concept is_dealii_petsc_vector_type
 
template<typename VectorType >
concept is_dealii_petsc_matrix_type
 
template<typename MeshType >
concept is_triangulation_or_dof_handler
 
template<typename VectorType >
concept is_vector_space_vector
 

Detailed Description

A namespace that is used to declare concepts used in C++20-style requires clauses.

Variable Documentation

◆ is_contiguous_container

template<typename C >
concept concepts::is_contiguous_container
Initial value:
= requires(C &c) {
{
std::data(c)
};
{
std::size(c)
};
}
requires((concepts::is_dealii_petsc_vector_type< VectorType >||std::constructible_from< VectorType, Vec >) &&(concepts::is_dealii_petsc_matrix_type< PMatrixType >||std::constructible_from< PMatrixType, Mat >) &&(concepts::is_dealii_petsc_matrix_type< AMatrixType >||std::constructible_from< AMatrixType, Mat >)) class TimeStepper
Definition: petsc_ts.h:320
SymmetricTensor< 2, dim, Number > C(const Tensor< 2, dim, Number > &F)

A concept that identifies whether a template argument C represents a contiguous container. A contiguous container is a container object (such as std::vector, std::array, or boost::container::small_vector that stores its elements in one contiguous array in which we access all elements via a pointer to the first element plus an offset. In contrast, linked lists, maps, and similar objects are typically not stored as contiguous containers.

Definition at line 698 of file template_constraints.h.

◆ is_valid_dim_spacedim

template<int dim, int spacedim>
concept concepts::is_valid_dim_spacedim
Initial value:
=
(dim >= 1 && spacedim <= 3 && dim <= spacedim)

A concept that tests that a combination of dim and spacedim template arguments is valid. Specifically, we must have that

  • dim>=1
  • spacedim<=3
  • dim<=spacedim. These are the kinds of requirements that are imposed, for example, on class Triangulation.

Definition at line 718 of file template_constraints.h.

◆ is_dealii_vector_type

template<typename VectorType >
concept concepts::is_dealii_vector_type
Initial value:
=
internal::is_dealii_vector_type<std::remove_cv_t<VectorType>>

A concept that tests whether a given template argument is a deal.II vector type. This concept is used in many places, such as for the functions in namespace VectorTools, where functions take a vector as argument, but the type of the vector is a template argument. The concept ensures that these functions cannot be called with an int argument, for example, for which the declaration without the concept would be perfectly valid but for which one would later get a linker error because the function is only instantiated for deal.II vector types.

Definition at line 860 of file template_constraints.h.

◆ is_writable_dealii_vector_type

template<typename VectorType >
concept concepts::is_writable_dealii_vector_type
Initial value:
=
is_dealii_vector_type<VectorType> && (std::is_const_v<VectorType> == false)

A concept that tests whether a given template argument is a deal.II vector type into which one can write. It is defined by asking whether the is_dealii_vector_type concept is satisfied, and that the template argument is not a const-qualified type. For example, is_writable_dealii_vector_type<Vector> is true, whereas is_writable_dealii_vector_type<const Vector> is not.

Definition at line 873 of file template_constraints.h.

◆ is_dealii_petsc_vector_type

template<typename VectorType >
concept concepts::is_dealii_petsc_vector_type
Initial value:
=
internal::is_dealii_petsc_vector_type<VectorType>

A concept that tests whether a given template argument is a deal.II vector type that internally builds on PETSc functionality. This concept is used to constrain some classes that implement advanced functionality based on PETSc and that requires that the vector it works on are PETSc vectors. This includes, for example, the time stepping and nonlinear solver classes in namespace PETScWrappers.

Definition at line 885 of file template_constraints.h.

◆ is_dealii_petsc_matrix_type

template<typename VectorType >
concept concepts::is_dealii_petsc_matrix_type
Initial value:
=
internal::is_dealii_petsc_matrix_type<VectorType>

A concept that tests whether a given template argument is a deal.II matrix type that internally builds on PETSc functionality. This concept is used to constrain some classes that implement advanced functionality based on PETSc and that requires that the matrix it works on are PETSc matrices. This includes, for example, the time stepping and nonlinear solver classes in namespace PETScWrappers.

Definition at line 897 of file template_constraints.h.

◆ is_triangulation_or_dof_handler

template<typename MeshType >
concept concepts::is_triangulation_or_dof_handler
Initial value:
=
internal::is_triangulation_or_dof_handler<MeshType>

A concept that is used to check whether the MeshType template type used in many functions in namespace GridTools and VectorTools is in fact a "mesh" in the sense expected by these functions. Specifically, this means that the type is either a Triangulation or a DoFHandler type.

Definition at line 971 of file template_constraints.h.

◆ is_vector_space_vector

template<typename VectorType >
concept concepts::is_vector_space_vector

A concept that tests whether a class VectorType has the required interface to serve as a vector in vector-space operations – principally what is required to run iterative solvers: things such as norms, dot products, etc.

Definition at line 981 of file template_constraints.h.