PTEMS  0.1.0-dev+git.81fd0e4
PolyTopic Element Method Solver
ptems Namespace Reference

Namespace for the PTEMS code. More...

Classes

class  DiscreteFunction
 A function over a discrete function space. More...
 
class  DiscreteFunction< DIM, X, N, 1 >
 Specialization of a function over a discrete function space with scalar result. More...
 
class  DomainDefinition3D
 Definition of the computational domain in 3D as an outer (boundary) surface, and a set of surfaces of polyhedra denoting internal holes. More...
 
class  DomainDefinition2D
 Definition of the computational domain in 2D as a set of boundary points, and set of holes (each hole defined as a set of boundary points). More...
 
class  FEFace
 
class  FiniteElement
 
class  FEFace< 1 >
 Defines a face between two finite elements in one-dimensions (i.e., a point between two intervals). More...
 
class  FEFace< 2 >
 Defines a face between two finite elements in two-dimensions (i.e., an interval). More...
 
class  FiniteElement< 1 >
 Definition of a 1D finite element (interval). More...
 
class  FiniteElement< 2 >
 Definition of a 2D finite element. More...
 
class  HighOrderFunctionTransform
 Functor for mapping high order derivatives on a reference element to a local element. More...
 
class  HighOrderFunctionTransform< 1, 2 >
 Functor for mapping second order derivatives on a reference element in 1D to a local element. More...
 
class  HighOrderFunctionTransform< 2, 2 >
 Functor for mapping second order derivatives on a reference element in 2D to a local element. More...
 
class  HighOrderFunctionTransform< 3, 2 >
 Functor for mapping second order derivatives on a reference element in 3D to a local element. More...
 
struct  HPRefinementData
 Structure for passing refinement data from HPRefinementStrategy to its derived classes. More...
 
struct  HPRefinementStrategy
 Base type for refinement strategies for \(hp\)-adaptive refinement. More...
 
class  HPPredictedErrorStrategy
 Class for performing \(hp\)-adaptive refinement, where the selection on whether to perform \(h\)- or \(p\)-refinement is based on the predicted convergence rate of the error estimate for a smooth or non-smooth function; cf. More...
 
class  HPLegendreDecayStrategy
 Class for performing \(hp\)-adaptive refinement, where the selection on whether to perform \(h\)- or \(p\)-refinement is based on the decay of the Legendre coefficients of the numerical solution; cf. More...
 
class  HPVEMStrategy
 Class for performing \(hp\)-adaptive refinement, where the selection on whether to perform \(h\)- or \(p\)-refinement is based on the difference between the gradient projection and gradient of the value projection for the virtual element method. More...
 
struct  DataFileWriter
 Base type for an object to write out data to a file. More...
 
struct  WritableVariable
 Interface for defining a variable type which can be written to a data file. More...
 
class  FEMesh
 A finite element mesh for a domain in the specified dimensions. More...
 
class  MatlabMATFileWriter
 File writer for writing output data to MATLAB .mat files. More...
 
class  VTKLegacyFileWriter
 File writer for writing output data to legacy VTK files. More...
 
class  LinearSystemSolver
 Basic linear solver (LU factorisation) for a small dense matrix of the system. More...
 
class  ConstrainedLeastSquares
 Class for solving a constrained least squares problem. More...
 
struct  NonZeroEntry
 Structure for defining the index of a non-zero entry in a sparse matrix. More...
 
struct  LinearSolver
 Base type for a linear solver, allowing the underlying matrix to be sparse. More...
 
class  MatrixVectorView
 A "view" object for accessing matrix rows or columns. More...
 
class  BasicMatrix
 A class for representing a small NxM matrix (generally matrix of dimension of the domain) More...
 
class  BasicLUFactorisation
 Utility functor for solving the equation linear system \(Ax=b\) using LU factorisation with partial pivoting of \(A\) for a square matrix. More...
 
struct  SaveFileOptions
 Specifies the options for saving a mesh (and functions) to a file. More...
 
struct  MeshSmoother
 Defines the options for mesh smoothing to perform during mesh refinement. More...
 
struct  DelaunayOptions
 Specifies the options to use for Delaunay triangulation. More...
 
struct  ParallelProcess
 Class for automatically initialising/finalising MPI. More...
 
class  ParallelComm
 This class is designed to abstract away the details of whether the project is built with MPI, or in single thread mode. More...
 
class  Polytope
 Class for specifying indices of vertices for defining a DIM-dimensional polytope. More...
 
class  Polytope< 2 >
 Specialization of the class for specifying indices of vertices for defining a DIM-dimensional polytope for DIM=2 (i.e., a polygon) More...
 
class  Polytope< 1 >
 Specialization of the class for specifying indices of vertices for defining a DIM-dimensional polytope for DIM=1 (line) More...
 
class  Polytope< 0 >
 Specialization of the class for specifying indices of vertices for defining a DIM-dimensional polytope for DIM=0 (point) More...
 
struct  QuadraturePoint
 Denotes a quadrature point and weight to use for quadrature on a reference element. More...
 
class  QuadraturePointAlgorithm
 Abstract base type for an algorithm for computing quadrature points for a reference element. More...
 
class  TensorQuadraturePointAlgorithm
 Abstract base type for an algorithm for computing quadrature points for a reference element based on tensor product of a set of quadratures points on the reference interval \([-1,1]\). More...
 
class  GaussLegendreQuadraturePoints
 Class for computing, and caching, Gauss-Legendre quadrature points on a reference element. More...
 
class  ReferenceMapping
 Structure for defining a mapping between an element and a reference element. More...
 
struct  DoerflerMarking
 Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform Dörfler marking [2] for refinement of elements based on an error indicator. More...
 
struct  ThresholdMarking
 Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform marking for refinement of elements based on a threshold condition for the error indicator. More...
 
struct  MaximalMarking
 Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform Maximal marking [6] for refinement of elements based on the maximum erro indicator. More...
 
struct  EquidistributionMarking
 Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform Equidistribution marking [3] for refinement of elements based on attempting to equidistribute the error between elements. More...
 
struct  FixedFractionMarking
 Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform Fixed Fraction marking for refinement of elements based on refining/coarsening a set fraction of the largest/smallest error indicators. More...
 
struct  FlagMarking
 Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform marking based on a container of flags. More...
 
struct  FlagMarking< Container, AdaptationType >
 Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform marking based on a random access container of AdaptationType (i.e., supports operator[] and size()) containing an AdaptationType for each element. More...
 
struct  FlagMarking< Container, std::enable_if_t< std::is_integral_v< typename Container::key_type > &&std::is_same_v< std::remove_cv_t< typename Container::mapped_type >, AdaptationType >, std::remove_cv_t< typename Container::value_type > > >
 Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform marking based on an associative container (map/unordered_map etc) of element number (std::size_t) to AdaptationType containing an AdaptationType for SOME elements (all other elements are left unrefined). More...
 
struct  FlagMarking< Container, std::enable_if_t< std::is_integral_v< typename Container::value_type >, std::remove_cv_t< typename Container::value_type > > >
 Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform marking based on two containers of element numbers to perform mesh refinement on or coarsening on, respectively (all other elements are left unrefined) More...
 
struct  SparseMatrixEntry
 Structure defining an entry in a sparse matrix. More...
 
struct  Preconditioner
 Defines the interface for a left, right, or split preconditioner. More...
 
struct  LeftPreconditioner
 Base type for a left preconditioner. More...
 
struct  RightPreconditioner
 Base type for a right preconditioner. More...
 
struct  SplitPreconditioner
 Base type for a split preconditioner. More...
 
class  GMRESSolver
 Linear system solver using GMRES. More...
 
class  MUMPSError
 Exception thrown is an error occurs within MUMPS. More...
 
class  MumpsSolver
 Linear system solver using the MUMPS direct solver. More...
 
struct  DampingParameters
 Specifies the damping parameters for damped Newton. More...
 
class  NonlinearSolver
 Nonlinear solver using (damped) Newton. More...
 
class  ILUPreconditioner
 Defines a preconditioner using incomplete LU (ILU) factorisation. More...
 
struct  DoFArraySlice
 Const reference to a consecutive subslice of a degrees of freedom array from a DiscreteFunction. More...
 
class  DiscreteFunctionSpaceInterface
 An interface declaration for DiscreteFunctionSpace which removes the size of the Codomain. More...
 
struct  DoFData
 Immutable structure for storing DoF or basis data for a DiscreteFunctionSpace. More...
 
class  DiscreteFunctionSpace
 Base type for defining a space of discrete functions on a mesh from \(\mathbb{R}^{DIM}\) to \(X^N\), where \(X\) is real (double/float) or complex (std::complex<double> or std::complex<float>). More...
 
struct  DiscreteFunctionType
 Type trait for extracting the type of a function from a DiscreteFunction space type. More...
 
struct  DiscreteFunctionType< PDiscreteFunctionSpace< DIM, X, N > >
 Only specialisation of DiscreteFunctionType, for a PDiscreteFunctionSpace type argument. More...
 
class  VariableDegreeDiscreteFunctionSpace
 Base type for a discrete space which supports variable polynomial degree. More...
 
class  DiscreteCartesianProductSpace
 Defines a space of discrete functions defined as the Cartesian product of discrete spaces. More...
 
class  ContinuousLagrangeSpace
 Discrete function space of continuous piecewise Lagrange functions. More...
 
class  ContinuousLagrangeSpace< 1, X, N >
 Specialisation of discrete function space of continuous piecewise Lagrange functions for 1D space. More...
 
class  ContinuousLagrangeSpace< 2, X, N >
 Specialisation of discrete function space of continuous piecewise Lagrange functions for 2D space. More...
 
class  DiscontinuousSpace
 Base type for discrete function space of discontinuous piecewise functions. More...
 
class  DiscontinuousLegendreSpace
 Discrete function space of discontinuous piecewise Legendre functions. More...
 
class  DiscontinuousLagrangeSpace
 Discrete function space of discontinuous piecewise Lagrange functions. More...
 
struct  HierarchicalPolynomials
 Base type for a set of hierarchical polynomials on space of dimension >= 2. More...
 
struct  LagrangePolynomials
 Defines Lagrange polynomials in the specified dimension on reference elements. More...
 
struct  LagrangePolynomials< 1 >
 Defines Lagrange polynomials in the 1D reference element (the interval \(4[-1.1]\)) More...
 
