suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
BC.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2026 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 ******************************************************************************/
26#ifndef BC_H
27#define BC_H
28
29#include "Constraint.h"
30
43class PenaltyBC : public Constraint {
44 static double multiplier;
45
46 friend void set_constraint_multiplier(double);
47
48public:
50 unsigned,
51 uvec&&, // node tags
52 std::vector<Node::DOF>&& // dof components
53 );
54
55 int initialize(const shared_ptr<DomainBase>&) override;
56
57 int process(const shared_ptr<DomainBase>&) override;
58 int process_resistance(const shared_ptr<DomainBase>&) final;
59};
60
65class MultiplierBC : public PenaltyBC {
66public:
68
69 int process(const shared_ptr<DomainBase>&) override;
70};
71
76class GroupPenaltyBC : protected GroupModifier, public MultiplierBC {
77public:
79 unsigned,
80 uvec&&, // node group tags
81 std::vector<Node::DOF>&& // dof components
82 );
83
84 int initialize(const shared_ptr<DomainBase>&) override;
85
86 int process(const shared_ptr<DomainBase>&) override;
87};
88
93class GroupMultiplierBC final : public GroupPenaltyBC {
94public:
96
97 int process(const shared_ptr<DomainBase>&) override;
98};
99
100void set_constraint_multiplier(double);
101
102#endif
103
A Constraint class.
Definition Constraint.h:36
Definition ConditionalModifier.h:216
A GroupMultiplierBC class.
Definition BC.h:93
int process(const shared_ptr< DomainBase > &) override
Process and update both stiffness and resistance.
Definition BC.cpp:123
A GroupPenaltyBC class.
Definition BC.h:76
int initialize(const shared_ptr< DomainBase > &) override
Definition BC.cpp:113
GroupPenaltyBC(unsigned, uvec &&, std::vector< Node::DOF > &&)
Definition BC.cpp:109
int process(const shared_ptr< DomainBase > &) override
Process and update both stiffness and resistance.
Definition BC.cpp:119
A MultiplierBC class.
Definition BC.h:65
int process(const shared_ptr< DomainBase > &) override
Apply the BC to the system using Lagrangian multiplier method. It directly modifies the global stiffn...
Definition BC.cpp:74
A PenaltyBC class.
Definition BC.h:43
PenaltyBC(unsigned, uvec &&, std::vector< Node::DOF > &&)
Definition BC.cpp:26
friend void set_constraint_multiplier(double)
Definition BC.cpp:127
int initialize(const shared_ptr< DomainBase > &) override
Definition BC.cpp:29
int process(const shared_ptr< DomainBase > &) override
Apply the BC to the system using penalty method. It effectively adds a diagonal matrix to the global ...
Definition BC.cpp:41
int process_resistance(const shared_ptr< DomainBase > &) final
Process and update resistance.
Definition BC.cpp:62
void set_constraint_multiplier(double)
Definition BC.cpp:127