NonlinearSystem::NonlinearSystem(FEProblemBase & fe_problem, const std::string & name) : NonlinearSystemBase( fe_problem, fe_problem.es().add_system<TransientNonlinearImplicitSystem>(name), name), _transient_sys(fe_problem.es().get_system<TransientNonlinearImplicitSystem>(name)), _nl_residual_functor(_fe_problem), _fd_residual_functor(_fe_problem), _use_coloring_finite_difference(false) { nonlinearSolver()->residual_object = &_nl_residual_functor; nonlinearSolver()->jacobian = Moose::compute_jacobian; nonlinearSolver()->bounds = Moose::compute_bounds; nonlinearSolver()->nullspace = Moose::compute_nullspace; nonlinearSolver()->transpose_nullspace = Moose::compute_transpose_nullspace; nonlinearSolver()->nearnullspace = Moose::compute_nearnullspace; #ifdef LIBMESH_HAVE_PETSC PetscNonlinearSolver<Real> * petsc_solver = static_cast<PetscNonlinearSolver<Real> *>(_transient_sys.nonlinear_solver.get()); if (petsc_solver) { petsc_solver->set_residual_zero_out(false); petsc_solver->set_jacobian_zero_out(false); petsc_solver->use_default_monitor(false); } #endif }
AuxiliarySystem::AuxiliarySystem(FEProblemBase & subproblem, const std::string & name) : SystemBase(subproblem, name, Moose::VAR_AUXILIARY), _fe_problem(subproblem), _sys(subproblem.es().add_system<TransientExplicitSystem>(name)), _serialized_solution(*NumericVector<Number>::build(_fe_problem.comm()).release()), _u_dot(addVector("u_dot", true, GHOSTED)), _need_serialized_solution(false) { _nodal_vars.resize(libMesh::n_threads()); _elem_vars.resize(libMesh::n_threads()); }
AuxiliarySystem::AuxiliarySystem(FEProblemBase & subproblem, const std::string & name) : SystemBase(subproblem, name, Moose::VAR_AUXILIARY), PerfGraphInterface(subproblem.getMooseApp().perfGraph(), "AuxiliarySystem"), _fe_problem(subproblem), _sys(subproblem.es().add_system<TransientExplicitSystem>(name)), _current_solution(NULL), _serialized_solution(*NumericVector<Number>::build(_fe_problem.comm()).release()), _solution_previous_nl(NULL), _u_dot(NULL), _u_dotdot(NULL), _u_dot_old(NULL), _u_dotdot_old(NULL), _need_serialized_solution(false), _aux_scalar_storage(_app.getExecuteOnEnum()), _nodal_aux_storage(_app.getExecuteOnEnum()), _elemental_aux_storage(_app.getExecuteOnEnum()), _compute_scalar_vars_timer(registerTimedSection("computeScalarVars", 1)), _compute_nodal_vars_timer(registerTimedSection("computeNodalVars", 1)), _compute_elemental_vars_timer(registerTimedSection("computeElementalVars", 1)) { _nodal_vars.resize(libMesh::n_threads()); _elem_vars.resize(libMesh::n_threads()); }