Lucas,
> Is there any way to initialize a Simulation object (akin to the StepX objects
> found in the tutorials) in a method and then return it via std::move()? Or,
> barring that, is there a way to reinitialize an FESystem member variable to
> have a different degree?
>
> In the former case I run into the problem that both the DoFHandler and
> SparseMatrix objects have no move constructor defined, and in the latter case
> that FESystem has no `reinit` function nor any way (that I know of) of
> reassigning the FESystem member variable to a new FESystem instance. Are there
> fundamental reasons why these operations are not implemented, or is this just
> an uncommon use case?
It's an uncommon case, and so nobody has implemented it. These sorts of large,
global objects are not generally created by factory functions, and so not
commonly copied or moved. The easy way around this in your case is to let the
factory function create a std::unique_ptr<Simulator<dim>> which you can move
without actually touching the Simulator object.
The same applies to FESystem objects.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/