本文整理汇总了C++中TransportMaterialStatus::setTempField方法的典型用法代码示例。如果您正苦于以下问题:C++ TransportMaterialStatus::setTempField方法的具体用法?C++ TransportMaterialStatus::setTempField怎么用?C++ TransportMaterialStatus::setTempField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransportMaterialStatus
的用法示例。
在下文中一共展示了TransportMaterialStatus::setTempField方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: giveFluxVector
void
HeMoTKMaterial :: giveFluxVector(FloatArray &answer, GaussPoint *gp, const FloatArray &grad, const FloatArray &field, TimeStep *tStep)
{
TransportMaterialStatus *ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
double w = field.at(2);
double t = field.at(1);
FloatArray ans_w, ans_t;
FloatArray grad_w, grad_t;
int size = grad.giveSize() / 2;
for ( int i = 1; i <= size; ++i ) {
grad_w.at(i) = grad.at(i);
}
for ( int i = size + 1; i <= size * 2; ++i ) {
grad_t.at(i) = grad.at(i);
}
ans_w.beScaled(perm_ww(w, t), grad_w);
ans_w.beScaled(perm_wt(w, t), grad_t);
ans_t.beScaled(perm_ww(w, t) * get_latent(w, t), grad_w);
ans_t.beScaled(get_chi(w, t) + get_latent(w, t) * perm_wt(w, t), grad_t);
answer.resize(size * 2);
answer.zero();
answer.addSubVector(ans_w, 1);
answer.addSubVector(ans_t, size + 1);
ms->setTempField(field);
ms->setTempGradient(grad);
ms->setTempFlux(answer);
}
示例2: giveFluxVector
void
IsotropicMoistureTransferMaterial :: giveFluxVector(FloatArray &answer, GaussPoint *gp, const FloatArray &grad, const FloatArray &field, TimeStep *tStep)
{
TransportMaterialStatus *ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
///@todo Shouldn't the permeability typically depend on the primary field and/or its gradient?
answer.beScaled(-this->givePermeability(gp, tStep), grad);
ms->setTempField(field);
ms->setTempGradient(grad);
ms->setTempFlux(answer);
}
示例3: giveFluxVector
void
AnisotropicMassTransferMaterial :: giveFluxVector(FloatArray& answer, GaussPoint *gp, const FloatArray &grad, const FloatArray &field, TimeStep *tStep)
{
TransportMaterialStatus *ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
answer.beProductOf(k, grad);
answer.negated();
ms->setTempField(field);
ms->setTempGradient(grad);
ms->setTempFlux(answer);
}
示例4: giveFluxVector
void
NonlinearMassTransferMaterial :: giveFluxVector(FloatArray &answer, GaussPoint *gp, const FloatArray &grad, const FloatArray &field, TimeStep *tStep)
{
TransportMaterialStatus *ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
double gradPNorm = grad.computeNorm();
answer.beScaled( -(1. + C * pow(gradPNorm, alpha)), grad);
ms->setTempGradient(grad);
ms->setTempField(field);
ms->setTempFlux(answer);
}
示例5: giveFluxVector
void
HeMoKunzelMaterial :: giveFluxVector(FloatArray &answer, GaussPoint *gp, const FloatArray &grad, const FloatArray &field, TimeStep *tStep)
{
TransportMaterialStatus *ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
FloatArray s;
// s = ms->giveTempStateVector();
s = ms->giveTempField();
if ( s.isEmpty() ) {
OOFEM_ERROR("matcond1d: undefined state vector");
}
double h = s.at(2);
double t = s.at(1);
FloatArray ans_w, ans_t;
FloatArray grad_w, grad_t;
int size = grad.giveSize() / 2;
for ( int i = 1; i <= size; ++i ) {
grad_w.at(i) = grad.at(i);
}
for ( int i = size + 1; i <= size * 2; ++i ) {
grad_t.at(i) = grad.at(i);
}
ans_w.beScaled(perm_mm(h, t), grad_w);
ans_w.beScaled(perm_mh(h, t), grad_t);
ans_t.beScaled(perm_hm(h, t), grad_w);
ans_t.beScaled(perm_hh(h, t), grad_t);
answer.resize(size * 2);
answer.zero();
answer.addSubVector(ans_w, 1);
answer.addSubVector(ans_t, size + 1);
ms->setTempField(field);
ms->setTempGradient(grad);
ms->setTempFlux(answer);
}