suanPan
Loading...
Searching...
No Matches
ExternalMaterial.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (C) 2017-2025 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
******************************************************************************/
50
#ifndef EXTERNALMATERIAL_H
51
#define EXTERNALMATERIAL_H
52
53
#include <
Material/Material.h
>
54
#include "
ExternalMaterialData.h
"
55
56
class
ExternalMaterial
final :
public
Material
{
57
static
MaterialType
get_type(
const
ExternalMaterialData
&);
58
59
using
Interface = void (*)(
ExternalMaterialData
*,
int
*);
60
61
std::vector<double> constant;
62
63
Interface cooker;
64
65
ExternalMaterialData
data;
66
67
public
:
68
ExternalMaterial
(
69
unsigned
,
// unique material tag
70
std::vector<double>&&,
// parameter pool
71
void
*
// handler pointer
72
);
73
ExternalMaterial
(
const
ExternalMaterial
&);
74
ExternalMaterial
(
ExternalMaterial
&&) noexcept = delete;
75
ExternalMaterial
& operator=(const
ExternalMaterial
&) = delete;
76
ExternalMaterial
& operator=(
ExternalMaterial
&&) noexcept = delete;
77
~
ExternalMaterial
() override;
78
79
bool
validate
();
80
81
int
initialize
(const shared_ptr<
DomainBase
>&) override;
82
83
void
initialize_history
(
unsigned
) override;
84
void
set_initial_history
(const vec&) override;
85
86
unique_ptr<
Material
>
get_copy
() override;
87
88
int
update_trial_status
(const vec&) override;
89
int
update_trial_status
(const vec&, const vec&) override;
90
91
int
commit_status
() override;
92
int
reset_status
() override;
93
int
clear_status
() override;
94
95
std::vector<vec>
record
(
OutputType
) override;
96
};
97
98
#endif
99
ExternalMaterialData.h
Material.h
OutputType
OutputType
Definition
OutputType.h:23
DomainBase
The DomainBase class is a template.
Definition
DomainBase.h:104
ExternalMaterial
A ExternalMaterial class.
Definition
ExternalMaterial.h:56
ExternalMaterial::initialize_history
void initialize_history(unsigned) override
Definition
ExternalMaterial.cpp:96
ExternalMaterial::record
std::vector< vec > record(OutputType) override
Definition
ExternalMaterial.cpp:151
ExternalMaterial::get_copy
unique_ptr< Material > get_copy() override
Definition
ExternalMaterial.cpp:100
ExternalMaterial::update_trial_status
int update_trial_status(const vec &) override
Definition
ExternalMaterial.cpp:102
ExternalMaterial::set_initial_history
void set_initial_history(const vec &) override
Definition
ExternalMaterial.cpp:98
ExternalMaterial::initialize
int initialize(const shared_ptr< DomainBase > &) override
Definition
ExternalMaterial.cpp:72
ExternalMaterial::validate
bool validate()
Definition
ExternalMaterial.cpp:64
ExternalMaterial::reset_status
int reset_status() override
Definition
ExternalMaterial.cpp:135
ExternalMaterial::ExternalMaterial
ExternalMaterial(ExternalMaterial &&) noexcept=delete
ExternalMaterial::clear_status
int clear_status() override
Definition
ExternalMaterial.cpp:143
ExternalMaterial::commit_status
int commit_status() override
Definition
ExternalMaterial.cpp:127
Material
A Material abstract base class.
Definition
Material.h:111
MaterialType
MaterialType
Definition
Material.h:34
ExternalMaterialData
A ExternalMaterialData class.
Definition
ExternalMaterialData.h:51
Material
ExternalMaterial.h
Generated by
1.9.8