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

Function specifyNumberer

SRC/tcl/commands.cpp:3679–3737  ·  view source on GitHub ↗

command invoked to allow the Numberer objects to be built

Source from the content-addressed store, hash-verified

3677// command invoked to allow the Numberer objects to be built
3678//
3679int
3680specifyNumberer(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
3681{
3682 // make sure at least one other argument to contain numberer
3683 if (argc < 2) {
3684 opserr << "WARNING need to specify a Nemberer type \n";
3685 return TCL_ERROR;
3686 }
3687
3688#ifdef _PARALLEL_PROCESSING
3689 // check argv[1] for type of Numberer and create the object
3690 if (strcmp(argv[1],"Plain") == 0) {
3691 theNumberer = new ParallelNumberer();
3692 } else if (strcmp(argv[1],"RCM") == 0) {
3693 RCM *theRCM = new RCM(false);
3694 theNumberer = new ParallelNumberer(*theRCM);
3695 } else {
3696 opserr << "WARNING No Numberer type exists (Plain, RCM only) \n";
3697 return TCL_ERROR;
3698 }
3699
3700#else
3701
3702 // check argv[1] for type of Numberer and create the object
3703 if (strcmp(argv[1],"Plain") == 0) {
3704 theNumberer = new PlainNumberer();
3705 } else if (strcmp(argv[1],"RCM") == 0) {
3706 RCM *theRCM = new RCM(false);
3707 theNumberer = new DOF_Numberer(*theRCM);
3708 } else if (strcmp(argv[1],"AMD") == 0) {
3709 AMD *theAMD = new AMD();
3710 theNumberer = new DOF_Numberer(*theAMD);
3711 }
3712
3713#ifdef _PARALLEL_INTERPRETERS
3714
3715 else if ((strcmp(argv[1],"ParallelPlain") == 0) || (strcmp(argv[1],"Parallel") == 0)) {
3716 ParallelNumberer *theParallelNumberer = new ParallelNumberer;
3717 theNumberer = theParallelNumberer;
3718 theParallelNumberer->setProcessID(OPS_rank);
3719 theParallelNumberer->setChannels(numChannels, theChannels);
3720 } else if (strcmp(argv[1],"ParallelRCM") == 0) {
3721 RCM *theRCM = new RCM(false);
3722 ParallelNumberer *theParallelNumberer = new ParallelNumberer(*theRCM);
3723 theNumberer = theParallelNumberer;
3724 theParallelNumberer->setProcessID(OPS_rank);
3725 theParallelNumberer->setChannels(numChannels, theChannels);
3726 }
3727
3728#endif
3729
3730 else {
3731 opserr << "WARNING No Numberer type exists (Plain, RCM only) \n";
3732 return TCL_ERROR;
3733 }
3734#endif
3735
3736 return TCL_OK;

Callers

nothing calls this directly

Calls 2

setProcessIDMethod · 0.45
setChannelsMethod · 0.45

Tested by

no test coverage detected