PLUTO
emf_userdef.c File Reference
#include "pluto.h"
Include dependency graph for emf_userdef.c:

Go to the source code of this file.

Functions

void EMF_USERDEF_BOUNDARY (EMF *emf, int side, int loc, Grid *grid)
 

Function Documentation

void EMF_USERDEF_BOUNDARY ( EMF emf,
int  side,
int  loc,
Grid grid 
)

Definition at line 4 of file emf_userdef.c.

52 {
53  int i, j, k;
54 
55  return; /* !! comment this line if you intend to use this function !! */
56 
57  if (loc != FACE_EMF) return;
58 
59  if (side == X1_BEG) {
60 
61  X1_BEG_LOOP(k,j,i){
62  D_EXPAND( ,
63  emf->ezj[k][j][i] = emf->ezj[k][j][IBEG]; ,
64  emf->eyk[k][j][i] = emf->eyk[k][j][IBEG];
65  )
66  }
67 
68  }else if (side == X1_END){
69 
70  X1_END_LOOP(k,j,i){
71  D_EXPAND( ,
72  emf->ezj[k][j][i] = emf->ezj[k][j][IEND]; ,
73  emf->eyk[k][j][i] = emf->eyk[k][j][IEND];
74  )
75  }
76 
77  }else if (side == X2_BEG){
78 
79  X2_BEG_LOOP(k,j,i){
80  D_EXPAND( ,
81  emf->ezi[k][j][i] = emf->ezi[k][JBEG][i]; ,
82  emf->exk[k][j][i] = emf->exk[k][JBEG][i];
83  )
84  }
85 
86  }else if (side == X2_END){
87 
88  X2_END_LOOP(k,j,i){
89  D_EXPAND( ,
90  emf->ezi[k][j][i] = emf->ezi[k][JEND][i]; ,
91  emf->exk[k][j][i] = emf->exk[k][JEND][i];
92  )
93  }
94 
95  }else if (side == X3_BEG){
96 
97  X3_BEG_LOOP(k,j,i){
98  emf->exj[k][j][i] = emf->exj[KBEG][j][i];
99  emf->eyi[k][j][i] = emf->eyi[KBEG][j][i];
100  }
101 
102  }else if (side == X3_END){
103 
104  X3_END_LOOP(k,j,i){
105  emf->exj[k][j][i] = emf->exj[KEND][j][i];
106  emf->eyi[k][j][i] = emf->eyi[KEND][j][i];
107  }
108 
109  }
110 }
#define X3_BEG
Boundary region at X3 beg.
Definition: pluto.h:150
#define X1_BEG
Boundary region at X1 beg.
Definition: pluto.h:146
#define X3_END_LOOP(k, j, i)
Definition: macros.h:52
#define X1_END
Boundary region at X1 end.
Definition: pluto.h:147
#define X2_BEG_LOOP(k, j, i)
Definition: macros.h:47
double *** ezi
Ez available at x-faces (i+1/2);.
Definition: ct.h:79
#define X2_END_LOOP(k, j, i)
Definition: macros.h:51
double *** exk
Ex available at z-faces (k+1/2);.
Definition: ct.h:76
#define X2_END
Boundary region at X2 end.
Definition: pluto.h:149
int j
Definition: analysis.c:2
long int IEND
Upper grid index of the computational domain in the the X1 direction for the local processor...
Definition: globals.h:37
int k
Definition: analysis.c:2
#define X1_END_LOOP(k, j, i)
Definition: macros.h:50
#define X3_END
Boundary region at X3 end.
Definition: pluto.h:151
double *** eyi
Ey available at x-faces (i+1/2);.
Definition: ct.h:77
D_EXPAND(tot/[n]=(double) grid[IDIR].np_int_glob;, tot/[n]=(double) grid[JDIR].np_int_glob;, tot/[n]=(double) grid[KDIR].np_int_glob;)
Definition: analysis.c:27
double *** eyk
Ey available at z-faces (k+1/2);.
Definition: ct.h:78
#define X1_BEG_LOOP(k, j, i)
Definition: macros.h:46
int i
Definition: analysis.c:2
double *** ezj
Ez available at y-faces (j+1/2);.
Definition: ct.h:80
#define FACE_EMF
Definition: ct.h:38
long int KBEG
Lower grid index of the computational domain in the the X3 direction for the local processor...
Definition: globals.h:43
#define X2_BEG
Boundary region at X2 beg.
Definition: pluto.h:148
long int KEND
Upper grid index of the computational domain in the the X3 direction for the local processor...
Definition: globals.h:45
long int JBEG
Lower grid index of the computational domain in the the X2 direction for the local processor...
Definition: globals.h:39
double *** exj
Ex available at y-faces (j+1/2);.
Definition: ct.h:75
long int JEND
Upper grid index of the computational domain in the the X2 direction for the local processor...
Definition: globals.h:41
#define X3_BEG_LOOP(k, j, i)
Definition: macros.h:48
long int IBEG
Lower grid index of the computational domain in the the X1 direction for the local processor...
Definition: globals.h:35

Here is the call graph for this function:

Here is the caller graph for this function: