https://mooseframework.inl.gov
NodalUserObject.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 #include "NodalUserObject.h"
11 #include "MooseVariableFE.h"
12 #include "SubProblem.h"
13 #include "MooseTypes.h"
14 #include "Assembly.h"
15 
18 {
20  params.addParam<bool>("unique_node_execute",
21  false,
22  "When false (default), block restricted objects will have the "
23  "execute method called multiple times on a single node if the "
24  "node lies on a interface between two subdomains.");
27  params += RandomInterface::validParams();
28  return params;
29 }
30 
32  : UserObject(parameters),
33  BlockRestrictable(this),
34  BoundaryRestrictable(this, blockIDs(), true), // true for applying to nodesets
36  TransientInterface(this),
37  RandomInterface(parameters, _fe_problem, _tid, true),
38  _mesh(_subproblem.mesh()),
39  _qp(0),
40  _current_node(_assembly.node()),
41  _unique_node_execute(getParam<bool>("unique_node_execute"))
42 {
43 }
44 
45 void
47 {
48  mooseError("NodalUserObjects do not execute subdomainSetup method, this function does nothing "
49  "and should not be used.");
50 }
Interface for objects that need parallel consistent random numbers without patterns over the course o...
NodalUserObject(const InputParameters &parameters)
MeshBase & mesh
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
static InputParameters validParams()
static InputParameters validParams()
Interface for objects that needs transient capabilities.
static InputParameters validParams()
static InputParameters validParams()
virtual void subdomainSetup() override
Gets called when the subdomain changes (i.e.
Intermediate base class that ties together all the interfaces for getting MooseVariableFEBases with t...
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
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...
Base class for user-specific data.
Definition: UserObject.h:40
static InputParameters validParams()
Definition: UserObject.C:18