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 : // Base class to move elements to a specific subdomain at the given times. 11 : 12 : #include "TimedElementSubdomainModifier.h" 13 : 14 : InputParameters 15 14390 : TimedElementSubdomainModifier::validParams() 16 : { 17 14390 : return ElementSubdomainModifier::validParams(); 18 : } 19 : 20 65 : TimedElementSubdomainModifier::TimedElementSubdomainModifier(const InputParameters & parameters) 21 65 : : ElementSubdomainModifier(parameters) 22 : { 23 65 : } 24 : 25 : void 26 432 : TimedElementSubdomainModifier::initialize() 27 : { 28 : // clear number of moved elements 29 432 : ElementSubdomainModifier::initialize(); 30 : 31 : // ask for all times (must NOT be sorted) 32 432 : const auto times = getTimes(); 33 : 34 : // copy data to local storage 35 432 : std::size_t i = 0; 36 1452 : for (const auto time : times) 37 1020 : _times_and_indices.insert(TimeIndexPair{time, i++}); 38 432 : }