https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TestDistributedVectorPostprocessor.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11
13
20
22 const InputParameters & parameters)
23 : GeneralVectorPostprocessor(parameters), _data(declareVector("data"))
24{
25}
26
27void
29{
30 const std::size_t size = 10;
31 const dof_id_type rank = processor_id();
32 _data.resize(size);
33 for (std::size_t i = 0; i < size; i++)
34 _data[i] = size * size * (rank + 1) + i; // 100, 101, ..., 200, 201, ...
35}
36
37void
registerMooseObject("StochasticToolsTestApp", TestDistributedVectorPostprocessor)
static InputParameters validParams()
void gather(const unsigned int root_id, const T &send_data, std::vector< T, A > &recv) const
Test class to make certain that CSV data is broadcast correctly.
TestDistributedVectorPostprocessor(const InputParameters &parameters)
const Parallel::Communicator & _communicator
processor_id_type processor_id() const