1 function [vel,lambda] = velocity_richards(glob, params)
2 %
function [vel,lambda] = velocity_richards(glob, params)
4 %
function evaluating a
function in the list of global coordinates
5 % specified in the columns of glob. Result is a matrix of velocity
6 % vectors as columns of vel.
9 % Linear combination of components by coefficients then yields the
10 % complete evaluation.
12 % Martin Drohmann 23.9.2009
16 if ~isempty(glob) && size(glob,1) < size(glob,2)
17 warning('coordinates in variable glob are given row-wise, but expected them to be column-wise');
24 vel = zeros(length(X),2);
26 % p_mu = spline_select(model);
27 % [ breaks, coeffs, pieces, order ] = unmkpp(p_mu);
28 % p_mu_d = mkpp(breaks, coeffs(1:order-1) .* [order-1:-1:1]);
30 % denom = 1 + ppval(p_mu, X);
33 d1 = res1{3} + res2{3};
34 d2 = res1{4} + res2{4};
35 vel(:,1) = ( -params.k .* (res1{1} .* d1 + res1{2} .* d2) );
36 vel(:,2) = ( -params.k .* (res2{1} .* d1 + res2{2} .* d2) );
function [ P1res , P2res ] = inv_geo_trans_derivative(model, glob, P1derivates, P2derivates, callerid)
computes entries of a geometry transformation function's inverse transposed jacobian ...