struct  LagrangePolynomials< 2 >
 Defines Lagrange polynomials in the 2D on the reference square \([-1,1]^2\) or reference triangle \( Conv\{(-1,-1),(1,-1),(-1,1)\} \), where \(Conv\) is the convex hull. More...
 
struct  LagrangePolynomials< 3 >
 Defines Lagrange polynomials in the 3D on the reference cube \([-1,1]^2\), simplex \( Conv\{(-1,-1,-1),(1,-1,-1),(-1,1,-1),(-1,-1,1)\} \), pyramid \( Conv\{(-1,-1,-1),(1,-1,-1),(1,1,-1),(-1,1,-1),(-1,-1,1)\} \), or prism \( Conv\{(-1,-1),(1,-1),(-1,1)\} \times [-1,1] \), where \(Conv\) is the convex hull. More...
 
struct  LegendrePolynomials
 Defines Legendre polynomials in the specified dimension on reference elements. More...
 
struct  LegendrePolynomials< 1 >
 Defines Legendre polynomials in the 1D reference element (the interval \([-1.1]\)) More...
 
struct  Monomials
 Defines Legendre polynomials in the specified dimension on reference elements. More...
 
struct  Monomials< 1 >
 Defines the set of hierarchical monomials in the 1D reference element (the interval \([-1.1]\)) of the form \(x^\alpha\), for \(\alpha=0,\dots,p+1\). More...
 
class  PiecewiseConstant
 Discrete function space of piecewise constant functions. More...
 
struct  FuncAndGradData
 Structure holding the values of a function and its gradient at a point. More...
 
struct  FuncGradAndHessianData
 Structure holding the values of a function, its gradient, and its Hessian at a point. More...
 
struct  Polynomials
 Defines polynomials in the specified dimension on reference elements. More...
 
struct  Polynomials< 1 >
 Defines polynomials in the 1D reference element (the internval \(4[-1.1]\) ) More...
 
struct  Polynomials< 2 >
 Defines polynomials in the 2D on the reference square \([-1,1]^2\) or reference triangle \( Conv\{(-1,-1),(1,-1),(-1,1)\} \), where \(Conv\) is the convex hull. More...
 
struct  Polynomials< 3 >
 Defines polynomials in the 3D on the reference cube \([-1,1]^2\), simplex \( Conv\{(-1,-1,-1),(1,-1,-1),(-1,1,-1),(-1,-1,1)\} \), pyramid \( Conv\{(-1,-1,-1),(1,-1,-1),(1,1,-1),(-1,1,-1),(-1,-1,1)\} \), or prism \( Conv\{(-1,-1),(1,-1),(-1,1)\} \times [-1,1] \), where \(Conv\) is the convex hull. More...
 
class  VirtualElementSpace
 Discrete function space of virtual element functions for \(H^1\) functions. More...
 
class  VirtualElementSpace< HBasis, 2, X, N >
 Specialisation of discrete function space of virtual element functions for second-order problems for 2D space. More...
 
struct  BasicVector
 Vector representing a point in DIM-dimensional space. More...
 
struct  is_complex
 Type trait for checking if a type is std::complex or not. More...
 
struct  remove_complex
 Type trait for extracting the underlying type from a std::complex, or just getting the type of anything which is not std::complex. More...
 
struct  BasicVector< T, 1 >
 Vector representing a point in one-dimensional space. More...
 
struct  BasicVector< T, 2 >
 Vector representing a point in two-dimensional space. More...
 
struct  BasicVector< T, 3 >
 Vector representing a point in three-dimensional space. More...
 
struct  BasicVector< V, 4 >
 Vector representing a point in four-dimensional space. More...
 
struct  BBox
 Defines a bounding box by opposite corners (minimum and maximum point) More...
 

Typedefs

template<std::size_t DIM>
using PFEFace = std::shared_ptr< FEFace< DIM > >
 Pointer to a face between two finite elements. More...
 
template<std::size_t DIM>
using PElement = std::shared_ptr< FiniteElement< DIM > >
 Pointer to a finite element. More...
 
template<std::size_t DIM, typename X = double, std::size_t N = 1>
using PHPRefinementStrategy = std::unique_ptr< HPRefinementStrategy< DIM, X, N > >
 Pointer to a hp-refinement strategy for \(hp\)-adaptive refinement. More...
 
typedef std::set< NonZeroEntrySparsityPattern
 Sorted set of non-zero entries to define the sparsity pattern of a sparse matrix (set of indices of non-zero entries) More...
 
template<std::size_t N, std::size_t M = N>
using Matrix = BasicMatrix< double, N, M >
 Matrix of double precision floating point components. More...
 
template<std::size_t N, std::size_t M = N>
using MatrixF = BasicMatrix< float, N, M >
 Matrix of single precision floating point components. More...
 
template<std::size_t N, std::size_t M = N>
using ComplexMatrix = BasicMatrix< std::complex< double >, N, M >
 Matrix of double precision complex components. More...
 
template<std::size_t N, std::size_t M = N>
using ComplexMatrixF = BasicMatrix< std::complex< float >, N, M >
 Matrix of single precision complex components. More...
 
template<std::size_t N>
using LUFactorisation = BasicLUFactorisation< double, N >
 LU factorisation structure for a matrix of double precision real components. More...
 
template<std::size_t N>
using LUFactorisationF = BasicLUFactorisation< float, N >
 LU factorisation structure for a matrix of single precision real components. More...
 
template<std::size_t N>
using ComplexLUFactorisation = BasicLUFactorisation< std::complex< double >, N >
 LU factorisation structure for a matrix of double precision complex components. More...
 
template<std::size_t N>
using ComplexLUFactorisationF = BasicLUFactorisation< std::complex< float >, N >
 LU factorisation structure for a matrix of single precision complex components. More...
 
template<std::size_t DIM>
using PFEMesh = std::shared_ptr< FEMesh< DIM > >
 Pointer to a mesh. More...
 
template<std::size_t DIM>
using QuadraturePoints = std::vector< QuadraturePoint< DIM > >
 List of quadrature points. More...
 
template<std::size_t DIM>
using ReferenceElement = std::array< ExtrudeType, DIM >
 Array of DIM ExtrudeType values defining a reference element. More...
 
template<typename T >
using PPreconditioner = std::shared_ptr< Preconditioner< T > >
 Pointer to a preconditioner. More...
 
template<typename X >
using DoFChangeList = std::vector< std::pair< DoFArraySlice< X >, std::reference_wrapper< std::vector< X > > > >
 Type for a map (actually array of pairs) of the degree of freedom from a function which is part of a space before a mesh change, to a (reference to a) vector to APPEND with the new degrees of freedom after mesh change. More...
 
template<std::size_t DIM, typename X , std::size_t N>
using PDiscreteFunctionSpace = std::shared_ptr< DiscreteFunctionSpace< DIM, X, N > >
 Pointer to a function space. More...
 
template<std::size_t DIM, typename X = double, std::size_t N = 1>
using FESpace = ContinuousLagrangeSpace< DIM, X, N >
 A conforming finite element space of continuous Lagrange polynomials. More...
 
template<std::size_t DIM, typename X = double, std::size_t N = 1>
using DGSpace = DiscontinuousLegendreSpace< DIM, X, N >
 A discontinuous Galerkin finite element space of Legendre polynomials. More...
 
template<std::size_t DIM, typename X = double, std::size_t N = 1>
using FVSpace = PiecewiseConstant< DIM, X, N >
 A finite volume space. More...
 
template<std::size_t DIM>
using Vector = BasicVector< double, DIM >
 Vector of double precision floating point components. More...
 
template<std::size_t DIM>
using VectorF = BasicVector< float, DIM >
 Vector of single precision floating point components. More...
 
template<std::size_t DIM>
using ComplexVector = BasicVector< std::complex< double >, DIM >
 Vector of double precision complex components. More...
 
template<std::size_t DIM>
using ComplexVectorF = BasicVector< std::complex< float >, DIM >
 Vector of single precision complex components. More...
 

Enumerations

enum class  LShapeDomain { MinusSW , MinusSE , MinusNW , MinusNE }
 Defines the L-shape domain to create. More...
 
enum class  MatrixOrdering { RowMajor , ColumnMajor }
 Specifies how a list of values is treated as a matrix. More...
 
enum class  MeshFileFormat {
  Automatic , VTK_Legacy , VTK_XML , VTK_HDF ,
  GMsh , UCD , PTEMS , Tecplot ,
  TecplotText , Triangle , MatlabMAT
}
 Enumeration for specifying the type of mesh file to open or save. More...
 
enum class  UniformElementType2D {
  Square , TriangleSWtoNE , TriangleSEtoNW , TriangleCross ,
  TriangleAlternateSW , TriangleAlternateSE
}
 Specifies the method for splitting a uniform square into possible mesh elements. More...
 
enum class  UniformElementType3D {
  Cube , Pyramid , PrismSWtoNE , PrismSEtoNW ,
  PrismCross , PrismAlternateSW , PrismAlternateSE , TetSEtoNW15 ,
  TetSEtoNW16 , TetSEtoNW24 , TetSEtoNW26 , TetSEtoNW34 ,
  TetSEtoNW35 , TetSWtoNE15 , TetSWtoNE16 , TetSWtoNE24 ,
  TetSWtoNE26 , TetSWtoNE34 , TetSWtoNE35
}
 Specifies the methods for splitting a uniform cube into different 3D elements. More...
 
enum class  UniformMeshHorizontalPlane { XY , XZ , YZ }
 Defines which plane to consider the horizontal plane when performing element splitting in 3D. More...
 
enum class  AxisDirection { X , Y , Z }
 Specifies a primary axis direction for an algorithm. More...
 
enum class  DelaunayAlgorithm { DivideAndConquer , VerticalCutsOnly , Incremental , Sweepline }
 Specifies the algorithm to use for Delaunay triangulation. More...
 
enum class  ExtrudeType { Point , Hyperplane }
 Specifies how a (N-1)-hyperplane at -1 is extruded to form a N-dimensional reference element. More...
 
enum class  AdaptationType { None , Refine , Coarsen }
 Specifies the type of adaptation to perform on a mesh element. More...
 
enum class  PreconditionerType { Left , Right , Split }
 Defines the type of a preconditioner. More...
 
