suanPan
Mass.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2022 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 
60 class Mass final : public Element {
61  const double magnitude;
62 
63  const uvec dof_label;
64 
65 public:
66  Mass(unsigned, // element tag
67  unsigned, // node tag
68  double, // magnitude
69  uvec&& // dof tags
70  );
71 
72  int initialize(const shared_ptr<DomainBase>&) override;
73 
74  int update_status() override;
75 
76  int commit_status() override;
77  int clear_status() override;
78  int reset_status() override;
79 
80  void print() override;
81 
82 #ifdef SUANPAN_VTK
83  void Setup() override;
84  void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
85  mat GetData(OutputType) override;
86  void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
87 #endif
88 };
89 
90 #endif
91 
A Element class.
Definition: Element.h:89
int reset_status() override
Definition: Mass.cpp:53
int clear_status() override
Definition: Mass.cpp:51
int initialize(const shared_ptr< DomainBase > &) override
Definition: Mass.cpp:38
OutputType
Definition: OutputType.h:21
Mass(unsigned, unsigned, double, uvec &&)
Definition: Mass.cpp:21
int update_status() override
Definition: Mass.cpp:47
The Mass class represents the point mass applied at unique points.
Definition: Mass.h:60
void print() override
Definition: Mass.cpp:55
int commit_status() override
Definition: Mass.cpp:49