Re: [Libmesh-users] Energy norm of errors

2016-01-19 Thread David Knezevic
Yeah, Roy is right, better to use quadrature. The approach I suggested initially would require you to project the exact solution into the FE space first, but you probably want to avoid that since it introduces a projection error into your calculation. David On Tue, Jan 19, 2016 at 6:20 PM, Roy

Re: [Libmesh-users] ParallelMesh, SerialMesh and simulation restarts

2016-01-19 Thread Roy Stogner
On Tue, 19 Jan 2016, Roy Stogner wrote: > In the short term the workaround ought to be to use > WRITE_SERIAL_FILES; I'm not sure that's working but if it's not I'll > try to fix it ASAP. WRITE_SERIAL_FILES | WRITE_DATA works. Parallel xda mesh support ought to be relatively easy to add, but I'm

Re: [Libmesh-users] Preconditioners in linear elasticity

2016-01-19 Thread Roy Stogner
On Tue, 19 Jan 2016, Salazar De Troya, Miguel wrote: Related to this issue, I would like to pass the rigid body modes to a multigrid preconditioner. I’ve seen that there is an interface in libMesh through PetscNonlinearSolver::nearnullspace, but my system is a FEMSystem with a NewtonSolver. It

[Libmesh-users] Preconditioners in linear elasticity

2016-01-19 Thread Salazar De Troya, Miguel
Hello I am trying to speed up a linear elasticity problem with isotropic and heterogeneous properties. It is a topology optimization problem, therefore some regions have an almost zero stiffness whereas other regions have a higher value, making the matrix ill-conditioned. So far, from having se

Re: [Libmesh-users] Energy norm of errors

2016-01-19 Thread Roy Stogner
This may not be what you want to do, IMHO. In the extreme case: If you compute the Uexact vector and then do the vec*mat*vec, then you'll get a result of 0 for problems where your method gives you an interpolant of the exact solution, even if that interpolant doesn't equal the exact solution. If

Re: [Libmesh-users] ParallelMesh, SerialMesh and simulation restarts

2016-01-19 Thread Roy Stogner
On Thu, 14 Jan 2016, Roy Stogner wrote: > You know what? It doesn't for me either, my previous reports to the > contrary. But that use case *should* work, and does work on lots of > other meshes I've tried. I'll keep looking into it. And now I think I understand the problem. Our solution res

Re: [Libmesh-users] Energy norm of errors

2016-01-19 Thread Junchao Zhang
Thanks, that is helpful. --Junchao Zhang On Tue, Jan 19, 2016 at 4:10 PM, David Knezevic wrote: > Assemble the Uexact vector, then compute the difference e = U - Uexact. > > You can also refer to error_estimation/exact_solution.h, but I believe > that's used for computing L2 or H1 error, not an

Re: [Libmesh-users] Energy norm of errors

2016-01-19 Thread David Knezevic
Assemble the Uexact vector, then compute the difference e = U - Uexact. You can also refer to error_estimation/exact_solution.h, but I believe that's used for computing L2 or H1 error, not an arbitrary energy norm. David On Tue, Jan 19, 2016 at 5:04 PM, Junchao Zhang wrote: > How to get e =

Re: [Libmesh-users] Energy norm of errors

2016-01-19 Thread Junchao Zhang
How to get e = U - Uex? Is there a libmesh interface for that? --Junchao Zhang On Tue, Jan 19, 2016 at 3:57 PM, David Knezevic wrote: > Assuming you've already assembled K, so you can just do a matvec > (SparseMatrix::vector_mult) followed by a dot product (NumericVector::dot). > > David > > >

Re: [Libmesh-users] Energy norm of errors

2016-01-19 Thread David Knezevic
Assuming you've already assembled K, so you can just do a matvec (SparseMatrix::vector_mult) followed by a dot product (NumericVector::dot). David On Tue, Jan 19, 2016 at 4:53 PM, Junchao Zhang wrote: > Hello, > I want to compute e^TKe as a measure of the error of a solution. Here e = > U -

[Libmesh-users] Energy norm of errors

2016-01-19 Thread Junchao Zhang
Hello, I want to compute e^TKe as a measure of the error of a solution. Here e = U - Uex, supposing I know the analytic answer to the PDE. How can I do it in libmesh? Is there an example? Thank you. --Junchao Zhang -