本文整理汇总了C++中TransportMaterialStatus::giveField方法的典型用法代码示例。如果您正苦于以下问题:C++ TransportMaterialStatus::giveField方法的具体用法?C++ TransportMaterialStatus::giveField怎么用?C++ TransportMaterialStatus::giveField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransportMaterialStatus
的用法示例。
在下文中一共展示了TransportMaterialStatus::giveField方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: inverse_sorption_isotherm
double
HeMoTKMaterial :: giveHumidity(GaussPoint *gp, ValueModeType mode)
{
TransportMaterialStatus *ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
const FloatArray &tempState = ms->giveTempField();
if ( tempState.giveSize() < 2 ) {
OOFEM_ERROR("undefined moisture status!");
}
FloatArray state = ms->giveField();
if ( mode == VM_Total ) {
return inverse_sorption_isotherm( tempState.at(2) );
} else if ( mode == VM_Incremental ) {
return inverse_sorption_isotherm( tempState.at(2) ) - inverse_sorption_isotherm( state.at(2) );
} else if ( mode == VM_Velocity ) { // VM_Previous
return inverse_sorption_isotherm( state.at(2) );
}
return 1.;
}
示例2: giveHumidity
double
HeMoKunzelMaterial :: giveHumidity(GaussPoint *gp, ValueModeType mode)
{
TransportMaterialStatus *ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
const FloatArray &tempState = ms->giveTempField();
if ( tempState.giveSize() < 2 ) {
OOFEM_ERROR("Undefined moisture status");
}
const FloatArray &state = ms->giveField();
if ( mode == VM_Total ) {
return tempState.at(2);
} else if ( mode == VM_Incremental ) {
return tempState.at(2) - state.at(2);
} else if ( mode == VM_Velocity ) { // VM_Previous
return state.at(2);
} else {
OOFEM_ERROR("Undefined moisture mode");
}
return 1.;
}
示例3: giveIPValue
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);
}