Like Paul said, Exodus II would be the easiest way to get a visual
representation of the divergence.

I also need to correct what I said earlier. If you want to represent the
divergence of the solution (which is in L2) in the same nodal basis as the
solution, i.e. let f = div(u_h), and F = sum f_i * phi_i its representation.

Building a new system with RHS = f * phi_j , Kij = phi_i * phi_j and solve
this new system, the resulting solution would be a projection of div(u_h)
and its nodal values would correspond to f_i. No need to do anything with
the rhs vector.

The patch recovery error estimator already present in libMesh already does
this, but at a local level.

Thanks.

On Thu, Jul 23, 2015 at 11:22 AM, Vikram Garg <vikram.v.g...@gmail.com>
wrote:

> One way to do this might be to create a new system where the divergence at
> the continuous level is the right hand side. Then you can repeat the usual
> assembly of the RHS using the loop over elems, dofs and qps, using your
> existing solution.
>
> You could then swap the rhs vector with one of the components of the
> solution vector and print that out in the usual way using
> Tecplot/Paraview/etc IO, see for example the plotting of the adjoint
> solutions in Adjoints Example 1.
>
> On Wed, Jul 22, 2015 at 6:13 PM, Sahai, Amal <sah...@illinois.edu> wrote:
>
>> I have a system with 3 variables, representing the x,y,z component of a
>> quantity. I solved this system to obtain the component wise distribution in
>> a given domain. I would now like to calculate the divergence of this
>> distribution at the node points and then output this along with the
>> previous 3 variables. How do I compute the divergence at the node points? I
>> could only find routines for derivatives of the shape functions at the
>> quadrature points.
>>
>> Regards
>> Amal
>>
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Libmesh-users mailing list
>> Libmesh-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>>
>
>
>
> --
> Vikram Garg
> Postdoctoral Associate
> Predictive Engineering and Computational Science (PECOS)
> The University of Texas at Austin
> http://web.mit.edu/vikramvg/www/
>
> http://vikramvgarg.wordpress.com/
> http://www.runforindia.org/runners/vikramg
>



-- 
Vikram Garg
Postdoctoral Associate
Predictive Engineering and Computational Science (PECOS)
The University of Texas at Austin
http://web.mit.edu/vikramvg/www/

http://vikramvgarg.wordpress.com/
http://www.runforindia.org/runners/vikramg
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to