Actual source code: zfef.c

  1: #include <petsc/private/fortranimpl.h>
  2: #include <petscfe.h>
  3: #include <petscviewer.h>

  5: #if defined(PETSC_HAVE_FORTRAN_CAPS)
  6:   #define petscspaceviewfromoptions_     PETSCSPACEVIEWFROMOPTIONS
  7:   #define petscdualspaceviewfromoptions_ PETSCDUALSPACEVIEWFROMOPTIONS
  8:   #define petscfeviewfromoptions_        PETSCFEVIEWFROMOPTIONS
  9: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
 10:   #define petscspaceviewfromoptions_     petscspaceviewfromoptions
 11:   #define petscdualspaceviewfromoptions_ petscdualspaceviewfromoptions
 12:   #define petscfeviewfromoptions_        petscfeviewfromoptions
 13: #endif

 15: PETSC_EXTERN void petscspaceviewfromoptions_(PetscSpace *ao, PetscObject obj, char *type, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len)
 16: {
 17:   char *t;

 19:   FIXCHAR(type, len, t);
 20:   CHKFORTRANNULLOBJECT(obj);
 21:   *ierr = PetscSpaceViewFromOptions(*ao, obj, t);
 22:   if (*ierr) return;
 23:   FREECHAR(type, t);
 24: }

 26: PETSC_EXTERN void petscdualspaceviewfromoptions_(PetscDualSpace *ao, PetscObject obj, char *type, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len)
 27: {
 28:   char *t;

 30:   FIXCHAR(type, len, t);
 31:   CHKFORTRANNULLOBJECT(obj);
 32:   *ierr = PetscDualSpaceViewFromOptions(*ao, obj, t);
 33:   if (*ierr) return;
 34:   FREECHAR(type, t);
 35: }

 37: PETSC_EXTERN void petscfeviewfromoptions_(PetscFE *ao, PetscObject obj, char *type, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len)
 38: {
 39:   char *t;

 41:   FIXCHAR(type, len, t);
 42:   CHKFORTRANNULLOBJECT(obj);
 43:   *ierr = PetscFEViewFromOptions(*ao, obj, t);
 44:   if (*ierr) return;
 45:   FREECHAR(type, t);
 46: }