← Back to team overview

dolfin team mailing list archive

Re: patch to enable CellData export for vector functions

 

I just pushed an update that should identify discontinuous fields
without relying on signatures. See if it works.

-- 
Anders


On Thu, Dec 18, 2008 at 01:18:35PM -0700, Bartosz Sawicki wrote:
> I prepared simple patch to enable CellData export for 2D and 3D vector
> functions defined over discontinuous lagrange elements.
> Could you apply this to the main repository?
> 
> --- a/dolfin/io/VTKFile.cpp	Thu Dec 18 08:52:35 2008 +0100
> +++ b/dolfin/io/VTKFile.cpp	Thu Dec 18 13:11:06 2008 -0700
> @@ -201,6 +201,14 @@
>         // FIXME: Update for new FiniteElement signatures
>         //error("Discontinuous Lagrange functions of order k > 0 cannot
> be written in VTK format. You may need to project your function.");
>       }
> +  }
> +  else if(rank == 1)
> +  {
> +     if( (dim == 2 && element.signature() == 
> "MixedElement([FiniteElement('Discontinuous Lagrange', 'triangle', 0),
> FiniteElement('Discontinuous Lagrange', 'triangle', 0)])")
> +        || (dim == 3 && element.signature() ==
> "MixedElement([FiniteElement('Discontinuous Lagrange', 'tetrahedron',
> 0), FiniteElement('Discontinuous Lagrange', 'tetrahedron', 0),
> FiniteElement('Discontinuous Lagrange', 'tetrahedron', 0)])") )
> +     {
> +       data_type = "cell";
> +     }
>     }
>     else
>     {
> 
> regrd.
> BArtek
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev

Attachment: signature.asc
Description: Digital signature


Follow ups

References