wby  
                
                  
                    January 5, 2022,  3:57pm
                   
                  1 
               
             
            
              Dear all,
varf a([uu,vv],[w,s])=mu (dx(uu)dx(w)+dy(vv)dy(s)+ ((dx(vv)+dy(uu)) (dx(s)+dy(w)))/2 ) (dx(uu)+dy(vv))*(dx(w)+dy(s))
varf b([uu,vv],[w,s])=w + vv s)      ;
matrix A= a(Vh,Vh,solver=“SPARSESOLVER”);
1、I tried to At=(A+A’)/2, but It doesn’t work.
But, Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
Are there other methods???
Best regards,
             
            
              
            
           
          
            
              
                prj  
              
                  
                    January 6, 2022,  6:02am
                   
                  2 
               
             
            
              What do you mean by “not strictly symmetric”?
             
            
              
            
           
          
            
              
                wby  
              
                  
                    January 6, 2022,  6:08am
                   
                  3 
               
             
            
              Hi, prj, thanks for your reply!
I export the discrete matrices to MATLAB, and Not Strictly Symmetric means that
          >> max(max(A-A.'))
          ans =
               1.136868377216160e-13
          
          or norm(A-A')!=0 
            
              
            
           
          
            
              
                prj  
              
                  
                    January 6, 2022,  6:14am
                   
                  4 
               
             
            
              It’s nearly symmetric up to machine epsilon. You are likely loosing precision while exporting the matrix to MATLAB.
             
            
              
            
           
          
            
              
                wby  
              
                  
                    January 6, 2022,  6:27am
                   
                  5 
               
             
            
              Sorry, I am not sure that.
   [0]PETSC ERROR: The solver 'lobpcg' cannot be used for non-symmetric problems
So I want to know how to process manually makes it symmetric in FreeFem?
             
            
              
            
           
          
            
              
                prj  
              
                  
                    January 6, 2022,  6:36am
                   
                  6 
               
             
            
              You should not use LOBPCG, much less robust than Krylov–Schur, but you need to add the option -eps_gen_hermitian.
             
            
              
            
           
          
            
              
                wby  
              
                  
                    January 6, 2022,  7:28am
                   
                  7 
               
             
            
              Thanks for your reminding, and I still want to know  how to process manually makes it symmetric in FreeFem?
             
            
              
            
           
          
            
              
                prj  
              
                  
                    January 6, 2022,  7:30am
                   
                  8 
               
             
            
              It is symmetric, up to machine epsilon.
             
            
              
            
           
          
            
              
                prj  
              
                  
                    January 6, 2022,  7:40am
                   
                  10 
               
             
            
              mesh Th = square(10, 10);
varf vPb(u, v) = int2d(Th)(dx(u)*dx(v) + dy(u)*dy(v));
fespace Vh(Th, P1);
matrix A = vPb(Vh, Vh);
matrix B = A+A';
B = 0.5 * B;
 
            
              
            
           
          
            
              
                wby  
              
                  
                    January 6, 2022,  7:52am
                   
                  11 
               
             
            
              That doesn’t work…2d-beam-eigen.edp  (4.2 KB)
    matrix AA= a(Vh,Vh,solver="SPARSESOLVER"); 
    matrix C = AA+AA';
    matrix A = 0.5 * C;
    matrix BB= b(Vh,Vh,solver=CG,eps=1e-20); 
    C = BB+BB';
    matrix B = 0.5 * C; 
            
              
            
           
          
            
              
                prj  
              
                  
                    January 6, 2022,  7:55am
                   
                  12 
               
             
            
              That does work… 2d-beam-eigen.edp  (2.7 KB)
             
            
              
            
           
          
            
              
                wby  
              
                  
                    January 6, 2022,  8:16am
                   
                  13 
               
             
            
              Thanks, but another problem occurs.
I don’t know what happen 
I want to compare the results of Eigvalue(ARPACK) in FreeFem with ARPACK in SLEPc
             
            
              
            
           
          
            
              
                prj  
              
                  
                    January 6, 2022,  8:20am
                   
                  14 
               
             
            
              I don’t recommend the use of ARPACK (here is a prime example of why), and I don’t know how to fix this.
             
            
              
            
           
          
            
              
                wby  
              
                  
                    January 6, 2022,  8:23am
                   
                  15 
               
             
            
              Well, thank you very much for your help today
             
            
              
            
           
          
            
              
                wby  
              
                  
                    January 6, 2022,  4:06pm
                   
                  16 
               
             
            
              Hi, prj, there still exist the problem that the binary file without processing was considered non-symmetric by SLEPc. Because of this, I can’t use many eps 
             
            
              
            
           
          
            
              
                prj  
              
                  
                    January 6, 2022,  4:19pm
                   
                  17 
               
             
            
              Why are you not calling SLEPc through FreeFEM? In which case it won’t complain if you give the proper option I mentioned earlier.