Logo Search packages:      
Sourcecode: qtpfsgui version File versions

pde.cpp File Reference


Detailed Description

Solving Partial Differential Equations.

Full Multigrid Algorithm and Successive Overrelaxation.

Author:
Grzegorz Krawczyk, <krawczyk@mpi-sb.mpg.de>

Rafal Mantiuk, <mantiuk@mpi-sb.mpg.de>

Some code from Numerical Recipes in C

This file is a part of Qtpfsgui package, based on pfstmo. ---------------------------------------------------------------------- Copyright (C) 2003,2004 Grzegorz Krawczyk

This program 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; either version 2 of the License, or (at your option) any later version.

This program 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ----------------------------------------------------------------------

Id
pde.cpp,v 1.7 2005/11/29 18:36:55 aefremov Exp

Definition in file pde.cpp.

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "../../Libpfs/array2d.h"
#include "pde.h"

Go to the source code of this file.

Defines

#define BCG_STEPS   20
#define EPS   1.0e-12
#define MINS   16
#define MODYF   0
#define SMOOTH_IT   1
#define V_CYCLE   2

Functions

void add_correction (pfs::Array2D *U, pfs::Array2D *C)
void asolve (unsigned long, float b[], float x[], int)
void atimes (unsigned long, float x[], float res[], int)
void calculate_defect (pfs::Array2D *D, pfs::Array2D *U, pfs::Array2D *F)
void exact_sollution (pfs::Array2D *F, pfs::Array2D *U)
int idx (int r, int c)
void linbcg (unsigned long n, float b[], float x[], int itol, float tol, int itmax, int *iter, float *err)
float max (float a, float b)
float min (float a, float b)
void prolongate (const pfs::Array2D *in, pfs::Array2D *out)
void prolongate_old (pfs::Array2D *F, pfs::Array2D *T)
void restrict (const pfs::Array2D *in, pfs::Array2D *out)
 !: for debugging purposes
void smooth (pfs::Array2DImpl *U, pfs::Array2DImpl *F)
float snrm (unsigned long n, float sx[], int itol)
void solve_pde_multigrid (pfs::Array2D *F, pfs::Array2D *U)
 solve pde using full multrigrid algorithm
void solve_pde_sor (pfs::Array2D *F, pfs::Array2D *U, int maxits)
 solve pde using successive overrelaxation

Variables

static int cols
static int rows


Generated by  Doxygen 1.6.0   Back to index