suanPan
TranslationConnector.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2024 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 ******************************************************************************/
31#ifndef TRANSLATIONCONNECTOR_H
32#define TRANSLATIONCONNECTOR_H
33
34#include <Element/Element.h>
35
37 static const unsigned c_node = 3;
38
39 const unsigned c_dof;
40
41 const unsigned c_size = c_node * c_dof;
42
43 const span sa, sb, sc;
44
45 const double alpha;
46
47 const double s_near{0.}, s_far{0.};
48
49public:
50 TranslationConnector(unsigned, uvec&&, unsigned, double);
51
52 int initialize(const shared_ptr<DomainBase>&) override;
53
54 int update_status() override;
55
56 int clear_status() override { return SUANPAN_SUCCESS; }
57
58 int commit_status() override { return SUANPAN_SUCCESS; }
59
60 int reset_status() override { return SUANPAN_SUCCESS; }
61};
62
64public:
65 TranslationConnector2D(const unsigned T, uvec&& N, const double P)
66 : TranslationConnector(T, std::move(N), 2u, P) {}
67};
68
70public:
71 TranslationConnector3D(const unsigned T, uvec&& N, const double P)
72 : TranslationConnector(T, std::move(N), 3u, P) {}
73};
74
75#endif
76
A Element class.
Definition: Element.h:117
Definition: TranslationConnector.h:63
TranslationConnector2D(const unsigned T, uvec &&N, const double P)
Definition: TranslationConnector.h:65
Definition: TranslationConnector.h:69
TranslationConnector3D(const unsigned T, uvec &&N, const double P)
Definition: TranslationConnector.h:71
A TranslationConnector class.
Definition: TranslationConnector.h:36
int commit_status() override
Definition: TranslationConnector.h:58
int reset_status() override
Definition: TranslationConnector.h:60
int update_status() override
Definition: TranslationConnector.cpp:53
TranslationConnector(unsigned, uvec &&, unsigned, double)
Definition: TranslationConnector.cpp:22
int initialize(const shared_ptr< DomainBase > &) override
Definition: TranslationConnector.cpp:30
int clear_status() override
Definition: TranslationConnector.h:56
constexpr auto SUANPAN_SUCCESS
Definition: suanPan.h:172