https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MooseEigenSystem.h
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
10#pragma once
11
12#include "NonlinearSystem.h"
13
14// libMesh
15#include "libmesh/eigen_system.h"
16
17class FEProblemBase;
18
20{
21public:
22 MooseEigenSystem(FEProblemBase & problem, const std::string & name);
23 virtual ~MooseEigenSystem();
24
31 virtual void addKernel(const std::string & kernel_name,
32 const std::string & name,
33 InputParameters & parameters);
34
39 virtual void markEigenVariable(const VariableName & var_name);
40
45 {
47 EIGEN
48 };
49
56 void scaleSystemSolution(SYSTEMTAG tag, Real scaling_factor);
57
64 void combineSystemSolution(SYSTEMTAG tag, const std::vector<Real> & coefficients);
65
72 void initSystemSolution(SYSTEMTAG tag, Real v);
73 void initSystemSolutionOld(SYSTEMTAG tag, Real v);
74
78 void eigenKernelOnOld();
80
85
89 bool activeOnOld();
90
94 const std::set<VariableName> & getEigenVariableNames() const { return _eigen_var_names; }
95
99 bool containsEigenKernel() const;
100
101protected:
102 std::set<VariableName> _eigen_var_names;
104 std::set<dof_id_type> _eigen_var_indices;
105
107
110};
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void eigenKernelOnOld()
Ask eigenkernels to operate on old or current solution vectors.
virtual ~MooseEigenSystem()
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
Adds a kernel.
virtual void markEigenVariable(const VariableName &var_name)
Mark a variable as a variable of the eigen system.
SYSTEMTAG
System or kernel tags.
void initSystemSolutionOld(SYSTEMTAG tag, Real v)
std::set< dof_id_type > _eigen_var_indices
const std::set< VariableName > & getEigenVariableNames() const
Get variable names of the eigen system.
void buildSystemDoFIndices(SYSTEMTAG tag=ALL)
Build DoF indices for a system.
unsigned int _eigen_kernel_counter
counter of eigen kernels
void initSystemSolution(SYSTEMTAG tag, Real v)
Initialize the solution vector with a constant value.
bool containsEigenKernel() const
Weather or not the system contains eigen kernels.
void combineSystemSolution(SYSTEMTAG tag, const std::vector< Real > &coefficients)
Linear combination of the solution vectors.
void scaleSystemSolution(SYSTEMTAG tag, Real scaling_factor)
Scale the solution vector.
bool activeOnOld()
Return if eigen kernels should be on old solution.
std::set< VariableName > _eigen_var_names
Nonlinear system to be solved.
virtual const std::string & name() const