TheBoussinesqModel  3.2.1
 All Data Structures Files Functions Variables Typedefs Macros Pages
linear_span.c File Reference
#include "turtle.h"
#include "tensor3D.h"
#include "t_utilities.h"
#include "linear_span.h"
#include "rw_maps.h"

Go to the source code of this file.

Functions

int no_value_function (double x, DOUBLEVECTOR *V)
 
DOUBLEVECTORprod_doublematvet (DOUBLEMATRIX *m, DOUBLEVECTOR *v)
 
double prodscal (DOUBLEVECTOR *a, DOUBLEVECTOR *b)
 
DOUBLEVECTORscalxvet (double a, DOUBLEVECTOR *b)
 
DOUBLETENSORlinear_span_doubletensor (double c1, double c2, DOUBLETENSOR *T1, DOUBLETENSOR *T2, DOUBLEVECTOR *V)
 
DOUBLEMATRIXtranspose_doublematrix (DOUBLEMATRIX *M)
 
DOUBLEVECTORextract_a_column_from_doublematrix (long d, DOUBLEMATRIX *M)
 
DOUBLEVECTORextract_a_row_from_doublematrix (long d, DOUBLEMATRIX *M)
 
DOUBLEVECTORextract_a_vertical_column_from_doubletensor (long r, long c, DOUBLETENSOR *T)
 

Function Documentation

DOUBLEVECTOR* extract_a_column_from_doublematrix ( long  d,
DOUBLEMATRIX M 
)

DOUBLEVECTOR *extract_a_coluumn_from_doublematrix(long l,DOUBLEMATRIX *M)

Parameters
(DOULEMATRIX*) - M a matrix of double from which the column will be estracted
(long)- d clunm at
Returns
DOUBLEVECTOR - a doublevector extracted and corresponding to the d-th column
Author
Emanuele Cordano
Date
August 2008

Definition at line 300 of file linear_span.c.

References DOUBLEMATRIX::nch, DOUBLEMATRIX::ncl, new_doublevector(), DOUBLEMATRIX::nrh, and DOUBLEMATRIX::nrl.

DOUBLEVECTOR* extract_a_row_from_doublematrix ( long  d,
DOUBLEMATRIX M 
)

DOUBLEVECTOR *extract_a_row_from_doublematrix(long l,DOUBLEMATRIX *M)

Parameters
(DOULEMATRIX*) - M a matrix of double from which the row will be extracted
(long)- d row
Returns
DOUBLEVECTOR - a doublevector extracted and corresponding to the d-th row
Author
Emanuele Cordano
Date
August 2008

Definition at line 333 of file linear_span.c.

References DOUBLEMATRIX::nch, new_doublevector(), DOUBLEMATRIX::nrh, and DOUBLEMATRIX::nrl.

DOUBLEVECTOR* extract_a_vertical_column_from_doubletensor ( long  r,
long  c,
DOUBLETENSOR T 
)

DOUBLEVECTOR *extract_a_vertical_column_from_doubletensor (long r,long c, DOUBLETENSOR *T)

Parameters
(DOULEMATRIX*) - T a doubletensor of double from which the vertical column will be estracted
(long)- r row index of the vertical column;
(long)- c column index of the verical column
Returns
DOUBLEVECTOR - a doublevector extracted and corresponding to the list of all layers at the row r and the column c of the doubletensor T
Author
Emanuele Cordano
Date
August 2008

Definition at line 368 of file linear_span.c.

References DOUBLETENSOR::nch, DOUBLETENSOR::ncl, DOUBLETENSOR::ndh, new_doublevector(), DOUBLEVECTOR::nl, DOUBLETENSOR::nrh, and DOUBLETENSOR::nrl.

DOUBLETENSOR* linear_span_doubletensor ( double  c1,
double  c2,
DOUBLETENSOR T1,
DOUBLETENSOR T2,
DOUBLEVECTOR V 
)

DOUBLETENSOR *linear_span_doubletensor(double c1, double c2, DOUBLETENSOR *T1,DOUBLETENSOR *T2)

Author
Emanuele Cordano
Date
9 January 2008
Parameters
c1first double coefficient
c2second double coefficient
T1first doubletensor
T2second doubletensor
Vdoublecetor with no_balue information
Returns
TL doubletensor

it solves the linear span between T1 and T2 : $ TL=c1 * T1 + c2 * T2 $ . It takes into account no-value data.

Definition at line 194 of file linear_span.c.

References DOUBLETENSOR::nch, DOUBLETENSOR::ncl, DOUBLETENSOR::ndh, DOUBLETENSOR::ndl, new_doubletensor(), no_value_function(), DOUBLETENSOR::nrh, DOUBLETENSOR::nrl, and t_error().

int no_value_function ( double  x,
DOUBLEVECTOR V 
)

< int no_value_function(double x,FLOATVECTOR* V)

Parameters
xa generic value of a map
Vthe no-value doublevector of a T_INIT struct)

Function which recognizes novalue in a map (doublematrix) it folloes FLUIDTURLE FORMALISM

Returns
0 if x is not a no-value, 1 if x is a no-value
Author
Emanuele Cordano
Date
7 January 2007
Version
0.9375b

< printf("1");

< printf("0");

Definition at line 36 of file linear_span.c.

Referenced by linear_span_doubletensor(), and new_raster_map().

DOUBLEVECTOR* prod_doublematvet ( DOUBLEMATRIX m,
DOUBLEVECTOR v 
)

DOUBLEVECTOR *prod_doublematvet(DOUBLEMATRIX *m, DOUBLEVECTOR *v)

Author
Matteo Dall'Amico

(in Italian) riceve in input una matrice e un vettore double e ne ritorna il vettore prodotto

Definition at line 109 of file linear_span.c.

References DOUBLEMATRIX::nch, DOUBLEMATRIX::ncl, new_doublevector(), DOUBLEVECTOR::nh, DOUBLEMATRIX::nrl, and t_error().

double prodscal ( DOUBLEVECTOR a,
DOUBLEVECTOR b 
)
Parameters
b
Author
Matteo Dall'Amico, Emanuele Cordano
Date
2006 / 2008
Parameters
a- (DOUBLEVECTOR *)
b- (DOUBLEVECTOR *)
Returns
scalar product between a and b

Definition at line 137 of file linear_span.c.

References DOUBLEVECTOR::nh, DOUBLEVECTOR::nl, and t_error().

DOUBLEVECTOR* scalxvet ( double  a,
DOUBLEVECTOR b 
)

Funzione che da' in output un vettore che e' il prodotto tra lo scalare a e il vettore b

Definition at line 161 of file linear_span.c.

References new_doublevector(), DOUBLEVECTOR::nh, and DOUBLEVECTOR::nl.

DOUBLEMATRIX* transpose_doublematrix ( DOUBLEMATRIX M)

DOUBLEMATRIX *transpose_doublematrix(DOUBLEMATRIX *M)

Parameters
(DOULEMATRIX*) - M a matrix of double to be transposed
Returns
It calculates the transpose matrix of M
Author
Emanuele Cordano
Date
August 2008

Definition at line 272 of file linear_span.c.

References DOUBLEMATRIX::nch, new_doublematrix(), DOUBLEMATRIX::nrh, and DOUBLEMATRIX::nrl.