| 831 | } |
| 832 | |
| 833 | void |
| 834 | OpenSeesCommands::setTransientAnalysis(bool suppress) |
| 835 | { |
| 836 | // delete the old analysis |
| 837 | if (theStaticAnalysis != 0) { |
| 838 | delete theStaticAnalysis; |
| 839 | theStaticAnalysis = 0; |
| 840 | } |
| 841 | if (theTransientAnalysis != 0) { |
| 842 | delete theTransientAnalysis; |
| 843 | theTransientAnalysis = 0; |
| 844 | } |
| 845 | |
| 846 | // create transient analysis |
| 847 | if (theAnalysisModel == 0) { |
| 848 | theAnalysisModel = new AnalysisModel(); |
| 849 | } |
| 850 | if (theTest == 0) { |
| 851 | theTest = new CTestNormUnbalance(1.0e-6,25,0); |
| 852 | } |
| 853 | if (theAlgorithm == 0) { |
| 854 | if (!suppress) { |
| 855 | opserr << "WARNING analysis Transient - no Algorithm yet specified, \n"; |
| 856 | opserr << " NewtonRaphson default will be used\n"; |
| 857 | } |
| 858 | theAlgorithm = new NewtonRaphson(*theTest); |
| 859 | } |
| 860 | if (theHandler == 0) { |
| 861 | if (!suppress) { |
| 862 | opserr << "WARNING analysis Transient - no ConstraintHandler yet specified, \n"; |
| 863 | opserr << " PlainHandler default will be used\n"; |
| 864 | } |
| 865 | theHandler = new PlainHandler(); |
| 866 | } |
| 867 | if (theNumberer == 0) { |
| 868 | if (!suppress) { |
| 869 | opserr << "WARNING analysis Transient - no Numberer specified, \n"; |
| 870 | opserr << " RCM default will be used\n"; |
| 871 | } |
| 872 | RCM* theRCM = new RCM(false); |
| 873 | theNumberer = new DOF_Numberer(*theRCM); |
| 874 | } |
| 875 | if (theTransientIntegrator == 0) { |
| 876 | if (!suppress) { |
| 877 | opserr << "WARNING analysis Transient - no Integrator specified, \n"; |
| 878 | opserr << " TransientIntegrator default will be used\n"; |
| 879 | } |
| 880 | setIntegrator(new Newmark(0.5,0.25), true); |
| 881 | } |
| 882 | if (theSOE == 0) { |
| 883 | if (!suppress) { |
| 884 | opserr << "WARNING analysis Transient - no LinearSOE specified, \n"; |
| 885 | opserr << " ProfileSPDLinSOE default will be used\n"; |
| 886 | } |
| 887 | ProfileSPDLinSolver *theSolver; |
| 888 | theSolver = new ProfileSPDLinDirectSolver(); |
| 889 | theSOE = new ProfileSPDLinSOE(*theSolver); |
| 890 | } |
no test coverage detected