22 "vectorpostprocessors",
"The vectorpostprocessors whose vector values are to be combined");
23 params.
addParam<std::vector<std::vector<std::string>>>(
24 "vectors",
"Vectors to combine from each vectorpostprocessor");
27 "Which value to use to fill the smaller vectors (any smaller than the " 28 "largest vector) if the vectors are not the same size");
30 "Outputs the values of an arbitrary user-specified set of " 31 "vectorpostprocessors as a combined vector in the order specified by the user");
35 params.
set<
bool>(
"_auto_broadcast") =
false;
44 const auto & vpps_names = getParam<std::vector<VectorPostprocessorName>>(
"vectorpostprocessors");
45 std::vector<std::vector<std::string>> vpp_vectors(vpps_names.size());
50 const auto & vpp_name = vpps_names[i];
52 for (
const auto & vec_name : vpp.getVectorNames())
53 vpp_vectors[i].push_back(vec_name);
57 vpp_vectors = getParam<std::vector<std::vector<std::string>>>(
"vectors");
58 if (vpp_vectors.size() != vpps_names.size())
61 "Outer vector size should be the same size as the 'vectorpostprocessors' parameter");
67 _vpp_vecs.push_back(&this->declareVector(vpps_names[i] +
"_" + vpp_vectors[i][j]));
71 for (
const auto & vec_name : vpp_vectors[i])
87 std::size_t max_size = 0;
static InputParameters validParams()
virtual void initialize() override
Initialize, clears the postprocessor vector.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
CombinedVectorPostprocessor is a type of VectorPostprocessor that outputs the values of multiple vect...
auto max(const L &left, const R &right)
CombinedVectorPostprocessor(const InputParameters ¶meters)
Class constructor.
virtual void execute() override
Populates the postprocessor vector of values with the supplied vectorpostprocessors.
static InputParameters validParams()
registerMooseObject("MooseApp", CombinedVectorPostprocessor)
const VectorPostprocessor & getVectorPostprocessorObjectByName(const std::string &object_name, const THREAD_ID tid=0) const
Return the VPP object given the name.
const Real _filler_value
A filler value to place on vectors that are smaller than the longest vector.
FEProblemBase & _vpp_fe_problem
The FEProblemBase.
std::vector< const VectorPostprocessorValue * > _vectorpostprocessor_values
The vector of VectorPostprocessorValue objects that are used to get the values of the vectorpostproce...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< VectorPostprocessorValue * > _vpp_vecs
The VectorPostprocessorValue object where the results are stored.
IntRange< T > make_range(T beg, T end)
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
const VectorPostprocessorValue & getVectorPostprocessorValueByName(const VectorPostprocessorName &name, const std::string &vector_name) const
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...
auto index_range(const T &sizable)