Actual source code: discretizationf.c

  1: /* discretization.c */
  2: /* Fortran interface file */

  4: /*
  5: * This file was generated automatically by bfort from the C source
  6: * file.  
  7:  */

  9: #ifdef PETSC_USE_POINTER_CONVERSION
 10: #if defined(__cplusplus)
 11: extern "C" {
 12: #endif 
 13: extern void *PetscToPointer(void *);
 14: extern int PetscFromPointer(void *);
 15: extern void PetscRmPointer(void *);
 16: #if defined(__cplusplus)
 17: }
 18: #endif 

 20: #else

 22: #define PetscToPointer(a) (*(long *)(a))
 23: #define PetscFromPointer(a) (long)(a)
 24: #define PetscRmPointer(a)
 25: #endif

 27: #include "petscfix.h"
 28:  #include discretization.h
 29: #ifdef MPI_BUILD_PROFILING
 30: #ifdef PETSC_HAVE_FORTRAN_CAPS
 31: #define discretizationdestroy_ PDISCRETIZATIONDESTROY
 32: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 33: #define discretizationdestroy_ pdiscretizationdestroy
 34: #else
 35: #define discretizationdestroy_ pdiscretizationdestroy_
 36: #endif
 37: #else
 38: #ifdef PETSC_HAVE_FORTRAN_CAPS
 39: #define discretizationdestroy_ DISCRETIZATIONDESTROY
 40: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 41: #define discretizationdestroy_ discretizationdestroy
 42: #endif
 43: #endif

 45: #ifdef MPI_BUILD_PROFILING
 46: #ifdef PETSC_HAVE_FORTRAN_CAPS
 47: #define discretizationview_ PDISCRETIZATIONVIEW
 48: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 49: #define discretizationview_ pdiscretizationview
 50: #else
 51: #define discretizationview_ pdiscretizationview_
 52: #endif
 53: #else
 54: #ifdef PETSC_HAVE_FORTRAN_CAPS
 55: #define discretizationview_ DISCRETIZATIONVIEW
 56: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 57: #define discretizationview_ discretizationview
 58: #endif
 59: #endif

 61: #ifdef MPI_BUILD_PROFILING
 62: #ifdef PETSC_HAVE_FORTRAN_CAPS
 63: #define discretizationsetfromoptions_ PDISCRETIZATIONSETFROMOPTIONS
 64: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 65: #define discretizationsetfromoptions_ pdiscretizationsetfromoptions
 66: #else
 67: #define discretizationsetfromoptions_ pdiscretizationsetfromoptions_
 68: #endif
 69: #else
 70: #ifdef PETSC_HAVE_FORTRAN_CAPS
 71: #define discretizationsetfromoptions_ DISCRETIZATIONSETFROMOPTIONS
 72: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 73: #define discretizationsetfromoptions_ discretizationsetfromoptions
 74: #endif
 75: #endif

 77: #ifdef MPI_BUILD_PROFILING
 78: #ifdef PETSC_HAVE_FORTRAN_CAPS
 79: #define discretizationviewfromoptions_ PDISCRETIZATIONVIEWFROMOPTIONS
 80: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 81: #define discretizationviewfromoptions_ pdiscretizationviewfromoptions
 82: #else
 83: #define discretizationviewfromoptions_ pdiscretizationviewfromoptions_
 84: #endif
 85: #else
 86: #ifdef PETSC_HAVE_FORTRAN_CAPS
 87: #define discretizationviewfromoptions_ DISCRETIZATIONVIEWFROMOPTIONS
 88: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 89: #define discretizationviewfromoptions_ discretizationviewfromoptions
 90: #endif
 91: #endif

 93: #ifdef MPI_BUILD_PROFILING
 94: #ifdef PETSC_HAVE_FORTRAN_CAPS
 95: #define discretizationprinthelp_ PDISCRETIZATIONPRINTHELP
 96: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 97: #define discretizationprinthelp_ pdiscretizationprinthelp
 98: #else
 99: #define discretizationprinthelp_ pdiscretizationprinthelp_
