예제 #1
0
contextIOResultType
Material :: restoreIPContext(DataStream *stream, ContextMode mode, GaussPoint *gp)
//
// restores full material status (saves state variables, that completely describe
// current state) stored in gp->matstatusDict with key =  (int)this->giveClassID()
// restoring of corresponding context if it is defined for current material in
// gp status dictionary should be performed here by overloading this function.
// (such code should invoke also corresponding function for yield conditions,
//  submaterials and so on)
//

//
{
    contextIOResultType iores;
    if ( gp == NULL ) {
        THROW_CIOERR(CIO_BADOBJ);
    }

    // read raw data - context
    MaterialStatus *status =  this->giveStatus(gp);
    if ( status ) {
        if ( ( iores = status->restoreContext(stream, mode, gp) ) != CIO_OK ) {
            THROW_CIOERR(iores);
        }
    }

    return CIO_OK;
}
예제 #2
0
bool
RandomMaterialExtensionInterface :: give(int key, GaussPoint *gp, double &value)
{
    MaterialStatus *status = gp->giveMaterial()->giveStatus(gp);
    RandomMaterialStatusExtensionInterface *interface = ( RandomMaterialStatusExtensionInterface * )
                                                        status->giveInterface(RandomMaterialStatusExtensionInterfaceType);
    return interface->_giveProperty(key, value);
}
예제 #3
0
void
Material :: updateYourself(GaussPoint *gp, TimeStep *atTime)
//
//
// We call MaterialStatus->updateYourself()
//
{
    MaterialStatus *status = this->giveStatus(gp);
    if ( status ) {
        status->updateYourself(atTime);
    }
}
예제 #4
0
void
Material :: initTempStatus(GaussPoint *gp)
//
// Initialize MatStatus (respective it's temporary variables at the begining
// of integrating incremental constitutive relations) to correct values
//
{
    MaterialStatus *status = this->giveStatus(gp);
    if ( status ) {
        status->initTempStatus();
    }
}
예제 #5
0
void
MicroplaneMaterial :: initTempStatus(GaussPoint *gp)
{
    // init master
    this->giveStatus(gp)->initTempStatus();

    // init master microplanes
    for ( int mPlaneIndex = 0; mPlaneIndex < numberOfMicroplanes; mPlaneIndex++ ) {
        Microplane *mPlane = this->giveMicroplane(mPlaneIndex, gp);
        MaterialStatus *status = dynamic_cast< MaterialStatus * >( this->giveMicroplaneStatus(mPlane) );
        if ( status ) {
            status->initTempStatus();
        }
    }
}