suanPan
NonlinearNM.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 ******************************************************************************/
29#ifndef NONLINEARNM_H
30#define NONLINEARNM_H
31
32#include "SectionNM.h"
33
35 const double EA, EIS, EIW;
36 const vec yield_force;
37};
38
39class NonlinearNM : protected DataNonlinearNM, public SectionNM {
40 [[nodiscard]] virtual int compute_local_integration(vec&, mat&) = 0;
41
42protected:
43 static constexpr unsigned max_iteration = 20u;
44
45 const vec yield_diag;
46
47 const mat ti, tj;
48
49 const bool has_kinematic;
50
51 const unsigned n_size; // nodal dof size
52 const unsigned d_size = 2llu * n_size - 1llu; // element dof size
53 const unsigned g_size; // global jacobian size
54
55 const uvec ni, nj, ga, gb, gc, gd, ge;
56
57 [[nodiscard]] virtual vec compute_h(double) const = 0;
58 [[nodiscard]] virtual vec compute_dh(double) const = 0;
59
60 [[nodiscard]] virtual double compute_f(const vec&, const vec&) const = 0;
61 [[nodiscard]] virtual vec compute_df(const vec&, const vec&) const = 0;
62 [[nodiscard]] virtual mat compute_ddf(const vec&, const vec&) const = 0;
63
64public:
66 unsigned, // tag
67 double, // axial rigidity
68 double, // flexural rigidity
69 bool, // kinematic hardening modulus
70 double, // linear density
71 vec&&
72 );
74 unsigned, // tag
75 double, // axial rigidity
76 double, // flexural rigidity
77 double, // flexural rigidity
78 bool, // kinematic hardening modulus
79 double, // linear density
80 vec&&
81 );
82
83 int initialize(const shared_ptr<DomainBase>&) override;
84
85 int update_trial_status(const vec&) override;
86
87 vector<vec> record(OutputType) override;
88};
89
90#endif
91
OutputType
Definition: OutputType.h:23
A NonlinearNM class.
Definition: NonlinearNM.h:39
const vec yield_diag
Definition: NonlinearNM.h:45
vector< vec > record(OutputType) override
Definition: NonlinearNM.cpp:133
int update_trial_status(const vec &) override
Definition: NonlinearNM.cpp:93
int initialize(const shared_ptr< DomainBase > &) override
Definition: NonlinearNM.cpp:72
virtual vec compute_dh(double) const =0
const mat ti
Definition: NonlinearNM.h:47
virtual double compute_f(const vec &, const vec &) const =0
const uvec gb
Definition: NonlinearNM.h:55
const unsigned d_size
Definition: NonlinearNM.h:52
const uvec ni
Definition: NonlinearNM.h:55
const uvec ga
Definition: NonlinearNM.h:55
const uvec gd
Definition: NonlinearNM.h:55
const bool has_kinematic
Definition: NonlinearNM.h:49
virtual vec compute_df(const vec &, const vec &) const =0
static constexpr unsigned max_iteration
Definition: NonlinearNM.h:43
const unsigned g_size
Definition: NonlinearNM.h:53
virtual vec compute_h(double) const =0
NonlinearNM(unsigned, double, double, bool, double, vec &&)
Definition: NonlinearNM.cpp:22
const mat tj
Definition: NonlinearNM.h:47
virtual mat compute_ddf(const vec &, const vec &) const =0
const uvec nj
Definition: NonlinearNM.h:55
const uvec gc
Definition: NonlinearNM.h:55
const unsigned n_size
Definition: NonlinearNM.h:51
const uvec ge
Definition: NonlinearNM.h:55
A SectionNM class.
Definition: SectionNM.h:42
Definition: NonlinearNM.h:34
const double EIS
Definition: NonlinearNM.h:35
const vec yield_force
Definition: NonlinearNM.h:36
const double EA
Definition: NonlinearNM.h:35
const double EIW
Definition: NonlinearNM.h:35