Main Page | Directories | File List | File Members

finite_element_3D_poisson.h

Go to the documentation of this file.
00001 /*
00002    This file belongs to Aeneas. Aeneas is a GNU package released under GPL 3 license.
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 
00025 /*
00026  ************************************************************************
00027 
00028   Program Name              : AENEAS
00029   Version                   : 1.0
00030   File Name                 : finite_element_3D_poisson.c
00031   Programmer                : Jean Michel Sellier
00032   Copyright                 : 2005, 2006, 2007, Jean Michel Sellier
00033   Created on                : 30 may 2005 Siracusa (PETSC_POISSON_3D.c)
00034   Last modified on          : 07 jun.2007 Siracusa
00035   Description               : Computes the electrostatic potential on a device
00036                               described by the simple Poisson equation :
00037                               -\nabla^2 (\phi) = 0.0
00038                               The numerical method is the Finite Element Method
00039                               using the P1 Lagrange finite element.
00040   Dependencies              : None
00041   Important bibliography    : Elements finis: theorie, applications, mise en oeuvre ,
00042                               Alexandre Ern, Jean-Luc Guermond, SMAI, Springer (french book).
00043 
00044   ************************************************************************
00045 */
00046 
00047 // itol is 1,2,3 or 4, specifying which convergence test is applied (see below)
00048 // itmax is the maximum number of allowed iterations
00049 // tol is the desired convergence tollerance
00050 // On output, x[1..n] is reset to the improved solution
00051 // iter is the number of iterations actually taken
00052 // err is the estimated error
00053 
00054 void poisson3D(double x[],int itol,double tol,int itmax)
00055 {
00056  printf("\nSolving the 3D Poisson equation...\n");
00057   
00058 // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
00059 // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
00060   linbcg(Ng,b,x,itol,tol,itmax);
00061 // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
00062 // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
00063 
00064   printf("Poisson equation solved...\n\n");
00065 }

© sourcejam.com 2005-2008