[petsc-users] scalar abs()

Ryan Yan vyan2000 at gmail.com
Fri Jan 15 13:33:49 CST 2010


Thanks a lot,

Yan

On Fri, Jan 15, 2010 at 2:29 PM, Matthew Knepley <knepley at gmail.com> wrote:

> 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/be2d1154/attachment.htm>


More information about the petsc-users mailing list