Postprocess history variable

38 views
Skip to first unread message

Junxiang Wang

unread,
Jan 16, 2025, 8:40:29 PM1/16/25
to deal.II User Group
Dear Deal.II community,

I'd like to ask for help exporting the history nodal value.

I am currently using the following

const std::vector<std::shared_ptr<PointHistory>> lqph = quadrature_point_history.get_data(cell);

to record some history variables (e.g., max and min) at quadrature_point. 

Is there a way to output the nodal value of the history value? I am currently using DataPostprocessorVector to handle my output.  

Thanks a lot in advance.

Best regards,

Juxniang.

Wolfgang Bangerth

unread,
Jan 17, 2025, 12:06:12 AM1/17/25
to dea...@googlegroups.com
On 1/16/25 18:40, Junxiang Wang wrote:
>
> const std::vector<std::shared_ptr<PointHistory>> lqph =
> quadrature_point_history.get_data(cell);
>
> to record some history variables (e.g., max and min) at quadrature_point.
>
> Is there a way to output the nodal value of the history value? I am currently
> using DataPostprocessorVector to handle my output.

I don't know what the PointHistory class does (did you mis-spell the name of a
deal.II class?), but if I understand you correctly, then this is the value (or
multiple values) of the solution at a specific point. DataOut does not have
facilities to output point values itself, but you can work around this by
creating a ParticleHandler that has particles at quadrature points (I think
either step-70 or step-83) shows this, then transfer your history variable
from quadrature points to the particles, and then you can output this
information via particles::DataOut. This information can then be visualized
alongside the field data you output separately via DataOut.

Best
W.

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


Junxiang Wang

unread,
Jan 17, 2025, 5:52:36 AM1/17/25
to deal.II User Group
Dear Prof.  Bangerth 

The definition of  class PointHistory is as follows:

````
 24 class PointHistory : public TransferableQuadraturePointData

 23 {

 22 public:

 21   void

 20   update(std::string name, double solution, std::string scheme = "latest");

 19   void

 18   update_independent(std::string name,

 17                      double      solution,

 16                      std::string scheme = "latest");

````

It is used to store my hist variable while assembling the stiffness matrix. Thanks for your suggestion, I'll take a look.

Best regards,

Junxiang.
Reply all
Reply to author
Forward
0 new messages