100: #endif
101: #else
102: #ifdef PETSC_HAVE_FORTRAN_CAPS
103: #define discretizationprinthelp_ DISCRETIZATIONPRINTHELP
104: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
105: #define discretizationprinthelp_ discretizationprinthelp
106: #endif
107: #endif

109: #ifdef MPI_BUILD_PROFILING
110: #ifdef PETSC_HAVE_FORTRAN_CAPS
111: #define discretizationsetupdefaultoperators_ PDISCRETIZATIONSETUPDEFAULTOPERATORS
112: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
113: #define discretizationsetupdefaultoperators_ pdiscretizationsetupdefaultoperators
114: #else
115: #define discretizationsetupdefaultoperators_ pdiscretizationsetupdefaultoperators_
116: #endif
117: #else
118: #ifdef PETSC_HAVE_FORTRAN_CAPS
119: #define discretizationsetupdefaultoperators_ DISCRETIZATIONSETUPDEFAULTOPERATORS
120: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
121: #define discretizationsetupdefaultoperators_ discretizationsetupdefaultoperators
122: #endif
123: #endif

125: #ifdef MPI_BUILD_PROFILING
126: #ifdef PETSC_HAVE_FORTRAN_CAPS
127: #define discretizationevaluatefunctiongalerkin_ PDISCRETIZATIONEVALUATEFUNCTIONGALERKIN
128: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
129: #define discretizationevaluatefunctiongalerkin_ pdiscretizationevaluatefunctiongalerkin
130: #else
131: #define discretizationevaluatefunctiongalerkin_ pdiscretizationevaluatefunctiongalerkin_
132: #endif
133: #else
134: #ifdef PETSC_HAVE_FORTRAN_CAPS
135: #define discretizationevaluatefunctiongalerkin_ DISCRETIZATIONEVALUATEFUNCTIONGALERKIN
136: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
137: #define discretizationevaluatefunctiongalerkin_ discretizationevaluatefunctiongalerkin
138: #endif
139: #endif

141: #ifdef MPI_BUILD_PROFILING
142: #ifdef PETSC_HAVE_FORTRAN_CAPS
143: #define discretizationevaluateoperatorgalerkin_ PDISCRETIZATIONEVALUATEOPERATORGALERKIN
144: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
145: #define discretizationevaluateoperatorgalerkin_ pdiscretizationevaluateoperatorgalerkin
146: #else
147: #define discretizationevaluateoperatorgalerkin_ pdiscretizationevaluateoperatorgalerkin_
148: #endif
149: #else
150: #ifdef PETSC_HAVE_FORTRAN_CAPS
151: #define discretizationevaluateoperatorgalerkin_ DISCRETIZATIONEVALUATEOPERATORGALERKIN
152: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
153: #define discretizationevaluateoperatorgalerkin_ discretizationevaluateoperatorgalerkin
154: #endif
155: #endif

157: #ifdef MPI_BUILD_PROFILING
158: #ifdef PETSC_HAVE_FORTRAN_CAPS
159: #define discretizationevaluatealeoperatorgalerkin_ PDISCRETIZATIONEVALUATEALEOPERATORGALERKIN
160: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
161: #define discretizationevaluatealeoperatorgalerkin_ pdiscretizationevaluatealeoperatorgalerkin
162: #else
163: #define discretizationevaluatealeoperatorgalerkin_ pdiscretizationevaluatealeoperatorgalerkin_
164: #endif
165: #else
166: #ifdef PETSC_HAVE_FORTRAN_CAPS
167: #define discretizationevaluatealeoperatorgalerkin_ DISCRETIZATIONEVALUATEALEOPERATORGALERKIN
168: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
169: #define discretizationevaluatealeoperatorgalerkin_ discretizationevaluatealeoperatorgalerkin
170: #endif
171: #endif

