20 #include "libmesh/nonlinear_implicit_system.h" 21 #include "libmesh/linear_implicit_system.h" 30 "NonlinearSystem and a single AuxiliarySystem object.");
36 :
FEProblemBase(parameters), _use_nonlinear(getParam<bool>(
"use_nonlinear"))
44 nl =
_use_nonlinear ? (std::make_shared<NonlinearSystem>(*
this, sys_name))
45 : (std::make_shared<MooseEigenSystem>(*
this, sys_name));
46 _nl_sys.push_back(std::dynamic_pointer_cast<NonlinearSystem>(nl));
67 _aux = std::make_shared<AuxiliarySystem>(*
this,
"aux0");
90 mooseError(
"Static condensation may not be used with multiple threads");
116 ls_params.
set<
bool>(
"affect_ltol") = affect_ltol;
117 ls_params.
set<
unsigned>(
"allowed_lambda_cuts") =
118 parameters.
get<
unsigned>(
"contact_line_search_allowed_lambda_cuts");
119 ls_params.
set<
Real>(
"contact_ltol") = affect_ltol
133 "PetscProjectSolutionOntoBounds",
"project_solution_onto_bounds_line_search", ls_params);
137 mooseError(
"Requested line search ", line_search.operator std::string(),
" is not supported");
std::vector< std::shared_ptr< NonlinearSystem > > _nl_sys
const std::size_t _num_nl_sys
The number of nonlinear systems.
Factory & _factory
The Factory for building objects.
virtual void setInputParametersFEProblem(InputParameters ¶meters) override
virtual void setInputParametersFEProblem(InputParameters ¶meters)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void init() override
const InputParameters & parameters() const
Get the parameters of the object.
virtual void newAssemblyArray(std::vector< std::shared_ptr< SolverSystem >> &solver_systems)
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters ¶meters, THREAD_ID tid=0, bool print_deprecated=true)
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void init() override
FEProblem(const InputParameters ¶meters)
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
void createTagSolutions()
Create extra tagged solution vectors.
static InputParameters validParams()
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
LineSearchType
Type of the line search.
void createTagVectors()
Create extra tagged vectors and matrices.
virtual void addLineSearch(const InputParameters ¶meters) override
add a MOOSE line search
virtual libMesh::EquationSystems & es() override
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
virtual void initNullSpaceVectors(const InputParameters ¶meters, std::vector< std::shared_ptr< NonlinearSystemBase >> &nl)
const std::vector< NonlinearSystemName > _nl_sys_names
The nonlinear system names.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
T & set(const std::string &)
const std::vector< LinearSystemName > _linear_sys_names
The linear system names.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
static InputParameters validParams()
const std::size_t _num_linear_sys
The number of linear systems.
const bool _use_hash_table_matrix_assembly
Whether to assemble matrices using hash tables instead of preallocating matrix memory.
registerMooseObject("MooseApp", FEProblem)
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.
void prefix_with_name(bool value)
auto index_range(const T &sizable)
std::shared_ptr< LineSearch > _line_search