/*------------------------------------------------------------------------ * Copyright (C) 2015 For the list of authors, see file AUTHORS. * * This file is part of IFOS3D. * * IFOS3D is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 2.0 of the License only. * * IFOS3D is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with IFOS3D. See file COPYING and/or * . --------------------------------------------------------------------------*/ /* $Id: absorb.c,v 1.1.1.1 2009/12/09 14:29:22 sjetschny Exp $ */ /* * Create dissipative boundaries around the model grid * The dissipative coefficients are stored in the 3-D array * absorb_coeff. The interior of the model is weighted by the * coefficient 1. In the absorbing frame the coefficients * are less than one. Coefficients are computed using * exponential damping (see Cerjan et al., 1985, * Geophysics, 50, 705-708) * */ #include "fd.h" void absorb(float *** absorb_coeff){ /* extern variables */ extern float DAMPING; extern int FREE_SURF, NX, NY, NZ, BOUNDARY, FW; extern int NPROCX, NPROCY, NPROCZ, MYID, POS[4]; /* local variables */ int i, j, k, ifw, ii, jj, kk, xb, yb, zb, xe, ye, ze; float amp, a, *coeff; char modfile[STRING_SIZE]; extern FILE *FP; if (MYID==0){ fprintf(FP,"\n **Message from absorb (printed by PE %d):\n",MYID); fprintf(FP," Coefficients for absorbing frame are now calculated.\n"); fprintf(FP," Width of dissipative frame (grid points)= %i\n",FW); if ((((NX)