# calcNDBline_Lin

| main | Tutorials | Functions | website |

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

email: giorgk@gmail.com

web : http://groundwater.ucdavis.edu/msim

Date 28-Mar-2014

Department of Land Air and Water

University of California Davis

## Contents

## Usage

NvB = calcNDBline_Lin(N, v, B, ii)

## Input

* N*: shape functions

* v*: velocity

* B*: shape function derivatives

* ii*: in case of nested calculation this defines which loop well be calculated. (Currently this is not used)

## Output

* NvB*: the product N x v x B computed in vectorized manner

## How to compute

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]