Exemplo n.º 1
0
void
RCM2Material :: updateActiveCrackMap(GaussPoint *gp, const IntArray *activatedCracks)
//
//
// updates mapping matrix of active cracks
//
{
    int i, indx = 1;
    RCM2MaterialStatus *status = ( RCM2MaterialStatus * ) this->giveStatus(gp);
    IntArray crackMap;
    status->giveCrackMap(crackMap);

    //if (crackMap == NULL) _error ("updateActiveCrackMap: NULL pointer encountered");

    for ( i = 1; i <= 3; i++ ) {
        if ( status->isCrackActive(i) ) {
            crackMap.at(i) = indx++;
        } else if ( activatedCracks ) {
            if ( ( activatedCracks->at(i) != 0 ) ) {
                crackMap.at(i) = indx++;
            }
        } else {
            crackMap.at(i) = 0;
        }
    }

    // store modified map into status
    status->letCrackMapBe(crackMap);
}
Exemplo n.º 2
0
void
RCM2Material :: checkIfClosedCracks(GaussPoint *gp, FloatArray &crackStrainVector,
                                    IntArray &crackMap)
//
// Check if crack closing occurs
// if yes updates crackStrainVector and gp-status accordingly
//
{
    RCM2MaterialStatus *status = ( RCM2MaterialStatus * ) this->giveStatus(gp);
    int i, isClosing = 0;

    for ( i = 1; i <= 3; i++ ) {
        if ( crackMap.at(i) ) {
            if ( crackStrainVector.at(i) < 0. ) {
                // crack closing occur
                crackStrainVector.at(i) = 0.;
                crackMap.at(i) = 0;
                // status->giveTempCrackStatus()->at(i) = pscm_CLOSED;
                isClosing = 1;
            }
        }
    }

    status->letCrackMapBe(crackMap);
    if ( isClosing ) {
        this->updateActiveCrackMap(gp);
    }

    status->giveCrackMap(crackMap); // update crack Map
}