Skip to content

Namespace ae108::cpppetsc

Namespace List > ae108 > cpppetsc

Manage a distributed data mesh. More...

Namespaces

Type Name
namespace mpi
Abstraction for mpi: error handling, communicator.

Classes

Type Name
struct ConstrainedComponents <NumComps>
The dofs per component that are constrained. Might be empty for a component.
struct ConstrainedDOF
struct ConstrainedDofs
A set of global dof indices constrained to the same value.
struct ConstrainedLabel <NumComps>
Label value mapped to constrained components.
class Context
struct ElementTypeTrait <s>
struct ElementTypeTrait< ElementType::Hexahedron > <>
struct ElementTypeTrait< ElementType::LineSegment > <>
struct ElementTypeTrait< ElementType::Quadrilateral > <>
struct ElementTypeTrait< ElementType::Tetrahedra > <>
struct ElementTypeTrait< ElementType::Triangle > <>
struct EssentialBoundaryCondition
Describes an essential (Dirichlet) boundary condition applied to all mesh points tagged with a given label value.
struct Exception
struct GeneralizedConstrainedDOFs
Defines a boundary condition that sets the target value (specified by a vertex view and a degree of freedom index) to the sum of scaled source values (specified by a factor, a vertex index and a degree of freedom index).
struct GeneralizedMeshBoundaryCondition <class MeshType>
Defines a boundary condition that sets the target value (specified by a vertex view and a degree of freedom index) to the sum of scaled source values (specified by a factor, a vertex index and a degree of freedom index).
struct GeneralizedVertexBoundaryCondition
struct GeneralizedVertexConstraint
struct InsertionProxy <Mode>
This class is used to provide a "matrix"-like interface (i.e. access elements via operator()) to the Matrix wrapper. PETSc requires that calls to INSERT and ADD are not mixed; therefore specializations of this class only provide one of these methods.
struct InsertionProxy< ADD_VALUES > <>
This class redirects calls to += to the internal functor.
struct InsertionProxy< INSERT_VALUES > <>
This class redirects calls to = to the internal functor.
struct InvalidParametersException
struct LabelConstraints <Dim>
Boundary condition label defined by a condition on the coordinates.
class LeastSquaresSolver
class LinearSolver
This class can be used to solve linear systems Ax = b.
struct LinearSolverDivergedException
class LocalElementView <class MeshType_>
class LocalVertexView <class MeshType_>
class Matrix
class Mesh
class MeshDataProvider <class MeshType_>
class NonlinearSolver
struct NonlinearSolverDivergedException
struct Range
class SharedEntity <typename T>
class TAOSolver
struct TAOSolverDivergedException
class TaggedEntity <class Entity, class Tag>
A wrapper that adds a tag to a given class.
class Vector
class Viewer

Public Types

Type Name
enum uint8_t ElementType
enum std::uint8_t OwnershipType
typedef std::unique_ptr< std::remove_pointer_t< T >, std::function< void(T)> > UniqueEntity
typedef TaggedEntity< Entity, DistributedTag > distributed
A tag to annotate a "distributed" vector. This vector contains the data for all vertices, but the data is distributed between MPI nodes.
typedef TaggedEntity< Entity, GlobalTag > global
A tag to annotate a "global" vector. This vector contains the data for all vertices, and all data is available locally.
typedef TaggedEntity< Entity, LocalTag > local
A tag to annotate a "local" vector. This vector only contains the data for all local vertices.

Public Functions

Type Name
Matrix asHermitianTransposedMatrix (const Matrix * matrix)
Returns a matrix that behaves like the Hermitian transpose.
Matrix asInverseMatrix (const Matrix * matrix)
Returns a matrix that behaves like the inverse of the provided matrix.
Matrix asSchurComplement (const Matrix * matrix_00, const Matrix * matrix_01, const Matrix * matrix_10, const Matrix * matrix_11)
Returns a matrix that behaves like the Schur complement: M_11 - M_10 * M_00^-1 * M_01.
Matrix asSchurComplement (const Matrix * matrix, const std::vector< typename Matrix::size_type > & indices)
Returns a matrix that behaves like the Schur complement: M_11 - M_10 * M_00^-1 * M_01.
Matrix asThAT (const Matrix * matrix, const Matrix * transform)
Returns a matrix that behaves like the transformed matrix T^H * A * T, where ^H denotes the Hermitian transpose.
Matrix asTransposedMatrix (const Matrix * matrix)
Returns a matrix that behaves like the transpose.
void assertNotInterpolated (DM dm)
TaggedEntity< Vector, Tag > clone (const TaggedEntity< Vector, Tag > & vector)
Creates a clone of the vector.
Matrix clone (const Matrix & matrix)
Creates a clone of the matrix.
template TaggedEntity< Vector, LocalTag > clone (const TaggedEntity< Vector, LocalTag > &)
template TaggedEntity< Vector, GlobalTag > clone (const TaggedEntity< Vector, GlobalTag > &)
template TaggedEntity< Vector, DistributedTag > clone (const TaggedEntity< Vector, DistributedTag > &)
Matrix computeElementsOfMatrix (const Matrix & matrix)
Computes the elements of the given matrix by evaluating matrix-vector products.
Matrix computeSchurComplement (const Matrix & matrix)
Explicitly computes the elements of the Schur complement represented by matrix .
void copy (const TaggedEntity< Vector, Tag > & from, TaggedEntity< Vector, Tag > * to)
Copies the contents of vector from to vectorto . The layouts of the vectors must be identical.
template void copy (const TaggedEntity< Vector, LocalTag > &, TaggedEntity< Vector, LocalTag > *)
template void copy (const TaggedEntity< Vector, DistributedTag > &, TaggedEntity< Vector, DistributedTag > *)
template void copy (const TaggedEntity< Vector, GlobalTag > &, TaggedEntity< Vector, GlobalTag > *)
MeshDataProvider< MeshType > createDataProviderFromMesh (const MeshType *const mesh)
Creates a data provider from the given mesh.
Matrix createLhsTransform (const Matrix & matrix, const typename Matrix::size_type rows)
Creates a matrix P that can be multiplied from the left hand side with the provided Matrix A, i.e. P * A is well-formed.
Matrix createLhsTransform (const Matrix & matrix, const typename Matrix::LocalRows localRows, const typename Matrix::GlobalRows globalRows)
Creates a matrix P that can be multiplied from the left hand side with the provided Matrix A, i.e. P * A is well-formed.
Matrix createRhsTransform (const Matrix & matrix, const typename Matrix::size_type columns)
Creates a matrix P that can be multiplied from the right hand side with the provided Matrix A, i.e. A * P is well-formed.
Matrix createRhsTransform (const Matrix & matrix, const typename Matrix::LocalCols localColumns, const typename Matrix::GlobalCols globalColumns)
Creates a matrix P that can be multiplied from the right hand side with the provided Matrix A, i.e. A * P is well-formed.
distributed< Vector > createTransformInput (const Matrix & transform)
Creates a vector that can be multiplied with the provided matrix. It is initialized with zeroes.
distributed< Vector > createTransformOutput (const Matrix & transform)
Creates a vector that can store the result of a multiplication with the provided matrix. It is initialized with zeroes.
distributed< Vector > createVectorFromSource (const Mesh & mesh, const typename Mesh::size_type dofs, const std::function< void(typename Mesh::size_type, typename Mesh::value_type *)> & writeVertexData)
Creates a global vector with dofs degrees of freedom per vertex in the provided in the mesh. The vector is filled with data copied (not added) from the source.
std::vector< ae108::cpppetsc::ConstrainedDOF > extractBoundaryDofs (const Mesh & mesh, std::span< const EssentialBoundaryCondition > essential_bcs)
Extracts the constrained DOFs owned by the local rank from a mesh and a list of label-based essential boundary conditions.
std::vector< GeneralizedConstrainedDOFs > extractBoundaryDofs (const Mesh & mesh, std::span< const GeneralizedVertexBoundaryCondition > essential_bcs)
Extracts all the constrained DOFs from a mesh and a list of generalized vertex boundary conditions.
const char * getName (const distributed< Vector > & vector)
Returns the name of the provided vector.
bool isInterpolated (DM dm)
SharedEntity< T > makeSharedEntity (T t, const OwnershipType own=OwnershipType::Take)
Create a SharedEntity .
UniqueEntity< T > makeUniqueEntity (const T & t)
Create a UniqueEntity with the default destructor.
distributed< Vector > multiply (const Matrix & matrix, const distributed< Vector > & vector)
Multiplies the given matrix by the given vector and returns the result.
std::vector< PetscInt > naturalToGlobalVertexIds (const Mesh & mesh)
Returns a lookup table, identical on every rank, that translates a "natural" (pre-distribution) vertex id into the mesh's current (post-distribution) DMPlex vertex numbering. These two numberings differ once a mesh has actually been redistributed across more than one rank, so any natural vertex id must be translated via this table before being stored as a GeneralizedVertexBoundaryCondition::global_vertex_id or GeneralizedVertexConstraint::SourceItem::global_vertex_id.
Matrix nestMatrices (const std::vector< std::vector< Matrix * > > & matrices)
Creates a matrix that consists of all the provided matrices combined. The matrices are not actually copied; instead the returned matrix contains a reference to the provided matrices.
distributed< Vector > nestVectors (const std::vector< cpppetsc::distributed< Vector > * > & vectors)
Creates a vector that consists of all the provided vectors stacked on top of each other. The vectors are not actually copied; instead the returned vector contains a reference to the provided vectors.
std::ostream & operator<< (std::ostream & stream, const Matrix & matrix)
Writes the local rows of the matrix to the stream.
std::ostream & operator<< (std::ostream & stream, const Vector & vector)
Writes the local rows of the vector to the stream.
void readFromViewer (const Viewer & viewer, distributed< Vector > *const vector)
Vector::value_type scalarProduct (const TaggedEntity< Vector, Tag > & x, const TaggedEntity< Vector, Tag > & y)
Computes the scalar product of the two vectors x andy .
void setName (const char * name, distributed< Vector > *const vector)
Sets the name of the provided vector.
void setSchurComplementTolerance (Matrix *const matrix, const double relativeTolerance=PETSC_DEFAULT, const double absoluteTolerance=PETSC_DEFAULT)
When computing the effect of the Schur complement when multiplied with a vector, PETSc uses a linear solver. This function configures the tolerance used by this linear solver.
constexpr TaggedEntity< Entity, Tag > tag (Entity && entity)
Wraps the given entity in a TaggedEntity with the provided tag.
std::vector< typename cpppetsc::Mesh::size_type > vertexDataOffsets (const cpppetsc::Mesh & mesh)
Returns a vector of size N , whereN is the number of vertices in the mesh. Elementi of this vector is the index of the first degree of freedom associated with vertexi in a distributed/global vector.
void writeToViewer (const Mesh & mesh, const distributed< Vector > & coordinates, Viewer * viewer)
Writes a mesh to a Viewer .
void writeToViewer (const distributed< Vector > & data, Viewer * viewer)
Writes a vector to a Viewer .

