本文整理汇总了C#中DenseMatrix.FillZeros方法的典型用法代码示例。如果您正苦于以下问题:C# DenseMatrix.FillZeros方法的具体用法?C# DenseMatrix.FillZeros怎么用?C# DenseMatrix.FillZeros使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DenseMatrix
的用法示例。
在下文中一共展示了DenseMatrix.FillZeros方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ComputeDLoadRFEM
private static void ComputeDLoadRFEM( ref DenseMatrix dload , DenseMatrix gdisp ,
int n , double kappa , double acoef ,
List<double> yg , List<double> hg ,
List<double> alpha , List<double> blength ,
List<double> K_nob , List<double> K_nos ,
List<double> K_nrb , List<double> K_nrs ,
List<double> K_trb , List<double> K_trs ,
List<double> A_coefb , List<double> A_coefs ,
List<double> Phi_b , List<double> Phi_s ,
List<double> Coh_b , List<double> Coh_s )
{
dload.FillZeros();
int iii , ii;
double cos , sin ,
A0 , A1 , Ab ,
du , dv ,
ubar , vbar ,
Kx , Ky , Kn , Kt , F ,
tau_n , sigma_n , denom ,
Ns , Ts , Nb , Tb;
// loop through nodes to compute ACTUAL loads
for ( int i = 0 ; i < n ; i++ )
{
ii = 2 * i; iii = ii + 1; // compute (x,y) dof indices
// ----------------------------------------------------
// COMPUTE LOAD COMPONENTS DUE TO INTERSLICE STIFFNESS
// ----------------------------------------------------
if ( i == 0 ) // FIRST slice only has interslice stiffness on LEADING side
{
/*
*
* LEADING SLICE INTERFACE
* (note: for FIRST slice, there is zero stiffness on the trailing side)
*
*/
A1 = hg[1] - yg[1]; // area of slice interface
du = gdisp[ii + 2 , 0] - gdisp[ii , 0]; // relative displacements
dv = gdisp[iii + 2 , 0] - gdisp[iii , 0];
// normal interslice stiffness
Kx = A1 * (du <= 0 ? K_nos[i + 1] : K_nrs[i + 1] + kappa / (du + A_coefs[i + 1]));
Ns = du * Kx; // normal force between slices
dload[ii , 0] = Ns;
// shear interslice stiffness
//F = Math.Max(Coh_s[i + 1] - (Ns / A1) * Math.Tan(Phi_s[i + 1]), 0);
//Ky = A1 * (K_trs[i + 1] + F / (Math.Abs(dv) + acoef));
sigma_n = Ns / A1;
denom = Math.Abs( dv );
F = sigma_n * Math.Tan( Phi_s[i + 1] ) + Coh_s[i + 1];
tau_n = denom > 0.0 ? 0.5 * (K_trs[i + 1] * denom + F) : 0.0;
F = Math.Max( F - tau_n , 0 );
Ky = A1 * (K_trs[i + 1] + F / (denom + acoef));
Ts = dv * Ky; // shear force between slices
dload[iii , 0] = Ts;
}
else if ( i == n - 1 ) // LAST slice only has interslice stiffness on TRAILING side
{
/*
*
* TRAILING SLICE INTERFACE
* (note: for LAST slice, there is zero stiffness on the leading side)
*
*/
A0 = hg[n - 1] - yg[n - 1]; // area of slice interface
du = gdisp[ii , 0] - gdisp[ii - 2 , 0]; // relative displacements
dv = gdisp[iii , 0] - gdisp[iii - 2 , 0];
// normal interslice stiffness
Kx = A0 * (du <= 0 ? K_nos[i] : K_nrs[i] + kappa / (du + A_coefs[i]));
Ns = -du * Kx; // normal force between slices
dload[ii , 0] = Ns;
// shear interslice stiffness
//F = Math.Max(Coh_s[i] - (-Ns / A0) * Math.Tan(Phi_s[i]), 0);
//Ky = A0 * (K_trs[i] + F / (Math.Abs(dv) + acoef));
sigma_n = -Ns / A0;
denom = Math.Abs( dv );
F = sigma_n * Math.Tan( Phi_s[i] ) + Coh_s[i];
tau_n = denom > 0.0 ? 0.5 * (K_trs[i] * denom + F) : 0.0;
F = Math.Max( F - tau_n , 0 );
Ky = A0 * (K_trs[i] + F / (denom + acoef));
Ts = -dv * Ky; // shear force between slices
dload[iii , 0] = Ts;
}
else
//.........这里部分代码省略.........