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

Function specifySOE

SRC/tcl/commands.cpp:2976–3647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2974static ExternalClassFunction *theExternalAlgorithmCommands = NULL;
2975
2976int
2977specifySOE(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
2978{
2979 // make sure at least one other argument to contain type of system
2980 if (argc < 2) {
2981 opserr << "WARNING need to specify a model type \n";
2982 return TCL_ERROR;
2983 }
2984
2985 // check argv[1] for type of SOE and create it
2986 // BAND GENERAL SOE & SOLVER
2987 if ((strcmp(argv[1],"BandGeneral") == 0) || (strcmp(argv[1],"BandGEN") == 0)
2988 || (strcmp(argv[1],"BandGen") == 0)){
2989 BandGenLinSolver *theSolver = new BandGenLinLapackSolver();
2990#ifdef _PARALLEL_PROCESSING
2991 theSOE = new DistributedBandGenLinSOE(*theSolver);
2992#else
2993 theSOE = new BandGenLinSOE(*theSolver);
2994#endif
2995 }
2996
2997#ifdef _CUDA
2998 else if ((strcmp(argv[1],"BandGeneral_Single") == 0) || (strcmp(argv[1],"BandGEN_Single") == 0)
2999 || (strcmp(argv[1],"BandGen_Single") == 0)){
3000 BandGenLinLapackSolver_Single *theSolver = new BandGenLinLapackSolver_Single();
3001 theSOE = new BandGenLinSOE_Single(*theSolver);
3002 }
3003#endif
3004
3005 // BAND SPD SOE & SOLVER
3006 else if (strcmp(argv[1],"BandSPD") == 0) {
3007 BandSPDLinSolver *theSolver = new BandSPDLinLapackSolver();
3008#ifdef _PARALLEL_PROCESSING
3009 theSOE = new DistributedBandSPDLinSOE(*theSolver);
3010#else
3011 theSOE = new BandSPDLinSOE(*theSolver);
3012#endif
3013
3014 }
3015
3016 // Diagonal SOE & SOLVER
3017 else if (strcmp(argv[1],"Diagonal") == 0) {
3018#ifdef _PARALLEL_PROCESSING
3019 DistributedDiagonalSolver *theSolver = new DistributedDiagonalSolver();
3020 theSOE = new DistributedDiagonalSOE(*theSolver);
3021#else
3022 DiagonalSolver *theSolver = new DiagonalDirectSolver();
3023 theSOE = new DiagonalSOE(*theSolver);
3024#endif
3025
3026
3027 }
3028 // Diagonal SOE & SOLVER
3029 else if (strcmp(argv[1],"MPIDiagonal") == 0) {
3030#ifdef _PARALLEL_INTERPRETERS
3031 MPIDiagonalSolver *theSolver = new MPIDiagonalSolver();
3032 theSOE = new MPIDiagonalSOE(*theSolver);
3033 setMPIDSOEFlag = true;

Callers

nothing calls this directly

Calls 4

OPS_ResetInputNoBuilderFunction · 0.50
getLibraryFunctionFunction · 0.50
setProcessIDMethod · 0.45
setChannelsMethod · 0.45

Tested by

no test coverage detected