173: #ifdef MPI_BUILD_PROFILING
174: #ifdef PETSC_HAVE_FORTRAN_CAPS
175: #define discretizationevaluateoperatorgalerkinmf_ PDISCRETIZATIONEVALUATEOPERATORGALERKINMF
176: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
177: #define discretizationevaluateoperatorgalerkinmf_ pdiscretizationevaluateoperatorgalerkinmf
178: #else
179: #define discretizationevaluateoperatorgalerkinmf_ pdiscretizationevaluateoperatorgalerkinmf_
180: #endif
181: #else
182: #ifdef PETSC_HAVE_FORTRAN_CAPS
183: #define discretizationevaluateoperatorgalerkinmf_ DISCRETIZATIONEVALUATEOPERATORGALERKINMF
184: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
185: #define discretizationevaluateoperatorgalerkinmf_ discretizationevaluateoperatorgalerkinmf
186: #endif
187: #endif

189: #ifdef MPI_BUILD_PROFILING
190: #ifdef PETSC_HAVE_FORTRAN_CAPS
191: #define discretizationevaluatealeoperatorgalerkinmf_ PDISCRETIZATIONEVALUATEALEOPERATORGALERKINMF
192: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
193: #define discretizationevaluatealeoperatorgalerkinmf_ pdiscretizationevaluatealeoperatorgalerkinmf
194: #else
195: #define discretizationevaluatealeoperatorgalerkinmf_ pdiscretizationevaluatealeoperatorgalerkinmf_
196: #endif
197: #else
198: #ifdef PETSC_HAVE_FORTRAN_CAPS
199: #define discretizationevaluatealeoperatorgalerkinmf_ DISCRETIZATIONEVALUATEALEOPERATORGALERKINMF
200: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
201: #define discretizationevaluatealeoperatorgalerkinmf_ discretizationevaluatealeoperatorgalerkinmf
202: #endif
203: #endif

205: #ifdef MPI_BUILD_PROFILING
206: #ifdef PETSC_HAVE_FORTRAN_CAPS
207: #define discretizationevaluatenonlinearoperatorgalerkin_ PDISCRETIZATIONEVALUATENONLINEAROPERATORGALERKIN
208: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
209: #define discretizationevaluatenonlinearoperatorgalerkin_ pdiscretizationevaluatenonlinearoperatorgalerkin
210: #else
211: #define discretizationevaluatenonlinearoperatorgalerkin_ pdiscretizationevaluatenonlinearoperatorgalerkin_
212: #endif
213: #else
214: #ifdef PETSC_HAVE_FORTRAN_CAPS
215: #define discretizationevaluatenonlinearoperatorgalerkin_ DISCRETIZATIONEVALUATENONLINEAROPERATORGALERKIN
216: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
217: #define discretizationevaluatenonlinearoperatorgalerkin_ discretizationevaluatenonlinearoperatorgalerkin
218: #endif
219: #endif

221: #ifdef MPI_BUILD_PROFILING
222: #ifdef PETSC_HAVE_FORTRAN_CAPS
223: #define discretizationevaluatenonlinearaleoperatorgalerkin_ PDISCRETIZATIONEVALUATENONLINEARALEOPERATORGALERKIN
224: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
225: #define discretizationevaluatenonlinearaleoperatorgalerkin_ pdiscretizationevaluatenonlinearaleoperatorgalerkin
226: #else
227: #define discretizationevaluatenonlinearaleoperatorgalerkin_ pdiscretizationevaluatenonlinearaleoperatorgalerkin_
228: #endif
229: #else
230: #ifdef PETSC_HAVE_FORTRAN_CAPS
231: #define discretizationevaluatenonlinearaleoperatorgalerkin_ DISCRETIZATIONEVALUATENONLINEARALEOPERATORGALERKIN
232: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
233: #define discretizationevaluatenonlinearaleoperatorgalerkin_ discretizationevaluatenonlinearaleoperatorgalerkin
234: #endif
235: #endif

237: #ifdef MPI_BUILD_PROFILING
238: #ifdef PETSC_HAVE_FORTRAN_CAPS
239: #define discretizationinterpolatefield_ PDISCRETIZATIONINTERPOLATEFIELD
240: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
241: #define discretizationinterpolatefield_ pdiscretizationinterpolatefield
242: #else
243: #define discretizationinterpolatefield_ pdiscretizationinterpolatefield_
244: #endif
245: #else
246: #ifdef PETSC_HAVE_FORTRAN_CAPS
247: #define discretizationinterpolatefield_ DISCRETIZATIONINTERPOLATEFIELD
248: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
249: #define discretizationinterpolatefield_ discretizationinterpolatefield
250: #endif
251: #endif

