Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Jacques Kools <jacques.kools@in...>  20070706 18:07:52
Attachments:
Message as HTML

Gentlemen, >From the examples I understand how to understand Dirichlet BC ( via penalty method), or Neumann BC ( implicitly vn=0 or explicitly adding surface integral in force term). Now, here is my question: How do I implement periodic boundary conditions, or more generally master slave conditions where the solution on two surfaces that are linked via some geometrical transformation is correlated ? Thanks for your help, Jacques Kools InSilicio SAS 
From: Peter Zajac <peterzajac1@gm...>  20130123 18:27:49

Dear All, I am using Libmesh (generalized eigenvalue problem GEP example) to solve the bounded vibrational Schrodinger equation. I want to use this example with the application of periodic boundary conditions (PBC). When I apply the PBCs, however I do not see any differences between the eigenvalues for any of our test cases compared to Dirichlet boundary conditions. The way I apply the boundary conditions is as follows: EquationSystems equation_systems (mesh); EigenSystem & eigen_system = equation_systems.add_system< EigenSystem> ("Eigensystem"); // ==== THIS SECTION IS ADDED ================ // MeshRefinement mesh_refinement (mesh); DofMap & dof_map = eigen_system.get_dof_map(); PeriodicBoundary horz(RealVectorValue(2.0,0.)); horz.myboundary = 3; horz.pairedboundary = 1; dof_map.add_periodic_boundary(horz); // eigen_system.get_dof_map().add_periodic_boundary(horz); PeriodicBoundary vert(RealVectorValue(0.,2.0)); vert.myboundary = 0; vert.pairedboundary = 2; dof_map.add_periodic_boundary(vert); // eigen_system.get_dof_map().add_periodic_boundary(vert); // mesh_refinement.set_periodic_boundaries_ptr(dof_map.get_periodic_boundaries()); // dof_map.create_dof_constraints(mesh); // ==== UNTIL HERE  WHERE THE ORIGINAL CODE FROM LIBMESH CONTINUES eigen_system.add_variable("u", SECOND); eigen_system.attach_assemble_function (assemble_mass); equation_systems.parameters.set<unsigned int>("eigenpairs") = nev; equation_systems.parameters.set<unsigned int>("basis vectors") = nev*3; eigen_system.eigen_solver>set_eigensolver_type(KRYLOVSCHUR); eigen_system.eigen_solver>set_position_of_spectrum(SMALLEST_REAL); equation_systems.parameters.set<Real>("linear solver tolerance") = pow(TOLERANCE, 5./3.); equation_systems.parameters.set<unsigned int> ("linear solver maximum iterations") = 1000; eigen_system.set_eigenproblem_type(GHEP); equation_systems.init(); equation_systems.print_info(); eigen_system.solve(); The mesh is built as a square of 20x20 elements with range (in both x and y directions) going from 0 to 2. Potential energy is set to 0 so we are investigating the motion of a free particle. Shouldn't the results be different for this case, with and without the PBC? In particular, with the PBC in place, I obtain at least some solutions that are discontinuous across the boundary (where psi(x_max) is not equal to psi(x_min)), and I don't see how that could satisfy constraints for a periodic system. Thank you very much in advance Peter Zajac Computational Science Research Center San Diego 
From: Roy Stogner <roystgnr@ic...>  20130123 18:45:00

On Wed, 23 Jan 2013, Peter Zajac wrote: > The way I apply the boundary conditions is as follows: Are you also remembering to apply the constraint matrices in your assemble_mass() function?  Roy 
From: Peter Zajac <peterzajac1@gm...>  20130123 19:19:51

Hi Roy, I am not applying the constraint matrices inside the assemble_mass() function. How exactly should I do that? Thank you Peter Computational Science Research Center San Diego On Wed, Jan 23, 2013 at 10:44 AM, Roy Stogner <roystgnr@...>wrote: > > > On Wed, 23 Jan 2013, Peter Zajac wrote: > > The way I apply the boundary conditions is as follows: >> > > Are you also remembering to apply the constraint matrices in your > assemble_mass() function? >  > Roy > 
From: Roy Stogner <roystgnr@ic...>  20130123 19:33:28