Detailed Description

Library for creating a FEM mesh and managing the degrees of freedom associated with the elements and their vertices (based on PETSc’s DMPLEX). It also provides wrappers around PETSc’s solvers (KSP, SNES, and TAO).

Public Types Documentation

enum ElementType

enum ae108::cpppetsc::ElementType {
    LineSegment = 0,
    Triangle,
    Quadrilateral,
    Tetrahedra,
    Hexahedron,
    Mixed,
    NumberOfElements
};

enum OwnershipType

enum ae108::cpppetsc::OwnershipType {
    Take,
    Share
};

typedef UniqueEntity

using ae108::cpppetsc::UniqueEntity = typedef std::unique_ptr<std::remove_pointer_t<T>, std::function<void(T)> >;

typedef distributed

A tag to annotate a "distributed" vector. This vector contains the data for all vertices, but the data is distributed between MPI nodes.

using ae108::cpppetsc::distributed = typedef TaggedEntity<Entity, DistributedTag>;


typedef global

A tag to annotate a "global" vector. This vector contains the data for all vertices, and all data is available locally.

using ae108::cpppetsc::global = typedef TaggedEntity<Entity, GlobalTag>;


typedef local

A tag to annotate a "local" vector. This vector only contains the data for all local vertices.

using ae108::cpppetsc::local = typedef TaggedEntity<Entity, LocalTag>;


Public Functions Documentation

function asHermitianTransposedMatrix

Returns a matrix that behaves like the Hermitian transpose.

Matrix ae108::cpppetsc::asHermitianTransposedMatrix (
    const Matrix * matrix
) 

Note that the matrix is not actually computed, but the returned matrix stores a reference to the given matrix to compute the result of operations on demand.

Parameters:

  • matrix Valid nonzero pointer.

function asInverseMatrix

Returns a matrix that behaves like the inverse of the provided matrix.

Matrix ae108::cpppetsc::asInverseMatrix (
    const Matrix * matrix
) 

Note that the inverse matrix is not actually computed, but the returned matrix stores a reference to the given matrix to compute the result of operations on demand.

Parameters:

  • matrix Valid nonzero pointer.

function asSchurComplement

