Line data Source code
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 : 10 : #include "InputPositions.h" 11 : 12 : registerMooseObject("MooseApp", InputPositions); 13 : 14 : InputParameters 15 15627 : InputPositions::validParams() 16 : { 17 15627 : InputParameters params = Positions::validParams(); 18 15627 : params.addClassDescription("Positions set directly from a user parameter in the input file"); 19 15627 : params.addRequiredParam<std::vector<Point>>("positions", "Positions"); 20 : 21 : // Inputs should not be re-ordered 22 15627 : params.set<bool>("auto_sort") = false; 23 : // Positions are known for all processes already 24 15627 : params.set<bool>("auto_broadcast") = false; 25 : 26 15627 : return params; 27 0 : } 28 : 29 681 : InputPositions::InputPositions(const InputParameters & parameters) : Positions(parameters) 30 : { 31 681 : _positions = getParam<std::vector<Point>>("positions"); 32 681 : _initialized = true; 33 : // Sort (if requested) and create KDTree 34 681 : finalize(); 35 681 : }