Revision de098fdd2379a053e8d57d2012d07624d71f02c6 authored by Rajesh Kommu on 24 September 2014, 19:42:15 UTC, committed by Rajesh Kommu on 24 September 2014, 19:42:15 UTC
1 parent e0ede29
Raw File
petsc_citcoms.h
// petsc_citcoms.h
#ifndef __CitcomS__PETSc__h__
#define __CitcomS__PETSc__h__

#ifdef USE_PETSC

#include <petscksp.h>

#ifdef __cplusplus
extern "C" {
#endif

void strip_bcs_from_residual_PETSc(struct All_variables *E, Vec Res, int level);
PetscErrorCode initial_vel_residual_PETSc(struct All_variables *E, Vec V, Vec P, Vec F, double acc);
double global_v_norm2_PETSc( struct All_variables *E, Vec v );
double global_p_norm2_PETSc( struct All_variables *E, Vec p );
double global_div_norm2_PETSc( struct All_variables *E,  Vec a );
PetscErrorCode assemble_c_u_PETSc( struct All_variables *E, Vec U, Vec res, int level );

PetscErrorCode PC_Apply_MultiGrid( PC pc, Vec x, Vec y );

PetscErrorCode MatShellMult_del2_u( Mat K, Vec U, Vec KU );
PetscErrorCode MatShellMult_grad_p( Mat G, Vec P, Vec GP );
PetscErrorCode MatShellMult_div_u( Mat D, Vec U, Vec DU );
PetscErrorCode MatShellMult_div_rho_u( Mat D, Vec U, Vec DU );

#ifdef __cplusplus
}
#endif

#endif /* USE_PETSC */

#endif // __CitcomS__PETSc__h__
back to top