enum class  MumpsMatrixType { Unsymmetric = 0 , PositiveDefinite = 1 , Symmetric = 2 }
 Enum to specify property of the matrix for aiding the MUMPS solver. More...
 
enum class  TensorProductPolynomials { None , HyperplaneExtrudedElementsOnly , PolytopicElementsOnly , All }
 For spaces which support total order and tensor product polynomials on (some) elements this can be used to specify which types of elements use tensor product polynomials and which use total order. More...
 

Functions

template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction< DIM, X, N, LEN > operator* (X constant, const DiscreteFunction< DIM, X, N, LEN > &func)
 Multiplies the specified function by a constant. More...
 
template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction< DIM, X, N, LEN > operator* (const DiscreteFunction< DIM, X, N, LEN > &func, X constant)
 Multiplies the specified function by a constant. More...
 
template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction< DIM, X, N, LEN > operator/ (const DiscreteFunction< DIM, X, N, LEN > &func, X constant)
 Divides the specified function by a constant. More...
 
template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction< DIM, X, N, LEN > operator+ (X constant, const DiscreteFunction< DIM, X, N, LEN > &func)
 Adds a constant to the specified function. More...
 
template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction< DIM, X, N, LEN > operator+ (const DiscreteFunction< DIM, X, N, LEN > &func, X constant)
 Adds a constant to the specified function. More...
 
template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction< DIM, X, N, LEN > operator- (const DiscreteFunction< DIM, X, N, LEN > &func, X constant)
 Subtracts a constant from the specified function. More...
 
template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction< DIM, X, N, LEN > operator+ (const DiscreteFunction< DIM, X, N, LEN > &lhs, const DiscreteFunction< DIM, X, N, LEN > &rhs)
 Adds the two specified functions. More...
 
template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction< DIM, X, N, LEN > operator- (const DiscreteFunction< DIM, X, N, LEN > &lhs, const DiscreteFunction< DIM, X, N, LEN > &rhs)
 Subtracts the two specified functions. More...
 
template<std::size_t DIM, typename X , std::size_t N>
PHPRefinementStrategy< DIM, X, N > CreateHPPredictedErrorStrategy (const PDiscreteFunctionSpace< DIM, X, N > &space, double gammaH, double gammaP, double gammaN=1, std::size_t minP=1, bool preferP=false)
 Creates an object for performing \(hp\)-adaptive refinement based on the predicted convergence rate of the error estimate. More...
 
template<std::size_t DIM, typename X , std::size_t N>
PHPRefinementStrategy< DIM, X, N > CreateHPPredictedErrorStrategy (const PDiscreteFunctionSpace< DIM, X, N > &space, double gammaH, double gammaP, bool preferP)
 Creates an object for performing \(hp\)-adaptive refinement based on the predicted convergence rate of the error estimate. More...
 
template<std::size_t DIM, typename X , std::size_t N>
PHPRefinementStrategy< DIM, X, N > CreateHPLegendreDecayStrategy (const PDiscreteFunctionSpace< DIM, X, N > &space, double threshold=0.25, std::size_t minP=1)
 Creates an object for performing \(hp\)-adaptive refinement based on the estimated smoothness of the numerical solution. More...
 
template<std::size_t DIM, typename X , std::size_t N>
PHPRefinementStrategy< DIM, X, N > CreateHPVEMStrategy (const PDiscreteFunctionSpace< DIM, X, N > &space, double threshold=2.0, std::size_t minP=1)
 Creates an object for performing \(hp\)-adaptive refinement based on the relative difference between the value and gradient projections for virtual element functions. More...
 
constexpr bool operator< (const NonZeroEntry &lhs, const NonZeroEntry &rhs)
 Comparator to use for sorting NonZeroEntry values. More...
 
constexpr bool IsBinaryFileFormat (MeshFileFormat format)
 Gets if the specified file format is a binary or text-based file format. More...
 
PFEMesh< 1 > CreateUniformMesh (const ParallelComm &mpi, double min, double max, std::size_t numElements)
 Create a 1 dimensional finite element mesh by uniform subdivision of the specified interval. More...
 
PFEMesh< 2 > CreateUniformMesh (const ParallelComm &mpi, const DomainDefinition2D &domain, std::size_t numElementsX, std::size_t numElementsY, UniformElementType2D elementType=UniformElementType2D::Square)
 Create a 2 dimensional finite element mesh by uniform subdivision of the specified domain. More...
 
template<typename Container >
FlagMarking< ContainerMarkingFromFlags (const Container &container)
 Creates a functor that can be passed to FEMesh::Adapt(Func, bool) to perform marking based on a container of flags. More...
 
template<typename Container >
FlagMarking< ContainerMarkingFromFlags (const Container &refine, const Container &coarsen)
 Create a functor for performing marking based on a container containing a list of element numbers to refine and a container containing a list of element numbers to coarsen. More...
 
template<typename T , typename... Args>
PPreconditioner< typename T::value_type > MakePreconditioner (Args... args)
 Constructs a preconditioner of the specified type. More...
 
template<std::size_t DIM, typename T >
auto HomogeneousDirichletBoundary ()
 Defines function to pass space constructors to denote all boundaries are homogeneous (zero) Dirichlet. More...
 
template<std::size_t DIM, typename T >
auto InhomogeneousDirichletBoundary (T value)
 Defines function to pass to space constructors to denote all boundaries are inhomogeneous Dirichlet of a specified constant. More...
 
template<std::size_t DIM, typename... T>
auto InhomogeneousDirichletBoundary (T... value)
 Defines function to pass to space constructors for vector spaces to denote all boundaries are inhomogeneous Dirichlet of a specified constant. More...
 
template<std::size_t DIM, typename Func >
auto DirichletBoundary (Func func)
 Defines function to pass to space constructors to denote all boundaries are Dirichlet defined by the specified function. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<DIM>&)>
PDiscreteFunctionSpace< DIM, X, N > MakeContinuousLagrangeSpace (const PFEMesh< DIM > &mesh, std::size_t polynomialDegree, BC dirichletBoundary=nullptr)
 Create a space of continuous piecewise Lagrange functions over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<DIM>&)>
PDiscreteFunctionSpace< DIM, X, N > MakeContinuousLagrangeSpace (const PFEMesh< DIM > &mesh, const std::array< std::size_t, N > &polynomialDegree, BC dirichletBoundary=nullptr)
 Create a space of continuous piecewise Lagrange functions over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<DIM>&)>
PDiscreteFunctionSpace< DIM, X, N > MakeFESpace (const PFEMesh< DIM > &mesh, std::size_t polynomialDegree, BC dirichletBoundary=nullptr)
 Create a conforming finite element space over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<DIM>&)>
PDiscreteFunctionSpace< DIM, X, N > MakeFESpace (const PFEMesh< DIM > &mesh, const std::array< std::size_t, N > &polynomialDegree, BC dirichletBoundary=nullptr)
 Create a conforming finite element space over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDiscontinuousLegendreSpace (const PFEMesh< DIM > &mesh, std::size_t polynomialDegree, TensorProductPolynomials tensorProductPolynomials=TensorProductPolynomials::HyperplaneExtrudedElementsOnly)
 Create a space of discontinuous piecewise Legendre functions over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDiscontinuousLegendreSpace (const PFEMesh< DIM > &mesh, std::size_t polynomialDegree, bool tensorProductPolytopes)
 Create a space of discontinuous piecewise Legendre functions over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDiscontinuousLegendreSpace (const PFEMesh< DIM > &mesh, const std::array< std::size_t, N > &polynomialDegree, TensorProductPolynomials tensorProductPolynomials=TensorProductPolynomials::HyperplaneExtrudedElementsOnly)
 Create a space of discontinuous piecewise Legendre functions over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDiscontinuousLegendreSpace (const PFEMesh< DIM > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool tensorProductPolytopes)
 Create a space of discontinuous piecewise Legendre functions over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDGSpace (const PFEMesh< DIM > &mesh, std::size_t polynomialDegree, TensorProductPolynomials tensorProductPolynomials=TensorProductPolynomials::HyperplaneExtrudedElementsOnly)
 Create a discontinuous Galerkin finite element space over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDGSpace (const PFEMesh< DIM > &mesh, std::size_t polynomialDegree, bool tensorProductPolytopes)
 Create a discontinuous Galerkin finite element space over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDGSpace (const PFEMesh< DIM > &mesh, const std::array< std::size_t, N > &polynomialDegree, TensorProductPolynomials tensorProductPolynomials=TensorProductPolynomials::HyperplaneExtrudedElementsOnly)
 Create a discontinuous Galerkin finite element space over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDGSpace (const PFEMesh< DIM > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool tensorProductPolytopes)
 Create a discontinuous Galerkin finite element space over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDiscontinuousLagrangeSpace (const PFEMesh< DIM > &mesh, std::size_t polynomialDegree, TensorProductPolynomials tensorProductPolynomials=TensorProductPolynomials::HyperplaneExtrudedElementsOnly)
 Create a space of discontinuous piecewise Lagrange functions over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDiscontinuousLagrangeSpace (const PFEMesh< DIM > &mesh, std::size_t polynomialDegree, bool tensorProductPolytopes)
 Create a space of discontinuous piecewise Lagrange functions over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDiscontinuousLagrangeSpace (const PFEMesh< DIM > &mesh, const std::array< std::size_t, N > &polynomialDegree, TensorProductPolynomials tensorProductPolynomials=TensorProductPolynomials::HyperplaneExtrudedElementsOnly)
 Create a space of discontinuous piecewise Lagrange functions over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeDiscontinuousLagrangeSpace (const PFEMesh< DIM > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool tensorProductPolytopes)
 Create a space of discontinuous piecewise Lagrange functions over the specified mesh with specified polynomial degree. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakePiecewiseConstant (const PFEMesh< DIM > &mesh)
 Create a space of piecewise constant functions over the specified mesh. More...
 
