18 _all_eigen_vars(false),
19 _active_on_old(false),
20 _eigen_kernel_counter(0)
28 const std::string & name,
38 parameters.
set<
bool>(
"implicit") =
true;
39 std::shared_ptr<KernelBase> ekernel =
41 if (parameters.get<
bool>(
"eigen"))
45 if (parameters.
get<
bool>(
"eigen"))
48 parameters.
set<
bool>(
"implicit") =
false;
49 std::string old_name(
name +
"_old");
51 std::shared_ptr<KernelBase> ekernel =
61 std::shared_ptr<KernelBase> kernel =
67 if (parameters.
get<std::vector<AuxVariableName>>(
"save_in").size() > 0)
69 if (parameters.
get<std::vector<AuxVariableName>>(
"diag_save_in").size() > 0)
86 else if (tag ==
EIGEN)
105 mooseAssert(coefficients.size() > 0 && coefficients.size() <= 3,
"Size error on coefficients");
109 if (coefficients.size() > 1)
111 if (coefficients.size() > 2)
114 else if (tag ==
EIGEN)
119 if (coefficients.size() > 1)
121 if (coefficients.size() > 2)
126 if (coefficients.size() > 2)
136 else if (coefficients.size() > 1)
166 else if (tag ==
EIGEN)
189 else if (tag ==
EIGEN)
231 else if (tag ==
EIGEN)
242 unsigned int i =
sys().variable_number(*it);
243 std::set<dof_id_type> var_indices;
244 sys().local_dof_indices(i, var_indices);
std::string name(const ElemQuality q)
const std::set< VariableName > & getEigenVariableNames() const
Get variable names of the eigen system.
virtual void update(bool update_libmesh_system=true)
Update the system (doing libMesh magic)
void scaleSystemSolution(SYSTEMTAG tag, Real scaling_factor)
Scale the solution vector.
unsigned int _eigen_kernel_counter
counter of eigen kernels
virtual ~MooseEigenSystem()
NumericVector< Number > & solution()
SYSTEMTAG
System or kernel tags.
bool activeOnOld()
Return if eigen kernels should be on old solution.
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 void updateActiveObjects()
Update the active objects in the warehouses.
NumericVector< Number > & solutionOlder()
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
bool _has_save_in
If there is any Kernel or IntegratedBC having save_in.
virtual const std::string & name() const
void buildSystemDoFIndices(SYSTEMTAG tag=ALL)
Build DoF indices for a system.
virtual void scale(const Number factor)=0
void initSystemSolution(SYSTEMTAG tag, Real v)
Initialize the solution vector with a constant value.
void eigenKernelOnOld()
Ask eigenkernels to operate on old or current solution vectors.
void combineSystemSolution(SYSTEMTAG tag, const std::vector< Real > &coefficients)
Linear combination of the solution vectors.
This is the common base class for the three main kernel types implemented in MOOSE, Kernel, VectorKernel and ArrayKernel.
MooseObjectTagWarehouse< KernelBase > _kernels
virtual void markEigenVariable(const VariableName &var_name)
Mark a variable as a variable of the eigen system.
std::set< dof_id_type > _eigen_var_indices
std::set< VariableName > _eigen_var_names
FEProblemBase & _fe_problem
the governing finite element/volume problem
void eigenKernelOnCurrent()
bool _has_diag_save_in
If there is any Kernel or IntegratedBC having diag_save_in.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool containsEigenKernel() const
Weather or not the system contains eigen kernels.
Nonlinear system to be solved.
MooseEigenSystem(FEProblemBase &problem, const std::string &name)
const std::vector< VariableName > & getVariableNames() const
virtual NonlinearImplicitSystem & sys()
virtual void set(const numeric_index_type i, const Number value)=0
void initSystemSolutionOld(SYSTEMTAG tag, Real v)
virtual void add(const numeric_index_type i, const Number value)=0
NumericVector< Number > & solutionOld()
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
Adds a kernel.