https://mooseframework.inl.gov
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 
16 {
18 }
19 
21  : ElementSubdomainModifier(parameters)
22 {
23 }
24 
25 void
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 }
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...
std::set< TimeIndexPair > _times_and_indices
Times and subdomain changes to make.
virtual 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 void initialize() override
Called before execute() is ever called so that data can be cleared.
static InputParameters validParams()
TimedElementSubdomainModifier(const InputParameters &parameters)
storage for the times including their original index.