Doubt Related to DataPostprocessor class

62 views
Skip to first unread message

Deepika Kushwah

unread,
Nov 23, 2022, 4:16:42 AM11/23/22
to dea...@googlegroups.com
Hello Everyone,

I am trying to calculate the gradient of displacement for step 8, for that, I am using the Datapostprocessor Tensor class (same example code which is given in the documentation here - https://www.dealii.org/current/doxygen/deal.II/classDataPostprocessorTensor.html) but I am getting the following error:


 66%] Linking CXX executable step-8
[ 66%] Built target step-8
[100%] Run step-8 with Debug configuration
Cycle 0:
   Number of active cells:       256
   Number of degrees of freedom: 578


----------------------------------------------------
Exception on processing:

--------------------------------------------------------
An error occurred in line <5286> of file <./source/base/data_out_base.cc> in function
    void dealii::DataOutBase::write_vtk(const std::vector<dealii::DataOutBase::Patch<dim, spacedim> >&, const std::vector<std::__cxx11::basic_string<char> >&, const std::vector<std::tuple<unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, dealii::DataComponentInterpretation::DataComponentInterpretation> >&, const dealii::DataOutBase::VtkFlags&, std::ostream&) [with int dim = 2; int spacedim = 2; std::ostream = std::basic_ostream<char>]
The violated condition was:
    std::get<3>(nonscalar_data_range) != DataComponentInterpretation::component_is_part_of_tensor
Additional information:
    You are trying to use functionality in deal.II that is currently not
    implemented. In many cases, this indicates that there simply didn't
    appear much of a need for it, or that the author of the original code
    did not have the time to implement a particular case. If you hit this
    exception, it is therefore worth the time to look into the code to
    find out whether you may be able to implement the missing
    functionality. If you do, please consider providing a patch to the
    deal.II development sources (see the deal.II website on how to
    contribute).

--------------------------------------------------------

Aborting!
----------------------------------------------------
make[3]: *** [CMakeFiles/run.dir/build.make:71: CMakeFiles/run] Error 1
make[2]: *** [CMakeFiles/Makefile2:116: CMakeFiles/run.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/run.dir/rule] Error 2
make: *** [Makefile:137: run] Error 2

How to resolve this? 


Thanks & Regards,
Deepika

**************************************************************************
This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
************************************************************************************************

Abbas

unread,
Nov 23, 2022, 12:38:09 PM11/23/22
to deal.II User Group
Change "data_out.write_vtk (output);" to "data_out.write_vtu (output);" 
https://groups.google.com/g/dealii/c/T1ckYL0Le_U/m/54r575TiAwAJ

Deepika Kushwah

unread,
Nov 23, 2022, 11:23:32 PM11/23/22
to dea...@googlegroups.com
Thank you for your reply. 
Yes it is working. But now the problem is how to visualize these files in paraview?
it showing the following error:
       
[ 66%] Linking CXX executable step-8
[ 66%] Built target step-8
[100%] Run step-8 with Debug configuration
Cycle 0:
   Number of active cells:       256
   Number of degrees of freedom: 578
Cycle 1:
   Number of active cells:       484
   Number of degrees of freedom: 1082
Cycle 2:
   Number of active cells:       922
   Number of degrees of freedom: 2030
Cycle 3:
   Number of active cells:       1750
   Number of degrees of freedom: 3774
Cycle 4:
   Number of active cells:       3319
   Number of degrees of freedom: 7064
Cycle 5:
   Number of active cells:       6301
   Number of degrees of freedom: 13124
Cycle 6:
   Number of active cells:       11935
   Number of degrees of freedom: 24838
Cycle 7:
   Number of active cells:       22543
   Number of degrees of freedom: 46256
[100%] Built target run
deepika@deepika-virtual-machine:~/dealii/examples/step-8$ paraview
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Mesa warning: Window 20971529 has no colormap!

Mesa warning: Window 20971532 has no colormap!

Mesa warning: Window 20971542 has no colormap!

ERROR: In /home/ubuntu/OpenFOAM/ThirdParty-dev/ParaView-5.6.3/VTK/IO/XMLParser/vtkXMLParser.cxx, line 391
vtkXMLDataParser (0x5640c1c302a0): Error parsing XML in stream at line 37, column 0, byte index 20093: junk after document element

ERROR: In /home/ubuntu/OpenFOAM/ThirdParty-dev/ParaView-5.6.3/VTK/IO/XML/vtkXMLReader.cxx, line 488
vtkXMLUnstructuredGridReader (0x5640c1c7b1a0): Error parsing input file.  ReadXMLInformation aborting.


Also it is asking the reader to open the vtk & vtu files. 
image.png

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/145b97cc-c131-45bc-940c-636fb3774f47n%40googlegroups.com.

Luca Heltai

unread,
Nov 24, 2022, 1:42:54 AM11/24/22
to dea...@googlegroups.com
You should also change the extension of the file to “.vtu”. (When you define the file name in the program). You changed “write_vtk” to “write_vtu” but you kept the extension of the vtk format. Paraview thinks it is a vtk format, and does not recognize it. 

Luca

Il giorno 24 nov 2022, alle ore 05:23, Deepika Kushwah <deepika...@iitgoa.ac.in> ha scritto:


<image.png>

Deepika Kushwah

unread,
Nov 24, 2022, 3:48:51 AM11/24/22
to dea...@googlegroups.com
Thank you, it's working fine. 
But how to visualize the same plot (as given in datapostprocessor documentation) displacement field and gradient for step-8 in paraview?


Thanks 
Deepika

Wolfgang Bangerth

unread,
Nov 25, 2022, 3:51:50 PM11/25/22
to dea...@googlegroups.com
On 11/24/22 01:48, Deepika Kushwah wrote:
> But how to visualize the same plot (as given in
> datapostprocessor documentation) displacement field and gradient for step-8 in
> paraview?

You will want to look up the video lectures on using Paraview and Visit!

Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Reply all
Reply to author
Forward
0 new messages