253: #ifdef MPI_BUILD_PROFILING
254: #ifdef PETSC_HAVE_FORTRAN_CAPS
255: #define discretizationinterpolateelementvec_ PDISCRETIZATIONINTERPOLATEELEMENTVEC
256: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
257: #define discretizationinterpolateelementvec_ pdiscretizationinterpolateelementvec
258: #else
259: #define discretizationinterpolateelementvec_ pdiscretizationinterpolateelementvec_
260: #endif
261: #else
262: #ifdef PETSC_HAVE_FORTRAN_CAPS
263: #define discretizationinterpolateelementvec_ DISCRETIZATIONINTERPOLATEELEMENTVEC
264: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
265: #define discretizationinterpolateelementvec_ discretizationinterpolateelementvec
266: #endif
267: #endif



271: /* Definitions of Fortran Wrapper routines */
272: #if defined(__cplusplus)
273: extern "C" {
274: #endif
275: void PETSC_STDCALL discretizationdestroy_(Discretization disc, int *ierr ){
276: *DiscretizationDestroy(
277:         (Discretization)PetscToPointer( (disc) ));
278: }
279: void PETSC_STDCALL discretizationview_(Discretization disc,PetscViewer *viewer, int *ierr ){
280: *DiscretizationView(
281:         (Discretization)PetscToPointer( (disc) ),*viewer);
282: }
283: void PETSC_STDCALL discretizationsetfromoptions_(Discretization disc, int *ierr ){
284: *DiscretizationSetFromOptions(
285:         (Discretization)PetscToPointer( (disc) ));
286: }
287: void PETSC_STDCALL discretizationviewfromoptions_(Discretization disc,char *title, int *ierr ){
288: *DiscretizationViewFromOptions(
289:         (Discretization)PetscToPointer( (disc) ),title);
290: }
291: void PETSC_STDCALL discretizationprinthelp_(Discretization disc, int *ierr ){
292: *DiscretizationPrintHelp(
293:         (Discretization)PetscToPointer( (disc) ));
294: }
295: void PETSC_STDCALL discretizationsetupdefaultoperators_(Discretization disc, int *ierr ){
296: *DiscretizationSetupDefaultOperators(
297:         (Discretization)PetscToPointer( (disc) ));
298: }
299: void PETSC_STDCALL discretizationevaluatefunctiongalerkin_(Discretization disc,Mesh mesh,PointFunction *f,PetscScalar *alpha,int *elem,PetscScalar *v,void*ctx, int *ierr ){
300: *DiscretizationEvaluateFunctionGalerkin(
301:         (Discretization)PetscToPointer( (disc) ),
302:         (Mesh)PetscToPointer( (mesh) ),*f,*alpha,*elem,v,ctx);
303: }
304: void PETSC_STDCALL discretizationevaluateoperatorgalerkin_(Discretization disc,Mesh mesh,int *elemSize,int *rowStart,int *colStart,
305:                                            int *op,PetscScalar *alpha,int *elem,PetscScalar *field,PetscScalar *mat,void*ctx, int *ierr ){
306: *DiscretizationEvaluateOperatorGalerkin(
307:         (Discretization)PetscToPointer( (disc) ),
308:         (Mesh)PetscToPointer( (mesh) ),*elemSize,*rowStart,*colStart,*op,*alpha,*elem,field,mat,ctx);
309: }
310: void PETSC_STDCALL discretizationevaluatealeoperatorgalerkin_(Discretization disc,Mesh mesh,int *elemSize,int *rowStart,int *colStart,
311:                                               int *op,PetscScalar *alpha,int *elem,PetscScalar *field,PetscScalar *ALEfield,PetscScalar *mat,void*ctx, int *ierr ){
312: *DiscretizationEvaluateALEOperatorGalerkin(
313:         (Discretization)PetscToPointer( (disc) ),
314:         (Mesh)PetscToPointer( (mesh) ),*elemSize,*rowStart,*colStart,*op,*alpha,*elem,field,ALEfield,mat,ctx);
315: }
316: void PETSC_STDCALL discretizationevaluateoperatorgalerkinmf_(Discretization disc,Mesh mesh,int *elemSize,int *rowStart,int *colStart,int *op,
317:                                              PetscScalar *alpha,int *elem,PetscScalar *field,PetscScalar *app,PetscScalar *vec,PetscScalar *mat,void*ctx, int *ierr ){
318: *DiscretizationEvaluateOperatorGalerkinMF(
319:         (Discretization)PetscToPointer( (disc) ),
320:         (Mesh)PetscToPointer( (mesh) ),*elemSize,*rowStart,*colStart,*op,*alpha,*elem,field,app,vec,mat,ctx);
321: }
322: void PETSC_STDCALL discretizationevaluatealeoperatorgalerkinmf_(Discretization disc,Mesh mesh,int *elemSize,int *rowStart,int *colStart,int *op,
323:                                                 PetscScalar *alpha,int *elem,PetscScalar *field,PetscScalar *app,PetscScalar *ALEfield,PetscScalar *vec,
324:                                                 PetscScalar *mat,void*ctx, int *ierr ){
325: *DiscretizationEvaluateALEOperatorGalerkinMF(
326:         (Discretization)PetscToPointer( (disc) ),
327:         (Mesh)PetscToPointer( (mesh) ),*elemSize,*rowStart,*colStart,*op,*alpha,*elem,field,app,ALEfield,vec,mat,ctx);
328: }
329: void PETSC_STDCALL discretizationevaluatenonlinearoperatorgalerkin_(Discretization disc,Mesh mesh,NonlinearOperator *op,PetscScalar *alpha,int *elem,
330:                                                     int *numArgs,PetscScalar **field,PetscScalar *vec,void*ctx, int *ierr ){
331: *DiscretizationEvaluateNonlinearOperatorGalerkin(
332:         (Discretization)PetscToPointer( (disc) ),
333:         (Mesh)PetscToPointer( (mesh) ),*op,*alpha,*elem,*numArgs,field,vec,ctx);
334: }
335: void PETSC_STDCALL discretizationevaluatenonlinearaleoperatorgalerkin_(Discretization disc,Mesh mesh,NonlinearOperator *op,PetscScalar *alpha,int *elem,
336:                                                        int *numArgs,PetscScalar **field,PetscScalar *ALEfield,PetscScalar *vec,void*ctx, int *ierr ){
337: *DiscretizationEvaluateNonlinearALEOperatorGalerkin(
338:         (Discretization)PetscToPointer( (disc) ),
339:         (Mesh)PetscToPointer( (mesh) ),*op,*alpha,*elem,*numArgs,field,ALEfield,vec,ctx);
340: }
341: void PETSC_STDCALL discretizationinterpolatefield_(Discretization disc,Mesh mesh,int *elem,double *x,double *y,double *z,
342:                                    PetscScalar *oldFieldVal,PetscScalar *newFieldVal,InterpolationType *type, int *ierr ){
343: *DiscretizationInterpolateField(
344:         (Discretization)PetscToPointer( (disc) ),
345:         (Mesh)PetscToPointer( (mesh) ),*elem,*x,*y,*z,oldFieldVal,newFieldVal,*type);
346: }
347: void PETSC_STDCALL discretizationinterpolateelementvec_(Discretization disc,ElementVec vec,Discretization newDisc,ElementVec newVec, int *ierr ){
348: *DiscretizationInterpolateElementVec(
349:         (Discretization)PetscToPointer( (disc) ),
350:         (ElementVec)PetscToPointer( (vec) ),
351:         (Discretization)PetscToPointer( (newDisc) ),
352:         (ElementVec)PetscToPointer( (newVec) ));
353: }
354: #if defined(__cplusplus)
355: }
356: #endif