void InterfaceElem1d :: drawScalar(oofegGraphicContext &context) { int i, indx, result = 0; GaussPoint *gp; IntegrationRule *iRule = integrationRulesArray [ giveDefaultIntegrationRule() ]; TimeStep *tStep = this->giveDomain()->giveEngngModel()->giveCurrentStep(); FloatArray gcoord(3), v1; WCRec p [ 1 ]; IntArray map; GraphicObj *go; double val [ 1 ]; if ( !context.testElementGraphicActivity(this) ) { return; } if ( context.getInternalVarsDefGeoFlag() ) { double defScale = context.getDefScale(); p [ 0 ].x = ( FPNum ) 0.5 * ( this->giveNode(1)->giveUpdatedCoordinate(1, tStep, EID_MomentumBalance, defScale) + this->giveNode(2)->giveUpdatedCoordinate(1, tStep, EID_MomentumBalance, defScale) ); p [ 0 ].y = ( FPNum ) 0.5 * ( this->giveNode(1)->giveUpdatedCoordinate(2, tStep, EID_MomentumBalance, defScale) + this->giveNode(2)->giveUpdatedCoordinate(2, tStep, EID_MomentumBalance, defScale) ); p [ 0 ].z = ( FPNum ) 0.5 * ( this->giveNode(1)->giveUpdatedCoordinate(3, tStep, EID_MomentumBalance, defScale) + this->giveNode(2)->giveUpdatedCoordinate(3, tStep, EID_MomentumBalance, defScale) ); } else { p [ 0 ].x = ( FPNum )( this->giveNode(1)->giveCoordinate(1) ); p [ 0 ].y = ( FPNum )( this->giveNode(1)->giveCoordinate(2) ); p [ 0 ].z = ( FPNum )( this->giveNode(1)->giveCoordinate(3) ); } result += giveIPValue(v1, iRule->getIntegrationPoint(0), context.giveIntVarType(), tStep); for ( i = 0; i < iRule->getNumberOfIntegrationPoints(); i++ ) { result = 0; gp = iRule->getIntegrationPoint(i); result += giveIPValue(v1, gp, context.giveIntVarType(), tStep); result += this->giveIntVarCompFullIndx( map, context.giveIntVarType() ); if ( result != 2 ) { continue; } if ( ( indx = map.at( context.giveIntVarIndx() ) ) == 0 ) { return; } val [ 0 ] = v1.at(indx); context.updateFringeTableMinMax(val, 1); EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER); EASValsSetMType(FILLED_CIRCLE_MARKER); go = CreateMarkerWD3D(p, val [ 0 ]); EGWithMaskChangeAttributes(LAYER_MASK | FILL_MASK | MTYPE_MASK, go); EMAddGraphicsToModel(ESIModel(), go); //} } }
void IntElPoint :: drawScalar(oofegGraphicContext &gc, TimeStep *tStep) { int indx, result = 0; IntegrationRule *iRule = this->giveDefaultIntegrationRulePtr(); FloatArray gcoord(3), v1; WCRec p [ 1 ]; GraphicObj *go; double val [ 1 ]; if ( !gc.testElementGraphicActivity(this) ) { return; } if ( gc.getInternalVarsDefGeoFlag() ) { double defScale = gc.getDefScale(); p [ 0 ].x = ( FPNum ) 0.5 * ( this->giveNode(1)->giveUpdatedCoordinate(1, tStep, defScale) + this->giveNode(2)->giveUpdatedCoordinate(1, tStep, defScale) ); p [ 0 ].y = ( FPNum ) 0.5 * ( this->giveNode(1)->giveUpdatedCoordinate(2, tStep, defScale) + this->giveNode(2)->giveUpdatedCoordinate(2, tStep, defScale) ); p [ 0 ].z = ( FPNum ) 0.5 * ( this->giveNode(1)->giveUpdatedCoordinate(3, tStep, defScale) + this->giveNode(2)->giveUpdatedCoordinate(3, tStep, defScale) ); } else { p [ 0 ].x = ( FPNum ) ( this->giveNode(1)->giveCoordinate(1) ); p [ 0 ].y = ( FPNum ) ( this->giveNode(1)->giveCoordinate(2) ); p [ 0 ].z = ( FPNum ) ( this->giveNode(1)->giveCoordinate(3) ); } result += giveIPValue(v1, iRule->getIntegrationPoint(0), gc.giveIntVarType(), tStep); for ( GaussPoint *gp: *iRule ) { result = 0; result += giveIPValue(v1, gp, gc.giveIntVarType(), tStep); if ( result != 1 ) { continue; } indx = gc.giveIntVarIndx(); val [ 0 ] = v1.at(indx); gc.updateFringeTableMinMax(val, 1); EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER); EASValsSetMType(FILLED_CIRCLE_MARKER); go = CreateMarkerWD3D(p, val [ 0 ]); EGWithMaskChangeAttributes(LAYER_MASK | FILL_MASK | MTYPE_MASK, go); EMAddGraphicsToModel(ESIModel(), go); //} } }
void IntElLine2 :: drawScalar(oofegGraphicContext &gc, TimeStep *tStep) { int indx, result = 0; IntegrationRule *iRule = this->giveDefaultIntegrationRulePtr(); FloatArray gcoord(3), v1; WCRec p [ 1 ]; GraphicObj *go; double val [ 1 ]; if ( !gc.testElementGraphicActivity(this) ) { return; } if ( gc.giveIntVarMode() == ISM_recovered ) { return; } for ( GaussPoint *gp: *iRule ) { result = 0; result += giveIPValue(v1, gp, gc.giveIntVarType(), tStep); if ( result != 1 ) { continue; } indx = gc.giveIntVarIndx(); result += this->computeGlobalCoordinates( gcoord, gp->giveNaturalCoordinates() ); p [ 0 ].x = ( FPNum ) gcoord.at(1); p [ 0 ].y = ( FPNum ) gcoord.at(2); p [ 0 ].z = 0.; val [ 0 ] = v1.at(indx); gc.updateFringeTableMinMax(val, 1); //if (val[0] > 0.) { EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER); EASValsSetMType(FILLED_CIRCLE_MARKER); go = CreateMarkerWD3D(p, val [ 0 ]); EGWithMaskChangeAttributes(LAYER_MASK | FILL_MASK | MTYPE_MASK, go); EMAddGraphicsToModel(ESIModel(), go); //} } }