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

Method initElementRecorders

SRC/recorder/MPCORecorder.cpp:6087–6352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6085}
6086
6087int MPCORecorder::initElementRecorders()
6088{
6089#ifdef MPCO_TIMING
6090 mpco::Timer timer("initElementRecorders"); timer.start();
6091#endif // MPCO_TIMING
6092 /*
6093 clear previous recorders
6094 */
6095 clearElementRecorders();
6096 /*
6097 generate elemental recorders, based on the element type, and the element output descriptor.
6098 The data size (num columns) of the same response may change even for element of the same class,
6099 for example (in some beamns) if the number of integration points is different from beam to beam...
6100 */
6101 m_data->elemental_recorders.resize(m_data->elemental_results_requests.size());
6102 for (size_t cnt_request = 0; cnt_request < m_data->elemental_results_requests.size(); cnt_request++) {
6103 const std::vector<std::string> &request = m_data->elemental_results_requests[cnt_request];
6104 /*
6105 copy request to **argv
6106 */
6107 std::vector<std::string> request_mod;
6108 bool do_all_materials = false;
6109 bool do_all_sections = false;
6110 bool do_all_fibers = false;
6111 size_t material_id_placeholder_index = 0;
6112 size_t section_id_placeholder_index = 0;
6113 size_t fiber_id_placeholder_index = 0;
6114 for (size_t i = 0; i < request.size(); i++) {
6115 const std::string &current_request = request[i];
6116 request_mod.push_back(current_request);
6117 if (i == 0) { // note: all sections or all materials available only as first options
6118 if (current_request == "section") {
6119 request_mod.push_back(""); // placeholder for section id
6120 section_id_placeholder_index = request_mod.size() - 1;
6121 do_all_sections = true;
6122 }
6123 else if (current_request == "material") {
6124 request_mod.push_back(""); // placeholder for material id
6125 material_id_placeholder_index = request_mod.size() - 1;
6126 do_all_materials = true;
6127 }
6128 }
6129 else {
6130 if (current_request == "fiber" && do_all_sections) {
6131 request_mod.push_back(""); // placeholder for fiber id
6132 fiber_id_placeholder_index = request_mod.size() - 1;
6133 do_all_fibers = true;
6134 }
6135 }
6136 }
6137 int argc = (int)request_mod.size();
6138 const char **argv = new const char*[argc];
6139 for (size_t i = 0; i < request_mod.size(); i++)
6140 argv[i] = request_mod[i].c_str();
6141 /**
6142 $WO:SHELL_SEC_KEYWORD
6143 */
6144 std::string aux_section_keyword_standard = "section";

Callers

nothing calls this directly

Calls 15

isShellElementTagFunction · 0.85
to_stringFunction · 0.85
OutputResponseClass · 0.85
push_backMethod · 0.80
addResponseMethod · 0.80
finalizeSetResponseMethod · 0.80
purgeMethod · 0.80
makeHeaderMethod · 0.80
stopMethod · 0.80

Tested by

no test coverage detected