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

Method setVariableAnalysis

SRC/interpreter/OpenSeesCommands.cpp:748–831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746}
747
748void
749OpenSeesCommands::setVariableAnalysis(bool suppress)
750{
751 // delete the old analysis
752 if (theStaticAnalysis != 0) {
753 delete theStaticAnalysis;
754 theStaticAnalysis = 0;
755 }
756 if (theTransientAnalysis != 0) {
757 delete theTransientAnalysis;
758 theTransientAnalysis = 0;
759 }
760
761 // make sure all the components have been built,
762 // otherwise print a warning and use some defaults
763 if (theAnalysisModel == 0) {
764 theAnalysisModel = new AnalysisModel();
765 }
766
767 if (theTest == 0) {
768 theTest = new CTestNormUnbalance(1.0e-6,25,0);
769 }
770
771 if (theAlgorithm == 0) {
772 if (!suppress) {
773 opserr << "WARNING analysis VariableTransient - no Algorithm yet specified, \n";
774 opserr << " NewtonRaphson default will be used\n";
775 }
776 theAlgorithm = new NewtonRaphson(*theTest);
777 }
778
779 if (theHandler == 0) {
780 if (!suppress) {
781 opserr << "WARNING analysis VariableTransient dt tFinal - no ConstraintHandler\n";
782 opserr << " yet specified, PlainHandler default will be used\n";
783 }
784 theHandler = new PlainHandler();
785 }
786
787 if (theNumberer == 0) {
788 if (!suppress) {
789 opserr << "WARNING analysis VariableTransient dt tFinal - no Numberer specified, \n";
790 opserr << " RCM default will be used\n";
791 }
792 RCM *theRCM = new RCM(false);
793 theNumberer = new DOF_Numberer(*theRCM);
794 }
795
796 if (theTransientIntegrator == 0) {
797 if (!suppress) {
798 opserr << "WARNING analysis VariableTransient dt tFinal - no Integrator specified, \n";
799 opserr << " Newmark(.5,.25) default will be used\n";
800 }
801 setIntegrator(new Newmark(0.5, 0.25), true);
802 }
803
804 if (theSOE == 0) {
805 if (!suppress) {

Callers 1

OPS_AnalysisFunction · 0.80

Calls 1

setEigenSOEMethod · 0.45

Tested by

no test coverage detected