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

Method setParameter

SRC/material/section/MembranePlateFiberSectionThermal.cpp:816–854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

814}
815
816int MembranePlateFiberSectionThermal::setParameter(const char** argv, int argc, Parameter& param)
817{
818 // if the user explicitly wants to update a material in this section...
819 if (argc > 1) {
820 // case 1: fiber value (all fibers)
821 // case 2: fiber id value (one specific fiber)
822 if (strcmp(argv[0], "fiber") == 0 || strcmp(argv[0], "Fiber") == 0) {
823 // test case 2 (one specific fiber) ...
824 if (argc > 2) {
825 int pointNum = atoi(argv[1]);
826 if (pointNum > 0 && pointNum <= 5) {
827 return theFibers[pointNum - 1]->setParameter(&argv[2], argc - 2, param);
828 }
829 }
830 // ... otherwise case 1 (all fibers), if the argv[1] is not a valid id
831 int mixed_result = -1;
832 for (int i = 0; i < 5; ++i) {
833 if (theFibers[i]->setParameter(&argv[1], argc - 1, param) == 0)
834 mixed_result = 0; // if at least one fiber handles the param, make it successful
835 }
836 return mixed_result;
837 }
838 }
839 // if we are here, the first keyword is not "fiber", so we can check for parameters
840 // specific to this section (if any) or forward the request to all fibers.
841 if (argc > 0) {
842 // we don't have parameters for this section, so we directly forward it to all fibers.
843 // placeholder for future implementations: if we will have parameters for this class, check them here
844 // before forwarding to all fibers
845 int mixed_result = -1;
846 for (int i = 0; i < 5; ++i) {
847 if (theFibers[i]->setParameter(argv, argc, param) == 0)
848 mixed_result = 0; // if at least one fiber handles the param, make it successful
849 }
850 return mixed_result;
851 }
852 // fallback to base class implementation
853 return SectionForceDeformation::setParameter(argv, argc, param);
854}
855
856int MembranePlateFiberSectionThermal::updateParameter(int parameterID, Information& info)
857{

Callers

nothing calls this directly

Calls 1

setParameterFunction · 0.85

Tested by

no test coverage detected