BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
petsctools.hpp File Reference
#include "typedefs.hpp"
#include "cl_Vector.hpp"
#include "cl_SolverDistMatrix.hpp"
Include dependency graph for petsctools.hpp:

Go to the source code of this file.

Classes

class  Vec
class  Mat
class  PC
class  KSP

Namespaces

namespace  belfem
 USER GUIDES:
namespace  belfem::sparse

Macros

#define PETSC_DECIDE   0

Typedefs

typedef int PetscInt
typedef double PetscReal
typedef int PetscErrorCode
typedef int MPI_Comm
typedef void belfem::sparse::PETScAIJ

Functions

string belfem::petsctools_error_message (const PetscErrorCode aStatus)
PetscErrorCode belfem::petsctools_allocate_vector (MPI_Comm aComm, Vec &aVec, const PetscInt aGlobalLength, const PetscInt aLocalLength)
PetscErrorCode belfem::petsctools_set_vector (const Vector< PetscReal > &aVector, const Vector< PetscInt > &aIndices, Vec &aVec)
 convert a BELFEM vector to a PETSC vector aVac must have been initialized.
PetscErrorCode belfem::petsctools_get_vector (Vec &aVec, const Vector< PetscInt > &aIndices, Vector< PetscReal > &aVector)
 convert a PETSC vector to a BELFEM vector
PetscErrorCode belfem::petsctools_get_local_vector (Vec &aVec, Vector< PetscReal > &aVector)
 Extract the local portion of a distributed PETSC vector to a BELFEM vector.
PetscErrorCode belfem::petsctools_set_local_vector (const Vector< PetscReal > &aVector, Vec &aVec)
 Set the local portion of a distributed PETSC vector from a BELFEM vector.
PetscErrorCode belfem::petsctools_create_matrix (sparse::PETScAIJ *aDistMatrix, Mat &aMat)
PetscErrorCode belfem::petsctools_update_matrix (sparse::PETScAIJ *aDistMatrix, Mat &aMat)
PetscErrorCode belfem::petsctools_link_matrix (COMM_TYPE aComm, SpMatrix &aMatrix, Mat &aMat)
PetscErrorCode belfem::petsctools_notify_matrix_update (Mat &aMat)

Macro Definition Documentation

◆ PETSC_DECIDE

#define PETSC_DECIDE   0

Typedef Documentation

◆ MPI_Comm

typedef int MPI_Comm

◆ PetscErrorCode

typedef int PetscErrorCode

◆ PetscInt

typedef int PetscInt

◆ PetscReal

typedef double PetscReal