On Wed, Feb 26, 2014 at 12:29 PM, Jones,Martin Alexander <
[email protected]> wrote:
> How do we input an auxillary field so that we can use the a[] array in
> the f0_u function in ex12.c ?
>
>
>
> Void f0_u(const PetscScalar u[], const PetscScalar gradU[], const
> PetscScalar a[], const PetscScalar gradA[],const PetscReal x[], PetscScalar
> f0[])
>
>
>
> I would like a=constant within a bounded volume and a=0 outside the
> bounded volume.
>
>
>
> Any help on this is much appreciated. Thanks.
>
This mode sounds like -variable_coefficient field, which creates an a[] in
some FE space. Then you use
-mat_petscspace_order k for order k (in the example I test 0 and 1). The
function SetupMaterial() makes
the auxiliary field values, and uses the pointwise function nu_2d() to do
it. You can substitute your own
pointwise function there, or take over at a higher level and directly put
your values in the Vec.
Thanks,
Matt
>
> Martin Jones
>
--
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