void TransportMaterialStatus :: printOutputAt(FILE *File, TimeStep *tNow) // Print the state variable and the flow vector on the data file. { FloatArray flowVec; TransportElement *transpElem = static_cast< TransportElement * >( gp->giveElement() ); MaterialStatus :: printOutputAt(File, tNow); fprintf(File, " state"); for ( int i = 1; i <= field.giveSize(); i++ ) { fprintf( File, " % .4e", field.at(i) ); } transpElem->computeFlow(flowVec, gp, tNow); fprintf(File, " flow"); for ( int i = 1; i <= flowVec.giveSize(); i++ ) { fprintf( File, " % .4e", flowVec.at(i) ); } fprintf(File, "\n"); }
int TransportMaterial :: giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) // IST_Humidity must be overriden! { TransportMaterialStatus *ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) ); if ( type == IST_Temperature || type == IST_MassConcentration_1 || type == IST_Humidity ) { FloatArray vec = ms->giveField(); answer = FloatArray{vec.at( ( type == IST_Temperature ) ? 1 : 2 ) }; return 1; } else if ( type == IST_TemperatureFlow ) { TransportElement *transpElem = static_cast< TransportElement * >( gp->giveElement() ); transpElem->computeFlow(answer, gp, tStep); return 1; } else if ( type == IST_Velocity ) { ///@todo Shouldn't be named velocity.. instead, "MassFlow" or something suitable like that. answer = ms->giveFlux(); answer.resizeWithValues(3); return 1; } else if ( type == IST_PressureGradient ) { answer = ms->giveGradient(); answer.resizeWithValues(3); return 1; } else if ( type == IST_Density ) { answer = FloatArray{ this->give('d', gp) }; return 1; } else if ( type == IST_HeatCapacity ) { answer = FloatArray{ this->give('c', gp) }; return 1; } else if ( type == IST_ThermalConductivityIsotropic ) { answer = FloatArray{ this->give('k', gp) }; return 1; } else if ( type == IST_Maturity ) { answer = FloatArray{ ms->giveMaturity() }; return 1; } return Material :: giveIPValue(answer, gp, type, tStep); }