| 49 | #include <math.h> |
| 50 | |
| 51 | void* |
| 52 | OPS_ASDShellT3(void) |
| 53 | { |
| 54 | static bool first_done = false; |
| 55 | if (!first_done) { |
| 56 | opserr << "Using ASDShellT3 - Developed by: Massimo Petracca, Guido Camata, ASDEA Software Technology\n"; |
| 57 | first_done = true; |
| 58 | } |
| 59 | |
| 60 | int numArgs = OPS_GetNumRemainingInputArgs(); |
| 61 | if (numArgs < 5) { |
| 62 | opserr << "Want: element ASDShellT3 $tag $iNode $jNode $kNode $secTag " |
| 63 | "<-corotational> <-reducedIntegration> <-drillingNL> <-damp $dampTag>" |
| 64 | "<-local $x1 $x2 $x3>"; |
| 65 | return 0; |
| 66 | } |
| 67 | |
| 68 | int iData[5]; |
| 69 | int numData = 5; |
| 70 | if (OPS_GetInt(&numData, iData) != 0) { |
| 71 | opserr << "WARNING invalid integer tag: element ASDShellT3 \n"; |
| 72 | return 0; |
| 73 | } |
| 74 | |
| 75 | bool corotational = false; |
| 76 | bool reduced_int = false; |
| 77 | ASDShellT3::DrillingDOFMode drill_mode = ASDShellT3::DrillingDOF_Elastic; |
| 78 | int dampingTag = 0; |
| 79 | Damping* m_damping = 0; |
| 80 | Vector local_x(3); |
| 81 | |
| 82 | while (OPS_GetNumRemainingInputArgs() > 0) { |
| 83 | const char* type = OPS_GetString(); |
| 84 | if ((strcmp(type, "-corotational") == 0) || (strcmp(type, "-Corotational") == 0)) { |
| 85 | corotational = true; |
| 86 | } |
| 87 | else if (strcmp(type, "-drillingNL") == 0) { |
| 88 | drill_mode = ASDShellT3::DrillingDOF_NonLinear; |
| 89 | } |
| 90 | else if (strcmp(type, "-reducedIntegration") == 0) { |
| 91 | reduced_int = true; |
| 92 | } |
| 93 | else if (strcmp(type, "-local") == 0) { |
| 94 | if (OPS_GetNumRemainingInputArgs() < 3) { |
| 95 | opserr << "Error: element ASDShellT3: not enough arguments for -local options (3 components are required)\n"; |
| 96 | return 0; |
| 97 | } |
| 98 | numData = 1; |
| 99 | for (int i = 0; i < 3; ++i) { |
| 100 | double local_x_com; |
| 101 | if (OPS_GetDoubleInput(&numData, &local_x_com) == 0) { |
| 102 | local_x(i) = local_x_com; |
| 103 | } |
| 104 | else { |
| 105 | opserr << "Error: element ASDShellT3: cannot get the component " << i + 1 << " for the local X axis\n"; |
| 106 | return 0; |
| 107 | } |
| 108 | } |
no test coverage detected