Actual source code: ex18.h

  1: #pragma once

  3: #include <petscmat.h>

  5: typedef struct {
  6:   PetscInt  Nv;       /* number of vertices */
  7:   PetscInt  Ne;       /* number of elements */
  8:   PetscInt  n;        /* dimension of the resulting linear system; size of the Jacobian */
  9:   PetscInt *vertices; /* list of vertices for each element */
 10:   PetscInt *coo;      /* offset into the matrices COO array for the start of each element stiffness */
 11: } FEStruct;

 13: PETSC_EXTERN PetscErrorCode FillMatrixKokkosCOO(FEStruct *, Mat);
 14: PETSC_EXTERN PetscErrorCode FillMatrixCUDACOO(FEStruct *, Mat);