suanPan
Loading...
Searching...
No Matches
B3DC.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 ******************************************************************************/
29#ifndef B3DC_H
30#define B3DC_H
31
32#include "B3DL.h"
33
34class B3DC final : public B3DL {
35 double elongation = 0.;
36
37 mat trial_n, current_n;
38 mat basic{3, 3, fill::none}, reference;
39 field<mat> sn{6}, se{3};
40
41 vec theta;
42 rowvec t6i, t6j;
43 mat transformation;
44
45 const double initial_length = 0.;
46
47 [[nodiscard]] mat compute_a() const;
48 [[nodiscard]] mat compute_l(const mat&, const subview_col<double>&) const;
49 [[nodiscard]] mat compute_m(const mat&, const subview_col<double>&) const;
50 [[nodiscard]] mat compute_g(const mat&, const subview_col<double>&, const subview_col<double>&) const;
51
52 // some syntax sugar
53 [[nodiscard]] subview_col<double> e(uword) const;
54 [[nodiscard]] subview_col<double> r(uword) const;
55 [[nodiscard]] subview_col<double> ni(uword) const;
56 [[nodiscard]] subview_col<double> nj(uword) const;
57 [[nodiscard]] const mat& sni(uword) const;
58 [[nodiscard]] const mat& snj(uword) const;
59
60protected:
61 void update_transformation() override;
62
63public:
64 using B3DL::B3DL;
65
66 [[nodiscard]] bool is_nlgeom() const override;
67
68 unique_ptr<Orientation> get_copy() override;
69
70 void commit_status() override;
71 void reset_status() override;
72 void clear_status() override;
73
74 [[nodiscard]] vec to_local_vec(const vec&) const override;
75 [[nodiscard]] vec to_global_vec(const vec&) const override;
76 [[nodiscard]] mat to_global_geometry_mat(const mat&) const override;
77 [[nodiscard]] mat to_global_stiffness_mat(const mat&) const override;
78};
79
80#endif
81
A B3DC class.
Definition: B3DC.h:34
mat to_global_geometry_mat(const mat &) const override
Definition: B3DC.cpp:209
void reset_status() override
Definition: B3DC.cpp:26
void clear_status() override
Definition: B3DC.cpp:28
bool is_nlgeom() const override
Definition: B3DC.cpp:203
void update_transformation() override
Definition: B3DC.cpp:106
void commit_status() override
Definition: B3DC.cpp:24
unique_ptr< Orientation > get_copy() override
Definition: B3DC.cpp:22
vec to_local_vec(const vec &) const override
transform anything from global to local system e.g., disp -> disp, vel -> vel, acc -> acc,...
Definition: B3DC.cpp:205
mat to_global_stiffness_mat(const mat &) const override
Definition: B3DC.cpp:280
vec to_global_vec(const vec &) const override
transform anything from local to global system e.g., disp -> disp, vel -> vel, acc -> acc,...
Definition: B3DC.cpp:207
A B3DL class.
Definition: B3DL.h:34
B3DL(unsigned=0, double=0., double=0., double=1.)
Definition: B3DL.cpp:21