LineValueSampler: VectorPostProcessor in PostProcessor #28827
Replies: 2 comments 14 replies
-
Hello All the postprocessors get lumped into the same CSV file by default. You can retrieve the vector values of of a VPP in a custom postprocessor using
this return a reference, you should save it in an attribute of your custom PP |
Beta Was this translation helpful? Give feedback.
-
Hello @GiudGiud! Time | c I have tried indexing the for loop in various ways without getting a solution. I attach the .C below. Do you have any suggestions or notice anything that might explain this tendency? The explanation I have found is that perhaps the PP runs the loop before the VPP and so at the current iteration the PP finds no value from the VPP, while at the next iteration the PP finds data from the VPP which is still at the previous iteration. I don't know if this makes sense, but I would like to know your point of view and how I could solve this last detail. Thanks again for your help @GiudGiud ! #include "NeckValue.h" registerMooseObject("ParrotApp", NeckValue); InputParameters NeckValue::NeckValue( {} void _c_var = getParam<std::vector>("c_var"); } void Real NeckValue::computeValue() { const VectorPostprocessorValue & _c_var = getVectorPostprocessorValueByName(getParam("vpp"),getParamstd::string("vector_name")); for (unsigned int i = 0; i < _c_var.size(); i++) {
[ ]
}
} PostprocessorValue NeckValue::getValue() const } |
Beta Was this translation helpful? Give feedback.
-
Check these boxes if you have followed the posting rules.
Question
Hello MOOSE community!
I'm intrested in the behaviour of LineValueSampler. In particular, the latter is a VectorPostProcessor and I get a .csv for each iteration. Is it possible to pass LineValueSampler from a VectorPostProcessor to a PostProcessor so that I can manipulate its behaviour to obtain a single .csv? Specifically, LineValueSampler in VectorPostProcessor returns me a .csv with a number of results = num_points (requested parameter) . My idea is to save this dataset, but to manipulate it in the PostProcessor area to get a single value of my interest.
Do you have any suggestions for following this path? Maybe this is a silly question, but I don't have much experience.
Thanks for your time and patience :)
Beta Was this translation helpful? Give feedback.
All reactions