Returns a matrix that behaves like the Schur complement: M_11 - M_10 * M_00^-1 * M_01.

Matrix ae108::cpppetsc::asSchurComplement (
    const Matrix * matrix_00,
    const Matrix * matrix_01,
    const Matrix * matrix_10,
    const Matrix * matrix_11
) 

Note that the matrix is not actually computed, but the returned matrix stores a reference to the given matrices to compute the result of operations on demand.

Parameters:

  • matrix_00 Valid nonzero pointer.
  • matrix_01 Valid nonzero pointer.
  • matrix_10 Valid nonzero pointer.
  • matrix_11 Valid nonzero pointer.

function asSchurComplement

Returns a matrix that behaves like the Schur complement: M_11 - M_10 * M_00^-1 * M_01.

Matrix ae108::cpppetsc::asSchurComplement (
    const Matrix * matrix,
    const std::vector< typename Matrix::size_type > & indices
) 

Note that the matrix is not actually computed, but the returned matrix stores a reference to the given matrices to compute the result of operations on demand.

Parameters:

  • matrix Valid nonzero pointer.
  • indices The row/column indices that define the matrix M_11. Only indices in the local row range of the matrix need to be provided.

function asThAT

Returns a matrix that behaves like the transformed matrix T^H * A * T, where ^H denotes the Hermitian transpose.

Matrix ae108::cpppetsc::asThAT (
    const Matrix * matrix,
    const Matrix * transform
) 

Note that the matrix is not actually computed, but the return matrix stores a reference to the given matrices to compute the result of operations on demand.

Parameters:

  • matrix Valid nonzero pointer.
  • transform Valid nonzero pointer.

function asTransposedMatrix

Returns a matrix that behaves like the transpose.

Matrix ae108::cpppetsc::asTransposedMatrix (
    const Matrix * matrix
) 

Note that the matrix is not actually computed, but the returned matrix stores a reference to the given matrix to compute the result of operations on demand.

Parameters:

  • matrix Valid nonzero pointer.

function assertNotInterpolated

void ae108::cpppetsc::assertNotInterpolated (
    DM dm
) 

function clone

Creates a clone of the vector.

template<class Tag>
TaggedEntity < Vector , Tag > ae108::cpppetsc::clone (
    const TaggedEntity < Vector , Tag > & vector
) 


function clone

Creates a clone of the matrix.

Matrix ae108::cpppetsc::clone (
    const Matrix & matrix
) 


function clone

template TaggedEntity < Vector , LocalTag > ae108::cpppetsc::clone (
    const TaggedEntity < Vector , LocalTag > &
) 

function clone

template TaggedEntity < Vector , GlobalTag > ae108::cpppetsc::clone (
    const TaggedEntity < Vector , GlobalTag > &
) 

function clone

template TaggedEntity < Vector , DistributedTag > ae108::cpppetsc::clone (
    const TaggedEntity < Vector , DistributedTag > &
) 

function computeElementsOfMatrix

Computes the elements of the given matrix by evaluating matrix-vector products.

Matrix ae108::cpppetsc::computeElementsOfMatrix (
    const Matrix & matrix
) 


function computeSchurComplement

Explicitly computes the elements of the Schur complement represented by matrix .

Matrix ae108::cpppetsc::computeSchurComplement (
    const Matrix & matrix
) 

Parameters:

  • matrix A matrix created by asSchurComplement.

function copy

Copies the contents of vector from to vectorto . The layouts of the vectors must be identical.

template<class Tag>
void ae108::cpppetsc::copy (
    const TaggedEntity < Vector , Tag > & from,
    TaggedEntity < Vector , Tag > * to
) 


function copy

template void ae108::cpppetsc::copy (
    const TaggedEntity < Vector , LocalTag > &,
    TaggedEntity < Vector , LocalTag > *
) 

function copy

template void ae108::cpppetsc::copy (
    const TaggedEntity < Vector , DistributedTag > &,
    TaggedEntity < Vector , DistributedTag > *
) 

function copy

template void ae108::cpppetsc::copy (
    const TaggedEntity < Vector , GlobalTag > &,
    TaggedEntity < Vector , GlobalTag > *
) 

function createDataProviderFromMesh

Creates a data provider from the given mesh.

template<class MeshType>
MeshDataProvider < MeshType > ae108::cpppetsc::createDataProviderFromMesh (
    const MeshType *const mesh
) 

Parameters:

  • mesh Valid nonzero pointer.

function createLhsTransform

