https://mooseframework.inl.gov
NonlinearTimeIntegratorInterface.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 
11 #include "FEProblem.h"
12 #include "NonlinearSystemBase.h"
13 
14 #include "libmesh/nonlinear_implicit_system.h"
15 #include "libmesh/nonlinear_solver.h"
16 #include "libmesh/dof_map.h"
17 
19  SystemBase & system)
20  : _nl(dynamic_cast<NonlinearSystemBase *>(&system)),
21  _nonlinear_implicit_system(_nl ? dynamic_cast<NonlinearImplicitSystem *>(&_nl->system())
22  : nullptr),
23  _Re_time(_nl ? &_nl->getResidualTimeVector() : nullptr),
24  _Re_non_time(_nl ? &_nl->getResidualNonTimeVector() : nullptr),
25  _u_dot_factor_tag(problem.addVectorTag("u_dot_factor", Moose::VECTOR_TAG_SOLUTION)),
26  _u_dotdot_factor_tag(problem.addVectorTag("u_dotdot_factor", Moose::VECTOR_TAG_SOLUTION))
27 {
28 }
29 
32  const bool project,
33  const libMesh::ParallelType type)
34 {
35  if (_nl)
36  return &_nl->addVector(name, project, type);
37  else
38  return nullptr;
39 }
std::string name(const ElemQuality q)
NonlinearSystemBase * _nl
Pointer to the nonlinear system, can happen that we dont have any.
Base class for a system (of equations)
Definition: SystemBase.h:84
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const libMesh::ParallelType type)
Adds a solution length vector to the system.
Nonlinear system to be solved.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
NonlinearTimeIntegratorInterface(FEProblemBase &problem, SystemBase &system)
NumericVector< Number > * addVector(const std::string &name, const bool project, const libMesh::ParallelType type)
Wrapper around vector addition for nonlinear time integrators.