[Getdp] result all zero

Lin Ji jil at rpi.edu
Thu Oct 25 23:45:54 CEST 2001


Hello,
    I am trying to solve the Helmholtz equation (Fourier transform of the
wave equation in time) just for one frequency but get all zero result. Can
you take a look of my .pro and SOLVER.PAR file? I am using getdp-0.821.
    Also, is the parameter setting in SOLVER.PAR very important for solving a
particular PDE? I am not so familiar with choosing the various algorithms.
Could you recommend some books on the suject. The book
       Iterative methods for sparse linear systems
by Y. Saad you recommend before is outof print.
     Thanks.

Lin Ji


-- 
Dept. of Math., RPI
518-276,6904 (work)
-------------- next part --------------

/*
  The helmholtz equation for the 2D accoustic wave equation
*/

Group {
  Omega = Region[1] ;
  Gamma_u = Region[3] ;
  Gamma_f = Region[2] ;
}

Function {
  pi   = 3.1415926;
  Freq = 1 ;  

// parameters about mu
  wx_mu = .02;
  wy_mu = .05;
  xc_mu = 0.1;
  yc_mu = 0.0;
  A_mu  = 2; 

// parameters about source
  tau_c  = 2*pi*40;
  wt_src = .04;
  wy_src = .02;
  tc_src = .02;
  yc_src = 0.0;
  A_src  = 1;

// compute mu (and sound speed)
  x2[] = ((X[]-xc_mu)/wx_mu)^2;
  y2[] = ((Y[]-yc_mu)/wy_mu)^2;
  mu[] = 1+A_mu*Exp[-(x2[]+y2[])/2] ;
/*
  mu[] = 1.0;
*/
  c[]  = Sqrt[mu[]];

// set up the source
  SpaceFct[] = A_src/(wy_src*Sqrt[2*pi])*Exp[-((Y[]-yc_src)/wy_src)^2/2];
  FreqFct[]  = (1+Exp[-2*(wt_src*tau_c)^2])/2;

  f_bc[] = SpaceFct[]*FreqFct[] ;
}

Constraint {
  { Name Dirichlet; Type Assign;
    Case {
      //{ Region Gamma_u  ; Value 0; }
    }
  }
}

Jacobian {
  { Name JVol ;
    Case { 
      { Region All ; Jacobian Vol ; }
    }
  }
  { Name JSur ;
    Case {
      { Region All ; Jacobian Sur ; }
    }
  }
}

Integration {
  { Name I1 ;
    Case { 
      { Type Gauss ;
        Case { 
	  { GeoElement Point       ; NumberOfPoints  1 ; }
	  { GeoElement Line        ; NumberOfPoints  4 ; }
	  { GeoElement Triangle    ; NumberOfPoints  6 ; }
	  { GeoElement Quadrangle  ; NumberOfPoints  6 ; }
	  { GeoElement Tetrahedron ; NumberOfPoints  6 ; }
	  { GeoElement Hexahedron  ; NumberOfPoints  8 ; }
	  { GeoElement Prism       ; NumberOfPoints  8 ; } 
	}
      }
    }
  }
}

FunctionSpace {
  { Name Hgrad; Type Form0;
    BasisFunction {
      { Name sn; NameOfCoef un; Function BF_Node; 
        Support Region[{Omega,Gamma_f}]; Entity NodesOf[All]; }
      { Name sn2; NameOfCoef un2; Function BF_Node_2E; 
        Support Region[{Omega,Gamma_f}]; Entity EdgesOf[All]; }
    }
    Constraint {
      { NameOfCoef un; EntityType NodesOf ; NameOfConstraint Dirichlet; }
      { NameOfCoef un2; EntityType EdgesOf ; NameOfConstraint Dirichlet; }
   }
  }
}

Formulation {
  { Name hhltz; Type FemEquation; 
    Quantity { 
      { Name u; Type Local; NameOfSpace Hgrad; }
    }
    Equation {
      Galerkin { [ tau_c*tau_c/mu[] * Dof{u} , {u} ]; 
                 In Omega; Integration I1; Jacobian JVol;  }

      Galerkin { [ -Dof{d u} , {d u} ]; 
                 In Omega; Integration I1; Jacobian JVol;  }

      Galerkin {  [ f_bc[] , {u} ]; 
                 In Gamma_f; Integration I1; Jacobian JSur;  }
    }
  }
}

Resolution {
  { Name hhltz;
    System {
      { Name A; NameOfFormulation hhltz; }
    }
    Operation { 
      Generate[A] ; 
      Solve[A] ; 
      SaveSolution[A] ; 
    } 
  }
}

PostProcessing {
  { Name hhltz; NameOfFormulation hhltz; NameOfSystem A;
    Quantity {
      { Name u;  
        Value{ 
	  Local{ [ {u} ] ; In Omega; Jacobian JVol; } 
	} 
      }
      /*
      { Name du;  
        Value{ 
	  Local{ [ {d u} ] ; In Omega; Jacobian JVol; }
	} 
      }
      { Name u2; 
        Value{ 
	  Local{ [ Norm[{u}] ] ; In Omega; Jacobian JVol; } 
	} 
      }
      */
    }
  }
  /*
  { Name Wave_f; NameOfFormulation Wave; NameOfSystem C;
    Quantity {
      { Name u;  
        Value{ 
	  Local{ [ {u} ] ; In Omega; Jacobian JVol; } 
	} 
      }
    }
  }
  */
}

