6#ifndef PETSC_INTERFACE_H
7#define PETSC_INTERFACE_H
59void petsc_initialize(
const PetscInt nNo,
const PetscInt mynNo,
60 const PetscInt nnz,
const PetscInt nEq,
const PetscInt *svFSI_ltg,
61 const PetscInt *svFSI_map,
const PetscInt *svFSI_rowPtr,
62 const PetscInt *svFSI_colPtr,
char *inp);
64void petsc_create_linearsystem(
const PetscInt dof,
const PetscInt iEq,
const PetscInt nEq,
65 const PetscReal *svFSI_DirBC,
const PetscReal *svFSI_lpBC);
67void petsc_create_linearsolver(
const consts::PreconditionerType
lsType,
const consts::PreconditionerType pcType,
68 const PetscInt kSpace,
const PetscInt maxIter,
const PetscReal relTol,
69 const PetscReal absTol,
const consts::EquationType phys,
const PetscInt dof,
70 const PetscInt iEq,
const PetscInt nEq);
72void petsc_set_values(
const PetscInt dof,
const PetscInt iEq,
const PetscReal *R,
73 const PetscReal *Val,
const PetscReal *svFSI_DirBC,
const PetscReal *svFSI_lpBC);
75void petsc_solve(PetscReal *resNorm, PetscReal *initNorm, PetscReal *dB,
76 PetscReal *execTime,
bool *converged, PetscInt *numIter,
77 PetscReal *R,
const PetscInt maxIter,
const PetscInt dof,
80void petsc_destroy_all(
const PetscInt);
82PetscErrorCode petsc_create_lhs(
const PetscInt,
const PetscInt,
const PetscInt,
83 const PetscInt *,
const PetscInt *,
84 const PetscInt *,
const PetscInt *);
86PetscErrorCode petsc_create_bc(
const PetscInt,
const PetscInt,
const PetscReal *,
89PetscErrorCode petsc_create_vecmat(
const PetscInt,
const PetscInt,
const PetscInt);
91PetscErrorCode petsc_set_vec(
const PetscInt,
const PetscInt,
const PetscReal *);
93PetscErrorCode petsc_set_mat(
const PetscInt,
const PetscInt,
const PetscReal *);
95PetscErrorCode petsc_set_bc(
const PetscInt,
const PetscReal *,
const PetscReal *);
97PetscErrorCode petsc_set_pcfieldsplit(
const PetscInt,
const PetscInt);
99PetscErrorCode petsc_pc_rcs(
const PetscInt,
const PetscInt);
102PetscErrorCode petsc_debug_save_vec(
const char *, Vec);
103PetscErrorCode petsc_debug_save_mat(
const char *, Mat);
Linear system of equations solver type.
Definition ComMod.h:652
Definition petsc_impl.h:21
Definition petsc_impl.h:39