https://mooseframework.inl.gov
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 
16 {
18  return params;
19 }
20 
22  const InputParameters & parameters)
23  : GeneralVectorPostprocessor(parameters), _data(declareVector("data"))
24 {
25 }
26 
27 void
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 
37 void
39 {
40  if (!isDistributed())
42 }
registerMooseObject("StochasticToolsTestApp", TestDistributedVectorPostprocessor)
void gather(const unsigned int root_id, const T &send_data, std::vector< T, A > &recv) const
const Parallel::Communicator & _communicator
TestDistributedVectorPostprocessor(const InputParameters &parameters)
static InputParameters validParams()
Test class to make certain that CSV data is broadcast correctly.
processor_id_type processor_id() const
uint8_t dof_id_type