www.mooseframework.org
Constraint.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 // MOOSE includes
13 #include "MooseObject.h"
14 #include "SetupInterface.h"
15 #include "FunctionInterface.h"
16 #include "UserObjectInterface.h"
17 #include "TransientInterface.h"
19 #include "Restartable.h"
20 #include "MeshChangedInterface.h"
21 #include "TaggingInterface.h"
22 
23 // Forward Declarations
24 class Assembly;
25 class Constraint;
26 template <typename>
30 class SubProblem;
31 class MooseMesh;
32 
33 template <>
35 
39 class Constraint : public MooseObject,
40  public SetupInterface,
41  public FunctionInterface,
42  public UserObjectInterface,
43  public TransientInterface,
44  protected GeometricSearchInterface,
45  public Restartable,
46  public MeshChangedInterface,
47  public TaggingInterface
48 {
49 public:
51  virtual ~Constraint();
52 
58 
59  virtual bool addCouplingEntriesToJacobian() { return true; }
60  virtual void subdomainSetup() override final
61  {
62  mooseError("subdomain setup for constraints is not implemented");
63  }
64 
65  virtual void residualEnd() {}
66 
67 protected:
69 
71 
74 
75  unsigned int _i, _j;
76  unsigned int _qp;
77 };
78 
79 #define usingConstraintMembers \
80  usingMooseObjectMembers; \
81  usingTaggingInterfaceMembers; \
82  using Constraint::_i; \
83  using Constraint::_qp; \
84  using Constraint::_tid
virtual void residualEnd()
Definition: Constraint.h:65
SubProblem & _subproblem
SubProblem that contains tag info.
SubProblem & subProblem()
Subproblem this constraint is part of.
Definition: Constraint.h:57
A class for creating restricted objects.
Definition: Restartable.h:29
Keeps track of stuff related to assembling.
Definition: Assembly.h:62
Class for stuff related to variables.
Definition: Adaptivity.h:29
Base class for all Constraint types.
Definition: Constraint.h:39
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int _i
Definition: Constraint.h:75
void mooseError(Args &&... args) const
Definition: MooseObject.h:147
Base class for a system (of equations)
Definition: SystemBase.h:92
Constraint(const InputParameters &parameters)
Definition: Constraint.C:38
unsigned int _j
Definition: Constraint.h:75
Interface for objects that needs transient capabilities.
virtual bool addCouplingEntriesToJacobian()
Definition: Constraint.h:59
Interface for notifications that the mesh has changed.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:42
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
MooseMesh & _mesh
Definition: Constraint.h:73
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
MooseVariableFE< VectorValue< Real > > VectorMooseVariable
Definition: Constraint.h:29
virtual void subdomainSetup() override final
Gets called when the subdomain changes (i.e.
Definition: Constraint.h:60
Interface for objects that need to use UserObjects.
Assembly & _assembly
Definition: Constraint.h:72
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:59
SystemBase & _sys
Definition: Constraint.h:68
THREAD_ID _tid
Definition: Constraint.h:70
MooseVariableFE< Real > MooseVariable
Definition: Constraint.h:27
virtual ~Constraint()
Definition: Constraint.C:55
InputParameters validParams< Constraint >()
Definition: Constraint.C:16
Interface for objects that need to use functions.
unsigned int _qp
Definition: Constraint.h:76
unsigned int THREAD_ID
Definition: MooseTypes.h:161