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

Function printModel

SRC/tcl/commands.cpp:2057–2142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2055
2056
2057int
2058printModel(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
2059{
2060 int currentArg = 1;
2061 int res = 0;
2062
2063 int flag = OPS_PRINT_CURRENTSTATE;
2064
2065 FileStream outputFile;
2066 OPS_Stream *output = &opserr;
2067 bool done = false;
2068
2069 // if just 'print' then print out the entire domain
2070 if (argc == currentArg) {
2071 opserr << theDomain;
2072 return TCL_OK;
2073 }
2074
2075 while(done == false) {
2076 // if 'print ele i j k..' print out some elements
2077 if ((strcmp(argv[currentArg],"-ele") == 0) || (strcmp(argv[currentArg],"ele") == 0)) {
2078 currentArg++;
2079 res = printElement(clientData, interp, argc-currentArg, argv+currentArg, *output);
2080 done = true;
2081 }
2082 // if 'print node i j k ..' print out some nodes
2083 else if ((strcmp(argv[currentArg],"-node") == 0) || (strcmp(argv[currentArg],"node") == 0)) {
2084 currentArg++;
2085 res = printNode(clientData, interp, argc-currentArg, argv+currentArg, *output);
2086 done = true;
2087 }
2088
2089 // if 'print integrator flag' print out the integrator
2090 else if ((strcmp(argv[currentArg],"integrator") == 0) ||
2091 (strcmp(argv[currentArg],"-integrator") == 0)) {
2092 currentArg++;
2093 res = printIntegrator(clientData, interp, argc-currentArg, argv+currentArg, *output);
2094 done = true;
2095 }
2096
2097 // if 'print algorithm flag' print out the algorithm
2098 else if ((strcmp(argv[currentArg],"algorithm") == 0) ||
2099 (strcmp(argv[currentArg],"-algorithm") == 0)) {
2100 currentArg++;
2101 res = printAlgorithm(clientData, interp, argc-currentArg, argv+currentArg, *output);
2102 done = true;
2103 }
2104
2105 else if ((strcmp(argv[currentArg],"-JSON") == 0)) {
2106 currentArg++;
2107 flag = OPS_PRINT_PRINTMODEL_JSON;
2108 }
2109
2110 else {
2111
2112 if ((strcmp(argv[currentArg],"file") == 0) ||
2113 (strcmp(argv[currentArg],"-file") == 0))
2114 currentArg++;

Callers 10

Example6.1.pyFile · 0.85
Example3.3.pyFile · 0.85
Example7.1.pyFile · 0.85
Example3.2.pyFile · 0.85
Example4.1.pyFile · 0.85
Example1.1.pyFile · 0.85
Example3.1.pyFile · 0.85
Example8.1.pyFile · 0.85
Example5.1.pyFile · 0.85
Example1.1.pyFile · 0.85

Calls 7

printElementFunction · 0.70
printNodeFunction · 0.70
printIntegratorFunction · 0.70
printAlgorithmFunction · 0.70
setFileMethod · 0.45
PrintMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected