https://mooseframework.inl.gov
Component1D.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 "GeneratedMeshComponent.h"
13 #include "Component1DConnection.h"
14 
19 {
20 public:
22 
24  struct Connection
25  {
27  Point _position;
29  const Elem * const _elem;
31  unsigned short int _side;
33  const Node * const _node;
35  unsigned int _boundary_id;
38 
39  Connection(const Point & pt,
40  const Elem * elem,
41  unsigned short int side,
42  boundary_id_type bc_id,
43  Real normal)
44  : _position(pt),
45  _elem(elem),
46  _side(side),
47  _node(_elem->node_ptr(side)),
48  _boundary_id(bc_id),
49  _normal(normal)
50  {
51  }
52  };
53 
54  virtual void buildMesh() override;
55 
59  unsigned int getNodesetID() const;
60 
64  const BoundaryName & getNodesetName() const;
65 
71  virtual const std::vector<Connection> &
73 
74 protected:
75  virtual bool usingSecondOrderMesh() const override;
76 
78  std::map<Component1DConnection::EEndType, std::vector<Connection>> _connections;
79 
80 private:
81  virtual void buildMeshNodes();
82 
86  BoundaryName _nodeset_name;
87 
88 public:
90 };
virtual void buildMeshNodes()
Definition: Component1D.C:23
std::map< Component1DConnection::EEndType, std::vector< Connection > > _connections
Map of end type to a list of connections.
Definition: Component1D.h:78
virtual bool usingSecondOrderMesh() const override
Check if second order mesh is being used by this geometrical component.
Definition: Component1D.C:134
Component1D(const InputParameters &parameters)
Definition: Component1D.C:20
BoundaryID _nodeset_id
Nodeset ID for all 1D component nodes.
Definition: Component1D.h:84
Structure for storing connection data.
Definition: Component1D.h:24
const Node *const _node
Boundary node of connection (used by other components for connecting)
Definition: Component1D.h:33
Point _position
Physical position of the connecting point.
Definition: Component1D.h:27
unsigned int _boundary_id
Boundary id of this connection.
Definition: Component1D.h:35
Real _normal
Outward norm (either 1 or -1) on boundaries.
Definition: Component1D.h:37
int8_t boundary_id_type
Base class for components that generate their own mesh.
boundary_id_type BoundaryID
BoundaryName _nodeset_name
Nodeset name for all 1D component nodes.
Definition: Component1D.h:86
Base class for 1D components.
Definition: Component1D.h:18
const Elem *const _elem
Boundary element.
Definition: Component1D.h:29
const BoundaryName & getNodesetName() const
Gets the 1D component nodeset name.
Definition: Component1D.C:148
virtual const std::vector< Connection > & getConnections(Component1DConnection::EEndType end_type) const
Gets the vector of connections of an end type for this component.
Definition: Component1D.C:156
Connection(const Point &pt, const Elem *elem, unsigned short int side, boundary_id_type bc_id, Real normal)
Definition: Component1D.h:39
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
Definition: Component1D.C:14
const InputParameters & parameters() const
virtual void buildMesh() override
Definition: Component1D.C:34
unsigned short int _side
Boundary side.
Definition: Component1D.h:31
unsigned int getNodesetID() const
Gets the 1D component nodeset ID.
Definition: Component1D.C:140