https://mooseframework.inl.gov
Indicator.C
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 // MOOSE includes
11 #include "Indicator.h"
12 #include "Assembly.h"
13 #include "MooseVariableFE.h"
14 #include "Problem.h"
15 #include "SubProblem.h"
16 #include "SystemBase.h"
17 
18 #include "libmesh/threads.h"
19 
22 {
25  params += OutputInterface::validParams();
27 
28  params.addParam<bool>("use_displaced_mesh",
29  false,
30  "Whether or not this object should use the "
31  "displaced mesh for computation. Note that "
32  "in the case this is true but no "
33  "displacements are provided in the Mesh block "
34  "the undisplaced mesh will still be used.");
35  params.addParamNamesToGroup("use_displaced_mesh", "Advanced");
36 
37  params.registerBase("Indicator");
38 
39  return params;
40 }
41 
43  : MooseObject(parameters),
44  BlockRestrictable(this),
45  SetupInterface(this),
46  FunctionInterface(this),
47  UserObjectInterface(this),
49  Restartable(this, "Indicators"),
50  OutputInterface(parameters),
52  _use_displaced_mesh(getParam<bool>("use_displaced_mesh")),
53  _subproblem(*getCheckedPointerParam<SubProblem *>("_subproblem")),
54  _fe_problem(*getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")),
55  _sys(*getCheckedPointerParam<SystemBase *>("_sys")),
56  _solution(_sys.solution()),
57  _tid(parameters.get<THREAD_ID>("_tid")),
58  // Assembly for system 0
59  _assembly(_subproblem.assembly(_tid, 0)),
60  _mesh(_subproblem.mesh())
61 {
62 }
A class for creating restricted objects.
Definition: Restartable.h:28
static InputParameters validParams()
Definition: Indicator.C:21
static InputParameters validParams()
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1146
A class to provide an common interface to objects requiring "outputs" option.
MeshBase & mesh
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
Base class for a system (of equations)
Definition: SystemBase.h:84
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
static InputParameters validParams()
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System...
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
Interface for objects that need to use UserObjects.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
An interface for accessing Materials.
const std::set< BoundaryID > EMPTY_BOUNDARY_IDS
Definition: MooseTypes.h:684
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
Indicator(const InputParameters &parameters)
Definition: Indicator.C:42
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
static InputParameters validParams()
Definition: MooseObject.C:25
Interface for objects that need to use functions.
unsigned int THREAD_ID
Definition: MooseTypes.h:209
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...