1 #include "petscsys.h"
2 #include "petscfix.h"
3 #include "petsc/private/fortranimpl.h"
4 /* plexgeometry.c */
5 /* Fortran interface file */
6 
7 /*
8 * This file was generated automatically by bfort from the C source
9 * file.
10  */
11 
12 #ifdef PETSC_USE_POINTER_CONVERSION
13 #if defined(__cplusplus)
14 extern "C" {
15 #endif
16 extern void *PetscToPointer(void*);
17 extern int PetscFromPointer(void *);
18 extern void PetscRmPointer(void*);
19 #if defined(__cplusplus)
20 }
21 #endif
22 
23 #else
24 
25 #define PetscToPointer(a) (*(PetscFortranAddr *)(a))
26 #define PetscFromPointer(a) (PetscFortranAddr)(a)
27 #define PetscRmPointer(a)
28 #endif
29 
30 #include "petscdmplex.h"
31 #include "petscfe.h"
32 #ifdef PETSC_HAVE_FORTRAN_CAPS
33 #define dmplexfindvertices_ DMPLEXFINDVERTICES
34 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
35 #define dmplexfindvertices_ dmplexfindvertices
36 #endif
37 #ifdef PETSC_HAVE_FORTRAN_CAPS
38 #define dmplexcomputeprojection3dto2d_ DMPLEXCOMPUTEPROJECTION3DTO2D
39 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
40 #define dmplexcomputeprojection3dto2d_ dmplexcomputeprojection3dto2d
41 #endif
42 #ifdef PETSC_HAVE_FORTRAN_CAPS
43 #define dmplexcomputegeometryfem_ DMPLEXCOMPUTEGEOMETRYFEM
44 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
45 #define dmplexcomputegeometryfem_ dmplexcomputegeometryfem
46 #endif
47 #ifdef PETSC_HAVE_FORTRAN_CAPS
48 #define dmplexcomputegeometryfvm_ DMPLEXCOMPUTEGEOMETRYFVM
49 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
50 #define dmplexcomputegeometryfvm_ dmplexcomputegeometryfvm
51 #endif
52 #ifdef PETSC_HAVE_FORTRAN_CAPS
53 #define dmplexcomputegradientfvm_ DMPLEXCOMPUTEGRADIENTFVM
54 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
55 #define dmplexcomputegradientfvm_ dmplexcomputegradientfvm
56 #endif
57 #ifdef PETSC_HAVE_FORTRAN_CAPS
58 #define dmplexgetdatafvm_ DMPLEXGETDATAFVM
59 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
60 #define dmplexgetdatafvm_ dmplexgetdatafvm
61 #endif
62 #ifdef PETSC_HAVE_FORTRAN_CAPS
63 #define dmplexcoordinatestoreference_ DMPLEXCOORDINATESTOREFERENCE
64 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
65 #define dmplexcoordinatestoreference_ dmplexcoordinatestoreference
66 #endif
67 #ifdef PETSC_HAVE_FORTRAN_CAPS
68 #define dmplexreferencetocoordinates_ DMPLEXREFERENCETOCOORDINATES
69 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
70 #define dmplexreferencetocoordinates_ dmplexreferencetocoordinates
71 #endif
72 
73 
74 /* Definitions of Fortran Wrapper routines */
75 #if defined(__cplusplus)
76 extern "C" {
77 #endif
dmplexfindvertices_(DM dm,PetscInt * npoints,PetscReal coord[],PetscReal * eps,PetscInt dagPoints[],int * __ierr)78 PETSC_EXTERN void  dmplexfindvertices_(DM dm,PetscInt *npoints, PetscReal coord[],PetscReal *eps,PetscInt dagPoints[], int *__ierr)
79 {
80 *__ierr = DMPlexFindVertices(
81 	(DM)PetscToPointer((dm) ),*npoints,coord,*eps,dagPoints);
82 }
dmplexcomputeprojection3dto2d_(PetscInt * coordSize,PetscScalar coords[],PetscReal R[],int * __ierr)83 PETSC_EXTERN void  dmplexcomputeprojection3dto2d_(PetscInt *coordSize,PetscScalar coords[],PetscReal R[], int *__ierr)
84 {
85 *__ierr = DMPlexComputeProjection3Dto2D(*coordSize,coords,R);
86 }
dmplexcomputegeometryfem_(DM dm,Vec * cellgeom,int * __ierr)87 PETSC_EXTERN void  dmplexcomputegeometryfem_(DM dm,Vec *cellgeom, int *__ierr)
88 {
89 *__ierr = DMPlexComputeGeometryFEM(
90 	(DM)PetscToPointer((dm) ),cellgeom);
91 }
dmplexcomputegeometryfvm_(DM dm,Vec * cellgeom,Vec * facegeom,int * __ierr)92 PETSC_EXTERN void  dmplexcomputegeometryfvm_(DM dm,Vec *cellgeom,Vec *facegeom, int *__ierr)
93 {
94 *__ierr = DMPlexComputeGeometryFVM(
95 	(DM)PetscToPointer((dm) ),cellgeom,facegeom);
96 }
dmplexcomputegradientfvm_(DM dm,PetscFV fvm,Vec faceGeometry,Vec cellGeometry,DM * dmGrad,int * __ierr)97 PETSC_EXTERN void  dmplexcomputegradientfvm_(DM dm,PetscFV fvm,Vec faceGeometry,Vec cellGeometry,DM *dmGrad, int *__ierr)
98 {
99 *__ierr = DMPlexComputeGradientFVM(
100 	(DM)PetscToPointer((dm) ),
101 	(PetscFV)PetscToPointer((fvm) ),
102 	(Vec)PetscToPointer((faceGeometry) ),
103 	(Vec)PetscToPointer((cellGeometry) ),dmGrad);
104 }
dmplexgetdatafvm_(DM dm,PetscFV fv,Vec * cellgeom,Vec * facegeom,DM * gradDM,int * __ierr)105 PETSC_EXTERN void  dmplexgetdatafvm_(DM dm,PetscFV fv,Vec *cellgeom,Vec *facegeom,DM *gradDM, int *__ierr)
106 {
107 *__ierr = DMPlexGetDataFVM(
108 	(DM)PetscToPointer((dm) ),
109 	(PetscFV)PetscToPointer((fv) ),cellgeom,facegeom,gradDM);
110 }
dmplexcoordinatestoreference_(DM dm,PetscInt * cell,PetscInt * numPoints,PetscReal realCoords[],PetscReal refCoords[],int * __ierr)111 PETSC_EXTERN void  dmplexcoordinatestoreference_(DM dm,PetscInt *cell,PetscInt *numPoints, PetscReal realCoords[],PetscReal refCoords[], int *__ierr)
112 {
113 *__ierr = DMPlexCoordinatesToReference(
114 	(DM)PetscToPointer((dm) ),*cell,*numPoints,realCoords,refCoords);
115 }
dmplexreferencetocoordinates_(DM dm,PetscInt * cell,PetscInt * numPoints,PetscReal refCoords[],PetscReal realCoords[],int * __ierr)116 PETSC_EXTERN void  dmplexreferencetocoordinates_(DM dm,PetscInt *cell,PetscInt *numPoints, PetscReal refCoords[],PetscReal realCoords[], int *__ierr)
117 {
118 *__ierr = DMPlexReferenceToCoordinates(
119 	(DM)PetscToPointer((dm) ),*cell,*numPoints,refCoords,realCoords);
120 }
121 #if defined(__cplusplus)
122 }
123 #endif
124