PostOperation {
  { Name u ; NameOfPostProcessing hhltz;
    Operation {
      Print[ u, OnPlane { {0,-.75,0} {0.75,-.75,0} {0,.75,0} } {150,300} ,
       Format Table, File "uh.pos" ] ;
/*
      Print[ u, OnPlane { {0,-.5,0} {0.5,-.5,0} {0,.5,0} } {100,200} ,
       Format TimeTable,
       File "u.pos" ] ;
*/
    }
  }

}

-------------- next part --------------
/*

Matrix_Format : 
    - 1  Sparse 
    - 2  Full 
    - default : 1

Matrix_Printing : Disk write ('fort.*') 
    - 1  matrix (csr) 
    - 2  preconditioner (msr) 
    - 3  both 
    - default : 0

Matrix_Storage : Disk Write or Read in internal format 
    - 0  none 
    - 1  write matrix (sparse) 
    - 2  read matrix (sparse) 
    - default : 0

Scaling : Scale the system by the reciprocal of the diagonal before resolution 
    - 0  no 
    - 1  yes 
    - default : 1

Renumbering_Technique : 
    - 0  No renumbering 
    - 1  Reverse Cuthill-Mc Kee 
    - default : 1 

Preconditioner : 
    - 0  NONE     No Factorization
    - 1  ILUT     Incomplete LU factorization with dual truncation strategy 
    - 2  ILUTP    ILUT with column  pivoting                                
    - 3  ILUD     ILU with single dropping + diagonal compensation (~MILUT) 
    - 4  ILUDP    ILUD with column pivoting                                 
    - 5  ILUK     level-k ILU                                               
    - 6  ILU0     simple ILU(0) preconditioning                             
    - 7  MILU0    MILU(0) preconditioning                                   
    - 8  DIAGONAL                                                           
    - default : 2 

Preconditioner_Position : 
    - 0  No Preconditioner 
    - 1  Left Preconditioner 
    - 2  Right Preconditioner 
    - 3  Both Left and Right Preconditioner 
    - default : 2 

Nb_Fill : 
    - ILUT/ILUTP : maximum number of elements per line 
      of L and U (except diagonal element) 
    - ILUK : each element whose fill-in level is greater than NB_FILL 
      is dropped. 
    - default : 20

Permutation_Tolerance : Tolerance for column permutation in ILUTP/ILUDP. 
    At stage i, columns i and j are permuted if 
    abs(a(i,j))*PERMUTATION_TOLERANCE > abs(a(i,i)). 
    - 0  no permutations 
    - 0.001 -> 0.1  classical 
    - default :  5.00000E-02

Dropping_Tolerance : 
    - ILUT/ILUTP/ILUK: a(i,j) is dropped if 
      abs(a(i,j)) < DROPPING_TOLERANCE * abs(diagonal element in U). 
    - ILUD/ILUDP : a(i,j) is dropped if 
      abs(a(i,j)) < DROPPING_TOLERANCE * [weighted norm of line i]. 
      Weighted norm = 1-norm / number of nonzero elements on the line. 
    - default :  0.00000E+00

Diagonal_Compensation : ILUD/ILUDP: the term 'DIAGONAL_COMPENSATION * (sum 
    of all dropped elements of the line)' is added to the diagonal element in U 
    - 0  ~ ILU with threshold 
      1  ~ MILU with threshold. 
    - default :  0.00000E+00

Re_Use_ILU : Reuse ILU decomposition (and renumbering if any)
    - 0  no 
    - 1  yes 
    - default : 0

Algorithm : 
    - 1  CG       Conjugate Gradient                    
    - 2  CGNR     CG (Normal Residual equation)         
    - 3  BCG      Bi-Conjugate Gradient                 
    - 4  DBCG     BCG with partial pivoting             
    - 5  BCGSTAB  BCG stabilized                        
    - 6  TFQMR    Transpose-Free Quasi-Minimum Residual 
    - 7  FOM      Full Orthogonalization Method         
    - 8  GMRES    Generalized Minimum RESidual          
    - 9  FGMRES   Flexible version of GMRES             
    - 10 DQGMRES  Direct versions of GMRES              
    - 11 LU       LU Factorization                      
    - 12 PGMRES   Alternative version of GMRES          
    - default : 8

Krylov_Size : Krylov subspace size 
    - default : 40

IC_Acceleration : IC accelerator
    - default :  1.00000E+00 

Re_Use_LU : Reuse LU decomposition
    - 0  no 
    - 1  yes 
    - default : 0

Iterative_Improvement : Iterative improvement of the solution obtained by a LU 
    - default : 0

Nb_Iter_Max : Maximum number of iterations 
    - default : 1000 

Stopping_Test : Target residual 
    - default :  1.00000E-10 

*/

            Matrix_Format            1
          Matrix_Printing            0
           Matrix_Storage            0
                  Scaling            1
    Renumbering_Technique            1
           Preconditioner            2
  Preconditioner_Position            2
                  Nb_Fill           20
    Permutation_Tolerance  5.00000E-02
       Dropping_Tolerance  0.00000E+00
    Diagonal_Compensation  0.00000E+00
               Re_Use_ILU            1 
                Algorithm            8
              Krylov_Size           40
          IC_Acceleration  1.00000E+00
                Re_Use_LU            0
    Iterative_Improvement            0
              Nb_Iter_Max         1000
            Stopping_Test  1.00000E-12