[petsc-users] best way to ignore a constant in FEM error evaluation
Geoffrey Irving
irving at naml.us
Wed Nov 27 13:38:28 CST 2013
On Wed, Nov 27, 2013 at 11:36 AM, Geoffrey Irving <irving at naml.us> wrote:
> I may be missing something, but I can't think of a clean way to use
> DMPlexComputeL2Diff but ignore a constant shift in a Neumann problem.
> It seems there's a missing routine that would make this easy, but I'm
> not entirely sure which routine that is. Mathematically, I have a Vec
> x and an exact solution f, and want to compute
>
> fc = int_D f
> xc = int_D x
> error = sqrt int_D (x-f-(xc-fc)/volume)^2
>
> where int_D means integrate over the domain.
>
> The most general option would be to make a generic FE integral routine
> can it twice as
>
> volume = int_D 1
> shift = (int_D (x - f))/volume
> error = sqrt int_D (x-f-shift)
>
> where I can could either compute volume myself, with another call to
> the integration routine, or with a new special function.
>
> Thoughts?
Oops, I suppose the obvious solution is to just make more PetscFEMs to
do the integrals I want.
Geoffrey
More information about the petsc-users
mailing list