suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
Mass.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2026 Theodore Chang
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ******************************************************************************/
55#ifndef MASS_H
56#define MASS_H
57
58#include <Element/Element.h>
59
60class MassBase : public Element {
61public:
63 unsigned, // tag
64 uvec&&, // node encoding
65 std::vector<Node::DOF>&& // dof identifier
66 );
67
68 int update_status() override;
69
70 int commit_status() override;
71 int clear_status() override;
72 int reset_status() override;
73
74 void print() override;
75};
76
77class Mass2D final : public MassBase {
78 const double magnitude;
79
80 const uvec dof_label;
81
82public:
83 Mass2D(
84 unsigned, // element tag
85 unsigned, // node tag
86 double, // magnitude
87 uvec&& // dof tags
88 );
89
90 int initialize(const shared_ptr<DomainBase>&) override;
91};
92
93class Mass3D final : public MassBase {
94 const double magnitude;
95
96 const uvec dof_label;
97
98public:
99 Mass3D(
100 unsigned, // element tag
101 unsigned, // node tag
102 double, // magnitude
103 uvec&& // dof tags
104 );
105
106 int initialize(const shared_ptr<DomainBase>&) override;
107};
108
109class MassPoint2D final : public MassBase {
110 const double translational_magnitude;
111 const double rotational_magnitude;
112
113public:
115 unsigned, // element tag
116 unsigned, // node tag
117 double // translational magnitude
118 );
120 unsigned, // element tag
121 unsigned, // node tag
122 double, // translational magnitude
123 double // rotational magnitude
124 );
125
126 int initialize(const shared_ptr<DomainBase>&) override;
127};
128
129class MassPoint3D final : public MassBase {
130 const double translational_magnitude;
131 const double rotational_magnitude;
132
133public:
135 unsigned, // element tag
136 unsigned, // node tag
137 double // translational magnitude
138 );
140 unsigned, // element tag
141 unsigned, // node tag
142 double, // translational magnitude
143 double // rotational magnitude
144 );
145
146 int initialize(const shared_ptr<DomainBase>&) override;
147};
148
149#endif
150
A Element class.
Definition Element.h:118
Definition Mass.h:77
int initialize(const shared_ptr< DomainBase > &) override
Definition Mass.cpp:49
Definition Mass.h:93
int initialize(const shared_ptr< DomainBase > &) override
Definition Mass.cpp:76
Definition Mass.h:60
int commit_status() override
Definition Mass.cpp:25
void print() override
Definition Mass.cpp:31
int clear_status() override
Definition Mass.cpp:27
int reset_status() override
Definition Mass.cpp:29
int update_status() override
Definition Mass.cpp:23
Definition Mass.h:109
int initialize(const shared_ptr< DomainBase > &) override
Definition Mass.cpp:96
Definition Mass.h:129
int initialize(const shared_ptr< DomainBase > &) override
Definition Mass.cpp:117