MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / writeSections

Method writeSections

SRC/recorder/MPCORecorder.cpp:5355–5853  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5353}
5354
5355int MPCORecorder::writeSections()
5356{
5357#ifdef MPCO_TIMING
5358 mpco::Timer timer("writeSections"); timer.start();
5359#endif // MPCO_TIMING
5360 /*
5361 error flags
5362 */
5363 int retval = 0;
5364 herr_t status = 0;
5365 /*
5366 auxiliary variables
5367 */
5368 std::map<int, mpco::element::SectionAssignment> sec_assignments;
5369 std::map<mpco::element::FiberSectionData, mpco::element::SectionAssignment> aux_sec_assignments;
5370 std::map<int, std::string> sec_id_and_names;
5371 std::map<int, std::string> mat_id_and_names;
5372 /*
5373 an auxiliary map to store, for each element the number of gauss points (with sections) and the number of fibers.
5374 key = element tag, value = vector with size equal to the number of gauss points, and each item is the number of fibers
5375 for that gauss point
5376 */
5377 m_data->elem_ngauss_nfiber_info.clear();
5378 /*
5379 create section assignments group
5380 */
5381 std::stringstream ss_gp_section_assignments_dir;
5382 ss_gp_section_assignments_dir << "MODEL_STAGE[" << m_data->info.current_model_stage_id << "]/MODEL/SECTION_ASSIGNMENTS";
5383 std::string gp_section_assignments_dir = ss_gp_section_assignments_dir.str();
5384 hid_t h_gp_section_assignments = h5::group::create(m_data->info.h_file_id, gp_section_assignments_dir.c_str(), H5P_DEFAULT, m_data->info.h_group_proplist, H5P_DEFAULT);
5385 /*
5386 loop over all element group-by-tag
5387 */
5388 for (mpco::element::ElementCollection::submap_type::iterator it1 = m_data->elements.items.begin();
5389 it1 != m_data->elements.items.end(); ++it1) {
5390 mpco::element::ElementWithSameClassTagCollection &elem_by_tag = it1->second;
5391 /*
5392 loop over all element group-by-integration rule
5393 */
5394 for (mpco::element::ElementWithSameClassTagCollection::submap_type::iterator it2 = elem_by_tag.items.begin();
5395 it2 != elem_by_tag.items.end(); ++it2) {
5396 mpco::element::ElementWithSameIntRuleCollection &elem_by_rule = it2->second;
5397 /*
5398 loop over all element group-by-custom(or default) integration rule
5399 */
5400 for (mpco::element::ElementWithSameIntRuleCollection::submap_type::iterator it3 = elem_by_rule.items.begin();
5401 it3 != elem_by_rule.items.end(); ++it3) {
5402 mpco::element::ElementWithSameCustomIntRuleCollection &elem_by_custom_rule = it3->second;
5403 /*
5404 loop over all alements
5405 */
5406 for (std::vector<Element*>::iterator it4 = elem_by_custom_rule.items.begin();
5407 it4 != elem_by_custom_rule.items.end(); ++it4) {
5408 Element *elem = *it4;
5409 /*
5410 prepare the request
5411 */
5412 std::string request1 = utils::shell::isShellElementTag(elem->getClassTag()) ? "material" : "section";

Callers

nothing calls this directly

Calls 15

isShellElementTagFunction · 0.85
exitFunction · 0.85
FiberSectionDataClass · 0.85
ElemGaussPairClass · 0.85
createAndWriteFunction · 0.85
closeFunction · 0.85
finalizeSetResponseMethod · 0.80
getFiberDataMethod · 0.80
push_backMethod · 0.80
stopMethod · 0.80
createFunction · 0.70

Tested by

no test coverage detected