On Wed, 23 Jan 2013, Peter Zajac wrote: > I am not applying the constraint matrices inside the assemble_mass() function. How exactly should I do that? See the constrain_element_* calls in the example codes. They're usually important in the context of hanging node constraints, but the periodic boundary constraints work the same way. (and any DirichletBoundaries work nearly the same way, if you're currently using penalty Dirichlet BCs and want to switch)  Roy 
From: Peter Zajac <peterzajac1@gm...>  20130124 20:29:35

Hi Roy, after constraining the matrices I get the correct eigenvalues and wavefunctions  thank you for helping me solve the problem. There is one last thing I wanted to ask. When I run the code now (with the constrains), despite obtaining the correct results I get the following error message: [0]PETSC ERROR:  Error Message  [0]PETSC ERROR: Detected zero pivot in LU factorization: see http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot! [0]PETSC ERROR: Empty row in matrix: row in original ordering 1223 in permuted ordering 20! [0]PETSC ERROR:  [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 11:26:24 CDT 2012 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR:  [0]PETSC ERROR: ./femvib on a archlinu named peterVirtualBox by peter Thu Jan 24 09:25:57 2013 [0]PETSC ERROR: Libraries linked from /home/peter/petsc3.3p3/archlinux2cdebug/lib [0]PETSC ERROR: Configure run at Fri Nov 23 19:14:06 2012 [0]PETSC ERROR: Configure options downloadf2cblaslapack=1 [0]PETSC ERROR:  [0]PETSC ERROR: MatLUFactorSymbolic_SeqAIJ() line 334 in src/mat/impls/aij/seq/aijfact.c [0]PETSC ERROR: MatLUFactorSymbolic() line 2750 in src/mat/interface/matrix.c [0]PETSC ERROR: PCSetUp_LU() line 135 in src/ksp/pc/impls/factor/lu/lu.c [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c [0]PETSC ERROR: PCSetUp_Redundant() line 176 in src/ksp/pc/impls/redundant/redundant.c [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c [0]PETSC ERROR: STSetUp_Shift() line 94 in src/st/impls/shift/shift.c [0]PETSC ERROR: STSetUp() line 280 in src/st/interface/stsolve.c [0]PETSC ERROR: EPSSetUp() line 204 in src/eps/interface/setup.c [0]PETSC ERROR: EPSSolve() line 109 in src/eps/interface/solve.c [0]PETSC ERROR: SlepcAbs() line 486 in "unknowndirectory/"src/solvers/slepc_eigen_solver.C application called MPI_Abort(comm=0x84000000, 71)  process 0 According to the PETSC documentation zero pivot does not always mean the matrix is singular and since I am getting the correct results I am ignoring the error. Could my ignorance in this case cause a serious problem in the future I should be aware of? thank you again best Peter Zajac Computational Science Research Center San Diego On Wed, Jan 23, 2013 at 11:33 AM, Roy Stogner <roystgnr@...>wrote: > > On Wed, 23 Jan 2013, Peter Zajac wrote: > > I am not applying the constraint matrices inside the assemble_mass() >> function. How exactly should I do that? >> > > See the constrain_element_* calls in the example codes. They're > usually important in the context of hanging node constraints, but the > periodic boundary constraints work the same way. (and any > DirichletBoundaries work nearly the same way, if you're currently > using penalty Dirichlet BCs and want to switch) >  > Roy > 
From: John Peterson <jwpeterson@gm...>  20130124 20:39:51

On Thu, Jan 24, 2013 at 1:29 PM, Peter Zajac <peterzajac1@...> wrote: > Hi Roy, > > after constraining the matrices I get the correct eigenvalues and > wavefunctions  thank you for helping me solve the problem. > > There is one last thing I wanted to ask. When I run the code now (with the > constrains), despite obtaining the correct results I get the following > error message: > > [0]PETSC ERROR:  Error Message >  > [0]PETSC ERROR: Detected zero pivot in LU factorization: > see http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot! > [0]PETSC ERROR: Empty row in matrix: row in original ordering 1223 in > permuted ordering 20! > [0]PETSC ERROR: >  > [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 11:26:24 > CDT 2012 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: >  > [0]PETSC ERROR: ./femvib on a archlinu named peterVirtualBox by peter Thu > Jan 24 09:25:57 2013 > [0]PETSC ERROR: Libraries linked from > /home/peter/petsc3.3p3/archlinux2cdebug/lib > [0]PETSC ERROR: Configure run at Fri Nov 23 19:14:06 2012 > [0]PETSC ERROR: Configure options downloadf2cblaslapack=1 > [0]PETSC ERROR: >  > [0]PETSC ERROR: MatLUFactorSymbolic_SeqAIJ() line 334 in > src/mat/impls/aij/seq/aijfact.c > [0]PETSC ERROR: MatLUFactorSymbolic() line 2750 in > src/mat/interface/matrix.c > [0]PETSC ERROR: PCSetUp_LU() line 135 in src/ksp/pc/impls/factor/lu/lu.c > [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: PCSetUp_Redundant() line 176 in > src/ksp/pc/impls/redundant/redundant.c > [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: STSetUp_Shift() line 94 in src/st/impls/shift/shift.c > [0]PETSC ERROR: STSetUp() line 280 in src/st/interface/stsolve.c > [0]PETSC ERROR: EPSSetUp() line 204 in src/eps/interface/setup.c > [0]PETSC ERROR: EPSSolve() line 109 in src/eps/interface/solve.c > [0]PETSC ERROR: SlepcAbs() line 486 in > "unknowndirectory/"src/solvers/slepc_eigen_solver.C > application called MPI_Abort(comm=0x84000000, 71)  process 0 > > According to the PETSC documentation zero pivot does not always mean the > matrix is singular and since I am getting the correct results I am ignoring > the error. Could my ignorance in this case cause a serious problem in the > future I should be aware of? This is a real problem: > Empty row in matrix: row in original ordering 1223 in permuted ordering 20! I would definitely investigate the issue. Start by finding out which row is zero (i.e. what dof it corresponds to) and go from there. If worse comes to worst, make the problem small enough that you can print out and compute the SVD of the system matrix in Matlab or Gnuplot. That will tell you if there really is a zero eigenvalue in the matrix you are trying to solve, and the associated singular vector may tell you what this mode is. Although I don't think that's necessary this time.  John 
From: Kirk, Benjamin (JSCEG311) <benjamin.kirk1@na...>  20130124 20:36:47

On Jan 24, 2013, at 2:29 PM, Peter Zajac <peterzajac1@...> wrote: > According to the PETSC documentation zero pivot does not always mean the > matrix is singular and since I am getting the correct results I am ignoring > the error. Could my ignorance in this case cause a serious problem in the > future I should be aware of? > > thank you again Previously Roy mentioned penalty vs Dirichlet boundary conditions? Penalty boundary conditions sometimes can cause an issue like this, as can disparate scaling in variables. What happens if you pass 'pc_factor_zeropivot 0 sub_pc_factor_zeropivot 0' to your application? Do you still get that message? PETSc has a default tolerance that it considers '0' during the factorization, these options override that default. Ben 
From: Peter Zajac <peterzajac1@gm...>  20130125 00:07:33

After I run the app as you suggested I still get the same error. I have also tried other options: 'pc_factor_shift_type NONZERO pc_factor_shift_amount [amount]' or 'pc_factor_shift_type POSITIVE_DEFINITE'; '[level]_pc_factor_shift_type NONZERO pc_factor_shift_amount [amount]' or '[level]_pc_factor_shift_type POSITIVE_DEFINITE' to prevent the zero pivot. without luck. Strange thing is that after I generate the A and B matrices and use PySparse to solve the GEP it works fine. Nevertheless I ll play around with the code and try to find out where I went wrong. Thank you P On Thu, Jan 24, 2013 at 12:36 PM, Kirk, Benjamin (JSCEG311) < benjamin.kirk1@...> wrote: > On Jan 24, 2013, at 2:29 PM, Peter Zajac <peterzajac1@...> wrote: > > > According to the PETSC documentation zero pivot does not always mean the > > matrix is singular and since I am getting the correct results I am > ignoring > > the error. Could my ignorance in this case cause a serious problem in the > > future I should be aware of? > > > > thank you again > > Previously Roy mentioned penalty vs Dirichlet boundary conditions? > > Penalty boundary conditions sometimes can cause an issue like this, as can > disparate scaling in variables. > > What happens if you pass > > 'pc_factor_zeropivot 0 sub_pc_factor_zeropivot 0' > > to your application? Do you still get that message? > > PETSc has a default tolerance that it considers '0' during the > factorization, these options override that default. > > Ben > > > 
From: David Knezevic <dknezevic@se...>  20130125 03:12:38

Hi Peter, You're using SLEPc, right? Have you tried using the LAPACK eigensolver via SLEPc (this tends to be very robust, but it treats the matrices as dense so only works for small problems). To do this, use the command line option: eps_type lapack David On 01/24/2013 03:29 PM, Peter Zajac wrote: > Hi Roy, > > after constraining the matrices I get the correct eigenvalues and > wavefunctions  thank you for helping me solve the problem. > > There is one last thing I wanted to ask. When I run the code now (with the > constrains), despite obtaining the correct results I get the following > error message: > > [0]PETSC ERROR:  Error Message >  > [0]PETSC ERROR: Detected zero pivot in LU factorization: > see http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot! > [0]PETSC ERROR: Empty row in matrix: row in original ordering 1223 in > permuted ordering 20! > [0]PETSC ERROR: >  > [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 11:26:24 > CDT 2012 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: >  > [0]PETSC ERROR: ./femvib on a archlinu named peterVirtualBox by peter Thu > Jan 24 09:25:57 2013 > [0]PETSC ERROR: Libraries linked from > /home/peter/petsc3.3p3/archlinux2cdebug/lib > [0]PETSC ERROR: Configure run at Fri Nov 23 19:14:06 2012 > [0]PETSC ERROR: Configure options downloadf2cblaslapack=1 > [0]PETSC ERROR: >  > [0]PETSC ERROR: MatLUFactorSymbolic_SeqAIJ() line 334 in > src/mat/impls/aij/seq/aijfact.c > [0]PETSC ERROR: MatLUFactorSymbolic() line 2750 in > src/mat/interface/matrix.c > [0]PETSC ERROR: PCSetUp_LU() line 135 in src/ksp/pc/impls/factor/lu/lu.c > [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: PCSetUp_Redundant() line 176 in > src/ksp/pc/impls/redundant/redundant.c > [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: STSetUp_Shift() line 94 in src/st/impls/shift/shift.c > [0]PETSC ERROR: STSetUp() line 280 in src/st/interface/stsolve.c > [0]PETSC ERROR: EPSSetUp() line 204 in src/eps/interface/setup.c > [0]PETSC ERROR: EPSSolve() line 109 in src/eps/interface/solve.c > [0]PETSC ERROR: SlepcAbs() line 486 in > "unknowndirectory/"src/solvers/slepc_eigen_solver.C > application called MPI_Abort(comm=0x84000000, 71)  process 0 > > According to the PETSC documentation zero pivot does not always mean the > matrix is singular and since I am getting the correct results I am ignoring > the error. Could my ignorance in this case cause a serious problem in the > future I should be aware of? > > thank you again > > best > > Peter Zajac > Computational Science Research Center > San Diego > > > > > > > > > > > > > On Wed, Jan 23, 2013 at 11:33 AM, Roy Stogner <roystgnr@...>wrote: > >> On Wed, 23 Jan 2013, Peter Zajac wrote: >> >> I am not applying the constraint matrices inside the assemble_mass() >>> function. How exactly should I do that? >>> >> See the constrain_element_* calls in the example codes. They're >> usually important in the context of hanging node constraints, but the >> periodic boundary constraints work the same way. (and any >> DirichletBoundaries work nearly the same way, if you're currently >> using penalty Dirichlet BCs and want to switch) >>  >> Roy >> >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 
From: Nachiket Gokhale <gokhalen@gm...>  20130125 12:48:31

You might want to try using MUMPS for LU factorization. It is robust. Petsc and SlepC make using it very easy. On Jan 24, 2013, at 10:12 PM, David Knezevic <dknezevic@...> wrote: > Hi Peter, > > You're using SLEPc, right? Have you tried using the LAPACK eigensolver > via SLEPc (this tends to be very robust, but it treats the matrices as > dense so only works for small problems). To do this, use the command > line option: > > eps_type lapack > > David > > > > On 01/24/2013 03:29 PM, Peter Zajac wrote: >> Hi Roy, >> >> after constraining the matrices I get the correct eigenvalues and >> wavefunctions  thank you for helping me solve the problem. >> >> There is one last thing I wanted to ask. When I run the code now (with the >> constrains), despite obtaining the correct results I get the following >> error message: >> >> [0]PETSC ERROR:  Error Message >>  >> [0]PETSC ERROR: Detected zero pivot in LU factorization: >> see http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot! >> [0]PETSC ERROR: Empty row in matrix: row in original ordering 1223 in >> permuted ordering 20! >> [0]PETSC ERROR: >>  >> [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 11:26:24 >> CDT 2012 >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. >> [0]PETSC ERROR: See docs/index.html for manual pages. >> [0]PETSC ERROR: >>  >> [0]PETSC ERROR: ./femvib on a archlinu named peterVirtualBox by peter Thu >> Jan 24 09:25:57 2013 >> [0]PETSC ERROR: Libraries linked from >> /home/peter/petsc3.3p3/archlinux2cdebug/lib >> [0]PETSC ERROR: Configure run at Fri Nov 23 19:14:06 2012 >> [0]PETSC ERROR: Configure options downloadf2cblaslapack=1 >> [0]PETSC ERROR: >>  >> [0]PETSC ERROR: MatLUFactorSymbolic_SeqAIJ() line 334 in >> src/mat/impls/aij/seq/aijfact.c >> [0]PETSC ERROR: MatLUFactorSymbolic() line 2750 in >> src/mat/interface/matrix.c >> [0]PETSC ERROR: PCSetUp_LU() line 135 in src/ksp/pc/impls/factor/lu/lu.c >> [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c >> [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c >> [0]PETSC ERROR: PCSetUp_Redundant() line 176 in >> src/ksp/pc/impls/redundant/redundant.c >> [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c >> [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c >> [0]PETSC ERROR: STSetUp_Shift() line 94 in src/st/impls/shift/shift.c >> [0]PETSC ERROR: STSetUp() line 280 in src/st/interface/stsolve.c >> [0]PETSC ERROR: EPSSetUp() line 204 in src/eps/interface/setup.c >> [0]PETSC ERROR: EPSSolve() line 109 in src/eps/interface/solve.c >> [0]PETSC ERROR: SlepcAbs() line 486 in >> "unknowndirectory/"src/solvers/slepc_eigen_solver.C >> application called MPI_Abort(comm=0x84000000, 71)  process 0 >> >> According to the PETSC documentation zero pivot does not always mean the >> matrix is singular and since I am getting the correct results I am ignoring >> the error. Could my ignorance in this case cause a serious problem in the >> future I should be aware of? >> >> thank you again >> >> best >> >> Peter Zajac >> Computational Science Research Center >> San Diego >> >> >> >> >> >> >> >> >> >> >> >> >> On Wed, Jan 23, 2013 at 11:33 AM, Roy Stogner <roystgnr@...>wrote: >> >>> On Wed, 23 Jan 2013, Peter Zajac wrote: >>> >>> I am not applying the constraint matrices inside the assemble_mass() >>>> function. How exactly should I do that? >>>> >>> See the constrain_element_* calls in the example codes. They're >>> usually important in the context of hanging node constraints, but the >>> periodic boundary constraints work the same way. (and any >>> DirichletBoundaries work nearly the same way, if you're currently >>> using penalty Dirichlet BCs and want to switch) >>>  >>> Roy >>> >>  >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> MVPs and experts. ON SALE this month only  learn more at: >> http://p.sf.net/sfu/learnnowd2d >> _______________________________________________ >> Libmeshusers mailing list >> Libmeshusers@... >> https://lists.sourceforge.net/lists/listinfo/libmeshusers > > >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 
From: Peter Zajac <peterzajac1@gm...>  20130126 05:35:35

Dear All, After analyzing both of the matrices (A and B) in matlab as John suggested, I found my B matrix had an empty row (as pointed out in the error message). Position of the row is related to the size of the mesh and type of element: using QUAD8: 2x2 mesh  B has an empty row at 18 from 21 dif: 3 3x3 mesh  B has an empty row at 34 from 40 dif: 6 4x4 mesh  B has an empty row at 56 from 65 dif: 9 5x5 mesh  B has an empty row at 84 from 96 dif: 12 using QUAD9 Quad9 2x2 mesh  B.m has an empty row at 21 from 25 dif: 4 3x3 mesh  B.m has an empty row at 31 from 49 dif: 8 .. I must be forgetting to add something when imposing the PBCs, If anyone sees it please let me know. Thank you Peter On Fri, Jan 25, 2013 at 4:48 AM, Nachiket Gokhale <gokhalen@...>wrote: > You might want to try using MUMPS for LU factorization. It is robust. > Petsc and SlepC make using it very easy. > > > > > On Jan 24, 2013, at 10:12 PM, David Knezevic <dknezevic@...> > wrote: > > > Hi Peter, > > > > You're using SLEPc, right? Have you tried using the LAPACK eigensolver > > via SLEPc (this tends to be very robust, but it treats the matrices as > > dense so only works for small problems). To do this, use the command > > line option: > > > > eps_type lapack > > > > David > > > > > > > > On 01/24/2013 03:29 PM, Peter Zajac wrote: > >> Hi Roy, > >> > >> after constraining the matrices I get the correct eigenvalues and > >> wavefunctions  thank you for helping me solve the problem. > >> > >> There is one last thing I wanted to ask. When I run the code now (with > the > >> constrains), despite obtaining the correct results I get the following > >> error message: > >> > >> [0]PETSC ERROR:  Error Message > >>  > >> [0]PETSC ERROR: Detected zero pivot in LU factorization: > >> see http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot! > >> [0]PETSC ERROR: Empty row in matrix: row in original ordering 1223 in > >> permuted ordering 20! > >> [0]PETSC ERROR: > >>  > >> [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 > 11:26:24 > >> CDT 2012 > >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > >> [0]PETSC ERROR: See docs/index.html for manual pages. > >> [0]PETSC ERROR: > >>  > >> [0]PETSC ERROR: ./femvib on a archlinu named peterVirtualBox by peter > Thu > >> Jan 24 09:25:57 2013 > >> [0]PETSC ERROR: Libraries linked from > >> /home/peter/petsc3.3p3/archlinux2cdebug/lib > >> [0]PETSC ERROR: Configure run at Fri Nov 23 19:14:06 2012 > >> [0]PETSC ERROR: Configure options downloadf2cblaslapack=1 > >> [0]PETSC ERROR: > >>  > >> [0]PETSC ERROR: MatLUFactorSymbolic_SeqAIJ() line 334 in > >> src/mat/impls/aij/seq/aijfact.c > >> [0]PETSC ERROR: MatLUFactorSymbolic() line 2750 in > >> src/mat/interface/matrix.c > >> [0]PETSC ERROR: PCSetUp_LU() line 135 in src/ksp/pc/impls/factor/lu/lu.c > >> [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c > >> [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c > >> [0]PETSC ERROR: PCSetUp_Redundant() line 176 in > >> src/ksp/pc/impls/redundant/redundant.c > >> [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c > >> [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c > >> [0]PETSC ERROR: STSetUp_Shift() line 94 in src/st/impls/shift/shift.c > >> [0]PETSC ERROR: STSetUp() line 280 in src/st/interface/stsolve.c > >> [0]PETSC ERROR: EPSSetUp() line 204 in src/eps/interface/setup.c > >> [0]PETSC ERROR: EPSSolve() line 109 in src/eps/interface/solve.c > >> [0]PETSC ERROR: SlepcAbs() line 486 in > >> "unknowndirectory/"src/solvers/slepc_eigen_solver.C > >> application called MPI_Abort(comm=0x84000000, 71)  process 0 > >> > >> According to the PETSC documentation zero pivot does not always mean the > >> matrix is singular and since I am getting the correct results I am > ignoring > >> the error. Could my ignorance in this case cause a serious problem in > the > >> future I should be aware of? > >> > >> thank you again > >> > >> best > >> > >> Peter Zajac > >> Computational Science Research Center > >> San Diego > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> On Wed, Jan 23, 2013 at 11:33 AM, Roy Stogner <roystgnr@... > >wrote: > >> > >>> On Wed, 23 Jan 2013, Peter Zajac wrote: > >>> > >>> I am not applying the constraint matrices inside the assemble_mass() > >>>> function. How exactly should I do that? > >>>> > >>> See the constrain_element_* calls in the example codes. They're > >>> usually important in the context of hanging node constraints, but the > >>> periodic boundary constraints work the same way. (and any > >>> DirichletBoundaries work nearly the same way, if you're currently > >>> using penalty Dirichlet BCs and want to switch) > >>>  > >>> Roy > >>> > >> >  > >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >> MVPs and experts. ON SALE this month only  learn more at: > >> http://p.sf.net/sfu/learnnowd2d > >> _______________________________________________ > >> Libmeshusers mailing list > >> Libmeshusers@... > >> https://lists.sourceforge.net/lists/listinfo/libmeshusers > > > > > > >  > > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > > MVPs and experts. ON SALE this month only  learn more at: > > http://p.sf.net/sfu/learnnowd2d > > _______________________________________________ > > Libmeshusers mailing list > > Libmeshusers@... > > https://lists.sourceforge.net/lists/listinfo/libmeshusers > > >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers > 
From: Roy Stogner <roystgnr@ic...>  20070706 18:20:13

On Fri, 6 Jul 2007, Jacques Kools wrote: > How do I implement periodic boundary conditions, or more generally > master slave conditions where the solution on two surfaces that are > linked via some geometrical transformation is correlated ? With new experimental code. It's working fine for me but I'd appreciate more users testing it. Basically you want to: Label your mesh boundaries with boundary ids. Create a PeriodicBoundary object (see the top of dof_map.h) for each periodic boundary  the myboundary and pairedboundary members will hold the boundary ids of the two sides of the periodic boundary, and the translation_vector will give the distance between them. Call DofMap::add_periodic_boundary() on each such object. Cross your fingers. The assumption here is that the periodic boundaries will have the same continuity as the rest of the mesh: for C^1 elements constraints will be created to match both values and derivatives; for C^0 they'll only match values, etc. If you have any more complicated requirements you'll have to handle coding them.  Roy 
Sign up for the SourceForge newsletter:
No, thanks