suanPan
Embedded.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  ******************************************************************************/
31 #ifndef EMBEDDED_H
32 #define EMBEDDED_H
33 
34 #include <Element/Element.h>
35 
36 class Embedded : public Element {
37  static constexpr unsigned max_iteration = 20;
38 
39  const unsigned e_dof;
40  const unsigned host_tag;
41  const unsigned host_size = 0;
42  const double alpha;
43  const rowvec iso_n;
44 
45  std::vector<uvec> idx;
46 
47  shared_ptr<Element> host_element;
48 
49 public:
50  Embedded(unsigned, unsigned, unsigned, unsigned, double);
51 
52  int initialize(const shared_ptr<DomainBase>&) override;
53 
54  int update_status() override;
55 
56  int clear_status() override;
57  int commit_status() override;
58  int reset_status() override;
59 };
60 
61 class Embedded2D final : public Embedded {
62 public:
63  Embedded2D(unsigned, unsigned, unsigned, double = 1E6);
64 };
65 
66 class Embedded3D final : public Embedded {
67 public:
68  Embedded3D(unsigned, unsigned, unsigned, double = 1E6);
69 };
70 
71 #endif
72 
A Element class.
Definition: Element.h:92
Definition: Embedded.h:61
Embedded2D(unsigned, unsigned, unsigned, double=1E6)
Definition: Embedded.cpp:108
Definition: Embedded.h:66
Embedded3D(unsigned, unsigned, unsigned, double=1E6)
Definition: Embedded.cpp:111
A Embedded class.
Definition: Embedded.h:36
int initialize(const shared_ptr< DomainBase > &) override
Definition: Embedded.cpp:28
int commit_status() override
Definition: Embedded.cpp:94
int clear_status() override
Definition: Embedded.cpp:84
int update_status() override
Definition: Embedded.cpp:58
Embedded(unsigned, unsigned, unsigned, unsigned, double)
Definition: Embedded.cpp:22
int reset_status() override
Definition: Embedded.cpp:101