void CohesiveSurface3d :: drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType type) { GraphicObj *go1, *go2; if ( !gc.testElementGraphicActivity(this) ) { return; } double defScale = gc.getDefScale(); WCRec p [ 2 ]; EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH); EASValsSetColor( gc.getDeformedElementColor() ); EASValsSetLayer(OOFEG_DEFORMED_GEOMETRY_LAYER); // get the displaced particle coordinates Particle *nodeA = ( Particle * ) giveNode(1); Particle *nodeB = ( Particle * ) giveNode(2); p [ 0 ].x = nodeA->giveUpdatedCoordinate(1, tStep, defScale); p [ 0 ].y = nodeA->giveUpdatedCoordinate(2, tStep, defScale); p [ 0 ].z = nodeA->giveUpdatedCoordinate(3, tStep, defScale); p [ 1 ].x = nodeB->giveUpdatedCoordinate(1, tStep, defScale); p [ 1 ].y = nodeB->giveUpdatedCoordinate(2, tStep, defScale); p [ 1 ].z = nodeB->giveUpdatedCoordinate(3, tStep, defScale); // plot the displaced particles EASValsSetMType(FILLED_CIRCLE_MARKER); EASValsSetColor( gc.getNodeColor() ); EASValsSetMSize(6); // plot the first particle go1 = CreateMarker3D(p); EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | MTYPE_MASK | MSIZE_MASK, go1); EMAddGraphicsToModel(ESIModel(), go1); // take into account periodic conditions if ( giveNumberOfNodes() == 3 ) { Node *nodeC = ( Particle * ) giveNode(3); p [ 1 ].x += kxa + kxa * defScale * ( nodeC->giveDofWithID(D_u)->giveUnknown(VM_Total, tStep) ) + kyb * defScale * ( nodeC->giveDofWithID(R_u)->giveUnknown(VM_Total, tStep) ); p [ 1 ].y += kyb + kyb * defScale * ( nodeC->giveDofWithID(D_v)->giveUnknown(VM_Total, tStep) ) + kzc * defScale * ( nodeC->giveDofWithID(R_v)->giveUnknown(VM_Total, tStep) ); p [ 1 ].z += kzc + kzc * defScale * ( nodeC->giveDofWithID(D_w)->giveUnknown(VM_Total, tStep) ) + kxa * defScale * ( nodeC->giveDofWithID(R_w)->giveUnknown(VM_Total, tStep) ); EASValsSetMType(CIRCLE_MARKER); } // plot the second particle go2 = CreateMarker3D(p + 1); EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | MTYPE_MASK | MSIZE_MASK, go2); EMAddGraphicsToModel(ESIModel(), go2); }
void IntElPoint :: drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType type) { GraphicObj *go; // if (!go) { // create new one WCRec p [ 1 ]; /* poin */ if ( !gc.testElementGraphicActivity(this) ) { return; } double defScale = gc.getDefScale(); EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH); EASValsSetColor( gc.getDeformedElementColor() ); EASValsSetLayer(OOFEG_DEFORMED_GEOMETRY_LAYER); 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) ); EASValsSetMType(CIRCLE_MARKER); go = CreateMarker3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go); EMAddGraphicsToModel(ESIModel(), go); }
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); //} } }
void LumpedMassElement :: drawRawGeometry(oofegGraphicContext &gc) { GraphicObj *go; WCRec p [ 1 ]; /* point */ if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetColor( gc.getElementColor() ); EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER); EASValsSetMType(SQUARE_MARKER); EASValsSetMSize(8); 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); go = CreateMarker3D(p); EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | MTYPE_MASK | MSIZE_MASK, go); EGAttachObject(go, ( EObjectP ) this); EMAddGraphicsToModel(ESIModel(), go); }
void LumpedMassElement :: drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType type) { GraphicObj *go; double defScale = gc.getDefScale(); WCRec p [ 1 ]; /* point */ if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetColor( gc.getDeformedElementColor() ); EASValsSetLayer(OOFEG_DEFORMED_GEOMETRY_LAYER); EASValsSetMType(SQUARE_MARKER); EASValsSetMSize(8); p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveUpdatedCoordinate(1, tStep, defScale); p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveUpdatedCoordinate(2, tStep, defScale); p [ 0 ].z = ( FPNum ) this->giveNode(1)->giveUpdatedCoordinate(3, tStep, defScale); go = CreateMarker3D(p); EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | MTYPE_MASK | MSIZE_MASK, go); EGAttachObject(go, ( EObjectP ) this); EMAddGraphicsToModel(ESIModel(), go); }
void InterfaceElem1d :: drawRawGeometry(oofegGraphicContext &gc) { GraphicObj *go; // if (!go) { // create new one WCRec p [ 1 ]; /* poin */ if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetColor( gc.getElementColor() ); EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER); EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH); EASValsSetColor( gc.getDeformedElementColor() ); 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) ); EASValsSetMType(CIRCLE_MARKER); go = CreateMarker3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go); EMAddGraphicsToModel(ESIModel(), go); }