https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
14
19{
20public:
22
25 {
27 Point _position;
29 const Elem * const _elem;
31 unsigned short int _side;
33 const Node * const _node;
35 unsigned int _boundary_id;
37 Real _normal;
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
74protected:
75 virtual bool usingSecondOrderMesh() const override;
76 std::string sortBy() const;
77
79 std::map<Component1DConnection::EEndType, std::vector<Connection>> _connections;
80
81private:
82 virtual void buildMeshNodes();
83
87 BoundaryName _nodeset_name;
88
89public:
91};
boundary_id_type BoundaryID
Base class for 1D components.
Definition Component1D.h:19
std::map< Component1DConnection::EEndType, std::vector< Connection > > _connections
Map of end type to a list of connections.
Definition Component1D.h:79
virtual void buildMeshNodes()
Definition Component1D.C:23
virtual void buildMesh() override
Definition Component1D.C:34
virtual bool usingSecondOrderMesh() const override
Check if second order mesh is being used by this geometrical component.
unsigned int getNodesetID() const
Gets the 1D component nodeset ID.
BoundaryName _nodeset_name
Nodeset name for all 1D component nodes.
Definition Component1D.h:87
static InputParameters validParams()
Definition Component1D.C:14
std::string sortBy() const
virtual const std::vector< Connection > & getConnections(Component1DConnection::EEndType end_type) const
Gets the vector of connections of an end type for this component.
BoundaryID _nodeset_id
Nodeset ID for all 1D component nodes.
Definition Component1D.h:85
const BoundaryName & getNodesetName() const
Gets the 1D component nodeset name.
Base class for components that generate their own mesh.
const InputParameters & parameters() const
Structure for storing connection data.
Definition Component1D.h:25
unsigned int _boundary_id
Boundary id of this connection.
Definition Component1D.h:35
const Elem *const _elem
Boundary element.
Definition Component1D.h:29
unsigned short int _side
Boundary side.
Definition Component1D.h:31
Point _position
Physical position of the connecting point.
Definition Component1D.h:27
const Node *const _node
Boundary node of connection (used by other components for connecting)
Definition Component1D.h:33
Connection(const Point &pt, const Elem *elem, unsigned short int side, boundary_id_type bc_id, Real normal)
Definition Component1D.h:39
Real _normal
Outward norm (either 1 or -1) on boundaries.
Definition Component1D.h:37