Computes the product N x v x B for 1D linear elements in vectorized manner This is used internally from calcNvB.
Version : 1.0
Author : George Kourakos
Department of Land Air and Water
University of California Davis
NvB = calcNDBline_Lin(N, v, B, ii)
N: shape functions
B: shape function derivatives
ii: in case of nested calculation this defines which loop well be calculated. (Currently this is not used)
NvB: the product N x v x B computed in vectorized manner
In mSim we avoid by hand computations at all costs, therefore we used the symbolic toolbox to perform the vectorized computations. The following code show how we computed the products.
syms n1 n2 b1 b2 vx N=[n1; n2]; V=vx; B=[b1 b2]; N*V*B
ans = [ b1*n1*vx, b2*n1*vx] [ b1*n2*vx, b2*n2*vx]