template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace< DIM, X, N > MakeFVSpace (const PFEMesh< DIM > &mesh)
 Create a finite volume space over the specified mesh. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1VESpace (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, bool hasVertexDoFs, std::size_t edgePolyReduct, std::size_t interiorPolyReduct, std::size_t valueProjReduct, std::size_t gradProjReduct, std::size_t edgeProjReduct, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\) virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1VESpace (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool hasVertexDoFs, std::size_t edgePolyReduct, std::size_t interiorPolyReduct, std::size_t valueProjReduct, std::size_t gradProjReduct, std::size_t edgeProjReduct, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\) virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1VESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, bool hasVertexDoFs, std::size_t edgePolyReduct, std::size_t interiorPolyReduct, std::size_t valueProjReduct, std::size_t gradProjReduct, std::size_t edgeProjReduct, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\) virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1VESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool hasVertexDoFs, std::size_t edgePolyReduct, std::size_t interiorPolyReduct, std::size_t valueProjReduct, std::size_t gradProjReduct, std::size_t edgeProjReduct, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\) virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpace (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, bool reduceGradProjDegree=true, std::size_t interiorPolyReduct=2, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpace (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool reduceGradProjDegree=true, std::size_t interiorPolyReduct=2, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, bool reduceGradProjDegree=true, std::size_t interiorPolyReduct=2, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool reduceGradProjDegree=true, std::size_t interiorPolyReduct=2, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpace (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, std::size_t interiorPolyReduct, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpace (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, std::size_t interiorPolyReduct, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, std::size_t interiorPolyReduct, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, std::size_t interiorPolyReduct, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpace (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, bool reduceGradProjDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpace (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool reduceGradProjDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, bool reduceGradProjDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool reduceGradProjDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpace (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpace (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1ConformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1NonconformingVESpace (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, bool reduceGradProjDegree=true, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1NonconformingVESpace (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool reduceGradProjDegree=true, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1NonconformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, bool reduceGradProjDegree=true, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1NonconformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, bool reduceGradProjDegree=true, BC dirichletBoundary=nullptr)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1NonconformingVESpace (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1NonconformingVESpace (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1NonconformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, std::size_t polynomialDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 
template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace< 2, X, N > MakeH1NonconformingVESpaceWithPolyBasis (const PFEMesh< 2 > &mesh, const std::array< std::size_t, N > &polynomialDegree, BC dirichletBoundary)
 Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis. More...
 

Detailed Description

Namespace for the PTEMS code.

Typedef Documentation

◆ ComplexLUFactorisation

template<std::size_t N>
using ptems::ComplexLUFactorisation = typedef BasicLUFactorisation<std::complex<double>, N>

LU factorisation structure for a matrix of double precision complex components.

Template Parameters
NThe number of rows/columns in the matrix

◆ ComplexLUFactorisationF

template<std::size_t N>
using ptems::ComplexLUFactorisationF = typedef BasicLUFactorisation<std::complex<float>, N>

LU factorisation structure for a matrix of single precision complex components.

Template Parameters
NThe number of rows/columns in the matrix

◆ ComplexMatrix

template<std::size_t N, std::size_t M = N>
using ptems::ComplexMatrix = typedef BasicMatrix<std::complex<double>, N, M>

Matrix of double precision complex components.

Template Parameters
NThe number of rows in the matrix
MThe number of columns in the matrix

◆ ComplexMatrixF

template<std::size_t N, std::size_t M = N>
using ptems::ComplexMatrixF = typedef BasicMatrix<std::complex<float>, N, M>

Matrix of single precision complex components.

Template Parameters
NThe number of rows in the matrix
MThe number of columns in the matrix

◆ ComplexVector

template<std::size_t DIM>
using ptems::ComplexVector = typedef BasicVector<std::complex<double>, DIM>

Vector of double precision complex components.

Template Parameters
DIMThe dimension of the space

◆ ComplexVectorF

template<std::size_t DIM>
using ptems::ComplexVectorF = typedef BasicVector<std::complex<float>, DIM>

Vector of single precision complex components.

Template Parameters
DIMThe dimension of the space

◆ DGSpace

template<std::size_t DIM, typename X = double, std::size_t N = 1>
using ptems::DGSpace = typedef DiscontinuousLegendreSpace<DIM, X, N>

A discontinuous Galerkin finite element space of Legendre polynomials.

Template Parameters
DIMThe dimension of the domain (and mesh)
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)

◆ DoFChangeList

template<typename X >
using ptems::DoFChangeList = typedef std::vector<std::pair< DoFArraySlice<X>, std::reference_wrapper<std::vector<X> > > >

Type for a map (actually array of pairs) of the degree of freedom from a function which is part of a space before a mesh change, to a (reference to a) vector to APPEND with the new degrees of freedom after mesh change.

Template Parameters
XThe type of the degrees of freedom

◆ FESpace

template<std::size_t DIM, typename X = double, std::size_t N = 1>
using ptems::FESpace = typedef ContinuousLagrangeSpace<DIM, X, N>

A conforming finite element space of continuous Lagrange polynomials.

Template Parameters
DIMThe dimension of the domain (and mesh)
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)

◆ FVSpace

template<std::size_t DIM, typename X = double, std::size_t N = 1>
using ptems::FVSpace = typedef PiecewiseConstant<DIM, X, N>

A finite volume space.

Template Parameters
DIMThe dimension of the domain (and mesh)
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)

◆ LUFactorisation

template<std::size_t N>
using ptems::LUFactorisation = typedef BasicLUFactorisation<double, N>

LU factorisation structure for a matrix of double precision real components.

Template Parameters
NThe number of rows/columns in the matrix

◆ LUFactorisationF

template<std::size_t N>
using ptems::LUFactorisationF = typedef BasicLUFactorisation<float, N>

LU factorisation structure for a matrix of single precision real components.

Template Parameters
NThe number of rows/columns in the matrix

◆ Matrix

template<std::size_t N, std::size_t M = N>
using ptems::Matrix = typedef BasicMatrix<double, N, M>

Matrix of double precision floating point components.

Template Parameters
NThe number of rows in the matrix
MThe number of columns in the matrix

◆ MatrixF

template<std::size_t N, std::size_t M = N>
using ptems::MatrixF = typedef BasicMatrix<float, N, M>

Matrix of single precision floating point components.

Template Parameters
NThe number of rows in the matrix
MThe number of columns in the matrix

◆ PDiscreteFunctionSpace

template<std::size_t DIM, typename X , std::size_t N>
using ptems::PDiscreteFunctionSpace = typedef std::shared_ptr<DiscreteFunctionSpace<DIM,X,N> >

Pointer to a function space.

Template Parameters
DIMThe dimension of the domain (and mesh)
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)

◆ PElement

template<std::size_t DIM>
using ptems::PElement = typedef std::shared_ptr<FiniteElement<DIM> >

Pointer to a finite element.

Template Parameters
DIMThe dimension of the space the finite element mesh is defined on

◆ PFEFace

template<std::size_t DIM>
using ptems::PFEFace = typedef std::shared_ptr<FEFace<DIM> >

Pointer to a face between two finite elements.

Template Parameters
DIMThe dimension of the space the finite element mesh is defined on

◆ PFEMesh

template<std::size_t DIM>
using ptems::PFEMesh = typedef std::shared_ptr<FEMesh<DIM> >

Pointer to a mesh.

Template Parameters
DIMDimension of the mesh

◆ PHPRefinementStrategy

template<std::size_t DIM, typename X = double, std::size_t N = 1>
using ptems::PHPRefinementStrategy = typedef std::unique_ptr<HPRefinementStrategy<DIM, X, N> >

Pointer to a hp-refinement strategy for \(hp\)-adaptive refinement.

Template Parameters
DIMThe dimension of the mesh and spaces to refine
XThe type of the result of the functions (double, std::complex, etc) for each space
NThe size of the resulting vector space (N=1 for scalars) for each space

◆ PPreconditioner

template<typename T >
using ptems::PPreconditioner = typedef std::shared_ptr<Preconditioner<T> >

Pointer to a preconditioner.

◆ QuadraturePoints

template<std::size_t DIM>
using ptems::QuadraturePoints = typedef std::vector<QuadraturePoint<DIM> >

List of quadrature points.

Template Parameters
DIMThe dimension of the points

◆ ReferenceElement

template<std::size_t DIM>
using ptems::ReferenceElement = typedef std::array<ExtrudeType, DIM>

Array of DIM ExtrudeType values defining a reference element.

A 2D reference element can be constructed by considering the reference interval \([-1,1]\) in 1D and then "extruding" this between y=-1 and y=1 either as an interval at \(y=-1\) and \(y=1\) (the reference square \([-1,1]^2\)), or as an interval at \(y=-1\) and a point \((-1,1)\) at \(y=1\) (the reference triangle \((-1,-1)--(1,-1)--(-1,1)\)).

A 3D reference element can be constructed by extruding one of the two 2D reference elements at \(z=-1\) to either the same 2D reference element at \(z=1\), or to the point \((-1,-1,1)\):

  • Square extruded to square => reference cube \([-1,1]^3\)
  • Square extruded to point => reference pyramid \((-1,-1,-1),(1,-1,-1),(1,1,-1),(-1,1,-1),(-1,-1,1)\)
  • Triangle extruded to triangle => reference prism \((-1,-1,-1),(1,-1,-1),(-1,1,-1),(-1,-1,1),(1,-1,1),(-1,1,1)\)
  • Triangle extruded to point => reference tetrahedron \((-1,-1,-1),(1,-1,-1),(-1,1,-1),(-1,-1,1)\)

This can be repeated for any dimension. In general, therefore, we call the extrusion of the DIM-1 reference element to a DIM-1 reference element an extrusion to a "hyperplane" (ExtrudeType::Hyperplane), and to a point as extrusion to a "point" (ExtrudeType::Point).

Note
The first entry (1st dimension) is ALWAYS ExtrudeType::Point
Template Parameters
DIMDimension of the reference element

◆ SparsityPattern

Sorted set of non-zero entries to define the sparsity pattern of a sparse matrix (set of indices of non-zero entries)

◆ Vector

template<std::size_t DIM>
using ptems::Vector = typedef BasicVector<double, DIM>

Vector of double precision floating point components.

Template Parameters
DIMThe dimension of the space

◆ VectorF

template<std::size_t DIM>
using ptems::VectorF = typedef BasicVector<float, DIM>

Vector of single precision floating point components.

Template Parameters
DIMThe dimension of the space

Enumeration Type Documentation

◆ AdaptationType

enum ptems::AdaptationType
strong

Specifies the type of adaptation to perform on a mesh element.

Enumerator
None 

Perform no refinement.

Refine 

Refine the element.

Coarsen 

Coarsen the element.

◆ AxisDirection

enum ptems::AxisDirection
strong

Specifies a primary axis direction for an algorithm.

Enumerator

The positive X-axis direction.

The positive Y-axis direction.

The positive Z-axis direction.

◆ DelaunayAlgorithm

Specifies the algorithm to use for Delaunay triangulation.

Enumerator
DivideAndConquer 

Use the divide-and-conquer algorithm.

VerticalCutsOnly 

Use the divide-and-conquer algorithm with only vertical cuts.

Incremental 

Use the incremental algorithm.

Sweepline 

Use the sweepline algorithm.

◆ ExtrudeType

enum ptems::ExtrudeType
strong

Specifies how a (N-1)-hyperplane at -1 is extruded to form a N-dimensional reference element.

See also
ReferenceMapping
Enumerator
Point 

The hyperplane is extruded to the point (-1,-1,....,1); e.g., an n-dimensional simplex is a "point" extrusion of an (N-1)-dimensional simplex.

Hyperplane 

The hyperplane at -1 is extruded to the same hyperplane at 1; e.g., an n-dimensional hypercube is a "hyperplane" extrusion of an (N-1)-dimensional hypercube.

◆ LShapeDomain

enum ptems::LShapeDomain
strong

Defines the L-shape domain to create.

Enumerator
MinusSW 

L-shape defined by subtracting the south-west corner from a square:

MinusSE 

L-shape defined by subtracting the south-east corner from a square:

MinusNW 

L-shape defined by subtracting the north-west corner from a square:

MinusNE 

L-shape defined by subtracting the north-east corner from a square:

◆ MatrixOrdering

enum ptems::MatrixOrdering
strong

Specifies how a list of values is treated as a matrix.

Enumerator
RowMajor 

The list of values is in Row-Major ordering.

This means that for a NxM matrix the first M entries are the entries of the first row, the next M entries are the entries of the second row, etc.

ColumnMajor 

The list of values is in Column-Major ordering.

This means that for a NxM matrix the first N entries are the entries of the first column, the next N entries are the entries of the second column, etc.

◆ MeshFileFormat

enum ptems::MeshFileFormat
strong

Enumeration for specifying the type of mesh file to open or save.

Enumerator
Automatic 

Attempt to automatically deduce the type of mesh file.

VTK_Legacy 

Open a Legacy format VTK file (.vtk): https://kitware.github.io/vtk-examples/site/VTKFileFormats#simple-legacy-formats.

VTK_XML 

Open a modern XML format VTK file (.pvti, .pvtp, .pvtr, .pvts, .pvtu, .vti, .vtp, .vtr, .vts, .vtu): https://kitware.github.io/vtk-examples/site/VTKFileFormats#xml-file-formats.

VTK_HDF 

Open a hierarchical data format (HDF) encoded VTK file (.hdf, .hdf5, .he5, or .h5): https://kitware.github.io/vtk-examples/site/VTKFileFormats#hdf-file-formats.

GMsh 

Opens a GMsh mesh file (.msh): https://gmsh.info/doc/texinfo/gmsh.html#Gmsh-file-formats.

UCD 

Opens an Unstructured Cell Data (UCD) file stored in ASCII or binary format (.inp): https://dav.lbl.gov/archive/NERSC/Software/express/help6.1/help/reference/dvmac/UCD_Form.htm.

PTEMS 

Opens a PTEMS mesh file (.pmsh or .pmshz): TODO: Define format.

Tecplot 

Opens a Tecplot mesh file: http://home.ustc.edu.cn/~cbq/360_data_format_guide.pdf (Chapter 3 & Appendix A)

TecplotText 

Opens an input ASCII Tecplot mesh file (.dat): http://home.ustc.edu.cn/~cbq/360_data_format_guide.pdf (Chapter 4)

Triangle 

Opens mesh files output by Triangle or TetGen (.node and .ele).

Note, these are pairs of files: https://www.cs.cmu.edu/~quake/triangle.html https://wias-berlin.de/software/tetgen/1.5/doc/manual/manual006.html

MatlabMAT 

Mesh in a structure saved to a matlab MAT file.

For 2D data contains three variables:

  • Dim: "2"
  • Vertices: Nx{Dimension} matrix containing one per vertex row
  • Elements: Ex1 cell array (one cell per element) containing row vector specifying vertices in counter-clockwise order.

◆ MumpsMatrixType

Enum to specify property of the matrix for aiding the MUMPS solver.

Enumerator
Unsymmetric 

The matrix is unsymmetric.

PositiveDefinite 

The matrix is positive definite.

Symmetric 

The matrix is symmetric.

◆ PreconditionerType

Defines the type of a preconditioner.

See also
Preconditioner
Enumerator
Left 

The preconditioner is a left preconditioner; i.e., for preconditioned linear system \( M^{-1}Ax = M^{-1}b \), where \(M\) is the preconditioner to \(A\).

Right 

The preconditioner is a right preconditioner; i.e., for preconditioned linear system \( AM^{-1}u = b\), where \(M\) is the preconditioner to \(A\) and \(u=Mx\).

Split 

The preconditioner is a split preconditioner; i.e., for preconditioned linear system \( L^{-1}AU^{-1}x = L^{-1}b \), where \(M=LU\) is the preconditioner to \(A\) and \(u=Ux\).

◆ TensorProductPolynomials

For spaces which support total order and tensor product polynomials on (some) elements this can be used to specify which types of elements use tensor product polynomials and which use total order.

Enumerator
None 

All elements types use total order polynomials.

HyperplaneExtrudedElementsOnly 

Elements which are a mapping of a reference element with a ExtrudeType::Hyperplane extrusion use tensor product polynomials on that extrusion direction; e.g, Quadrilaterals and hexahedra use tensor product, simplices use total order, and prisms, and pyramids use tensor in two coordinate directions and total order in the third.

Polygonal and polytopic elements use total order polynomials.

PolytopicElementsOnly 

Polygonal and polytopic elements use tensor product polynomials, all other element types use total order polynomials.

All 

Elements which are a mapping of a reference element with a ExtrudeType::Hyperplane AND Polygonal and polytopic elements use tensor product polynomials.

Simplices will still use total order, and prism/pyramid use a mix.

◆ UniformElementType2D

Specifies the method for splitting a uniform square into possible mesh elements.

Enumerator
Square 

Do not split the uniform square.

TriangleSWtoNE 

Split into two triangles by dividing diagonally from south west to north east corners.

TriangleSEtoNW 

Split into two triangles by dividing diagonally from south east to north west corners.

TriangleCross 

Split into four triangles by dividing inserting a vertex at the centre of the element.

TriangleAlternateSW 

Split into two triangles alternating between splitting using TriangleSWtoNE and TriangleSEtoNW (starting with TriangleSWtoNE in the square with lowest X and Y coordinates).

TriangleAlternateSE 

Split into two triangles alternating between splitting using TriangleSEtoNW and TriangleSWtoNE (starting with TriangleSEtoNW in the square with lowest X and Y coordinates).

◆ UniformElementType3D

Specifies the methods for splitting a uniform cube into different 3D elements.

Note

For a prism elements, we divide the the horizontal plane (UniformMeshHorizontalPlane) diagonally into two prisms either south east to north west, or south west to north east, and then define the splitting of that prism into the tetrahedrons which result in two named vertices (by index) being the only two vertices which are unique to different tetrahedrons. The index number for the south east to north west split prisms is as follows:

The south west to north east is simply this rotated counter-clockwise by 90 degrees.

Enumerator
Cube 

Do not split each uniform cube into sub elements.

Pyramid 

Split each uniform cube into 6 pyramids by inserting a centre point vertex.

PrismSWtoNE 

Split each uniform cube into two prisms, by dividing the horizontal plane from the South West corner to the North East corner.

PrismSEtoNW 

Split each uniform cube into two prisms, by dividing the horizontal plane from the South East corner to the North West corner.

PrismCross 

Split each uniform cube into four prisms, by adding vertices at the centre points of the horizontal planes.

PrismAlternateSW 

Split each uniform cube into two prisms, alternating between PrismSWtoNE and PrismSEtoNW on neighbouring elements (starting with PrismSWtoNE in the cube with lowest X,Y,and Z coordinates)

PrismAlternateSE 

Split each uniform cube into two prisms, alternating between PrismSEtoNW and PrismSWtoNE on neighbouring elements (starting with PrismSEtoNW in the cube with lowest X,Y,and Z coordinates)

TetSEtoNW15 

Split each uniform cube into six tetrahedrons by subdividing the plane South East to North West and ensure vertices 1 and 5 are contained in only one tetrahedron of a prism.

TetSEtoNW16 

Split each uniform cube into six tetrahedrons by subdividing the plane South East to North West and ensure vertices 1 and 6 are contained in only one tetrahedron of a prism.

TetSEtoNW24 

Split each uniform cube into six tetrahedrons by subdividing the plane South East to North West and ensure vertices 2 and 4 are contained in only one tetrahedron of a prism.

TetSEtoNW26 

Split each uniform cube into six tetrahedrons by subdividing the plane South East to North West and ensure vertices 2 and 6 are contained in only one tetrahedron of a prism.

TetSEtoNW34 

Split each uniform cube into six tetrahedrons by subdividing the plane South East to North West and ensure vertices 3 and 4 are contained in only one tetrahedron of a prism.

TetSEtoNW35 

Split each uniform cube into six tetrahedrons by subdividing the plane South East to North West and ensure vertices 3 and 5 are contained in only one tetrahedron of a prism.

TetSWtoNE15 

Split each uniform cube into six tetrahedrons by subdividing the plane South West to North East and ensure vertices 1 and 5 are contained in only one tetrahedron of a prism.

TetSWtoNE16 

Split each uniform cube into six tetrahedrons by subdividing the plane South West to North East and ensure vertices 1 and 6 are contained in only one tetrahedron of a prism.

TetSWtoNE24 

Split each uniform cube into six tetrahedrons by subdividing the plane South West to North East and ensure vertices 2 and 4 are contained in only one tetrahedron of a prism.

TetSWtoNE26 

Split each uniform cube into six tetrahedrons by subdividing the plane South West to North East and ensure vertices 2 and 6 are contained in only one tetrahedron of a prism.

TetSWtoNE34 

Split each uniform cube into six tetrahedrons by subdividing the plane South West to North East and ensure vertices 3 and 4 are contained in only one tetrahedron of a prism.

TetSWtoNE35 

Split each uniform cube into six tetrahedrons by subdividing the plane South West to North East and ensure vertices 3 and 5 are contained in only one tetrahedron of a prism.

◆ UniformMeshHorizontalPlane

Defines which plane to consider the horizontal plane when performing element splitting in 3D.

See also
UniformElementType3D.
Enumerator
XY 

The xy-plane is the horizontal plane.

XZ 

The xz-plane is the horizontal plane.

YZ 

The yz-plane is the horizontal plane.

Function Documentation

◆ CreateHPLegendreDecayStrategy()

template<std::size_t DIM, typename X , std::size_t N>
PHPRefinementStrategy<DIM, X, N> ptems::CreateHPLegendreDecayStrategy ( const PDiscreteFunctionSpace< DIM, X, N > &  space,
double  threshold = 0.25,
std::size_t  minP = 1 
)

Creates an object for performing \(hp\)-adaptive refinement based on the estimated smoothness of the numerical solution.

Parameters
spaceThe function space to refine (containing the mesh to refine)
thresholdThreshold \(\gamma\) specifying how smooth a solution must be to perform \(p\)-refinement (closer to zero is smoother, far from zero is non-smooth)
minPMinimum polynomial degree. Coarsen will not occur if the polynomial degree of ANY component will fall below this minimum (default = 1)

◆ CreateHPPredictedErrorStrategy() [1/2]

template<std::size_t DIM, typename X , std::size_t N>
PHPRefinementStrategy<DIM, X, N> ptems::CreateHPPredictedErrorStrategy ( const PDiscreteFunctionSpace< DIM, X, N > &  space,
double  gammaH,
double  gammaP,
bool  preferP 
)

Creates an object for performing \(hp\)-adaptive refinement based on the predicted convergence rate of the error estimate.

Parameters
spaceThe function space to refine (containing the mesh to refine)
gammaHSteering parameter \(\gamma_h\) specifying the rate of reduction in the error estimator when \(h\)-refinement is performed.
gammaPSteering parameter \(\gamma_p\) specifying the rate of reduction in the error estimator when \(p\)-refinement is performed.
preferPtrue if the first mesh refinement should be \(p\)-refinement, false if the first mesh refinement should be \(h\)-refinement

◆ CreateHPPredictedErrorStrategy() [2/2]

template<std::size_t DIM, typename X , std::size_t N>
PHPRefinementStrategy<DIM, X, N> ptems::CreateHPPredictedErrorStrategy ( const PDiscreteFunctionSpace< DIM, X, N > &  space,
double  gammaH,
double  gammaP,
double  gammaN = 1,
std::size_t  minP = 1,
bool  preferP = false 
)

Creates an object for performing \(hp\)-adaptive refinement based on the predicted convergence rate of the error estimate.

Parameters
spaceThe function space to refine (containing the mesh to refine)
gammaHSteering parameter \(\gamma_h\) specifying the rate of reduction in the error estimator when \(h\)-refinement is performed.
gammaPSteering parameter \(\gamma_p\) specifying the rate of reduction in the error estimator when \(p\)-refinement is performed.
gammaNSteering parameter \(\gamma_n\) specifying the rate of reduction in the error estimator when no refinement is performed (default = 1)
minPMinimum polynomial degree. Coarsen will not occur if the polynomial degree of ANY component will fall below this minimum (default = 1)
preferPtrue if the first mesh refinement should be \(p\)-refinement, false if the first mesh refinement should be \(h\)-refinement (default = false)

◆ CreateHPVEMStrategy()

template<std::size_t DIM, typename X , std::size_t N>
PHPRefinementStrategy<DIM, X, N> ptems::CreateHPVEMStrategy ( const PDiscreteFunctionSpace< DIM, X, N > &  space,
double  threshold = 2.0,
std::size_t  minP = 1 
)

Creates an object for performing \(hp\)-adaptive refinement based on the relative difference between the value and gradient projections for virtual element functions.

Parameters
spaceThe function space to refine (containing the mesh to refine)
thresholdThreshold \(\gamma\) specifying the value the relative difference should be below to perform \(p\)-refinement (default=1)
minPMinimum polynomial degree. Coarsen will not occur if the polynomial degree of ANY component will fall below this minimum (default = 1)

◆ CreateUniformMesh() [1/2]

PFEMesh< 2 > CreateUniformMesh ( const ParallelComm mpi,
const DomainDefinition2D domain,
std::size_t  numElementsX,
std::size_t  numElementsY,
UniformElementType2D  elementType = UniformElementType2D::Square 
)

Create a 2 dimensional finite element mesh by uniform subdivision of the specified domain.

Parameters
mpiMPI communicator to ensure the mesh is identical on all processes.
domainDefinition of the domain. May only contain vertical or horizontal edges.
numElementsXNumber of elements to subdivide the mesh (limits) by in the x-direction
numElementsYNumber of elements to subdivide the mesh (limits) by in the y-direction
elementTypeSpecifies how to subdivide the uniform squares into elements.
Exceptions
std::invalid_argumentIf domain.IsAligned() is false.
std::invalid_argumentIf numElementsX or numElementsY is zero
std::invalid_argumentIf the domain cannot be split into the specified number of elements due to not aligning with edges in the domain; i.e., numElementsX/numElementsY not multiple of domain.MinElementsX()/domain.MinElementsY().
Returns
The constructed mesh.

TODO: What about cut/slit domains?

◆ CreateUniformMesh() [2/2]

PFEMesh< 1 > CreateUniformMesh ( const ParallelComm mpi,
double  min,
double  max,
std::size_t  numElements 
)

Create a 1 dimensional finite element mesh by uniform subdivision of the specified interval.

Parameters
mpiMPI communicator to ensure the mesh is identical on all processes.
minThe start of the interval to subdivide.
maxThe end of the interval to subdivide.
numElementsNumber of finite elements to divide the interval into.
Exceptions
std::invalid_argumentIf min is not less than max
std::invalid_argumentIf numElements is zero
Returns
The constructed mesh.

◆ DirichletBoundary()

template<std::size_t DIM, typename Func >
auto ptems::DirichletBoundary ( Func  func)
inline

Defines function to pass to space constructors to denote all boundaries are Dirichlet defined by the specified function.

Warning
The dimension of the mesh MUST be specified
Template Parameters
DIMThe dimension of the mesh
FuncType defining the function (should take Vector<DIM> argument)
Parameters
funcFunction on the boundary - should have form X(const Vector<DIM>&), where X is the type of the space, or a STL container of length = size of vector space
Returns
Functor object for passing to space constructors which take functors for defining Dirichlet BCs

◆ HomogeneousDirichletBoundary()

template<std::size_t DIM, typename T >
auto ptems::HomogeneousDirichletBoundary ( )
inline

Defines function to pass space constructors to denote all boundaries are homogeneous (zero) Dirichlet.

Warning
The dimension of the mesh and the type (double, etc) of the space MUST be specified
Template Parameters
DIMThe dimension of the mesh
TThe type of the boundary value (zero)/the space
Returns
Functor object for passing to space constructors which take functors for defining Dirichlet BCs

◆ InhomogeneousDirichletBoundary() [1/2]

template<std::size_t DIM, typename T >
auto ptems::InhomogeneousDirichletBoundary ( value)
inline

Defines function to pass to space constructors to denote all boundaries are inhomogeneous Dirichlet of a specified constant.

Warning
The dimension of the mesh MUST be specified
Template Parameters
DIMThe dimension of the mesh
TThe type of the boundary value/the space
Parameters
valueThe constant for all components of the space
Returns
Functor object for passing to space constructors which take functors for defining Dirichlet BCs

◆ InhomogeneousDirichletBoundary() [2/2]

template<std::size_t DIM, typename... T>
auto ptems::InhomogeneousDirichletBoundary ( T...  value)
inline

Defines function to pass to space constructors for vector spaces to denote all boundaries are inhomogeneous Dirichlet of a specified constant.

Warning
The dimension of the mesh MUST be specified
Template Parameters
DIMThe dimension of the mesh
TThe type of the boundary value/the space
Parameters
valueThe constants for each individual component of the space
Returns
Functor object for passing to space constructors which take functors for defining Dirichlet BCs

◆ IsBinaryFileFormat()

constexpr bool ptems::IsBinaryFileFormat ( MeshFileFormat  format)
inlineconstexpr

Gets if the specified file format is a binary or text-based file format.

This can be used to decide the format to open the file stream in

Note
Some formats may support both formats (such as support for compressed text), in which case this returns the "default" behaviour. Some formats which use binary are really text formats wrapped around binary data (such as GMsh or some VTK formats)
MeshFileFormat::Automatic always returns false
Parameters
formatThe file format to check
Returns
true if binary file format; false otherwise

◆ MakeContinuousLagrangeSpace() [1/2]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<DIM>&)>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeContinuousLagrangeSpace ( const PFEMesh< DIM > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
BC  dirichletBoundary = nullptr 
)

Create a space of continuous piecewise Lagrange functions over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh is non-conforming (mesh.IsConforming() returns false)
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeContinuousLagrangeSpace() [2/2]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<DIM>&)>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeContinuousLagrangeSpace ( const PFEMesh< DIM > &  mesh,
std::size_t  polynomialDegree,
BC  dirichletBoundary = nullptr 
)

Create a space of continuous piecewise Lagrange functions over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh is non-conforming (mesh.IsConforming() returns false)
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeDGSpace() [1/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDGSpace ( const PFEMesh< DIM > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  tensorProductPolytopes 
)
inline

Create a discontinuous Galerkin finite element space over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each componenet
tensorProductPolytopesSpecifies if to use tensor product for polytopic elements

◆ MakeDGSpace() [2/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDGSpace ( const PFEMesh< DIM > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
TensorProductPolynomials  tensorProductPolynomials = TensorProductPolynomials::HyperplaneExtrudedElementsOnly 
)
inline

Create a discontinuous Galerkin finite element space over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each componenet
tensorProductPolynomialsSpecifies if to use tensor product or total order polynomials for various element types

◆ MakeDGSpace() [3/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDGSpace ( const PFEMesh< DIM > &  mesh,
std::size_t  polynomialDegree,
bool  tensorProductPolytopes 
)
inline

Create a discontinuous Galerkin finite element space over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
tensorProductPolytopesSpecifies if to use tensor product for polytopic elements

◆ MakeDGSpace() [4/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDGSpace ( const PFEMesh< DIM > &  mesh,
std::size_t  polynomialDegree,
TensorProductPolynomials  tensorProductPolynomials = TensorProductPolynomials::HyperplaneExtrudedElementsOnly 
)
inline

Create a discontinuous Galerkin finite element space over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
tensorProductPolynomialsSpecifies if to use tensor product or total order polynomials for various element types

◆ MakeDiscontinuousLagrangeSpace() [1/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDiscontinuousLagrangeSpace ( const PFEMesh< DIM > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  tensorProductPolytopes 
)

Create a space of discontinuous piecewise Lagrange functions over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each componenet
tensorProductPolytopesSpecifies if to use tensor product for polytopic elements

◆ MakeDiscontinuousLagrangeSpace() [2/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDiscontinuousLagrangeSpace ( const PFEMesh< DIM > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
TensorProductPolynomials  tensorProductPolynomials = TensorProductPolynomials::HyperplaneExtrudedElementsOnly 
)

Create a space of discontinuous piecewise Lagrange functions over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each componenet
tensorProductPolynomialsSpecifies if to use tensor product or total order polynomials for various element types

◆ MakeDiscontinuousLagrangeSpace() [3/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDiscontinuousLagrangeSpace ( const PFEMesh< DIM > &  mesh,
std::size_t  polynomialDegree,
bool  tensorProductPolytopes 
)

Create a space of discontinuous piecewise Lagrange functions over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
tensorProductPolytopesSpecifies if to use tensor product for polytopic elements

◆ MakeDiscontinuousLagrangeSpace() [4/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDiscontinuousLagrangeSpace ( const PFEMesh< DIM > &  mesh,
std::size_t  polynomialDegree,
TensorProductPolynomials  tensorProductPolynomials = TensorProductPolynomials::HyperplaneExtrudedElementsOnly 
)

Create a space of discontinuous piecewise Lagrange functions over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
tensorProductPolynomialsSpecifies if to use tensor product or total order polynomials for various element types

◆ MakeDiscontinuousLegendreSpace() [1/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDiscontinuousLegendreSpace ( const PFEMesh< DIM > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  tensorProductPolytopes 
)

Create a space of discontinuous piecewise Legendre functions over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each componenet
tensorProductPolytopesSpecifies if to use tensor product for polytopic elements

◆ MakeDiscontinuousLegendreSpace() [2/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDiscontinuousLegendreSpace ( const PFEMesh< DIM > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
TensorProductPolynomials  tensorProductPolynomials = TensorProductPolynomials::HyperplaneExtrudedElementsOnly 
)

Create a space of discontinuous piecewise Legendre functions over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each componenet
tensorProductPolynomialsSpecifies if to use tensor product or total order polynomials for various element types

◆ MakeDiscontinuousLegendreSpace() [3/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDiscontinuousLegendreSpace ( const PFEMesh< DIM > &  mesh,
std::size_t  polynomialDegree,
bool  tensorProductPolytopes 
)

Create a space of discontinuous piecewise Legendre functions over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
tensorProductPolytopesSpecifies if to use tensor product for polytopic elements

◆ MakeDiscontinuousLegendreSpace() [4/4]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeDiscontinuousLegendreSpace ( const PFEMesh< DIM > &  mesh,
std::size_t  polynomialDegree,
TensorProductPolynomials  tensorProductPolynomials = TensorProductPolynomials::HyperplaneExtrudedElementsOnly 
)

Create a space of discontinuous piecewise Legendre functions over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
tensorProductPolynomialsSpecifies if to use tensor product or total order polynomials for various element types

◆ MakeFESpace() [1/2]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<DIM>&)>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeFESpace ( const PFEMesh< DIM > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
BC  dirichletBoundary = nullptr 
)
inline

Create a conforming finite element space over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh is non-conforming (mesh.IsConforming() returns false)
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeFESpace() [2/2]

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<DIM>&)>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeFESpace ( const PFEMesh< DIM > &  mesh,
std::size_t  polynomialDegree,
BC  dirichletBoundary = nullptr 
)
inline

Create a conforming finite element space over the specified mesh with specified polynomial degree.

Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh is non-conforming (mesh.IsConforming() returns false)
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeFVSpace()

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakeFVSpace ( const PFEMesh< DIM > &  mesh)
inline

Create a finite volume space over the specified mesh.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over

◆ MakeH1ConformingVESpace() [1/8]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpace ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

Gradient projection is performed onto polynomial space of polynomialDegree-1

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpace() [2/8]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpace ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  reduceGradProjDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpace() [3/8]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpace ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  reduceGradProjDegree = true,
std::size_t  interiorPolyReduct = 2,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments (default = 2). Can be used to define serendipity elements
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpace() [4/8]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpace ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
std::size_t  interiorPolyReduct,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

Gradient projection is performed onto polynomial space of polynomialDegree-1

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments (default = 2). Can be used to define serendipity elements
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpace() [5/8]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpace ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

Gradient projection is performed onto polynomial space of polynomialDegree-1

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpace() [6/8]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpace ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
bool  reduceGradProjDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpace() [7/8]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpace ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
bool  reduceGradProjDegree = true,
std::size_t  interiorPolyReduct = 2,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments (default = 2). Can be used to define serendipity elements
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpace() [8/8]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpace ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
std::size_t  interiorPolyReduct,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

Gradient projection is performed onto polynomial space of polynomialDegree-1

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments (default = 2). Can be used to define serendipity elements
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpaceWithPolyBasis() [1/8]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

Gradient projection is performed onto polynomial space of polynomialDegree-1

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpaceWithPolyBasis() [2/8]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  reduceGradProjDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpaceWithPolyBasis() [3/8]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  reduceGradProjDegree = true,
std::size_t  interiorPolyReduct = 2,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments (default = 2). Can be used to define serendipity elements
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpaceWithPolyBasis() [4/8]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
std::size_t  interiorPolyReduct,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

Gradient projection is performed onto polynomial space of polynomialDegree-1

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments (default = 2). Can be used to define serendipity elements
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpaceWithPolyBasis() [5/8]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

Gradient projection is performed onto polynomial space of polynomialDegree-1

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpaceWithPolyBasis() [6/8]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
bool  reduceGradProjDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpaceWithPolyBasis() [7/8]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
bool  reduceGradProjDegree = true,
std::size_t  interiorPolyReduct = 2,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments (default = 2). Can be used to define serendipity elements
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1ConformingVESpaceWithPolyBasis() [8/8]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1ConformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
std::size_t  interiorPolyReduct,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

Gradient projection is performed onto polynomial space of polynomialDegree-1

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments (default = 2). Can be used to define serendipity elements
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1NonconformingVESpace() [1/4]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1NonconformingVESpace ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

Gradient projection is performed onto polynomial space of polynomialDegree-1

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1NonconformingVESpace() [2/4]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1NonconformingVESpace ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  reduceGradProjDegree = true,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1NonconformingVESpace() [3/4]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1NonconformingVESpace ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

Gradient projection is performed onto polynomial space of polynomialDegree-1

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1NonconformingVESpace() [4/4]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1NonconformingVESpace ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
bool  reduceGradProjDegree = true,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1NonconformingVESpaceWithPolyBasis() [1/4]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1NonconformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

Gradient projection is performed onto polynomial space of polynomialDegree-1

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1NonconformingVESpaceWithPolyBasis() [2/4]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1NonconformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  reduceGradProjDegree = true,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1NonconformingVESpaceWithPolyBasis() [3/4]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1NonconformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
BC  dirichletBoundary 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

Gradient projection is performed onto polynomial space of polynomialDegree-1

Interior moments are defined for polynomialDegree-2

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1NonconformingVESpaceWithPolyBasis() [4/4]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1NonconformingVESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
bool  reduceGradProjDegree = true,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\)-conforming virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
reduceGradProjDegreeSpecifies if gradient projection should be performed onto a space of polynomials of polynomialDegree-1 (true, default) or polynomialDegree (false)
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1VESpace() [1/2]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1VESpace ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  hasVertexDoFs,
std::size_t  edgePolyReduct,
std::size_t  interiorPolyReduct,
std::size_t  valueProjReduct,
std::size_t  gradProjReduct,
std::size_t  edgeProjReduct,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\) virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

This method is a generic method, which can build most \(H^1\) virtual element functions depending on the selection of parameters, see VirtualElementSpace<HBasis,2,X,N>. Other make H1*VESpace functions may be more convenient.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
std::invalid_argumentIf hasVertexDoFs is false and edgeProjReduct < edgePolyReduct, or if hasVertexDoFs is true and edgeProjReduct+2 < edgePolyReduct
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
hasVertexDoFsSpecifies if the virtual element space has degrees of freedom for the vertices
edgePolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for edge moments
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments
valueProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the value projection onto
gradProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the gradient projection onto
edgeProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the edge projections onto
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1VESpace() [2/2]

template<typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1VESpace ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
bool  hasVertexDoFs,
std::size_t  edgePolyReduct,
std::size_t  interiorPolyReduct,
std::size_t  valueProjReduct,
std::size_t  gradProjReduct,
std::size_t  edgeProjReduct,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\) virtual element functions over the specified mesh with specified polynomial degree with projections onto Legendre polynomials.

This method is a generic method, which can build most \(H^1\) virtual element functions depending on the selection of parameters, see VirtualElementSpace<HBasis,2,X,N>. Other make H1*VESpace functions may be more convenient.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
std::invalid_argumentIf hasVertexDoFs is false and edgeProjReduct < edgePolyReduct, or if hasVertexDoFs is true and edgeProjReduct+2 < edgePolyReduct
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
hasVertexDoFsSpecifies if the virtual element space has degrees of freedom for the vertices
edgePolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for edge moments
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments
valueProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the value projection onto
gradProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the gradient projection onto
edgeProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the edge projections onto
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1VESpaceWithPolyBasis() [1/2]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1VESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
const std::array< std::size_t, N > &  polynomialDegree,
bool  hasVertexDoFs,
std::size_t  edgePolyReduct,
std::size_t  interiorPolyReduct,
std::size_t  valueProjReduct,
std::size_t  gradProjReduct,
std::size_t  edgeProjReduct,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\) virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

This method is a generic method, which can build most \(H^1\) virtual element functions depending on the selection of parameters, see VirtualElementSpace<HBasis,2,X,N>. Other make H1*VESpace functions may be more convenient.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
std::invalid_argumentIf hasVertexDoFs is false and edgeProjReduct < edgePolyReduct, or if hasVertexDoFs is true and edgeProjReduct+2 < edgePolyReduct
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space for each component
hasVertexDoFsSpecifies if the virtual element space has degrees of freedom for the vertices
edgePolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for edge moments
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments
valueProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the value projection onto
gradProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the gradient projection onto
edgeProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the edge projections onto
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakeH1VESpaceWithPolyBasis() [2/2]

template<template< std::size_t > class HBasis, typename X = double, std::size_t N = 1, typename BC = std::optional<std::array<X,N>>(*)(const Vector<2>&)>
PDiscreteFunctionSpace<2, X, N> ptems::MakeH1VESpaceWithPolyBasis ( const PFEMesh< 2 > &  mesh,
std::size_t  polynomialDegree,
bool  hasVertexDoFs,
std::size_t  edgePolyReduct,
std::size_t  interiorPolyReduct,
std::size_t  valueProjReduct,
std::size_t  gradProjReduct,
std::size_t  edgeProjReduct,
BC  dirichletBoundary = nullptr 
)

Create a space of \(H^1\) virtual element functions over the specified mesh with specified polynomial degree with projections onto the specified polynomial basis.

This method is a generic method, which can build most \(H^1\) virtual element functions depending on the selection of parameters, see VirtualElementSpace<HBasis,2,X,N>. Other make H1*VESpace functions may be more convenient.

See also
VirtualElementSpace<HBasis,2,X,N>
Exceptions
std::invalid_argumentIf the polynomialDegree is zero
std::invalid_argumentIf the mesh contains no elements
std::invalid_argumentIf hasVertexDoFs is false and edgeProjReduct < edgePolyReduct, or if hasVertexDoFs is true and edgeProjReduct+2 < edgePolyReduct
Template Parameters
HBasisDefines the basis of the polynomials to use for projections; see VirtualElementSpace<HBasis,2,X,N>
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
BCType of a functor for defining a boundary conditions. Should be a function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N
Parameters
meshThe mesh to create the space over
polynomialDegreeThe polynomial degree of the space
hasVertexDoFsSpecifies if the virtual element space has degrees of freedom for the vertices
edgePolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for edge moments
interiorPolyReductSpecifies the reduction in the polynomial degree for polynomials to test against for interior moments
valueProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the value projection onto
gradProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the gradient projection onto
edgeProjReductSpecifies the reduction in the polynomial degree for the polynomial basis to perform the edge projections onto
dirichletBoundaryA function of the form std::optional<X> (const Vector<DIM>& pt) or std::optional<X[N]> (const Vector<DIM>& pt)` where X[N] is an STL compatible container type of length N, or nullptr for no Dirichlet boundary

◆ MakePiecewiseConstant()

template<typename X = double, std::size_t N = 1, std::size_t DIM = 1>
PDiscreteFunctionSpace<DIM, X, N> ptems::MakePiecewiseConstant ( const PFEMesh< DIM > &  mesh)

Create a space of piecewise constant functions over the specified mesh.

Exceptions
std::invalid_argumentIf the mesh contains no elements
Template Parameters
XThe type of the result of the functions (double, std::complex, etc)
NThe size of the resulting vector space (N=1 for scalars)
DIMThe dimension of the domain (and mesh)
Parameters
meshThe mesh to create the space over

◆ MakePreconditioner()

template<typename T , typename... Args>
PPreconditioner<typename T::value_type> ptems::MakePreconditioner ( Args...  args)

Constructs a preconditioner of the specified type.

Template Parameters
TThe type of the preconditioner to construct
ArgsThe type of the arguments to pass to the preconditioner
Parameters
argsThe arguments to pass to the preconditioner

◆ MarkingFromFlags() [1/2]

template<typename Container >
FlagMarking<Container> ptems::MarkingFromFlags ( const Container container)

Creates a functor that can be passed to FEMesh::Adapt(Func, bool) to perform marking based on a container of flags.

A container of flags can be one of the following:

  • A random access container of AdaptationType (i.e., supports operator[] and size()) containing an AdaptationType for each element
  • An associate container (map/unordered_map etc) of element number (std::size_t) to AdaptationType containing an AdaptationType for SOME elements, all other elements are left unrefined
  • A container of element numbers to perform mesh refinement on, all other elements are left unrefined
Warning
The returned functor keeps a REFERENCE to the containers. As such the containers MUST stay in scope while this functor is used (until FEMesh::Adapt call returns)
Template Parameters
ContainerContainer type containing AdaptationType or std::size_t, or map from std::size_t to AdaptationType
Parameters
containerContainer of AdaptationType or std::size_t, or map from std::size_t to AdaptationType
Returns
The functor to pass to FEMesh::Adapt(Func, bool)

◆ MarkingFromFlags() [2/2]

template<typename Container >
FlagMarking<Container> ptems::MarkingFromFlags ( const Container refine,
const Container coarsen 
)

Create a functor for performing marking based on a container containing a list of element numbers to refine and a container containing a list of element numbers to coarsen.

All other elements are left unrefined.

Note
Refinement takes precedence over coarsening if an element number is present in both containers.
Warning
The returned functor keeps a REFERENCE to the containers. As such the containers MUST stay in scope while this functor is used (until FEMesh::Adapt call returns)
Parameters
refineList (ideally set) of element numbers to refine
coarsenList (ideally set) of element numbers to coarsen

◆ operator*() [1/2]

template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction<DIM, X, N, LEN> ptems::operator* ( const DiscreteFunction< DIM, X, N, LEN > &  func,
constant 
)
inline

Multiplies the specified function by a constant.

Template Parameters
DIMThe dimension of the domain for the function
XThe type of the codomain of the space for the function
NThe dimension of the vector space for the function
LENThe dimension of the function
Parameters
funcThe function to multiply
constantThe constant to multiply by
Returns
A new function containing the result

◆ operator*() [2/2]

template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction<DIM, X, N, LEN> ptems::operator* ( constant,
const DiscreteFunction< DIM, X, N, LEN > &  func 
)
inline

Multiplies the specified function by a constant.

Template Parameters
DIMThe dimension of the domain for the function
XThe type of the codomain of the space for the function
NThe dimension of the vector space for the function
LENThe dimension of the function
Parameters
constantThe constant to multiply by
funcThe function to multiply
Returns
A new function containing the result

◆ operator+() [1/3]

template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction<DIM, X, N, LEN> ptems::operator+ ( const DiscreteFunction< DIM, X, N, LEN > &  func,
constant 
)
inline

Adds a constant to the specified function.

Template Parameters
DIMThe dimension of the domain for the function
XThe type of the codomain of the space for the function
NThe dimension of the vector space for the function
LENThe dimension of the function
Parameters
funcThe function to add to
constantThe constant to add
Returns
A new function containing the result

◆ operator+() [2/3]

template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction<DIM, X, N, LEN> ptems::operator+ ( const DiscreteFunction< DIM, X, N, LEN > &  lhs,
const DiscreteFunction< DIM, X, N, LEN > &  rhs 
)
inline

Adds the two specified functions.

Exceptions
std::invalid_argumentIf the specified functions are from different spaces
std::invalid_argumentIf the specified functions have a different sizes (number of DoFs)
Template Parameters
DIMThe dimension of the domain for the functions
XThe type of the codomain of the space for the functions
NThe dimension of the vector space for the functions
LENThe dimension of the functions
Parameters
lhsThe function to add to
rhsThe function to add
Returns
A new function containing the result

◆ operator+() [3/3]

template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction<DIM, X, N, LEN> ptems::operator+ ( constant,
const DiscreteFunction< DIM, X, N, LEN > &  func 
)
inline

Adds a constant to the specified function.

Template Parameters
DIMThe dimension of the domain for the function
XThe type of the codomain of the space for the function
NThe dimension of the vector space for the function
LENThe dimension of the function
Parameters
constantThe constant to add
funcThe function to add to
Returns
A new function containing the result

◆ operator-() [1/2]

template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction<DIM, X, N, LEN> ptems::operator- ( const DiscreteFunction< DIM, X, N, LEN > &  func,
constant 
)
inline

Subtracts a constant from the specified function.

Template Parameters
DIMThe dimension of the domain for the function
XThe type of the codomain of the space for the function
NThe dimension of the vector space for the function
LENThe dimension of the function
Parameters
funcThe function to subtract from
constantThe constant to subtract
Returns
A new function containing the result

◆ operator-() [2/2]

template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction<DIM, X, N, LEN> ptems::operator- ( const DiscreteFunction< DIM, X, N, LEN > &  lhs,
const DiscreteFunction< DIM, X, N, LEN > &  rhs 
)
inline

Subtracts the two specified functions.

Exceptions
std::invalid_argumentIf the specified functions are from different spaces
std::invalid_argumentIf the specified functions have a different sizes (number of DoFs)
Template Parameters
DIMThe dimension of the domain for the functions
XThe type of the codomain of the space for the functions
NThe dimension of the vector space for the functions
LENThe dimension of the functions
Parameters
lhsThe function to subtract from
rhsThe function to subtract
Returns
A new function containing the result

◆ operator/()

template<std::size_t DIM, typename X , std::size_t N, std::size_t LEN>
DiscreteFunction<DIM, X, N, LEN> ptems::operator/ ( const DiscreteFunction< DIM, X, N, LEN > &  func,
constant 
)
inline

Divides the specified function by a constant.

Template Parameters
DIMThe dimension of the domain for the function
XThe type of the codomain of the space for the function
NThe dimension of the vector space for the function
LENThe dimension of the function
Parameters
funcThe function to divide
constantThe constant to divide by
Returns
A new function containing the result

◆ operator<()

constexpr bool ptems::operator< ( const NonZeroEntry lhs,
const NonZeroEntry rhs 
)
constexpr

Comparator to use for sorting NonZeroEntry values.

Sorted by row, then column

Parameters
lhsThe left hand side non-zero index
rhsThe right hand side non-zero index
Returns
true if the left hand row is less than the right hand row, of if both are the same row if the left hand column is less than the right hand column; false otherwise