suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
Constraint.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 ******************************************************************************/
31#ifndef CONSTRAINT_H
32#define CONSTRAINT_H
33
35
37protected:
38 unsigned lagrangian_size; // size of multiplier
39
40 vec trial_lambda{lagrangian_size, fill::zeros};
42
43 sp_vec resistance;
44 sp_mat stiffness;
45
49
50public:
52 unsigned, // tag
53 unsigned, // amplitude tag
54 std::vector<Node::DOF>&&, // dof order
55 std::vector<Node::DOF>&&, // dof component (unordered)
56 unsigned // size of multiplier
57 );
58
59 const sp_vec& get_resistance() const;
60 const sp_mat& get_stiffness() const;
61
62 const vec& get_auxiliary_resistance() const;
63 const vec& get_auxiliary_load() const;
64 const sp_mat& get_auxiliary_stiffness() const;
65
66 void set_multiplier_size(unsigned);
67 [[nodiscard]] unsigned get_multiplier_size() const;
68};
69
70#endif
71
Abstract base for node/element-scoped, step-conditional modifiers (constraints and loads).
Definition ConditionalModifier.h:103
A Constraint class.
Definition Constraint.h:36
unsigned get_multiplier_size() const
Definition Constraint.cpp:40
const sp_mat & get_stiffness() const
Definition Constraint.cpp:30
unsigned lagrangian_size
Definition Constraint.h:38
const sp_vec & get_resistance() const
Definition Constraint.cpp:24
const sp_mat & get_auxiliary_stiffness() const
Definition Constraint.cpp:28
sp_mat stiffness
Definition Constraint.h:44
const vec & get_auxiliary_load() const
Definition Constraint.cpp:32
sp_vec resistance
Definition Constraint.h:43
vec current_lambda
Definition Constraint.h:41
vec trial_lambda
Definition Constraint.h:40
const vec & get_auxiliary_resistance() const
Definition Constraint.cpp:26
sp_mat auxiliary_stiffness
Definition Constraint.h:48
vec auxiliary_load
Definition Constraint.h:47
void set_multiplier_size(unsigned)
Definition Constraint.cpp:34
vec auxiliary_resistance
Definition Constraint.h:46