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: Lorenzo Botti <bottilorenzo@gm...>  20091015 16:39:55

Ups, I've already answered to the first question. Lorenzo 
From: Lorenzo Botti <bottilorenzo@gm...>  20091012 15:33:32

Hi all, I'm solving the incompressible NS equations with a fully implicit dg code and I would like to know if there is an easy way to solve for the increment instead of the solution itself. Sometimes with nonlinear fluxes building the residual on the rhs is easier than summing it to the product J*U^(n1) as you do in ex13. The problem is that petsc_linear_solver use to initialize the solution vector to the previous solution and clearly the previous increment is not a good guess. I'm using a transient_system but maybe there is a best framework to do that. Thanks Lorenzo 
From: Roy Stogner <roystgnr@ic...>  20091012 15:57:25

On Mon, 12 Oct 2009, Lorenzo Botti wrote: > I'm solving the incompressible NS equations with a fully implicit dg code > and I would like > to know if there is an easy way to solve for the increment instead of the > solution itself. > I'm using a transient_system but maybe there is a best framework to do that. The simplest change might be for you to use a TransientSystem<NonlinearImplicitSystem> and solve it with the PetscNonlinearSolver; that expects you to build just the global residual and Jacobian for your time step. A more radical change might be for you to create a FEMSystem subclass; that framework doesn't even require you to worry about the time stepping, just to build the differential and the algebraic parts of element and side residuals in separate methods.  Roy 
From: John Peterson <peterson@cf...>  20091012 16:02:16

On Mon, Oct 12, 2009 at 10:57 AM, Roy Stogner <roystgnr@...> wrote: > > On Mon, 12 Oct 2009, Lorenzo Botti wrote: > >> I'm solving the incompressible NS equations with a fully implicit dg code >> and I would like >> to know if there is an easy way to solve for the increment instead of the >> solution itself. > >> I'm using a transient_system but maybe there is a best framework to do that. > > The simplest change might be for you to use a > TransientSystem<NonlinearImplicitSystem> and solve it with the > PetscNonlinearSolver; that expects you to build just the global > residual and Jacobian for your time step. A more radical change might > be for you to create a FEMSystem subclass; that framework doesn't even > require you to worry about the time stepping, just to build the > differential and the algebraic parts of element and side residuals in > separate methods. FYI: FEMSystem example in ex18.  John 
From: Lorenzo Botti <bottilorenzo@gm...>  20091012 19:39:42

Thanks for the suggestions, I'm going to try both the possibilities. Lorenzo Il giorno 12/ott/2009, alle ore 18.01, John Peterson ha scritto: > On Mon, Oct 12, 2009 at 10:57 AM, Roy Stogner <roystgnr@... > > wrote: >> >> On Mon, 12 Oct 2009, Lorenzo Botti wrote: >> >>> I'm solving the incompressible NS equations with a fully implicit >>> dg code >>> and I would like >>> to know if there is an easy way to solve for the increment instead >>> of the >>> solution itself. >> >>> I'm using a transient_system but maybe there is a best framework >>> to do that. >> >> The simplest change might be for you to use a >> TransientSystem<NonlinearImplicitSystem> and solve it with the >> PetscNonlinearSolver; that expects you to build just the global >> residual and Jacobian for your time step. A more radical change >> might >> be for you to create a FEMSystem subclass; that framework doesn't >> even >> require you to worry about the time stepping, just to build the >> differential and the algebraic parts of element and side residuals in >> separate methods. > > FYI: FEMSystem example in ex18. > >  > John 
From: Lorenzo Botti <bottilorenzo@gm...>  20091015 10:50:37

Ok, I'm trying with NonlinearImplicitSystem in the first place. I have a couple of questions... Is it possible to compute and get the L2 norm of the increment as in example 13, it's a good indication of how the residual is decreasing and it's cheaper to compute compared to the residual norm? Would it be possible to add a metod initial_linear/nonlinear_residual() to Linear/NonlinearImplicitSystem? Actually for a LinearImplicitSystem I need to do std::cout<<"initial linear residual = "<<(dynamic_cast<PetscLinearSolver<Number>*>(ns_system.linear_solver.get()))>get_initial_residual()<<std::endl; Thank you very much Lorenzo 2009/10/12 Lorenzo Botti <bottilorenzo@...> > Thanks for the suggestions, I'm going to try both the possibilities. > > Lorenzo > > > Il giorno 12/ott/2009, alle ore 18.01, John Peterson ha scritto: > > > On Mon, Oct 12, 2009 at 10:57 AM, Roy Stogner <roystgnr@...> >> wrote: >> >>> >>> On Mon, 12 Oct 2009, Lorenzo Botti wrote: >>> >>> I'm solving the incompressible NS equations with a fully implicit dg >>>> code >>>> and I would like >>>> to know if there is an easy way to solve for the increment instead of >>>> the >>>> solution itself. >>>> >>> >>> I'm using a transient_system but maybe there is a best framework to do >>>> that. >>>> >>> >>> The simplest change might be for you to use a >>> TransientSystem<NonlinearImplicitSystem> and solve it with the >>> PetscNonlinearSolver; that expects you to build just the global >>> residual and Jacobian for your time step. A more radical change might >>> be for you to create a FEMSystem subclass; that framework doesn't even >>> require you to worry about the time stepping, just to build the >>> differential and the algebraic parts of element and side residuals in >>> separate methods. >>> >> >> FYI: FEMSystem example in ex18. >> >>  >> John >> > > 
From: Lorenzo Botti <bottilorenzo@gm...>  20091015 16:39:55

Ups, I've already answered to the first question. Lorenzo 