d_Helmholtz_3D accuracy

d_Helmholtz_3D accuracy

Portrait de Ahmad Falahatpisheh

What is the accuracy of d_Helmholtz_3D? I would like to know what the residual error is after solving the equation.

Thanks.

15 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Alexander Kalinkin (Intel)
Best Reply

Hi, d_Helmholtz_3D is the direct solver of matrix correspond of 7-point grid Helmholtz equation. So its provide accuracy based on floating operations. With best regards, Alexander Kalinkin

Portrait de Ahmad Falahatpisheh

since it is double precision, does it mean the accuracy is 1E-16?

Portrait de Alexander Kalinkin (Intel)

Not equal but about it. With best regards, Alexander Kalinkin

Portrait de Ahmad Falahatpisheh

Dear Alexander,

I checked the accuracy of d_Helmholtz_3D and it was much much larger than 1E-16. Since the solver uses a standard seven-point discretization, I verified the accuracy by the following code. (I have a uniform mesh for my problem.)

for ( k=1; k
	{

		for (j=1; j
		{

			for (i=1; i
			{

				phi_ijk   = Phi->GetTuple(  i    +  j   *NX +  k   *NX*NY);

				phi_im1jk = Phi->GetTuple( (i-1) +  j   *NX +  k   *NX*NY);

				phi_ip1jk = Phi->GetTuple( (i+1) +  j   *NX +  k   *NX*NY);

				phi_ijm1k = Phi->GetTuple(  i    + (j-1)*NX +  k   *NX*NY);

				phi_ijp1k = Phi->GetTuple(  i    + (j+1)*NX +  k   *NX*NY);

				phi_ijkm1 = Phi->GetTuple(  i    +  j   *NX + (k-1)*NX*NY);

				phi_ijkp1 = Phi->GetTuple(  i    +  j   *NX + (k+1)*NX*NY);
				X_i   = X->GetTuple( i   );

				X_im1 = X->GetTuple( i-1 );
				Y_j   = Y->GetTuple( j   );

				Y_jm1 = Y->GetTuple( j-1 );
				Z_k   = Z->GetTuple( k   );

				Z_km1 = Z->GetTuple( k-1 );
				rhs= f->GetTuple( i + j*NX+ k*NX*NY);
				res = ( phi_im1jk + phi_ip1jk - 2*phi_ijk)/pow( X_i - X_im1, 2 ) +

					  ( phi_ijm1k + phi_ijp1k - 2*phi_ijk)/pow( Y_j - Y_jm1, 2 ) +

					  ( phi_ijkm1 + phi_ijkp1 - 2*phi_ijk)/pow( Z_k - Z_km1, 2 ) +

					    rhs;
			}

		}

	}

When I print res, the residual is about 1E-1. Is there something that I have to be careful when using the function? I need to have an accuracy about 1E-16. Please advise.

Thanks,
Ahmad

Portrait de Alexander Kalinkin (Intel)

Hi Ahmad, To verify it I need to have full example with rhs and boundary condition. Could you provide this example to me by e'mail or by private answer? With best regards, Alexander Kalinkin

Portrait de Ahmad Falahatpisheh

Alexander,

I found a bug in my code which misled me to the see large residuals. I fixed it and the error now is about 1E-15.

Thanks,
Ahmad

Portrait de Alexander Kalinkin (Intel)

Hi Ahmad, Nice to hear it, feel free to ask any question about PL in particular and MKL in general. With best regards, Alexander Kalinkin

Portrait de Ahmad Falahatpisheh

Hi Alexander,

I have another question. The solver is for uniform mesh. Does this mean that it has to have dx=dy=dz? Or we can have dx!=dy!=dz (constant dx, dy, dz everywhere in the domain)?

Thanks,
Ahmad

Portrait de Alexander Kalinkin (Intel)

Hi Ahmad, The uniform mesh mean that all mesh steps are equals in one direction, but mesh sizes for different dimension could be differ. For example hx=0.2, hy=0.5, hz=0.1. With best regards, Alexander Kalinkin

Portrait de Ahmad Falahatpisheh

I am writing a journal paper in which I have used d_Helmholtz. Regarding the 7-point grid Helmholtz equation, can I have the name of the method by which the system is solved?

Thanks,
Ahmad

Portrait de Alexander Kalinkin (Intel)

Hi Ahmad, The main information could be in paper prepared by us a several years ago so feel free to use it. With best regards, Alexander Kalinkin

Portrait de Ahmad Falahatpisheh

Thanks. You helped me a lot.
Best,
Ahmad

Portrait de Ahmad Falahatpisheh

Hi Alexander,

I didn't find the method by which the library solves the system. Is it gradient bi-conjugate,
multigrid, overrelaxation, or Fourier? I would appreciate it.

Thanks,
Ahmad

Portrait de Alexander Kalinkin (Intel)

Hi Ahmad, Poisson library based on Fourier decomposition for elliptic problems with separable variables. With best regards, Alexander Kalinkin

Connectez-vous pour laisser un commentaire.