Creates a matrix P that can be multiplied from the left hand side with the provided Matrix A, i.e. P * A is well-formed.

Matrix ae108::cpppetsc::createLhsTransform (
    const Matrix & matrix,
    const typename Matrix::size_type rows
) 

Parameters:

  • rows Global number of rows of the created matrix.

function createLhsTransform

Creates a matrix P that can be multiplied from the left hand side with the provided Matrix A, i.e. P * A is well-formed.

Matrix ae108::cpppetsc::createLhsTransform (
    const Matrix & matrix,
    const typename Matrix::LocalRows localRows,
    const typename Matrix::GlobalRows globalRows
) 


function createRhsTransform

Creates a matrix P that can be multiplied from the right hand side with the provided Matrix A, i.e. A * P is well-formed.

Matrix ae108::cpppetsc::createRhsTransform (
    const Matrix & matrix,
    const typename Matrix::size_type columns
) 

Parameters:

  • columns Global number of columns of the created matrix.

function createRhsTransform

Creates a matrix P that can be multiplied from the right hand side with the provided Matrix A, i.e. A * P is well-formed.

Matrix ae108::cpppetsc::createRhsTransform (
    const Matrix & matrix,
    const typename Matrix::LocalCols localColumns,
    const typename Matrix::GlobalCols globalColumns
) 


function createTransformInput

Creates a vector that can be multiplied with the provided matrix. It is initialized with zeroes.

distributed < Vector > ae108::cpppetsc::createTransformInput (
    const Matrix & transform
) 


function createTransformOutput

Creates a vector that can store the result of a multiplication with the provided matrix. It is initialized with zeroes.

distributed < Vector > ae108::cpppetsc::createTransformOutput (
    const Matrix & transform
) 


function createVectorFromSource

Creates a global vector with dofs degrees of freedom per vertex in the provided in the mesh. The vector is filled with data copied (not added) from the source.

distributed < Vector > ae108::cpppetsc::createVectorFromSource (
    const Mesh & mesh,
    const typename Mesh::size_type dofs,
    const std::function< void(typename Mesh::size_type, typename Mesh::value_type *)> & writeVertexData
) 

Parameters:

  • mesh The mesh that defines the geometry, e.g. the number of vertices.
  • dofs The desired number of degrees of freedom per vertex.
  • writeVertexData For every local vertex, the function is called with the vertex index and a buffer of size dofs. The function shall write the data for the given vertex to the buffer.

function extractBoundaryDofs

Extracts the constrained DOFs owned by the local rank from a mesh and a list of label-based essential boundary conditions.

template<class Mesh, int DofsPerVertex>
std::vector< ae108::cpppetsc::ConstrainedDOF > ae108::cpppetsc::extractBoundaryDofs (
    const Mesh & mesh,
    std::span< const EssentialBoundaryCondition > essential_bcs
) 

Combines collect_bc_indices() (label -> global dof indices) and filter_bcs() (global -> locally owned dof indices).

Note:

There is a differently-shaped overload of this function in GeneralizedVertexBoundaryCondition.h, distinguished only by the std::span element type, returning GeneralizedConstrainedDOFs instead of ConstrainedDOF. Don't conflate the two when reading call sites.

Template parameters:

  • Mesh Mesh type
  • DofsPerVertex Number of dofs per mesh vertex.

Parameters:

  • mesh The mesh the boundary conditions are defined on; also used to determine the local dof ownership range.
  • essential_bcs The essential boundary conditions to apply.

Returns:

The degrees of freedom (global index + value) constrained by essential_bcs that are owned by the local rank.


function extractBoundaryDofs

Extracts all the constrained DOFs from a mesh and a list of generalized vertex boundary conditions.

template<class Mesh, int DofsPerVertex>
std::vector< GeneralizedConstrainedDOFs > ae108::cpppetsc::extractBoundaryDofs (
    const Mesh & mesh,
    std::span< const GeneralizedVertexBoundaryCondition > essential_bcs
) 

Template parameters:

  • Mesh Mesh type
  • DofsPerVertex Number of dofs per mesh vertex.

Parameters:

  • mesh The mesh the boundary conditions are defined on.
  • essential_bcs The generalized vertex boundary conditions to apply.

Returns:

The constrained DOFs (target + sources + value offset), present on every rank.


function getName

Returns the name of the provided vector.

const char * ae108::cpppetsc::getName (
    const distributed < Vector > & vector
) 


function isInterpolated

bool ae108::cpppetsc::isInterpolated (
    DM dm
) 

function makeSharedEntity

