suanPan
Loading...
Searching...
No Matches
Orientation.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2023 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 ******************************************************************************/
33#ifndef ORIENTATION_H
34#define ORIENTATION_H
35
36#include <Domain/Tag.h>
37
38class Element;
39
40class Orientation : public Tag {
41protected:
42 const Element* element_ptr = nullptr;
43
44 vec z_axis;
45
46 double length = 0., inclination = 0.;
47
49
50 void check_element_ptr() const;
51
52 virtual void update_transformation() = 0;
53
54public:
55 explicit Orientation(unsigned = 0, vec&& = {});
56 Orientation(const Orientation&) = default; // copy allowed
57 Orientation(Orientation&&) = delete; // move forbidden
58 Orientation& operator=(const Orientation&) = delete; // copy assign forbidden
59 Orientation& operator=(Orientation&&) = delete; // move assign forbidden
60 ~Orientation() override = default;
61
62 void update_axis(const vec&);
63
64 virtual void set_element_ptr(const Element*);
65
66 [[nodiscard]] virtual bool is_nlgeom() const;
67
68 [[nodiscard]] double get_length() const;
69 [[nodiscard]] double get_inclination() const;
70 [[nodiscard]] const mat& get_transformation() const;
71
72 virtual unique_ptr<Orientation> get_copy() = 0;
73
74 virtual void update_status();
75 virtual void commit_status();
76 virtual void reset_status();
77 virtual void clear_status();
78
79 [[nodiscard]] virtual vec to_local_vec(double) const;
80 [[nodiscard]] virtual vec to_global_vec(double) const;
81 [[nodiscard]] virtual mat to_global_mass_mat(double) const;
82 [[nodiscard]] virtual mat to_global_geometry_mat(double) const;
83 [[nodiscard]] virtual mat to_global_stiffness_mat(double) const;
84
85 [[nodiscard]] virtual vec to_local_vec(vec&&) const;
86 [[nodiscard]] virtual vec to_global_vec(vec&&) const;
87 [[nodiscard]] virtual mat to_global_mass_mat(mat&&) const;
88 [[nodiscard]] virtual mat to_global_geometry_mat(mat&&) const;
89 [[nodiscard]] virtual mat to_global_stiffness_mat(mat&&) const;
90
97 [[nodiscard]] virtual vec to_local_vec(const vec&) const = 0;
104 [[nodiscard]] virtual vec to_global_vec(const vec&) const = 0;
110 [[nodiscard]] virtual mat to_global_mass_mat(const mat&) const;
111 [[nodiscard]] virtual mat to_global_geometry_mat(const mat&) const;
112 [[nodiscard]] virtual mat to_global_stiffness_mat(const mat&) const = 0;
113};
114
115#endif
116
A Element class.
Definition Element.h:106
A Orientation class.
Definition Orientation.h:40
virtual void update_status()
Definition Orientation.cpp:42
virtual bool is_nlgeom() const
Definition Orientation.cpp:34
Orientation(const Orientation &)=default
Orientation & operator=(Orientation &&)=delete
virtual mat to_global_mass_mat(double) const
Definition Orientation.cpp:57
vec z_axis
Definition Orientation.h:44
virtual void update_transformation()=0
virtual vec to_global_vec(double) const
Definition Orientation.cpp:55
virtual vec to_local_vec(const vec &) const =0
transform anything from global to local system e.g., disp -> disp, vel -> vel, acc -> acc,...
virtual mat to_global_geometry_mat(double) const
Definition Orientation.cpp:59
double get_length() const
Definition Orientation.cpp:36
virtual mat to_global_stiffness_mat(const mat &) const =0
virtual vec to_global_vec(const vec &) const =0
transform anything from local to global system e.g., disp -> disp, vel -> vel, acc -> acc,...
mat direction_cosine
Definition Orientation.h:48
Orientation & operator=(const Orientation &)=delete
void update_axis(const vec &)
Definition Orientation.cpp:27
void check_element_ptr() const
Definition Orientation.cpp:21
double length
Definition Orientation.h:46
virtual void reset_status()
Definition Orientation.cpp:49
virtual void set_element_ptr(const Element *)
Definition Orientation.cpp:29
const mat & get_transformation() const
Definition Orientation.cpp:40
~Orientation() override=default
virtual vec to_local_vec(double) const
Definition Orientation.cpp:53
double inclination
Definition Orientation.h:46
double get_inclination() const
Definition Orientation.cpp:38
virtual unique_ptr< Orientation > get_copy()=0
Orientation(Orientation &&)=delete
virtual mat to_global_stiffness_mat(double) const
Definition Orientation.cpp:61
virtual void clear_status()
Definition Orientation.cpp:51
virtual void commit_status()
Definition Orientation.cpp:47
const Element * element_ptr
Definition Orientation.h:42
A base Tag class.
Definition Tag.h:38