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

Function main

SRC/renderer/mainTriangle.cpp:103–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101#include <Metis.h>
102
103int main(int argc, char **argv)
104{
105 //
106 // read in the number of analysis iterations
107 // - the first iteartion will be expensive due to
108 // construction of FE_Element, DOF_Groups, node
109 // and dof graphs
110 //
111
112 int numReps;
113 opserr << "Enter Number of Iterations: ";
114 cin >> numReps;
115
116#ifdef PETSC_EXISTS
117 int numP; // number of processes started
118 int me; // the integer id of the process .. 0 through numP-1
119 MPI_Init(&argc, &argv);
120 MPI_Comm_rank(MPI_COMM_WORLD, &me);
121 MPI_Comm_size(MPI_COMM_WORLD, &numP);
122 static char help[] = "My daft little program\n";
123 PetscInitialize(&argc, &argv, (char *)0, help);
124#endif
125
126 //
127 // now create a domain and a modelbuilder
128 // and build the model
129 //
130
131 Domain *theDomain = new Domain();
132 TrianglePlaneStress *theModelBuilder
133 = new TrianglePlaneStress(*theDomain);
134 theModelBuilder->buildFE_Model();
135
136
137 theModelBuilder->fixNodeXdirnXloc(100.0,0.0);
138 theModelBuilder->fixNodeYdirnYloc(100.0,0.0);
139
140 theModelBuilder->addPointLoad(0.0,100.0, -50.0, 0.0);
141
142 //
143 // create an Analysis object to perform a static analysis of the model
144 // - constructs:
145 // AnalysisModel of type AnalysisModel,
146 // EquiSolnAlgo of type Linear
147 // StaticIntegrator of type StaticIntegrator
148 // ConstraintHandler of type PlainHandler (only homo SP constraints)
149 // DOF_Numberer which does either RCM or takes order provided
150 // LinearSOE of types full and band general, band and profile SPD
151
152 AnalysisModel *theModel = new AnalysisModel();
153 EquiSolnAlgo *theSolnAlgo = new Linear();
154 ConvergenceTest *theTest = new CTestNormUnbalance(1.0e-8);
155 // EquiSolnAlgo *theSolnAlgo = new NewtonRaphson(10,*theTest);
156 StaticIntegrator *theIntegrator = new LoadControl(1);
157
158 ConstraintHandler *theHandler;
159 cout << "Enter ConstraintHandler type: [1]-Plain, [2]-Penalty: ";
160 int handlerType;

Callers

nothing calls this directly

Calls 15

exitFunction · 0.85
pauseMethod · 0.80
getRealMethod · 0.80
getCPUMethod · 0.80
getNumPageFaultsMethod · 0.80
displayModelMethod · 0.80
buildFE_ModelMethod · 0.45
startMethod · 0.45
analyzeMethod · 0.45
PrintMethod · 0.45
getNodeMethod · 0.45
getNumEqnMethod · 0.45

Tested by

no test coverage detected