38 std::atomic_bool updated =
false;
41 unsigned current_step_tag = 0;
42 unsigned current_converger_tag = 0;
43 unsigned current_integrator_tag = 0;
44 unsigned current_solver_tag = 0;
51 shared_ptr<LongFactory> factory;
77 std::vector<std::vector<unsigned>> color_map;
79 std::vector<bool> attribute;
82 explicit Domain(
unsigned = 0);
89 void set_factory(
const shared_ptr<LongFactory>&)
override;
90 const shared_ptr<LongFactory>&
get_factory()
const override;
92 bool insert(
const shared_ptr<future<void>>&)
override;
96 bool insert(
const shared_ptr<ExternalModule>&)
override;
99 bool insert(
const shared_ptr<Amplitude>&)
override;
100 bool insert(
const shared_ptr<Expression>&)
override;
101 bool insert(
const shared_ptr<Constraint>&)
override;
102 bool insert(
const shared_ptr<Converger>&)
override;
103 bool insert(
const shared_ptr<Criterion>&)
override;
104 bool insert(
const shared_ptr<Database>&)
override;
105 bool insert(
const shared_ptr<Element>&)
override;
106 bool insert(
const shared_ptr<Group>&)
override;
107 bool insert(
const shared_ptr<Integrator>&)
override;
108 bool insert(
const shared_ptr<Load>&)
override;
109 bool insert(
const shared_ptr<Material>&)
override;
110 bool insert(
const shared_ptr<Modifier>&)
override;
111 bool insert(
const shared_ptr<Node>&)
override;
112 bool insert(
const shared_ptr<Orientation>&)
override;
113 bool insert(
const shared_ptr<Recorder>&)
override;
114 bool insert(
const shared_ptr<Section>&)
override;
115 bool insert(
const shared_ptr<Solver>&)
override;
116 bool insert(
const shared_ptr<Step>&)
override;
175 const shared_ptr<Amplitude>&
get_amplitude(
unsigned)
const override;
176 const shared_ptr<Expression>&
get_expression(
unsigned)
const override;
177 const shared_ptr<Constraint>&
get_constraint(
unsigned)
const override;
178 const shared_ptr<Converger>&
get_converger(
unsigned)
const override;
179 const shared_ptr<Criterion>&
get_criterion(
unsigned)
const override;
180 const shared_ptr<Database>&
get_database(
unsigned)
const override;
181 const shared_ptr<Element>&
get_element(
unsigned)
const override;
182 const shared_ptr<Group>&
get_group(
unsigned)
const override;
183 const shared_ptr<Integrator>&
get_integrator(
unsigned)
const override;
184 const shared_ptr<Load>&
get_load(
unsigned)
const override;
185 const shared_ptr<Material>&
get_material(
unsigned)
const override;
186 const shared_ptr<Modifier>&
get_modifier(
unsigned)
const override;
187 const shared_ptr<Node>&
get_node(
unsigned)
const override;
188 const shared_ptr<Orientation>&
get_orientation(
unsigned)
const override;
189 const shared_ptr<Recorder>&
get_recorder(
unsigned)
const override;
190 const shared_ptr<Section>&
get_section(
unsigned)
const override;
191 const shared_ptr<Solver>&
get_solver(
unsigned)
const override;
192 const shared_ptr<Step>&
get_step(
unsigned)
const override;
213 friend shared_ptr<Amplitude>&
get_amplitude(
const shared_ptr<Domain>&,
unsigned);
214 friend shared_ptr<Expression>&
get_expression(
const shared_ptr<Domain>&,
unsigned);
215 friend shared_ptr<Constraint>&
get_constraint(
const shared_ptr<Domain>&,
unsigned);
216 friend shared_ptr<Converger>&
get_converger(
const shared_ptr<Domain>&,
unsigned);
217 friend shared_ptr<Criterion>&
get_criterion(
const shared_ptr<Domain>&,
unsigned);
218 friend shared_ptr<Database>&
get_database(
const shared_ptr<Domain>&,
unsigned);
219 friend shared_ptr<Element>&
get_element(
const shared_ptr<Domain>&,
unsigned);
220 friend shared_ptr<Group>&
get_group(
const shared_ptr<Domain>&,
unsigned);
221 friend shared_ptr<Integrator>&
get_integrator(
const shared_ptr<Domain>&,
unsigned);
222 friend shared_ptr<Load>&
get_load(
const shared_ptr<Domain>&,
unsigned);
223 friend shared_ptr<Material>&
get_material(
const shared_ptr<Domain>&,
unsigned);
224 friend shared_ptr<Modifier>&
get_modifier(
const shared_ptr<Domain>&,
unsigned);
225 friend shared_ptr<Node>&
get_node(
const shared_ptr<Domain>&,
unsigned);
226 friend shared_ptr<Orientation>&
get_orientation(
const shared_ptr<Domain>&,
unsigned);
227 friend shared_ptr<Recorder>&
get_recorder(
const shared_ptr<Domain>&,
unsigned);
228 friend shared_ptr<Section>&
get_section(
const shared_ptr<Domain>&,
unsigned);
229 friend shared_ptr<Solver>&
get_solver(
const shared_ptr<Domain>&,
unsigned);
230 friend shared_ptr<Step>&
get_step(
const shared_ptr<Domain>&,
unsigned);
232 friend shared_ptr<Amplitude>&
get_amplitude(
const shared_ptr<DomainBase>&,
unsigned);
233 friend shared_ptr<Expression>&
get_expression(
const shared_ptr<DomainBase>&,
unsigned);
234 friend shared_ptr<Constraint>&
get_constraint(
const shared_ptr<DomainBase>&,
unsigned);
235 friend shared_ptr<Converger>&
get_converger(
const shared_ptr<DomainBase>&,
unsigned);
236 friend shared_ptr<Criterion>&
get_criterion(
const shared_ptr<DomainBase>&,
unsigned);
237 friend shared_ptr<Database>&
get_database(
const shared_ptr<DomainBase>&,
unsigned);
238 friend shared_ptr<Element>&
get_element(
const shared_ptr<DomainBase>&,
unsigned);
239 friend shared_ptr<Group>&
get_group(
const shared_ptr<DomainBase>&,
unsigned);
240 friend shared_ptr<Integrator>&
get_integrator(
const shared_ptr<DomainBase>&,
unsigned);
241 friend shared_ptr<Load>&
get_load(
const shared_ptr<DomainBase>&,
unsigned);
242 friend shared_ptr<Material>&
get_material(
const shared_ptr<DomainBase>&,
unsigned);
243 friend shared_ptr<Modifier>&
get_modifier(
const shared_ptr<DomainBase>&,
unsigned);
244 friend shared_ptr<Node>&
get_node(
const shared_ptr<DomainBase>&,
unsigned);
245 friend shared_ptr<Orientation>&
get_orientation(
const shared_ptr<DomainBase>&,
unsigned);
246 friend shared_ptr<Recorder>&
get_recorder(
const shared_ptr<DomainBase>&,
unsigned);
247 friend shared_ptr<Section>&
get_section(
const shared_ptr<DomainBase>&,
unsigned);
248 friend shared_ptr<Solver>&
get_solver(
const shared_ptr<DomainBase>&,
unsigned);
249 friend shared_ptr<Step>&
get_step(
const shared_ptr<DomainBase>&,
unsigned);
323 const std::vector<std::vector<unsigned>>&
get_color_map()
const override;
394 void save(
string)
override;
The DomainBase class is a template.
Definition: DomainBase.h:96
A Domain class holds all FE model components.
Definition: Domain.h:37
bool find_element(unsigned) const override
Definition: Domain.cpp:663
bool find_node(unsigned) const override
Definition: Domain.cpp:675
void assemble_damping_force() const override
Definition: DomainState.cpp:82
void disable_amplitude(unsigned) override
Definition: Domain.cpp:289
void enable_constraint(unsigned) override
Definition: Domain.cpp:430
const ConvergerQueue & get_converger_pool() const override
Definition: Domain.cpp:585
bool erase_modifier(unsigned) override
Definition: Domain.cpp:240
int update_trial_status() const override
Definition: DomainState.cpp:315
bool erase_node(unsigned) override
Definition: Domain.cpp:247
bool erase_expression(unsigned) override
Definition: Domain.cpp:170
bool find_material(unsigned) const override
Definition: Domain.cpp:671
bool erase_load(unsigned) override
Definition: Domain.cpp:226
const shared_ptr< Step > & get_current_step() const override
Definition: Domain.cpp:703
void enable_step(unsigned) override
Definition: Domain.cpp:535
void update_load() override
Definition: Domain.cpp:1222
friend shared_ptr< Constraint > & get_constraint(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:24
bool erase_converger(unsigned) override
Definition: Domain.cpp:184
void enable_solver(unsigned) override
Definition: Domain.cpp:528
bool erase_constraint(unsigned) override
Definition: Domain.cpp:177
const AmplitudeQueue & get_amplitude_pool() const override
Definition: Domain.cpp:579
friend shared_ptr< Section > & get_section(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:50
void enable_modifier(unsigned) override
Definition: Domain.cpp:493
bool is_sparse() const override
Definition: Domain.cpp:749
void enable_section(unsigned) override
Definition: Domain.cpp:521
bool erase_integrator(unsigned) override
Definition: Domain.cpp:219
void assemble_initial_mass() const override
Definition: DomainState.cpp:116
void assemble_trial_geometry() const override
Definition: DomainState.cpp:272
void assemble_current_mass() const override
Definition: DomainState.cpp:130
const ExternalModuleQueue & get_external_module_pool() const override
Definition: Domain.cpp:71
bool erase_section(unsigned) override
Definition: Domain.cpp:268
friend shared_ptr< Amplitude > & get_amplitude(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:20
const ModifierQueue & get_modifier_pool() const override
Definition: Domain.cpp:601
const StepQueue & get_step_pool() const override
Definition: Domain.cpp:613
bool insert(const shared_ptr< future< void > > &) override
Definition: Domain.cpp:59
bool find_modifier(unsigned) const override
Definition: Domain.cpp:673
bool erase_element(unsigned) override
Definition: Domain.cpp:205
void enable_element(unsigned) override
Definition: Domain.cpp:458
void disable_converger(unsigned) override
Definition: Domain.cpp:310
void insert_restrained_dof(const uvec &) override
concurrently safe insertion method
Definition: Domain.cpp:719
const shared_ptr< Solver > & get_current_solver() const override
Definition: Domain.cpp:709
const RecorderQueue & get_recorder_pool() const override
Definition: Domain.cpp:607
const MaterialQueue & get_material_pool() const override
Definition: Domain.cpp:599
friend shared_ptr< Material > & get_material(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:40
void assemble_current_geometry() const override
Definition: DomainState.cpp:257
void assemble_constraint_stiffness() override
Definition: Domain.cpp:1238
const shared_ptr< LongFactory > & get_factory() const override
Definition: Domain.cpp:57
void update_current_resistance() const override
Definition: DomainState.cpp:25
const shared_ptr< Integrator > & get_current_integrator() const override
Definition: Domain.cpp:707
void disable_orientation(unsigned) override
Definition: Domain.cpp:380
const DatabaseQueue & get_database_pool() const override
Definition: Domain.cpp:589
int initialize_constraint() override
Definition: Domain.cpp:1047
const ElementQueue & get_element_pool() const override
Definition: Domain.cpp:591
int process_constraint(bool) override
Definition: Domain.cpp:1110
const suanpan::unordered_set< uword > & get_constrained_dof() const override
Definition: Domain.cpp:745
bool find_recorder(unsigned) const override
Definition: Domain.cpp:679
Domain(const Domain &)=delete
~Domain() override
Definition: Domain.cpp:48
const SolverQueue & get_solver_pool() const override
Definition: Domain.cpp:611
void reset_status() const override
Definition: DomainState.cpp:433
void enable_load(unsigned) override
Definition: Domain.cpp:479
void enable_converger(unsigned) override
Definition: Domain.cpp:437
int process_modifier() override
Definition: Domain.cpp:1189
void clear_status() override
Definition: DomainState.cpp:410
void enable_expression(unsigned) override
Definition: Domain.cpp:423
void set_current_solver_tag(unsigned) override
Definition: Domain.cpp:693
void summary() const override
Definition: Domain.cpp:1215
void enable_group(unsigned) override
Definition: Domain.cpp:465
bool erase_material(unsigned) override
Definition: Domain.cpp:233
bool find_integrator(unsigned) const override
Definition: Domain.cpp:667
int initialize() override
Definition: Domain.cpp:898
friend shared_ptr< Orientation > & get_orientation(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:46
void insert_constrained_dof(const uvec &) override
concurrently safe insertion method
Definition: Domain.cpp:724
bool find_section(unsigned) const override
Definition: Domain.cpp:681
int update_incre_status() const override
Definition: DomainState.cpp:328
bool find_amplitude(unsigned) const override
Definition: Domain.cpp:651
const OrientationQueue & get_orientation_pool() const override
Definition: Domain.cpp:605
friend shared_ptr< Converger > & get_converger(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:26
void enable_orientation(unsigned) override
Definition: Domain.cpp:507
bool erase_recorder(unsigned) override
Definition: Domain.cpp:261
void disable_criterion(unsigned) override
Definition: Domain.cpp:317
bool find_converger(unsigned) const override
Definition: Domain.cpp:657
void disable_node(unsigned) override
Definition: Domain.cpp:373
void assemble_trial_stiffness() const override
Definition: DomainState.cpp:228
void enable_database(unsigned) override
Definition: Domain.cpp:451
void set_factory(const shared_ptr< LongFactory > &) override
Definition: Domain.cpp:50
Domain & operator=(Domain &&)=delete
void disable_solver(unsigned) override
Definition: Domain.cpp:401
bool erase_step(unsigned) override
Definition: Domain.cpp:282
unsigned get_current_converger_tag() override
Definition: Domain.cpp:697
unsigned get_current_step_tag() override
Definition: Domain.cpp:695
friend shared_ptr< Group > & get_group(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:34
void enable_all() override
Definition: Domain.cpp:1198
bool find_criterion(unsigned) const override
Definition: Domain.cpp:659
friend shared_ptr< Element > & get_element(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:32
const IntegratorQueue & get_integrator_pool() const override
Definition: Domain.cpp:595
int restart() override
Definition: Domain.cpp:876
const CriterionQueue & get_criterion_pool() const override
Definition: Domain.cpp:587
bool find_group(unsigned) const override
Definition: Domain.cpp:665
void disable_element(unsigned) override
Definition: Domain.cpp:331
const ConstraintQueue & get_constraint_pool() const override
Definition: Domain.cpp:583
friend shared_ptr< Database > & get_database(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:30
const ExpressionQueue & get_expression_pool() const override
Definition: Domain.cpp:581
bool find_expression(unsigned) const override
Definition: Domain.cpp:653
void set_current_integrator_tag(unsigned) override
Definition: Domain.cpp:691
int process_criterion() override
Definition: Domain.cpp:1183
bool erase_amplitude(unsigned) override
Definition: Domain.cpp:163
void assemble_initial_geometry() const override
Definition: DomainState.cpp:242
friend shared_ptr< Solver > & get_solver(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:52
bool find_constraint(unsigned) const override
Definition: Domain.cpp:655
void enable_node(unsigned) override
Definition: Domain.cpp:500
void disable_recorder(unsigned) override
Definition: Domain.cpp:387
friend shared_ptr< Expression > & get_expression(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:22
bool get_attribute(ModalAttribute) override
Definition: Domain.cpp:753
const std::vector< std::vector< unsigned > > & get_color_map() const override
Definition: Domain.cpp:760
void assemble_initial_damping() const override
Definition: DomainState.cpp:158
const suanpan::unordered_set< uword > & get_loaded_dof() const override
Definition: Domain.cpp:741
void assemble_load_stiffness() override
Definition: Domain.cpp:1236
bool is_updated() const override
Definition: Domain.cpp:747
void disable_expression(unsigned) override
Definition: Domain.cpp:296
void assemble_mass_container() const override
Definition: DomainState.cpp:287
void set_color_model(ColorMethod) override
Definition: Domain.cpp:755
const SectionQueue & get_section_pool() const override
Definition: Domain.cpp:609
std::pair< std::vector< unsigned >, suanpan::graph< unsigned > > get_element_connectivity(bool) override
Definition: Domain.cpp:762
int assign_color() override
Definition: Domain.cpp:848
void enable_recorder(unsigned) override
Definition: Domain.cpp:514
bool find_load(unsigned) const override
Definition: Domain.cpp:669
int initialize_load() override
Definition: Domain.cpp:1038
bool erase_group(unsigned) override
Definition: Domain.cpp:212
void commit_status() const override
Definition: DomainState.cpp:397
const suanpan::unordered_set< uword > & get_restrained_dof() const override
Definition: Domain.cpp:743
void assemble_stiffness_container() const override
Definition: DomainState.cpp:301
void disable_database(unsigned) override
Definition: Domain.cpp:324
void enable_criterion(unsigned) override
Definition: Domain.cpp:444
void update_current_damping_force() const override
Definition: DomainState.cpp:39
void enable_amplitude(unsigned) override
Definition: Domain.cpp:416
friend shared_ptr< Modifier > & get_modifier(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:42
void stage_status() override
Definition: DomainState.cpp:395
friend shared_ptr< Load > & get_load(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:38
bool find_step(unsigned) const override
Definition: Domain.cpp:685
const shared_ptr< Converger > & get_current_converger() const override
Definition: Domain.cpp:705
void set_current_converger_tag(unsigned) override
Definition: Domain.cpp:689
friend shared_ptr< Criterion > & get_criterion(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:28
unsigned get_current_integrator_tag() override
Definition: Domain.cpp:699
int reorder_dof() override
Definition: Domain.cpp:788
const LoadQueue & get_load_pool() const override
Definition: Domain.cpp:597
friend shared_ptr< Node > & get_node(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:44
Domain & operator=(const Domain &)=delete
void assemble_current_stiffness() const override
Definition: DomainState.cpp:214
void assemble_current_damping() const override
Definition: DomainState.cpp:172
friend shared_ptr< Recorder > & get_recorder(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:48
unsigned get_current_solver_tag() override
Definition: Domain.cpp:701
int initialize_reference() override
Definition: Domain.cpp:1054
bool find_database(unsigned) const override
Definition: Domain.cpp:661
void disable_section(unsigned) override
Definition: Domain.cpp:394
void set_current_step_tag(unsigned) override
Definition: Domain.cpp:687
bool find_orientation(unsigned) const override
Definition: Domain.cpp:677
const NodeQueue & get_node_pool() const override
Definition: Domain.cpp:603
void wait() override
Definition: Domain.cpp:64
bool erase_database(unsigned) override
Definition: Domain.cpp:198
void disable_material(unsigned) override
Definition: Domain.cpp:359
bool erase_solver(unsigned) override
Definition: Domain.cpp:275
int soft_restart() override
Definition: Domain.cpp:896
bool erase_criterion(unsigned) override
Definition: Domain.cpp:191
void assemble_trial_damping() const override
Definition: DomainState.cpp:186
void enable_integrator(unsigned) override
Definition: Domain.cpp:472
void disable_modifier(unsigned) override
Definition: Domain.cpp:366
void disable_load(unsigned) override
Definition: Domain.cpp:352
bool find_solver(unsigned) const override
Definition: Domain.cpp:683
void record() override
Definition: Domain.cpp:1196
void erase_machine_error(vec &) const override
Definition: Domain.cpp:1220
void save(string) override
Definition: Domain.cpp:1240
int update_current_status() const override
Definition: DomainState.cpp:341
friend shared_ptr< Integrator > & get_integrator(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:36
const GroupQueue & get_group_pool() const override
Definition: Domain.cpp:593
void update_constraint() override
Definition: Domain.cpp:1224
void assemble_trial_mass() const override
Definition: DomainState.cpp:144
void assemble_inertial_force() const override
Definition: DomainState.cpp:99
void assemble_resistance() const override
Definition: DomainState.cpp:65
void enable_material(unsigned) override
Definition: Domain.cpp:486
void assemble_initial_stiffness() const override
Definition: DomainState.cpp:200
void disable_constraint(unsigned) override
Definition: Domain.cpp:303
void update_current_inertial_force() const override
Definition: DomainState.cpp:52
void disable_integrator(unsigned) override
Definition: Domain.cpp:345
void set_attribute(ModalAttribute) override
Definition: Domain.cpp:751
void disable_group(unsigned) override
Definition: Domain.cpp:338
bool erase_orientation(unsigned) override
Definition: Domain.cpp:254
int process_load(bool) override
Definition: Domain.cpp:1074
friend shared_ptr< Step > & get_step(const shared_ptr< Domain > &, unsigned)
Definition: DomainHelper.cpp:54
void insert_loaded_dof(const uvec &) override
concurrently safe insertion method
Definition: Domain.cpp:714
void disable_step(unsigned) override
Definition: Domain.cpp:408
ColorMethod
Definition: DomainBase.h:86
std::vector< shared_ptr< ExternalModule > > ExternalModuleQueue
Definition: Domain.h:34
std::vector< shared_ptr< Orientation > > OrientationQueue
Definition: DomainBase.h:78
std::vector< shared_ptr< Node > > NodeQueue
Definition: DomainBase.h:77
std::vector< shared_ptr< Database > > DatabaseQueue
Definition: DomainBase.h:70
std::vector< shared_ptr< Group > > GroupQueue
Definition: DomainBase.h:72
std::vector< shared_ptr< Material > > MaterialQueue
Definition: DomainBase.h:75
std::vector< shared_ptr< Modifier > > ModifierQueue
Definition: DomainBase.h:76
std::vector< shared_ptr< Integrator > > IntegratorQueue
Definition: DomainBase.h:73
std::vector< shared_ptr< Recorder > > RecorderQueue
Definition: DomainBase.h:79
std::vector< shared_ptr< Constraint > > ConstraintQueue
Definition: DomainBase.h:67
std::map< unsigned, shared_ptr< Step > > StepQueue
Definition: DomainBase.h:82
std::vector< shared_ptr< future< void > > > ThreadQueue
Definition: Domain.h:35
std::vector< shared_ptr< Element > > ElementQueue
Definition: DomainBase.h:71
std::vector< shared_ptr< Converger > > ConvergerQueue
Definition: DomainBase.h:68
std::vector< shared_ptr< Solver > > SolverQueue
Definition: DomainBase.h:81
std::vector< shared_ptr< Load > > LoadQueue
Definition: DomainBase.h:74
std::vector< shared_ptr< Section > > SectionQueue
Definition: DomainBase.h:80
std::vector< shared_ptr< Criterion > > CriterionQueue
Definition: DomainBase.h:69
std::vector< shared_ptr< Expression > > ExpressionQueue
Definition: DomainBase.h:66
ModalAttribute
Definition: DomainBase.h:92
std::vector< shared_ptr< Amplitude > > AmplitudeQueue
Definition: DomainBase.h:65
std::unordered_set< T > unordered_set
Definition: container.h:55
vector< set< T > > graph
Definition: container.h:59