www.mooseframework.org
ConstraintWarehouse.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 CONSTRAINTWAREHOUSE_H
16 #define CONSTRAINTWAREHOUSE_H
17 
18 // MOOSE includes
19 #include "MooseObjectWarehouse.h"
20 #include "MooseTypes.h"
21 
22 class Constraint;
23 class NodalConstraint;
24 class NodeFaceConstraint;
25 class FaceFaceConstraint;
26 class ElemElemConstraint;
27 
31 class ConstraintWarehouse : public MooseObjectWarehouse<Constraint>
32 {
33 public:
35 
41  void addObject(std::shared_ptr<Constraint> object, THREAD_ID tid = 0);
42 
44 
47  const std::vector<std::shared_ptr<NodalConstraint>> & getActiveNodalConstraints() const;
48  const std::vector<std::shared_ptr<FaceFaceConstraint>> &
49  getActiveFaceFaceConstraints(const std::string & interface) const;
50  const std::vector<std::shared_ptr<ElemElemConstraint>> &
51  getActiveElemElemConstraints(InterfaceID interface_id) const;
52  const std::vector<std::shared_ptr<NodeFaceConstraint>> &
53  getActiveNodeFaceConstraints(BoundaryID boundary_id, bool displaced) const;
55 
57 
60  bool hasActiveNodalConstraints() const;
61  bool hasActiveFaceFaceConstraints(const std::string & interface) const;
62  bool hasActiveElemElemConstraints(const InterfaceID interface_id) const;
63  bool hasActiveNodeFaceConstraints(BoundaryID boundary_id, bool displaced) const;
65 
69  void subdomainsCovered(std::set<SubdomainID> & subdomains_covered,
70  std::set<std::string> & unique_variables,
71  THREAD_ID tid = 0) const;
72 
76  void updateActive(THREAD_ID tid = 0);
77 
78 protected:
81 
83  std::map<BoundaryID, MooseObjectWarehouse<NodeFaceConstraint>> _node_face_constraints;
84 
86  std::map<BoundaryID, MooseObjectWarehouse<NodeFaceConstraint>> _displaced_node_face_constraints;
87 
89  std::map<std::string, MooseObjectWarehouse<FaceFaceConstraint>> _face_face_constraints;
90 
92  std::map<unsigned int, MooseObjectWarehouse<ElemElemConstraint>> _element_constraints;
93 };
94 
95 #endif // CONSTRAINTWAREHOUSE_H
MooseObjectWarehouse< NodalConstraint > _nodal_constraints
NodalConstraint objects.
std::map< BoundaryID, MooseObjectWarehouse< NodeFaceConstraint > > _displaced_node_face_constraints
NodeFaceConstraint objects (displaced)
void subdomainsCovered(std::set< SubdomainID > &subdomains_covered, std::set< std::string > &unique_variables, THREAD_ID tid=0) const
Update supplied subdomain and variable coverate containters.
User for mortar methods.
A storage container for MooseObjects that inherit from SetupInterface.
Base class for all Constraint types.
Definition: Constraint.h:42
std::map< std::string, MooseObjectWarehouse< FaceFaceConstraint > > _face_face_constraints
FaceFaceConstraints.
void addObject(std::shared_ptr< Constraint > object, THREAD_ID tid=0)
Add Constraint object to the warehouse.
const std::vector< std::shared_ptr< ElemElemConstraint > > & getActiveElemElemConstraints(InterfaceID interface_id) const
A NodeFaceConstraint is used when you need to create constraints between two surfaces in a mesh...
unsigned int InterfaceID
Definition: MooseTypes.h:76
std::map< unsigned int, MooseObjectWarehouse< ElemElemConstraint > > _element_constraints
ElemElemConstraints.
const std::vector< std::shared_ptr< NodalConstraint > > & getActiveNodalConstraints() const
Access methods for active objects.
void updateActive(THREAD_ID tid=0)
Update the various active lists.
bool hasActiveElemElemConstraints(const InterfaceID interface_id) const
bool hasActiveNodalConstraints() const
Deterimine if active objects exist.
const std::vector< std::shared_ptr< FaceFaceConstraint > > & getActiveFaceFaceConstraints(const std::string &interface) const
bool hasActiveNodeFaceConstraints(BoundaryID boundary_id, bool displaced) const
const std::vector< std::shared_ptr< NodeFaceConstraint > > & getActiveNodeFaceConstraints(BoundaryID boundary_id, bool displaced) const
bool hasActiveFaceFaceConstraints(const std::string &interface) const
std::map< BoundaryID, MooseObjectWarehouse< NodeFaceConstraint > > _node_face_constraints
NodeFaceConstraint objects (non-displaced)
Warehouse for storing constraints.
boundary_id_type BoundaryID
Definition: MooseTypes.h:75
unsigned int THREAD_ID
Definition: MooseTypes.h:79