39 std::atomic_bool updated =
false;
42 unsigned current_step_tag = 0;
43 std::pair<unsigned, unsigned> current_converger_tag{0, 0};
44 std::pair<unsigned, unsigned> current_integrator_tag{0, 0};
45 std::pair<unsigned, unsigned> current_solver_tag{0, 0};
52 shared_ptr<LongFactory> factory;
78 std::vector<std::vector<unsigned>> color_map;
80 std::vector<bool> attribute;
82 mutable std::array<double, 5> statistics{};
85 explicit Domain(
unsigned = 0);
92 void set_factory(
const shared_ptr<LongFactory>&)
override;
93 const shared_ptr<LongFactory>&
get_factory()
const override;
95 bool insert(
const shared_ptr<future<void>>&)
override;
99 bool insert(
const shared_ptr<ExternalModule>&)
override;
102 bool insert(
const shared_ptr<Amplitude>&)
override;
103 bool insert(
const shared_ptr<Expression>&)
override;
104 bool insert(
const shared_ptr<Constraint>&)
override;
105 bool insert(
const shared_ptr<Converger>&)
override;
106 bool insert(
const shared_ptr<Criterion>&)
override;
107 bool insert(
const shared_ptr<Database>&)
override;
108 bool insert(
const shared_ptr<Element>&)
override;
109 bool insert(
const shared_ptr<Group>&)
override;
110 bool insert(
const shared_ptr<Integrator>&)
override;
111 bool insert(
const shared_ptr<Load>&)
override;
112 bool insert(
const shared_ptr<Material>&)
override;
113 bool insert(
const shared_ptr<Modifier>&)
override;
114 bool insert(
const shared_ptr<Node>&)
override;
115 bool insert(
const shared_ptr<Orientation>&)
override;
116 bool insert(
const shared_ptr<Recorder>&)
override;
117 bool insert(
const shared_ptr<Section>&)
override;
118 bool insert(
const shared_ptr<Solver>&)
override;
119 bool insert(
const shared_ptr<Step>&)
override;
178 const shared_ptr<Amplitude>&
get_amplitude(
unsigned)
const override;
179 const shared_ptr<Expression>&
get_expression(
unsigned)
const override;
180 const shared_ptr<Constraint>&
get_constraint(
unsigned)
const override;
181 const shared_ptr<Converger>&
get_converger(
unsigned)
const override;
182 const shared_ptr<Criterion>&
get_criterion(
unsigned)
const override;
183 const shared_ptr<Database>&
get_database(
unsigned)
const override;
184 const shared_ptr<Element>&
get_element(
unsigned)
const override;
185 const shared_ptr<Group>&
get_group(
unsigned)
const override;
186 const shared_ptr<Integrator>&
get_integrator(
unsigned)
const override;
187 const shared_ptr<Load>&
get_load(
unsigned)
const override;
188 const shared_ptr<Material>&
get_material(
unsigned)
const override;
189 const shared_ptr<Modifier>&
get_modifier(
unsigned)
const override;
190 const shared_ptr<Node>&
get_node(
unsigned)
const override;
191 const shared_ptr<Orientation>&
get_orientation(
unsigned)
const override;
192 const shared_ptr<Recorder>&
get_recorder(
unsigned)
const override;
193 const shared_ptr<Section>&
get_section(
unsigned)
const override;
194 const shared_ptr<Solver>&
get_solver(
unsigned)
const override;
195 const shared_ptr<Step>&
get_step(
unsigned)
const override;
216 friend shared_ptr<Amplitude>&
get_amplitude(
const shared_ptr<Domain>&,
unsigned);
217 friend shared_ptr<Expression>&
get_expression(
const shared_ptr<Domain>&,
unsigned);
218 friend shared_ptr<Constraint>&
get_constraint(
const shared_ptr<Domain>&,
unsigned);
219 friend shared_ptr<Converger>&
get_converger(
const shared_ptr<Domain>&,
unsigned);
220 friend shared_ptr<Criterion>&
get_criterion(
const shared_ptr<Domain>&,
unsigned);
221 friend shared_ptr<Database>&
get_database(
const shared_ptr<Domain>&,
unsigned);
222 friend shared_ptr<Element>&
get_element(
const shared_ptr<Domain>&,
unsigned);
223 friend shared_ptr<Group>&
get_group(
const shared_ptr<Domain>&,
unsigned);
224 friend shared_ptr<Integrator>&
get_integrator(
const shared_ptr<Domain>&,
unsigned);
225 friend shared_ptr<Load>&
get_load(
const shared_ptr<Domain>&,
unsigned);
226 friend shared_ptr<Material>&
get_material(
const shared_ptr<Domain>&,
unsigned);
227 friend shared_ptr<Modifier>&
get_modifier(
const shared_ptr<Domain>&,
unsigned);
228 friend shared_ptr<Node>&
get_node(
const shared_ptr<Domain>&,
unsigned);
229 friend shared_ptr<Orientation>&
get_orientation(
const shared_ptr<Domain>&,
unsigned);
230 friend shared_ptr<Recorder>&
get_recorder(
const shared_ptr<Domain>&,
unsigned);
231 friend shared_ptr<Section>&
get_section(
const shared_ptr<Domain>&,
unsigned);
232 friend shared_ptr<Solver>&
get_solver(
const shared_ptr<Domain>&,
unsigned);
233 friend shared_ptr<Step>&
get_step(
const shared_ptr<Domain>&,
unsigned);
235 friend shared_ptr<Amplitude>&
get_amplitude(
const shared_ptr<DomainBase>&,
unsigned);
236 friend shared_ptr<Expression>&
get_expression(
const shared_ptr<DomainBase>&,
unsigned);
237 friend shared_ptr<Constraint>&
get_constraint(
const shared_ptr<DomainBase>&,
unsigned);
238 friend shared_ptr<Converger>&
get_converger(
const shared_ptr<DomainBase>&,
unsigned);
239 friend shared_ptr<Criterion>&
get_criterion(
const shared_ptr<DomainBase>&,
unsigned);
240 friend shared_ptr<Database>&
get_database(
const shared_ptr<DomainBase>&,
unsigned);
241 friend shared_ptr<Element>&
get_element(
const shared_ptr<DomainBase>&,
unsigned);
242 friend shared_ptr<Group>&
get_group(
const shared_ptr<DomainBase>&,
unsigned);
243 friend shared_ptr<Integrator>&
get_integrator(
const shared_ptr<DomainBase>&,
unsigned);
244 friend shared_ptr<Load>&
get_load(
const shared_ptr<DomainBase>&,
unsigned);
245 friend shared_ptr<Material>&
get_material(
const shared_ptr<DomainBase>&,
unsigned);
246 friend shared_ptr<Modifier>&
get_modifier(
const shared_ptr<DomainBase>&,
unsigned);
247 friend shared_ptr<Node>&
get_node(
const shared_ptr<DomainBase>&,
unsigned);
248 friend shared_ptr<Orientation>&
get_orientation(
const shared_ptr<DomainBase>&,
unsigned);
249 friend shared_ptr<Recorder>&
get_recorder(
const shared_ptr<DomainBase>&,
unsigned);
250 friend shared_ptr<Section>&
get_section(
const shared_ptr<DomainBase>&,
unsigned);
251 friend shared_ptr<Solver>&
get_solver(
const shared_ptr<DomainBase>&,
unsigned);
252 friend shared_ptr<Step>&
get_step(
const shared_ptr<DomainBase>&,
unsigned);
328 const std::vector<std::vector<unsigned>>&
get_color_map()
const override;
408 void update(
const Statistics T,
const double value)
const override { statistics[
static_cast<size_t>(
T)] += value; }
412 void save(
string)
override;
The DomainBase class is a template.
Definition: DomainBase.h:104
A Domain class holds all FE model components.
Definition: Domain.h:38
bool find_element(unsigned) const override
Definition: Domain.cpp:662
bool find_node(unsigned) const override
Definition: Domain.cpp:674
void assemble_damping_force() const override
Definition: DomainState.cpp:96
std::pair< unsigned, unsigned > get_current_solver_tag() override
Definition: Domain.cpp:700
void disable_amplitude(unsigned) override
Definition: Domain.cpp:288
void enable_constraint(unsigned) override
Definition: Domain.cpp:429
const ConvergerQueue & get_converger_pool() const override
Definition: Domain.cpp:584
bool erase_modifier(unsigned) override
Definition: Domain.cpp:239
size_t get_solver() const override
Definition: Domain.cpp:646
int update_trial_status() const override
Definition: DomainState.cpp:391
void assemble_current_nonviscous() const override
Definition: DomainState.cpp:246
bool erase_node(unsigned) override
Definition: Domain.cpp:246
bool erase_expression(unsigned) override
Definition: Domain.cpp:169
bool find_material(unsigned) const override
Definition: Domain.cpp:670
void assemble_nonviscous_force() const override
Definition: DomainState.cpp:113
bool erase_load(unsigned) override
Definition: Domain.cpp:225
const shared_ptr< Step > & get_current_step() const override
Definition: Domain.cpp:702
void enable_step(unsigned) override
Definition: Domain.cpp:534
void update_load() override
Definition: Domain.cpp:1253
bool erase_converger(unsigned) override
Definition: Domain.cpp:183
void enable_solver(unsigned) override
Definition: Domain.cpp:527
bool erase_constraint(unsigned) override
Definition: Domain.cpp:176
const AmplitudeQueue & get_amplitude_pool() const override
Definition: Domain.cpp:578
size_t get_converger() const override
Definition: Domain.cpp:620
void enable_modifier(unsigned) override
Definition: Domain.cpp:492
bool is_sparse() const override
Definition: Domain.cpp:762
void enable_section(unsigned) override
Definition: Domain.cpp:520
bool erase_integrator(unsigned) override
Definition: Domain.cpp:218
int initialize_section() override
Definition: Domain.cpp:1072
void assemble_initial_mass() const override
Definition: DomainState.cpp:147
std::pair< unsigned, unsigned > get_current_converger_tag() override
Definition: Domain.cpp:696
void assemble_trial_geometry() const override
Definition: DomainState.cpp:348
void assemble_current_mass() const override
Definition: DomainState.cpp:161
const ExternalModuleQueue & get_external_module_pool() const override
Definition: Domain.cpp:70
bool erase_section(unsigned) override
Definition: Domain.cpp:267
const ModifierQueue & get_modifier_pool() const override
Definition: Domain.cpp:600
const StepQueue & get_step_pool() const override
Definition: Domain.cpp:612
bool insert(const shared_ptr< future< void > > &) override
Definition: Domain.cpp:58
bool find_modifier(unsigned) const override
Definition: Domain.cpp:672
bool erase_element(unsigned) override
Definition: Domain.cpp:204
void enable_element(unsigned) override
Definition: Domain.cpp:457
void disable_converger(unsigned) override
Definition: Domain.cpp:309
void insert_restrained_dof(const uvec &) override
concurrently safe insertion method
Definition: Domain.cpp:732
const shared_ptr< Solver > & get_current_solver() const override
Definition: Domain.cpp:708
const RecorderQueue & get_recorder_pool() const override
Definition: Domain.cpp:606
const MaterialQueue & get_material_pool() const override
Definition: Domain.cpp:598
void assemble_current_geometry() const override
Definition: DomainState.cpp:333
void assemble_constraint_stiffness() override
Definition: Domain.cpp:1269
const shared_ptr< LongFactory > & get_factory() const override
Definition: Domain.cpp:56
void update_current_resistance() const override
Definition: DomainState.cpp:26
const shared_ptr< Integrator > & get_current_integrator() const override
Definition: Domain.cpp:706
void disable_orientation(unsigned) override
Definition: Domain.cpp:379
const DatabaseQueue & get_database_pool() const override
Definition: Domain.cpp:588
int initialize_constraint() override
Definition: Domain.cpp:1023
const ElementQueue & get_element_pool() const override
Definition: Domain.cpp:590
int process_constraint(bool) override
Definition: Domain.cpp:1141
const suanpan::unordered_set< uword > & get_constrained_dof() const override
Definition: Domain.cpp:758
size_t get_node() const override
Definition: Domain.cpp:638
bool find_recorder(unsigned) const override
Definition: Domain.cpp:678
Domain(const Domain &)=delete
~Domain() override
Definition: Domain.cpp:47
const SolverQueue & get_solver_pool() const override
Definition: Domain.cpp:610
void reset_status() const override
Definition: DomainState.cpp:511
size_t get_amplitude() const override
Definition: Domain.cpp:614
void enable_load(unsigned) override
Definition: Domain.cpp:478
void enable_converger(unsigned) override
Definition: Domain.cpp:436
int process_modifier() override
Definition: Domain.cpp:1220
void clear_status() override
Definition: DomainState.cpp:486
void enable_expression(unsigned) override
Definition: Domain.cpp:422
void set_current_solver_tag(unsigned) override
Definition: Domain.cpp:692
void summary() const override
Definition: Domain.cpp:1246
void enable_group(unsigned) override
Definition: Domain.cpp:464
bool erase_material(unsigned) override
Definition: Domain.cpp:232
void update(const Statistics T, const double value) const override
Definition: Domain.h:408
bool find_integrator(unsigned) const override
Definition: Domain.cpp:666
int initialize() override
Definition: Domain.cpp:901
void insert_constrained_dof(const uvec &) override
concurrently safe insertion method
Definition: Domain.cpp:737
bool find_section(unsigned) const override
Definition: Domain.cpp:680
int update_incre_status() const override
Definition: DomainState.cpp:404
size_t get_expression() const override
Definition: Domain.cpp:616
bool find_amplitude(unsigned) const override
Definition: Domain.cpp:650
const OrientationQueue & get_orientation_pool() const override
Definition: Domain.cpp:604
void enable_orientation(unsigned) override
Definition: Domain.cpp:506
size_t get_step() const override
Definition: Domain.cpp:648
bool erase_recorder(unsigned) override
Definition: Domain.cpp:260
void disable_criterion(unsigned) override
Definition: Domain.cpp:316
bool find_converger(unsigned) const override
Definition: Domain.cpp:656
void disable_node(unsigned) override
Definition: Domain.cpp:372
void assemble_trial_stiffness() const override
Definition: DomainState.cpp:304
size_t get_database() const override
Definition: Domain.cpp:624
void enable_database(unsigned) override
Definition: Domain.cpp:450
void set_factory(const shared_ptr< LongFactory > &) override
Definition: Domain.cpp:49
Domain & operator=(Domain &&)=delete
void disable_solver(unsigned) override
Definition: Domain.cpp:400
bool erase_step(unsigned) override
Definition: Domain.cpp:281
unsigned get_current_step_tag() override
Definition: Domain.cpp:694
void assemble_trial_nonviscous() const override
Definition: DomainState.cpp:261
void enable_all() override
Definition: Domain.cpp:1229
bool find_criterion(unsigned) const override
Definition: Domain.cpp:658
const IntegratorQueue & get_integrator_pool() const override
Definition: Domain.cpp:594
int restart() override
Definition: Domain.cpp:879
const CriterionQueue & get_criterion_pool() const override
Definition: Domain.cpp:586
bool find_group(unsigned) const override
Definition: Domain.cpp:664
void disable_element(unsigned) override
Definition: Domain.cpp:330
const ConstraintQueue & get_constraint_pool() const override
Definition: Domain.cpp:582
const ExpressionQueue & get_expression_pool() const override
Definition: Domain.cpp:580
bool find_expression(unsigned) const override
Definition: Domain.cpp:652
void set_current_integrator_tag(unsigned) override
Definition: Domain.cpp:690
void assemble_initial_nonviscous() const override
Definition: DomainState.cpp:231
int process_criterion() override
Definition: Domain.cpp:1214
bool erase_amplitude(unsigned) override
Definition: Domain.cpp:162
void assemble_initial_geometry() const override
Definition: DomainState.cpp:318
bool find_constraint(unsigned) const override
Definition: Domain.cpp:654
void enable_node(unsigned) override
Definition: Domain.cpp:499
size_t get_criterion() const override
Definition: Domain.cpp:622
void disable_recorder(unsigned) override
Definition: Domain.cpp:386
bool get_attribute(ModalAttribute) override
Definition: Domain.cpp:766
const std::vector< std::vector< unsigned > > & get_color_map() const override
Definition: Domain.cpp:773
unique_ptr< Material > initialized_material_copy(uword) override
Definition: Domain.cpp:710
void assemble_initial_damping() const override
Definition: DomainState.cpp:189
const suanpan::unordered_set< uword > & get_loaded_dof() const override
Definition: Domain.cpp:754
void assemble_load_stiffness() override
Definition: Domain.cpp:1267
bool is_updated() const override
Definition: Domain.cpp:760
void disable_expression(unsigned) override
Definition: Domain.cpp:295
void assemble_mass_container() const override
Definition: DomainState.cpp:363
void set_color_model(ColorMethod) override
Definition: Domain.cpp:768
const SectionQueue & get_section_pool() const override
Definition: Domain.cpp:608
std::pair< std::vector< unsigned >, suanpan::graph< unsigned > > get_element_connectivity(bool) override
Definition: Domain.cpp:775
size_t get_recorder() const override
Definition: Domain.cpp:642
int assign_color() override
Definition: Domain.cpp:851
void enable_recorder(unsigned) override
Definition: Domain.cpp:513
bool find_load(unsigned) const override
Definition: Domain.cpp:668
int initialize_load() override
Definition: Domain.cpp:1014
size_t get_material() const override
Definition: Domain.cpp:634
bool erase_group(unsigned) override
Definition: Domain.cpp:211
void commit_status() const override
Definition: DomainState.cpp:473
int initialize_material() override
Definition: Domain.cpp:1050
const suanpan::unordered_set< uword > & get_restrained_dof() const override
Definition: Domain.cpp:756
size_t get_element() const override
Definition: Domain.cpp:626
void assemble_stiffness_container() const override
Definition: DomainState.cpp:377
void disable_database(unsigned) override
Definition: Domain.cpp:323
void enable_criterion(unsigned) override
Definition: Domain.cpp:443
void update_current_damping_force() const override
Definition: DomainState.cpp:40
void enable_amplitude(unsigned) override
Definition: Domain.cpp:415
void stage_status() override
Definition: DomainState.cpp:471
size_t get_section() const override
Definition: Domain.cpp:644
bool find_step(unsigned) const override
Definition: Domain.cpp:684
const shared_ptr< Converger > & get_current_converger() const override
Definition: Domain.cpp:704
void set_current_converger_tag(unsigned) override
Definition: Domain.cpp:688
double stats(const Statistics T) const override
Definition: Domain.h:410
Domain(unsigned=0)
Definition: Domain.cpp:42
int reorder_dof() override
Definition: Domain.cpp:801
const LoadQueue & get_load_pool() const override
Definition: Domain.cpp:596
Domain & operator=(const Domain &)=delete
void assemble_current_stiffness() const override
Definition: DomainState.cpp:290
void assemble_current_damping() const override
Definition: DomainState.cpp:203
int initialize_reference() override
Definition: Domain.cpp:1030
bool find_database(unsigned) const override
Definition: Domain.cpp:660
void disable_section(unsigned) override
Definition: Domain.cpp:393
void set_current_step_tag(unsigned) override
Definition: Domain.cpp:686
bool find_orientation(unsigned) const override
Definition: Domain.cpp:676
const NodeQueue & get_node_pool() const override
Definition: Domain.cpp:602
void wait() override
Definition: Domain.cpp:63
bool erase_database(unsigned) override
Definition: Domain.cpp:197
void disable_material(unsigned) override
Definition: Domain.cpp:358
std::pair< unsigned, unsigned > get_current_integrator_tag() override
Definition: Domain.cpp:698
bool erase_solver(unsigned) override
Definition: Domain.cpp:274
int soft_restart() override
Definition: Domain.cpp:899
bool erase_criterion(unsigned) override
Definition: Domain.cpp:190
void assemble_trial_damping() const override
Definition: DomainState.cpp:217
void enable_integrator(unsigned) override
Definition: Domain.cpp:471
void disable_modifier(unsigned) override
Definition: Domain.cpp:365
size_t get_load() const override
Definition: Domain.cpp:632
void disable_load(unsigned) override
Definition: Domain.cpp:351
bool find_solver(unsigned) const override
Definition: Domain.cpp:682
size_t get_constraint() const override
Definition: Domain.cpp:618
void record() override
Definition: Domain.cpp:1227
void erase_machine_error(vec &) const override
Definition: Domain.cpp:1251
void save(string) override
Definition: Domain.cpp:1271
int update_current_status() const override
Definition: DomainState.cpp:417
const GroupQueue & get_group_pool() const override
Definition: Domain.cpp:592
void update_constraint() override
Definition: Domain.cpp:1255
size_t get_modifier() const override
Definition: Domain.cpp:636
void assemble_trial_mass() const override
Definition: DomainState.cpp:175
void assemble_inertial_force() const override
Definition: DomainState.cpp:130
size_t get_integrator() const override
Definition: Domain.cpp:630
void update_current_nonviscous_force() const override
Definition: DomainState.cpp:53
void assemble_resistance() const override
Definition: DomainState.cpp:79
void enable_material(unsigned) override
Definition: Domain.cpp:485
void assemble_initial_stiffness() const override
Definition: DomainState.cpp:276
void disable_constraint(unsigned) override
Definition: Domain.cpp:302
void update_current_inertial_force() const override
Definition: DomainState.cpp:66
void disable_integrator(unsigned) override
Definition: Domain.cpp:344
void set_attribute(ModalAttribute) override
Definition: Domain.cpp:764
void disable_group(unsigned) override
Definition: Domain.cpp:337
bool erase_orientation(unsigned) override
Definition: Domain.cpp:253
size_t get_orientation() const override
Definition: Domain.cpp:640
int process_load(bool) override
Definition: Domain.cpp:1094
size_t get_group() const override
Definition: Domain.cpp:628
void insert_loaded_dof(const uvec &) override
concurrently safe insertion method
Definition: Domain.cpp:727
void disable_step(unsigned) override
Definition: Domain.cpp:407
ColorMethod
Definition: DomainBase.h:86
std::vector< shared_ptr< ExternalModule > > ExternalModuleQueue
Definition: Domain.h:35
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
Statistics
Definition: DomainBase.h:96
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:36
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