PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
creatediagmatrix.cpp File Reference

Definitions of functions creating different kinds of diagonal matrices. More...

#include <functional>
#include <vector>
#include <petscmat.h>
#include <petibm/mesh.h>

Go to the source code of this file.

Namespaces

namespace  petibm
 A toolbox for building flow solvers.
 
namespace  petibm::operators
 Collections of factory functions of operators.
 

Typedefs

typedef std::function< PetscReal(const PetscInt &, const PetscInt &, const PetscInt &)> petibm::operators::KernelType
 a short name for the signatures of kernels. More...
 

Functions

PetscErrorCode petibm::operators::createDiagMatrix (const type::Mesh &mesh, const std::vector< KernelType > &kernels, Mat &M)
 a function to create diagonal matrix according to input kernel. More...
 
PetscErrorCode petibm::operators::createR (const type::Mesh &mesh, Mat &R)
 Create a matrix of flux areas, $R$. More...
 
PetscErrorCode petibm::operators::createRInv (const type::Mesh &mesh, Mat &RInv)
 Create a matrix of inversed flux areas, $R^{-1}$. More...
 
PetscErrorCode petibm::operators::createMHead (const type::Mesh &mesh, Mat &MHead)
 Create a matrix of cell widths of velocity points, $\hat{M}$. More...
 
PetscErrorCode petibm::operators::createM (const type::Mesh &mesh, Mat &M)
 Create a matrix $M=\hat{M}R^{-1}$. More...
 
PetscErrorCode petibm::operators::createIdentity (const type::Mesh &mesh, Mat &I)
 Create an identity matrix $I$ for velocity fields. More...
 

Detailed Description

Definitions of functions creating different kinds of diagonal matrices.

License
BSD 3-Clause License.

Definition in file creatediagmatrix.cpp.