| 814 | } |
| 815 | |
| 816 | int 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 | |
| 856 | int MembranePlateFiberSectionThermal::updateParameter(int parameterID, Information& info) |
| 857 | { |
nothing calls this directly
no test coverage detected