本文整理汇总了C++中StructuralInterfaceMaterialStatus::giveTempF方法的典型用法代码示例。如果您正苦于以下问题:C++ StructuralInterfaceMaterialStatus::giveTempF方法的具体用法?C++ StructuralInterfaceMaterialStatus::giveTempF怎么用?C++ StructuralInterfaceMaterialStatus::giveTempF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StructuralInterfaceMaterialStatus
的用法示例。
在下文中一共展示了StructuralInterfaceMaterialStatus::giveTempF方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
StructuralInterfaceMaterial :: giveStiffnessMatrix_dTdj_Num(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
{
// Default implementation for computation of the numerical tangent
// Computes the material stiffness using a central difference method
StructuralInterfaceMaterialStatus *status = static_cast< StructuralInterfaceMaterialStatus * >( this->giveStatus(gp) );
if ( status ) {
FloatMatrix F;
F = status->giveTempF();
int dim = F.giveNumberOfRows();
answer.resize(dim, dim);
answer.zero();
const double eps = 1.0e-9;
FloatArray T, TPlus, TMinus;
FloatArray jump, jumpPlus, jumpMinus, Kcolumn;
jump = status->giveTempJump();
for ( int i = 1; i <= dim; i++ ) {
jumpPlus = jumpMinus = jump;
jumpPlus.at(i) += eps;
jumpMinus.at(i) -= eps;
this->giveFirstPKTraction_3d(TPlus, gp, jumpPlus, F, tStep);
this->giveFirstPKTraction_3d(TMinus, gp, jumpMinus, F, tStep);
Kcolumn = ( TPlus - TMinus );
answer.setColumn(Kcolumn, i);
}
answer.times( 1.0 / ( 2 * eps ) );
this->giveFirstPKTraction_3d(T, gp, jump, F, tStep); // reset temp values by recomputing the stress
}
}