suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
Modifier.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 ******************************************************************************/
28#ifndef MODIFIER_H
29#define MODIFIER_H
30
31#include <Domain/Tag.h>
32#include <Element/Element.h>
33
34class DomainBase;
35
36class Modifier : public UniqueTag {
37protected:
39
40 std::vector<std::weak_ptr<Element>> element_pool;
41
42public:
43 explicit Modifier(
44 unsigned = 0, // tag
45 uvec&& = {} // element tags
46 );
47
48 [[nodiscard]] virtual bool has_nonviscous() const { return false; }
49
50 virtual int initialize(const shared_ptr<DomainBase>&);
51
52 virtual bool if_apply(const shared_ptr<DomainBase>&);
53
54 virtual int update_status() = 0;
55};
56
57class ModifierDynamics : public Modifier {
58public:
60
61 bool if_apply(const shared_ptr<DomainBase>&) override;
62};
63
64#endif
65
The DomainBase class is a template.
Definition DomainBase.h:94
Definition Modifier.h:57
bool if_apply(const shared_ptr< DomainBase > &) override
Definition Modifier.cpp:47
A Modifier class.
Definition Modifier.h:36
virtual bool has_nonviscous() const
Definition Modifier.h:48
virtual int initialize(const shared_ptr< DomainBase > &)
Definition Modifier.cpp:27
uvec element_tag
Definition Modifier.h:38
Modifier(unsigned=0, uvec &&={})
Definition Modifier.cpp:23
virtual int update_status()=0
std::vector< std::weak_ptr< Element > > element_pool
Definition Modifier.h:40
virtual bool if_apply(const shared_ptr< DomainBase > &)
Definition Modifier.cpp:45
Label objects that cannot be copied.
Definition Tag.h:88