[Dune] question about addCellData

Ponomarev, Ilya ilya.ponomarev at phystech.edu
Mon Feb 12 14:15:54 CET 2018


Good afternoon.

I have structure
std::vector<Dune::FieldVector<double ,GridType::dimensionworld>>
velocity(num_cell);;
num_cell is number of cells in my grid from the size of
Dune::LeafMultipleCodimMultipleGeomTypeMapper<GridType,Dune::MCMGElementLayout>
object.
I store 3 components of speed in my structure.

But I didn't catch, how I can visualize my speed with addCellData in object
of Dune::VTKSequenceWriter class. Simple structure, like temperature or
concentration, are visualized correctly, but structure with several
components - not.
I got an error:

dune-grid/dune/grid/io/file/vtk/function.hh:123:47: error: cannot convert
‘const value_type {aka const Dune::FieldVector<double, 3>}’ to ‘double’ in
return
       return v[mapper.index(e)*ncomps_+mycomp_];

Could you explain me, please, how that problem can be solved?

Best regards,
Ilya Ponomarev.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20180212/09d0adcd/attachment.htm>


More information about the Dune mailing list