[dune-pdelab] Visualization of Gauss point data

Felix Heimann felix.heimann at iwr.uni-heidelberg.de
Wed Jul 20 16:01:14 CEST 2011


Hi Christian,

as Christian Engwer already remarked, there is currently no interface
for a direct visualization of data at arbitrary points (in your case the
Gauss-points). 

As the stresses can be directly computed from the deformation gradients
(and physical parameters), my approach for visualization would be to
write a class according to the Dune::PDELab::GridFunctionInterface which
computes the stress from the finite element coefficients and the grid
function space plus the physical parameters (just take a look at
Dune::PDELab::VectorDiscreteGridFunction and
Dune::PDELab::DiscreteGridFunctionGradient). 

This of course implies a repeated computation of the stresses during the
VTKWriter call. If this, in your case is really expensive (why
actually?), then you could make an alternative approach and prior to
assembling perform an L2 projection of the stresses into an appropriate
finite element space (one polynomial order below deformation, for
constant physical coefficients). Then you pack this finite element space
together with the projections coefficients into a grid function and pass
this grid function into the constructor of your local operator.

However, then the summed costs of L2 projection plus evaluation of the
corresponding finite element stress function in the local operator
should better be cheaper then the direct evaluation of the stresses -
would this be really the case?

If the visualization need not be very good you could also store the
stress values at the Gauss points for each cell during the local
operator calls. Afterwards you pass this data to a
Dune::PDELab::GridFunctionInterface class which returns a (weighted)
average of the local Gauss points (according to the current local
position). This is a bit dirty (and discontinuous) but cheap.

Best Regards,
Felix

Am Mittwoch, den 20.07.2011, 14:45 +0200 schrieb Christian Simon:
> Dear all,
> 
> I moved this question from the dune mailing list to the dune-pdelab
> mailing list.
> 
> Here is the problem:
> I computed stresses at the Gauss points resulting from the deformation
> gradients in my local operator. Now I wonder, how I can visualize
> these stresses via vtkwriter directly from the local operator, which
> is on element basis, without a second calculation of the variable in
> the driver *_Q2.hh or somewhere else? Or is there a way to assign
> these stress values to a vector container and visualize it in the
> driver *_Q2.hh?
> 
> Maybe it is possible to extrapolate these values to the nodes within
> the operator and assign the values to a vector container, which in
> turn can be visualized by the vtkwriter?
> 
> Is this there a solution for this problem?
> 
> Thank you in advance,
> Christian Simon
> 
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab

-- 
Felix Heimann
Universität Heidelberg
Interdisziplinäres Zentrum für Wissenschaftliches Rechnen
Arbeitsgruppe Paralleles Rechnen
IWR 368, Raum 422
Tel: 06221 / 54 8881





More information about the dune-pdelab mailing list