void ThermalContactBCsAction::act() { bool quadrature = getParam<bool>("quadrature"); InputParameters params = _factory.getValidParams(getParam<std::string>("type")); // Extract global params _app.parser().extractParams(_name, params); if(isParamValid("save_in")) { params.set<std::vector<std::string> >("save_in") = getParam<std::vector<std::string> >("save_in"); } params.set<NonlinearVariableName>("variable") = getParam<NonlinearVariableName>("variable"); if(!quadrature) { std::vector<VariableName> vars(1); vars[0] = "penetration"; params.set<std::vector<VariableName> >("gap_distance") = vars; vars[0] = ThermalContactAuxVarsAction::getGapValueName(_pars); params.set<std::vector<VariableName> >("gap_temp") = vars; } else { params.set<bool>("quadrature") = true; params.set<BoundaryName>("paired_boundary") = getParam<BoundaryName>("master"); params.set<MooseEnum>("order") = getParam<MooseEnum>("order"); params.set<bool>("warnings") = getParam<bool>("warnings"); params.set<bool>("use_displaced_mesh") = true; } std::vector<BoundaryName> bnds(1, getParam<BoundaryName>("slave")); params.set<std::vector<BoundaryName> >("boundary") = bnds; params.set<std::string>("appended_property_name") = getParam<std::string>("appended_property_name"); if (isParamValid("disp_x")) { params.addCoupledVar("disp_x", "The x displacement"); std::vector<VariableName> disp_x(1, getParam<VariableName>("disp_x")); params.set< std::vector<VariableName> >("disp_x") = disp_x; } if (isParamValid("disp_y")) { params.addCoupledVar("disp_y", "The y displacement"); std::vector<VariableName> disp_y(1, getParam<VariableName>("disp_y")); params.set< std::vector<VariableName> >("disp_y") = disp_y; } if (isParamValid("disp_z")) { params.addCoupledVar("disp_z", "The z displacement"); std::vector<VariableName> disp_z(1, getParam<VariableName>("disp_z")); params.set< std::vector<VariableName> >("disp_z") = disp_z; } _problem->addBoundaryCondition(getParam<std::string>("type"), "gap_bc_" + Moose::stringify(n), params); if(quadrature) { // Swap master and slave for this one std::vector<BoundaryName> bnds(1, getParam<BoundaryName>("master")); params.set<std::vector<BoundaryName> >("boundary") = bnds; params.set<BoundaryName>("paired_boundary") = getParam<BoundaryName>("slave"); _problem->addBoundaryCondition(getParam<std::string>("type"), "gap_bc_master_" + Moose::stringify(n), params); } ++n; }
void display_chars(int off,int off2,int places[25]) { int a,b,places_c,x=3,y=12; clrscr(); display(); /* ----------------------------------------- Display loop -----------------------------------------------------------------------*/ for (places_c=0;places_c<=23;places_c++) { b=0; gotoxy(x,y); if (y==12) a=0; else a=1; if (places[places_c]<0) disp_o(a,places,places_c); if (places[places_c]>0) disp_x(a,places,places_c); if ((x==18 && y==3) || (x==45 && y==3)) { x-=3; b=2; } if (x==30 && y==12) { x+=3; b=2; } if (x!=18 && x!=45 && x!=30 && b!=2) { if (y==12) x+=3; if (y==3) x-=3; b=1; } if (x==18 && y==12 && !b) x+=12; if (x==45 && y==12 && !b) y=3; if (x==30 && y==3 && !b) x-=12; } /* ----------------------------------------- Bar calculations -----------------------------------------------------------------------*/ if (places[24]!=0) bar_xo(places); /* ----------------------------------------- Bear-off calculations -----------------------------------------------------------------------*/ if (off>0) { gotoxy(50,1); cout << "X-off = " << off; } if (off2>0) { gotoxy(50,3); cout << "O-off = " << off2; } }