Create a SharedEntity .

template<typename T>
SharedEntity < T > ae108::cpppetsc::makeSharedEntity (
    T t,
    const OwnershipType own=OwnershipType::Take
) 

Parameters:

  • own Take: do not increase reference count; Share: increase reference count

function makeUniqueEntity

Create a UniqueEntity with the default destructor.

template<typename T>
UniqueEntity< T > ae108::cpppetsc::makeUniqueEntity (
    const T & t
) 


function multiply

Multiplies the given matrix by the given vector and returns the result.

distributed < Vector > ae108::cpppetsc::multiply (
    const Matrix & matrix,
    const distributed < Vector > & vector
) 


function naturalToGlobalVertexIds

Returns a lookup table, identical on every rank, that translates a "natural" (pre-distribution) vertex id into the mesh's current (post-distribution) DMPlex vertex numbering. These two numberings differ once a mesh has actually been redistributed across more than one rank, so any natural vertex id must be translated via this table before being stored as a GeneralizedVertexBoundaryCondition::global_vertex_id or GeneralizedVertexConstraint::SourceItem::global_vertex_id.

template<class Mesh>
std::vector< PetscInt > ae108::cpppetsc::naturalToGlobalVertexIds (
    const Mesh & mesh
) 

Template parameters:

Parameters:

  • mesh

Returns:

std::vector<PetscInt> indexed by natural vertex id


function nestMatrices

Creates a matrix that consists of all the provided matrices combined. The matrices are not actually copied; instead the returned matrix contains a reference to the provided matrices.

Matrix ae108::cpppetsc::nestMatrices (
    const std::vector< std::vector< Matrix * > > & matrices
) 

Exception:


function nestVectors

Creates a vector that consists of all the provided vectors stacked on top of each other. The vectors are not actually copied; instead the returned vector contains a reference to the provided vectors.

distributed < Vector > ae108::cpppetsc::nestVectors (
    const std::vector< cpppetsc::distributed < Vector > * > & vectors
) 


function operator<<

Writes the local rows of the matrix to the stream.

std::ostream & ae108::cpppetsc::operator<< (
    std::ostream & stream,
    const Matrix & matrix
) 


function operator<<

Writes the local rows of the vector to the stream.

std::ostream & ae108::cpppetsc::operator<< (
    std::ostream & stream,
    const Vector & vector
) 


function readFromViewer

void ae108::cpppetsc::readFromViewer (
    const Viewer & viewer,
    distributed < Vector > *const vector
) 

function scalarProduct

Computes the scalar product of the two vectors x andy .

template<class Tag>
Vector::value_type ae108::cpppetsc::scalarProduct (
    const TaggedEntity < Vector , Tag > & x,
    const TaggedEntity < Vector , Tag > & y
) 


function setName

Sets the name of the provided vector.

void ae108::cpppetsc::setName (
    const char * name,
    distributed < Vector > *const vector
) 


function setSchurComplementTolerance

When computing the effect of the Schur complement when multiplied with a vector, PETSc uses a linear solver. This function configures the tolerance used by this linear solver.

void ae108::cpppetsc::setSchurComplementTolerance (
    Matrix *const matrix,
    const double relativeTolerance=PETSC_DEFAULT,
    const double absoluteTolerance=PETSC_DEFAULT
) 

Parameters:

  • matrix Valid nonzero pointer to a matrix created by asSchurComplement.

function tag

Wraps the given entity in a TaggedEntity with the provided tag.

template<class Tag, class Entity>
constexpr TaggedEntity < Entity, Tag > ae108::cpppetsc::tag (
    Entity && entity
) 


function vertexDataOffsets

Returns a vector of size N , whereN is the number of vertices in the mesh. Elementi of this vector is the index of the first degree of freedom associated with vertexi in a distributed/global vector.

std::vector< typename cpppetsc::Mesh::size_type > ae108::cpppetsc::vertexDataOffsets (
    const cpppetsc::Mesh & mesh
) 


function writeToViewer

Writes a mesh to a Viewer .

void ae108::cpppetsc::writeToViewer (
    const Mesh & mesh,
    const distributed < Vector > & coordinates,
    Viewer * viewer
) 


function writeToViewer

Writes a vector to a Viewer .

void ae108::cpppetsc::writeToViewer (
    const distributed < Vector > & data,
    Viewer * viewer
) 



The documentation for this class was generated from the following file cpppetsc/src/include/ae108/cpppetsc/asHermitianTransposedMatrix.h