You can also use PetscAbsScalar(). Matt
On Fri, Jan 15, 2010 at 1:29 PM, Matthew Knepley <knepley at gmail.com> wrote: > fabs(). > > Matt > > > On Fri, Jan 15, 2010 at 1:25 PM, Ryan Yan <vyan2000 at gmail.com> wrote: > >> Hi All, >> I am solving nonlinear BVP on structure grid using DM. >> >> For the variable v, I have the following term included in my residual: >> abs(v)*v >> >> My question is: >> In DMMGSetSNESLocal(), for the FormFunctionLocal(), at interior node i, >> What is the right PETSc function to use for the abs in: >> abs(x[i].v) * x[i].v >> >> Thanks, >> Yan >> > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100115/b7b2b7f9/attachment.htm>
