https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TimedElementSubdomainModifier.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
10// Base class to move elements to a specific subdomain at the given times.
11
13
19
24
25void
27{
28 // clear number of moved elements
30
31 // ask for all times (must NOT be sorted)
32 const auto times = getTimes();
33
34 // copy data to local storage
35 std::size_t i = 0;
36 for (const auto time : times)
37 _times_and_indices.insert(TimeIndexPair{time, i++});
38}
static InputParameters validParams()
void initialize() override
Called before execute() is ever called so that data can be cleared.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
virtual std::vector< Real > getTimes()=0
Requests a vector of all times from the inheriting class (these do not have to be sorted and may have...
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
std::set< TimeIndexPair > _times_and_indices
Times and subdomain changes to make.
TimedElementSubdomainModifier(const InputParameters &parameters)
storage for the times including their original index.