suanPan
Degradation.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 DEGRADATION_H
30
#define DEGRADATION_H
31
32
#include <
Material/Material1D/Material1D.h
>
33
34
class
Degradation
:
public
Material1D
{
35
const
unsigned
mat_tag;
36
37
protected
:
38
unique_ptr<Material>
base
;
39
40
[[nodiscard]]
virtual
vec
compute_positive_degradation
(
double
)
const
= 0;
// positive region
41
[[nodiscard]]
virtual
vec
compute_negative_degradation
(
double
)
const
= 0;
// negative region
42
43
public
:
44
Degradation
(
45
unsigned
,
// tag
46
unsigned
// material tag
47
);
48
Degradation
(
const
Degradation
&);
49
Degradation
(
Degradation
&&) noexcept = delete;
50
Degradation
& operator=(const
Degradation
&) = delete;
51
Degradation
& operator=(
Degradation
&&) noexcept = delete;
52
~
Degradation
() override = default;
53
54
int
initialize
(const shared_ptr<
DomainBase
>&) override;
55
56
int
clear_status
() override;
57
int
commit_status
() override;
58
int
reset_status
() override;
59
};
60
61
class
StrainDegradation
: public
Degradation
{
62
public
:
63
using
Degradation::Degradation
;
64
65
int
initialize
(
const
shared_ptr<DomainBase>&)
override
;
66
67
int
update_trial_status
(
const
vec&)
override
;
68
69
vector<vec>
record
(
OutputType
)
override
;
70
};
71
72
class
StressDegradation
:
public
Degradation
{
73
public
:
74
using
Degradation::Degradation
;
75
76
int
initialize
(
const
shared_ptr<DomainBase>&)
override
;
77
78
int
update_trial_status
(
const
vec&)
override
;
79
80
vector<vec>
record
(
OutputType
)
override
;
81
};
82
83
#endif
84
Material1D.h
OutputType
OutputType
Definition:
OutputType.h:23
Degradation
The Degradation class.
Definition:
Degradation.h:34
Degradation::compute_negative_degradation
virtual vec compute_negative_degradation(double) const =0
Degradation::Degradation
Degradation(Degradation &&) noexcept=delete
Degradation::commit_status
int commit_status() override
Definition:
Degradation.cpp:54
Degradation::reset_status
int reset_status() override
Definition:
Degradation.cpp:62
Degradation::compute_positive_degradation
virtual vec compute_positive_degradation(double) const =0
Degradation::initialize
int initialize(const shared_ptr< DomainBase > &) override
Definition:
Degradation.cpp:31
Degradation::clear_status
int clear_status() override
Definition:
Degradation.cpp:46
Degradation::Degradation
Degradation(unsigned, unsigned)
Definition:
Degradation.cpp:22
Degradation::base
unique_ptr< Material > base
Definition:
Degradation.h:38
DomainBase
The DomainBase class is a template.
Definition:
DomainBase.h:104
Material1D
A Material1D class.
Definition:
Material1D.h:36
Material1D::record
vector< vec > record(OutputType) override
Definition:
Material1D.cpp:24
Material::update_trial_status
int update_trial_status(double)
Definition:
Material.cpp:147
StrainDegradation
Definition:
Degradation.h:61
StressDegradation
Definition:
Degradation.h:72
unique_ptr< Material >
Material
Material1D
Degradation
Degradation.h
Generated by
1.9.4