Main Page | Directories | File List | File Members

read_neighbourhood_table.h

Go to the documentation of this file.
00001 /*
00002    This file belongs to Aeneas. Aeneas is a GNU package released under GPL 3.
00003    This code is a simulator for Submicron 3D Semiconductor Devices. 
00004    It implements the Monte Carlo transport in 3D tetrahedra meshes
00005    for the simulation of the semiclassical Boltzmann equation for both electrons.
00006    It also includes all the relevant quantum effects for nanodevices.
00007 
00008    Copyright (C) 2007 Jean Michel Sellier <sellier@dmi.unict.it>
00009  
00010    This program is free software; you can redistribute it and/or modify
00011    it under the terms of the GNU General Public License as published by
00012    the Free Software Foundation; either version 3, or (at your option)
00013    any later version.
00014 
00015    This program is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU General Public License for more details.
00019 
00020    You should have received a copy of the GNU General Public License
00021    along with this program. If not, see <http://www.gnu.org/licenses/>.
00022 */
00023 
00024 // Created on : 09 june 2007, Siracusa, Jean Michel Sellier
00025 // Last modified : 16 september 2007, Siracusa, Jean Michel Sellier
00026 
00027 // simply read the precedently calculated neighbourhood table
00028 
00029 void read_neighbourhood_table(void)
00030 {
00031  int i,j;
00032  FILE *fp;
00033  
00034 // this is for the non-neighboring faces elements
00035  for(i=0;i<Ne;i++) for(j=0;j<4;j++) vois[j][i]=-1;
00036 
00037 // open the input file where the computed neighbourhood table has been saved
00038  fp=fopen("neighbourhood_table.dat","r");
00039  if(fp==NULL){
00040   printf("read_neighbourhood_table error : problem in opening the file!\n");
00041   exit(0);
00042  }
00043 // read the data
00044  for(i=0;i<Ne;i++) for(j=0;j<4;j++) fscanf(fp,"%d",&vois[j][i]);
00045 
00046 // output on the screen
00047 // for(i=0;i<Ne;i++){
00048 //    for(j=0;j<4;j++) printf("%d ",vois[j][i]);
00049 //    printf("\n");
00050 // }
00051 // close the input file
00052  fclose(fp);
00053 }

© sourcejam.com 2005-2008