亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? be5.c

?? 邊界元程序
?? C
字號:
#include "cbox5.h"main(){	float X[102],Y[102],Xm[101],Ym[101],Bc[101],F[101],Xi[21],Yi[21];	float u[21],q1[21],q2[21],D;	float G[101][101],H[101][101];	int Code[101],Dim;		/*[ Dim =Max dimension of the system AX = F. This number		must be equal or smaller than the dimension of Xm ]*/			Dim = 100;		/*[ Read input  ]*/	Input5(Xi,Yi,X,Y,Code,Bc);		/*[ Compute matrices G and H, and form the system A X = F ]*/	Sys5(X,Y,Xm,Ym,G,H,Bc,F,Code,Dim);			/*[Solve the system AX = F ]*/	Solve(G,F,&D,N,Dim);		/*[ Compute the potential at interior points ]*/	Inter5(Bc,F,Code,Xi,Yi,X,Y,u,q1,q2);		/*[ Output solution at boundary nodes and interior points ]*/	Out5(Xm,Ym,Bc,F,Xi,Yi,u,q1,q2);}void  Input5(Xi,Yi,X,Y,Code,Bc)		float Xi[21],Yi[21],X[102],Y[102],Bc[101];	int Code[101];	{		FILE  *infile, *outfile;		int i,j,k,lnsize;		char title[80],line1[100];		lnsize = 100; 		printf("\nNOTE:FIRST LINE IN INPUT FILE SHOULD BE THE TITLE OR LEFT BLANK NO DATA\n");        		printf("\n Enter the name of the input file:");        scanf("%s", inname);        printf("\n Enter the name of the output file:");        scanf("%s", outname);        printf("\n");               infile = fopen(inname, "r" );        outfile = fopen(outname,"w" );				fgets(line1,lnsize,infile);		fprintf(outfile,"%s\nInput \n",line1);						fscanf(infile,"%d %d %d",&N,&L,&M);		fprintf(outfile," \nNumber of Boundary Elements = %d \n",N);		fprintf(outfile,"Number of Interior Points = %d \n",L);								if(M > 0)		{			fprintf(outfile,"Number of different Boundaries = %d \n \n",M);			for(i=1;i<=M;i++)			{				fscanf(infile,"%d",&Last[i]);				fprintf(outfile,"Last node on  boundary %2d = %2d \n",i,Last[i]);			}		}		fprintf(outfile," \nCordinates of The Extreme"); 		fprintf(outfile," Points of the Boundary Elements \n"); 		fprintf(outfile,"\nPoint    X          Y \n");		for(i=1;i<=N;i++)		 { 		   fscanf(infile,"%f %f",&X[i],&Y[i]);		   fprintf(outfile,"%2d %10.4f %10.4f \n",i,X[i],Y[i]);		 }		fprintf(outfile," \n \n");		  /*[ Read boundary conditions in Bc[i] vector; if Code[i] = 0,  the Bc[i] value is a known potential; if Code[i] = 1, the Bc[i] value is a known potential derivative (flux).]*/		fprintf(outfile,"Boundary Conditions \n");		fprintf(outfile,"\nNode		Code	Prescribed Value \n");		for(i=1;i<=N;i++)		{		  fscanf(infile,"%d %f",&Code[i],&Bc[i]);		  fprintf(outfile,"%2d \t\t\t%2d \t\t\t%10.4f \n",i,Code[i],Bc[i]);		}				fprintf(outfile," \n \n");/*[  Read coordinates of the interior points   ]*/		if( L)		 {		   fprintf(outfile," \nInterior Point Coordinates \n");		   fprintf(outfile,"\nPoint    Xi         Yi\n"); 		   for(i=1;i<=L;i++)		    {		     fscanf(infile,"%f %f",&Xi[i],&Yi[i]);			 fprintf(outfile,"%2d %10.4f %10.4f\n",i,Xi[i],Yi[i]);		    }		  }    		for(i=1;i<=80;i++)		fprintf(outfile,"*");		fprintf(outfile," \n");  		fclose(infile);		fclose(outfile);  }void Inter5(Bc,F,Code,Xi,Yi,X,Y,u,q1,q2)float Bc[101],F[101],Xi[21],Yi[21];float X[102],Y[102],u[21],q1[21],q2[21];int Code[101];{	int i,j,k,lk,kk,found;	float A,B,qx,qy,ux,uy,temp;		found = 0; 	/*[	Initialization ]*/	/*[ Rearrange the Bc and F arrays to store all values of the		potential in Bc and all potential derivatives in F ]*/				for(i=1;i<=N;i++)	{		if(Code[i] > 0)		{			temp = Bc[i];			Bc[i] = F[i];			F[i] = temp;		}	}	/*[ Compute the potential and fluxes at the interior points ]*/		if(L)	{		for(k=1;k<=L;k++)		{			u[k] = 0.0;			q1[k] = 0.0;			q2[k] = 0.0;			for(j=1;j<=N;j++)			{				if((M-1) > 0)				{					if(!(j-Last[1]))						kk = 1;					else						{							found = 0;							for(lk=2;lk<=M;lk++)							{								if(!(j-Last[lk]))								{									kk = Last[lk-1] + 1;									found = 1;									break;								}							}							if(!found)								kk = j + 1;														}				}				else					kk = j + 1;				Quad5(Xi[k],Yi[k],X[j],Y[j],X[kk],Y[kk],						&A,&B,&qx,&qy,&ux,&uy,1); 				u[k]   += F[j]*B - Bc[j]*A;				q1[k] += F[j]*ux - Bc[j]* qx;				q2[k] += F[j]*uy - Bc[j]* qy;			}			u[k]   /= 2 * pi;			q1[k] /= 2 * pi;			q2[k] /= 2 * pi;		}	}}void Out5(Xm,Ym,Bc,F,Xi,Yi,u,q1,q2)float Xm[101],Ym[101],Bc[101],F[101],Xi[21],Yi[21];float u[21],q1[21],q2[21];{	FILE *outfile;	int i,j,k;		outfile = fopen(outname,"a");			fprintf(outfile," \nResults \n\n");		fprintf(outfile,"\n            (X,Y)              u         q\n");		for(i=1;i<=N;i++)		fprintf(outfile,"(%10.4f, %10.4f) %10.4f %10.4f\n",					Xm[i],Ym[i],Bc[i],F[i]);						if(L)	{		fprintf(outfile,"\n\n\n		Interior Points \n\n");		fprintf(outfile,"          (Xi,Yi)              u         q_x       q_y\n");		for(k=1;k<=L;k++)			fprintf(outfile,"(%10.4f, %10.4f) %10.4f %10.4f %10.4f\n",						Xi[k],Yi[k],u[k],q1[k],q2[k]);	}			 	fclose(outfile);}  void Quad5(Xp,Yp,X1,Y1,X2,Y2,H,G,qx,qy,ux,uy,K)	float Xp,Yp,X1,Y1,X2,Y2,*H,*G;	float *qx,*qy,*ux,*uy;	int K;{    /*[ Program Quad5 :This function computes the integral of several nonsingular functions along the boundary elements using a four points Gauss Quadrature.If K = 0, the off-diagonal coefficients of the H and G matrices are computed; when K = 1, all coefficients needed to compute the potential and fluxes at the interior points are computed.Ra = Radius = Distance from the collocation point to the Gauss Integration points on the boundary element; nx,ny = components of the unit normal to the element; rx,ry,rn = Radius derivatives. See section 5.3.       ]*/const float Z[] = { 0.0,0.86113631,-0.86113631,0.33998104,-0.33998104};const float W[] = {0.0,0.34785485, 0.34785485,0.65214515, 0.65214515};float Xg[5],Yg[5];float Ax,Bx,Ay,By,HL,nx,ny,Ra,rx,ry,rn;int i;	Ax = (X2 - X1)/2;	Bx = (X2 + X1)/2;	Ay = (Y2 - Y1)/2;	By = (Y2 + Y1)/2;	HL = sqrt(SQ(Ax) + SQ(Ay));	nx =  Ay/HL;	ny = -Ax/HL;	(*G) = 0.0;	(*H) = 0.0;	(*ux)  = 0.0;	(*uy)  = 0.0;	(*qx)  = 0.0;	(*qy)  = 0.0;/*[ Compute G[x][y], H[x][y], qx, qy, ux, and uy ]*/  							for(i=1;i<=4;i++) 		{		  Xg[i] = Ax*Z[i] + Bx;		  Yg[i] = Ay*Z[i] + By;		  Ra = sqrt( SQ(Xp - Xg[i]) + SQ(Yp - Yg[i]));		  rx = (Xg[i]-Xp)/Ra;		  ry = (Yg[i]-Yp)/Ra;		  rn = rx*nx + ry*ny;		  if(K > 0)		    {			  (*ux) += rx*W[i]*HL/Ra;			  (*uy) += ry*W[i]*HL/Ra;			  (*qx) -= (( 2.0 * SQ(rx) -1.0)*nx + 2.0 *rx*ry*ny)*			  		  	W[i]*HL/SQ(Ra);			  			  (*qy) -= (( 2.0 * SQ(ry) -1.0)*ny + 2.0 *rx*ry*nx)*			  		  	W[i]*HL/SQ(Ra);			 }			 			  (*G) += log(1/Ra) * W[i]*HL;			  (*H) -= rn*W[i]*HL/Ra;		  }}void Diag5(X1,Y1,X2,Y2,G)float X1,Y1,X2,Y2,*G;{  float Ax,Ay,Li;  Ax = (X2 - X1)/2.0;  Ay = (Y2 - Y1)/2.0;  Li = sqrt(SQ(Ax) + SQ(Ay));  (*G) = 2* Li*(1.0 - log(Li)); }/*[ function  Solve : Solution of the linear systems of equations by the Gauss elimination method providing for interchanging rows when encountering a zero diagonal coeficient.A : System MatrixB:  Originally it contains the independent coefficients.  After solutions it	contains the values of the system unknowns.                            				   				N:  Actual number of unknowns.Dim: Row and Column Dimension of A. ]*/void Solve(A,B,D,N,Dim)	float A[101][101],B[101],*D;  /*[ D is assigned some value here ]*/  	int N,Dim;{	int N1,i,j,k,i1,l,k1,found;	float c;	/*[ found is a flag which is used to check if any non zero coeff is found ]*/				N1 = N - 1;	for(k=1;k<=N1;k++)	{		k1 = k + 1;		c = A[k][k];				if( (fabs(c) - tol) <=0 )		{			found = 0;			for(j=k1;j<=N;j++)  /*[Interchange rows to get Nonzero ]*/		        {            	if( (fabs(A[j][k]) - tol) > 0.0 )                 {				 	for(l=k;l<=N;l++)                    {                     	c = A[k][l];                        A[k][l] = A[j][l];                        A[j][l] = c;                     }				  		c = B[k];				  		B[k] = B[j];				  		B[j] = c;				  		c = A[k][k];						found = 1;		/*[ coeff is found ]*/						break;				}			}		 }		if(!found)		{			printf("Singularity in Row %d \n",k);	   		(*D) = 0.0;          	    	return;   /*[ If no coeff is found the control is transferred to main ]*/		}		/*[ Divide row by diagonal coefficient ]*/		  		c = A[k][k];		for(j = k1;j<=N;j++)		   A[k][j] /= c;		B[k] /= c;   /*[ Eliminate unknown X[k] from row i ]*/		for(i = k1;i<=N; i++)		{		  c = A[i][k];		  for(j = k1;j<= N;j++)		 	A[i][j] -= c*A[k][j];		  B[i] -= c*B[k];		}	}/*[ Compute the last unknown ]*/	if((fabs(A[N][N]) - tol) > 0.0)	{	   B[N] /= A[N][N];/*[Apply back substitution to compute the remaining unknowns  ]*/	   for(l = 1;l<= N1;l++)	   {	      k = N - l;	      k1 = k +1;	      for(j = k1;j<=N;j++)			B[k] -= A[k][j]*B[j];	   }/*[Compute the value of the determinent ]*/	(*D) = 1.0;	for(i=1;i<=N;i++)	  (*D) *= A[i][i];   }  else  {  		printf("Singularity in Row %d \n",k);	   	(*D) = 0.0;   }            return;	}void Sys5(X,Y,Xm,Ym,G,H,Bc,F,Code,Dim)float X[102],Y[102],Xm[101],Ym[101],G[101][101];float H[101][101],Bc[101],F[101];int Code[101],Dim;{	int i,j,k,kk,found;	float qx,qy,ux,uy,temp;		found = 0;	/*[ Initialization ]*/		/*[ This function computes the matrices G and H. and forms the system	 A X = F ]*/				X[N+1] = X[1];		Y[N+1] = Y[1];		for(i=1;i<=N;i++)		{			Xm[i] = (X[i] + X[i+1])/2.0;			Ym[i] = (Y[i] + Y[i+1])/2.0;		}				if((M-1) > 0)		{			Xm[Last[1]] = (X[Last[1]]  + X[1])/2.0;			Ym[Last[1]] = (Y[Last[1]]  + Y[1])/2.0;				for(k=2;k<=M;k++)			{				Xm[Last[k]] = (X[Last[k]]  + X[Last[k-1]+1])/2.0;				Ym[Last[k]] = (Y[Last[k]]  + Y[Last[k-1]+1])/2.0;			}		}			/*[ Compute the coefficients of G and H matrices ]*/			for(i=1;i<=N;i++)		{			for(j=1;j<=N;j++)			{				if((M-1) > 0)				{					if(!(j-Last[1]))						kk = 1;					else						{								found = 0;							for(k=2;k<=M;k++)							{								if(!(j-Last[k]))								{									kk = Last[k-1] + 1;									found = 1;									break;								}							}							if(!found)								kk = j + 1;						}				}				else					kk = j + 1;				if(i-j)				{						Quad5(Xm[i],Ym[i],X[j],Y[j],X[kk],Y[kk],&H[i][j],					&G[i][j],&qx,&qy,&ux,&uy,0);									}				else				{						Diag5(X[j],Y[j],X[kk],Y[kk],&G[i][j]);					H[i][j] = pi;  				}												}		}	/*[ Reorder the columns of the system of equations as in (5.28) 	 and form the system matrix A which is stored G]*/		for(j=1;j<=N;j++)	{		if(Code[j] > 0)		{			for(i=1;i<=N;i++)			{				temp = G[i][j];				G[i][j] = -H[i][j];				H[i][j] = -temp;			}		}	}	/*[ Form the right-side vector F which is stored in F ]*/		for(i=1;i<=N;i++)	{		F[i] = 0.0;		for(j=1;j<=N;j++)			F[i] += H[i][j] * Bc[j];	}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情资源网| 一区二区三区精品| 在线视频国产一区| 加勒比av一区二区| 一区二区三区欧美在线观看| 精品999在线播放| 欧美另类变人与禽xxxxx| a级高清视频欧美日韩| 精品一区二区三区视频 | 国产欧美日韩亚州综合 | 国产精品高潮久久久久无| 欧美一区二区三区四区在线观看| 成人涩涩免费视频| 九色porny丨国产精品| 亚洲一区二区三区四区在线免费观看 | 欧美日韩你懂得| jlzzjlzz亚洲女人18| 国产精品一品视频| 免费一区二区视频| 偷窥国产亚洲免费视频| 亚洲靠逼com| 亚洲欧洲日韩女同| 亚洲国产高清在线观看视频| 精品精品欲导航| 日韩一级完整毛片| 欧美一区二区三区在线| 欧美丰满高潮xxxx喷水动漫| 欧美日韩三级在线| 欧美高清一级片在线| 欧美性生活影院| 欧美日韩国产小视频| 在线看一区二区| 日本韩国欧美三级| 欧美亚洲另类激情小说| 在线视频一区二区三| 欧洲一区在线电影| 欧美在线观看18| 精品视频999| 91麻豆精品国产综合久久久久久| 欧美电影在线免费观看| 在线不卡中文字幕| 日韩一区二区三| 精品国产乱子伦一区| 久久久天堂av| 国产精品久久久久久亚洲伦| 中文字幕中文字幕一区二区| 国产精品久久久久久久久图文区| 中文字幕一区二区三区色视频 | 国产精品免费人成网站| 国产精品久久久久久久久动漫| 亚洲国产精品精华液2区45| 国产精品五月天| 亚洲丝袜美腿综合| 亚洲大型综合色站| 九色porny丨国产精品| 国产精品456露脸| 91视视频在线直接观看在线看网页在线看| 成人a免费在线看| 在线日韩av片| 日韩视频免费观看高清完整版 | 精品捆绑美女sm三区| 国产欧美综合在线| 亚洲色大成网站www久久九九| 亚洲视频一区在线观看| 午夜影院在线观看欧美| 久久丁香综合五月国产三级网站| 国产一区欧美二区| 在线亚洲一区二区| 日韩女优电影在线观看| 日韩电影免费在线看| 九一久久久久久| 成人三级伦理片| 欧美性videosxxxxx| 日韩三级精品电影久久久 | 在线国产亚洲欧美| 欧美成人女星排行榜| 中文字幕第一页久久| 亚洲一区在线电影| 国产精品影视网| 91黄色免费看| 久久久噜噜噜久久中文字幕色伊伊| 国产欧美一区二区三区网站| 亚洲成人激情综合网| 成人网男人的天堂| 日韩一区二区三区免费看| 国产精品久久二区二区| 免费观看在线色综合| 99精品偷自拍| 久久综合久久久久88| 亚洲观看高清完整版在线观看 | 91黄色免费版| 国产区在线观看成人精品| 五月天激情小说综合| 成人免费观看视频| 日韩欧美激情在线| 一区二区三区日本| 粉嫩在线一区二区三区视频| 欧美二区在线观看| 综合激情成人伊人| 国产福利视频一区二区三区| 欧美日韩国产一级片| 亚洲天堂成人在线观看| 国产一区二区不卡| 日韩一级黄色片| 亚洲一区二区三区精品在线| 波多野结衣亚洲一区| 欧美成人精品高清在线播放| 偷拍一区二区三区| 欧美影院午夜播放| 中文字幕一区av| 成人性生交大合| 久久久久久久久久看片| 久久精品国产亚洲一区二区三区| 91国产免费观看| 国产精品久久久久9999吃药| 国产二区国产一区在线观看| 日韩欧美国产1| 日韩黄色免费电影| 欧美日韩免费观看一区二区三区| 亚洲欧洲色图综合| 91亚洲午夜精品久久久久久| 日本一区二区三区四区| 国产一区二区免费视频| 精品三级在线看| 久久精品久久综合| 精品国产麻豆免费人成网站| 美女一区二区在线观看| 欧美高清性hdvideosex| 舔着乳尖日韩一区| 制服.丝袜.亚洲.另类.中文| 天天操天天色综合| 91.xcao| 蜜桃视频在线观看一区| 91精选在线观看| 免费精品视频在线| 日韩欧美你懂的| 久久99精品久久久久久国产越南 | 粗大黑人巨茎大战欧美成人| 国产三级精品三级| 成人午夜视频在线| 国产精品福利影院| 欧美中文字幕一区| 视频一区中文字幕国产| 欧美一卡二卡在线| 极品少妇一区二区三区精品视频| 欧美成人精精品一区二区频| 极品少妇xxxx精品少妇偷拍| 国产午夜亚洲精品不卡| 国产成人亚洲综合a∨婷婷| 中文字幕乱码日本亚洲一区二区| 成人自拍视频在线| 樱花影视一区二区| 欧美一区二区三区影视| 国内精品第一页| 国产精品久久久久aaaa樱花| 99re这里只有精品视频首页| 一区二区三区不卡在线观看| 欧美日韩精品一区二区| 久久精品免费观看| 国产欧美日韩在线看| 一本一道波多野结衣一区二区| 亚洲无线码一区二区三区| 欧美一区二区三区四区在线观看| 国产麻豆视频一区| 亚洲码国产岛国毛片在线| 欧美日韩国产首页| 久久99热99| 亚洲天堂成人在线观看| 欧美夫妻性生活| 丁香六月久久综合狠狠色| 亚洲欧美激情在线| 欧美mv日韩mv| 色视频成人在线观看免| 久久精品国产一区二区三 | 91香蕉视频黄| 亚洲1区2区3区4区| 国产视频在线观看一区二区三区| 在线观看av不卡| 国产精品1024久久| 亚洲国产精品嫩草影院| 精品91自产拍在线观看一区| 99精品黄色片免费大全| 欧美bbbbb| 一区在线观看免费| 精品久久人人做人人爱| 91理论电影在线观看| 久久99久久久久| 一卡二卡欧美日韩| 久久青草欧美一区二区三区| 欧美视频一区二区三区| 成人毛片老司机大片| 日韩黄色一级片| 亚洲美女一区二区三区| 国产性做久久久久久| 日韩午夜激情视频| 在线观看亚洲精品视频| 成人深夜福利app| 黑人精品欧美一区二区蜜桃| 丝袜美腿高跟呻吟高潮一区| 中文字幕在线一区二区三区|