Main Page   Data Structures   File List   Data Fields   Globals  

make_bc_periodic.c

Go to the documentation of this file.
00001 /*----------------------------------------------------------------------------*/
00002 /* SCCS Information: %W%    %G% */
00003 /*----------------------------------------------------------------------------*/
00004 #include "utilf.h"
00005 #include "make_bc_periodic.h"
00006 
00007 void bc_scalar_periodic(real2D u, int nx, int ny)
00008 {
00009   int j; 
00010   for (j = 1; j <= ny; j++)
00011     {
00012       u[1][j] = u[nx - 1][j];
00013       u[nx][j] = u[2][j];
00014     }
00015 }
00016 
00017 
00018 void bc_vector_periodic(real2D u, real2D v, int nx, int ny)
00019 {
00020   int j; 
00021   for (j = 1; j <= ny; j++)
00022     {
00023       u[1][j] = u[nx - 1][j];
00024       u[nx][j] = u[2][j];
00025       v[1][j] = v[nx - 1][j];
00026       v[nx][j] = v[2][j];
00027     }
00028 }
00029 
00030 
00031 void bc_tensor_periodic(real2D S11, real2D S22, real2D S12, 
00032                         int nx, int ny)
00033 {
00034   int j; 
00035   for (j = 1; j <= ny; j++)
00036     {
00037       S11[1][j] = S11[nx - 1][j];
00038       S11[nx][j] = S11[2][j];
00039       S22[1][j] = S22[nx - 1][j];
00040       S22[nx][j] = S22[2][j];
00041       S12[1][j] = S12[nx - 1][j];
00042       S12[nx][j] = S12[2][j];
00043     }
00044 }

Generated on Wed Feb 19 22:26:49 2003 for Markers by doxygen1.2.18