Source: header.h


Annotated List
Files
Globals
Hierarchy
Index
//	general header for all functions in directory

#ifndef HEADER_FILE
#define HEADER_FILE

#include 
using namespace std;
#include 

//	----------	dexx.cpp	--------------
void Send_ProcD(const int to, const int nin, const double xin[], const MPI::Intracomm& icomm);

void Recv_ProcD(const int from, int& nout, double xout[], const int maxbuf, 
	MPI::Intracomm& icomm);

void ExchangeD(const int yourid, const int nin, const double xin[],
	int& nout, double xout[], const int maxbuf, const MPI::Intracomm& icomm);
	

//	----------	debugd.cpp	--------------

void DebugD(const int n, const double x[]);


//	----------	vdop.cpp	--------------

void vdcopy(const int n, double xp[], const int ix, 
                   const double yp[], const int iy);

void vdplus(const int n, double x[], const int ix, 
                   const double y[], const int iy, 
		   const double z[], const int iz);

void vddiv(const int n,  double x[], const int ix, 
                   const double y[], const int iy, 
		   const double z[], const int iz);

void vdmult(const int n, double x[], const int ix, 
                   const double y[], const int iy, 
		   const double z[], const int iz);

double dscapr(const int n, const double x[], const double y[]);

void vdaxpy(const int n, double x[], const double y[], 
                   const double& a,  const double z[] );

void vicopy(const int n, int xp[], const int ix, 
                   const int yp[], const int iy);

//	----------	vdop.cpp	--------------

/*
   (0,1) * (0,1) is divided into procx * procy subdomains 
   numbered row by row,
   according to myid, the array neigh contains the id's
   of the neighbors at South, East, North, West
   
	IN:  	myid	  process id
		procx	  number of subdomains in x-direction
		procy	  number of subdomains in x-direction
	OUT     neigh     id's of neighbors
		color     black/white coloring (check board) of subdomains   	
*/
void IniGeom(const int myid, const int procx, const int procy, int neigh[], int& color);

/* 
   (0,1) * (0,1) is divided into procx * procy subdomains 
   numbered row by row,
   according to myid, the coordinates of the lower left corner
   (xl,yb) and the upper right corner (xr,yt) are generated

	IN:  	myid	  process id
		procx	  number of subdomains in x-direction
		procy	  number of subdomains in x-direction
	OUT:    (xl,yb)   coordinates of the lower left corner
		(xr,yt)   coordinates the upper right corner
*/

void IniCoord(const int myid, const int procx, const int procy, 
	      double& xl, double& xr, double& yb, double& yt);


//	----------	addbound.cpp	--------------

/*
	Compute w:= w + s at nodes on  the boundary
	South (ib==1), East (ib==2), North (ib==3), West (ib==4)
 	
	IN:	ib	define piece of boundary
		nx, ny  number of intervals in x/y direction
		s	vector of boundary values
	I/O:	w	vector
*/

void AddBound(const int ib, const int nx, const int ny, double w[], const double s[]);


//	----------	getbound.cpp	--------------

/*
	Copy the values of w corresponding to the boundary
	South (ib==1), East (ib==2), North (ib==3), West (ib==4)
	onto s 
	
	IN:	ib	define piece of boundary
		nx, ny  number of intervals in x/y direction
		w	vector
	OUT:	s	vector of boundary values
*/
	
void GetBound(const int ib, const int nx, const int ny, const double w[], double s[]);


//	----------	vecaccu.cpp	--------------

void VecAccu(const int nx, const int ny, double w[], 
	const int neigh[], const int color, const MPI::Intracomm& icomm);

void FreeVecAccu();

//	----------	skalar.cpp	--------------

double skalar(const int n, const double x[], const double y[], const MPI::Intracomm& icomm);

//	----------	userset.cpp	--------------

void SetU(const int nx, const int ny, double u[]);
void SetF(const int nx, const int ny, double f[]);
double FunctF(const double& x, const double& y);
double FunctU(const double& x, const double& y);

//	----------	savevekp.cpp	--------------

void SaveVectorP(const int myid, const string& name, const double u[], 
		 const int nx, const int ny, 
		 const double& xl, const double& xr, const double& yb, const double& yt);

//	----------	accudiag.cpp	--------------

void AccuDiag(const int nx, const int ny, const double sk[], const int id[], double d[], 
	const int neigh[], const int color, const MPI::Intracomm& icomm);

//	----------	applybc.cpp	--------------

void ApplyDirichletBC(const int nx, const int ny, const int neigh[], 
	const double u[], double sk[], const int id[], const int* , double f[]);

//	----------	crsmult.cpp	--------------

void  CrsMult(const int iza, const int ize, double w[], const double u[], 
	const int id[], const int ik[], const double sk[], const double& alfa);

//	----------	jacsolve.cpp	--------------

void JacobiSolve(const int nx, const int ny, 
	const int neigh[], const int color, const MPI::Intracomm& icomm, 
	const double sk[], const int id[], const int ik[], 
	const double f[], double u[] );


//	----------	getmatrix.cpp	--------------


void GetCoordsInRectangle(const int nx, const int ny, 
	const double& xl, const double& xr, const double& yb, const double& yt, 
	double xc[]);

void GetConnectivityInRectangle(const int nx, const int ny, int ia[]);

void GetMatrixpointersInRectangle(const int nx, const int ny, int id[], int ik[]);

void CalcElem(const int ial[3], const double xc[], double ske[3][3], double fe[3]);

void AddElem(const int ial[3], const double ske[3][3], const double fe[3], 
	double sk[], const int id[], const int ik[], double f[]);

void DebugMatrix(const int nnode, const double sk[], const int id[], const int ik[]);

void GetMatrix(const int nx, const int ny, 
		const double& xl, const double& xr, const double& yb, const double& yt, 
		double sk[], int id[], int ik[], double f[]);

















#endif

Generated by: ghaase on mephisto on Fri Apr 11 18:03:43 2008, using kdoc 2.0a54.