root/trunk/rheoplast/rheoplast.h

Revision 1412, 3.1 kB (checked in by hazelsct, 3 years ago)

The removal of membrane! And reordering of the modules in several places.

  • Property svn:keywords set to Author Date Id Revision
Line 
1/***************************************
2  $Header$
3
4  This #includes all of the the typedefs for the various field variable
5  structures, and their function prototypes, and has the main AppCtx and
6  +latex+{\tt DPRINTF()}.
7  +html+ <tt>DPRINTF()</tt>.
8  ***************************************/
9
10
11#ifndef RHEOPLAST_H
12#define RHEOPLAST_H    /*+ To stop multiple inclusions. +*/
13
14#include <petsc.h>  /* For PetscScalar and PetscPrintf() */
15#include <stdlib.h> /* For (s)random (seeded by main()) */
16#include <illuminator.h>
17#include <petscts.h>       /* For the (semi-)implicit parts */
18#include <petscblaslapack.h> /* For the BLAS parts */
19#include <stdlib.h>          /* For (s)random */
20#include <time.h>            /* For CLK_TCK in tsmonitor */
21#include <sys/times.h>       /* For times() in tsmonitor */
22
23/* This includes timestep.h and headers for each of the modules. */
24#include "timestep.h"
25#include "cahnhill.h"
26#include "chternary.h"
27#include "vectorphase.h"
28#include "heatcond.h"
29#include "vortflow.h"
30#include "pressflow.h"
31#include "shearstrain.h"
32#include "electra.h"
33
34/* Redefine DPRINTF to use data->logfile instead of timestep.h's logfile. */
35#undef DPRINTF
36#ifdef DEBUG
37#define DPRINTF(fmt, args...) { \
38  ierr = PetscPrintf (PETSC_COMM_WORLD, "%s: " fmt, __FUNCT__, args); \
39  CHKERRQ (ierr); \
40  if (data->logfile) { \
41    ierr = PetscFPrintf (PETSC_COMM_WORLD, data->logfile, "%s: " fmt, __FUNCT__, args); \
42    CHKERRQ (ierr); }}
43#else
44#define DPRINTF(fmt, args...) { \
45  if (data->logfile) { \
46    ierr = PetscFPrintf (PETSC_COMM_WORLD, data->logfile, "%s: " fmt, __FUNCT__, args); \
47    CHKERRQ (ierr); }}
48#endif
49
50typedef struct {
51  DA theda;
52  Vec global, local, localfunc; /* localfunc and parameters are for TS only */
53  PetscScalar *parameters, xwid, ywid, zwid;                  /* Domain size */
54  PetscScalar deltax_m2, deltay_m2, deltaz_m2, deltat; /* 1/dx^2, 1/dy^2, dt */
55  int expsteps, impsteps, current_timestep, monsteps, vars, tempvars, intvars,
56    bcflags, *symmtypes;
57  char **label, *save_basename;
58  FILE *logfile;
59  field_plot_type *plot_types;
60  PetscTruth contours, jacobian, threedee, load_data;
61  EqStyle *timestyle;
62  PetscViewer theviewer;
63  Mat J;
64  Vec intvec;
65  CommStyle style;
66  /* Flags and structures for each of the modules */
67  PetscTruth cahnhill, chternary, vectorphase, heatcond, vortflow, pressflow,
68    shearstrain, electra;
69  chparm thecahnhill;
70  chtparm thechternary;
71  vectorphasers thephasers;
72  heatparm theheater;
73  vortparm thevortex;
74  pressparm thepressure;
75  strainparm thestrain;
76  echemparm thepotential;
77} AppCtx;
78
79#define APPCTX_DEFINED
80
81/* This is kind of convoluted, we need vectorphasers etc. typedefs for the
82   AppCtx typedef, and in turn need the AppCtx typedef for the function
83   prototypes!  So those files are split into three parts; effectively we use
84   the first part (typedefs) in the first include above, and the second part
85   (prototypes) in the second include here. */
86#include "cahnhill.h"
87#include "chternary.h"
88#include "vectorphase.h"
89#include "heatcond.h"
90#include "vortflow.h"
91#include "pressflow.h"
92#include "shearstrain.h"
93#include "electra.h"
94
95#endif /* RHEOPLAST_H */
Note: See TracBrowser for help on using the browser.