www.mooseframework.org
MooseEigenSystem.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef EIGENSYSTEM_H
16 #define EIGENSYSTEM_H
17 
18 #include "NonlinearSystem.h"
19 
20 // libMesh
21 #include "libmesh/eigen_system.h"
22 
23 class FEProblemBase;
24 
26 {
27 public:
28  MooseEigenSystem(FEProblemBase & problem, const std::string & name);
29  virtual ~MooseEigenSystem();
30 
37  virtual void
38  addKernel(const std::string & kernel_name, const std::string & name, InputParameters parameters);
39 
44  virtual void markEigenVariable(const VariableName & var_name);
45 
49  enum SYSTEMTAG
50  {
51  ALL,
53  };
54 
61  void scaleSystemSolution(SYSTEMTAG tag, Real scaling_factor);
62 
69  void combineSystemSolution(SYSTEMTAG tag, const std::vector<Real> & coefficients);
70 
77  void initSystemSolution(SYSTEMTAG tag, Real v);
78  void initSystemSolutionOld(SYSTEMTAG tag, Real v);
79 
83  void eigenKernelOnOld();
84  void eigenKernelOnCurrent();
85 
90 
94  bool activeOnOld();
95 
99  const std::set<VariableName> & getEigenVariableNames() const { return _eigen_var_names; }
100 
104  bool containsEigenKernel() const;
105 
106 protected:
107  std::set<VariableName> _eigen_var_names;
109  std::set<dof_id_type> _eigen_var_indices;
110 
112 
114  unsigned int _eigen_kernel_counter;
115 };
116 
117 #endif /* EIGENSYSTEM_H */
void scaleSystemSolution(SYSTEMTAG tag, Real scaling_factor)
Scale the solution vector.
unsigned int _eigen_kernel_counter
counter of eigen kernels
virtual ~MooseEigenSystem()
virtual const std::string & name()
Definition: SystemBase.h:453
SYSTEMTAG
System or kernel tags.
bool activeOnOld()
Return if eigen kernels should be on old solution.
const std::set< VariableName > & getEigenVariableNames() const
Get variable names of the eigen system.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
void buildSystemDoFIndices(SYSTEMTAG tag=ALL)
Build DoF indices for a system.
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.
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
bool containsEigenKernel() const
Weather or not the system contains eigen kernels.
Nonlinear system to be solved.
MooseEigenSystem(FEProblemBase &problem, const std::string &name)
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
Adds a kernel.
void initSystemSolutionOld(SYSTEMTAG tag, Real v)