Dataflow Datatypes NCRR Dataflow Datatypes Revisited Dataflow Datatypes

  • Slides: 11
Download presentation
Dataflow Datatypes NCRR

Dataflow Datatypes NCRR

Dataflow Datatypes Revisited Dataflow Datatypes Matrix Field Color. Map Geometry NCRR

Dataflow Datatypes Revisited Dataflow Datatypes Matrix Field Color. Map Geometry NCRR

Matrices: Class Hierarchy • Matrix -- base class Dataflow Datatypes • get, put, [

Matrices: Class Hierarchy • Matrix -- base class Dataflow Datatypes • get, put, [ ], nrows, ncols, get_row, get_col, get_val, zero, mult_transpose, print, {is_, as_, }{sparse, dense, column}, cg_solve, bicg_solve, scalar_multiply • Sparse. Row. Matrix • int *rows, int *cols, double *a, int nnz; • Column. Matrix • double *data; • Dense. Matrix • double **data; NCRR

Matrices: External Libraries • PETSc Dataflow Datatypes • Preconditioners: jacobi, bijacobi, sor, eisenstat, icc,

Matrices: External Libraries • PETSc Dataflow Datatypes • Preconditioners: jacobi, bijacobi, sor, eisenstat, icc, ilu, asm, sles, lu, mg, spai, milu, nn, cholesky, ramg • Solvers: KSRICHARDSON, PSPCHEBYCHEV, KSPGG, KSPGMRES, KSPTCQMR, KSPBCGS, KSPBGS, KSPTFQMR, KSPCR, KSPLSQR, KSPBICG, KSPPREONLY • BLAS and Atlas • Faster linear-algebra via loop unrolling NCRR

Dataflow Datatypes Revisited Dataflow Datatypes Matrix Field Color. Map Geometry NCRR

Dataflow Datatypes Revisited Dataflow Datatypes Matrix Field Color. Map Geometry NCRR

Fields: Mesh + Dataflow Datatypes Geometry Regular Point. Cloud. Field Irregular Data Scanline. Field

Fields: Mesh + Dataflow Datatypes Geometry Regular Point. Cloud. Field Irregular Data Scanline. Field Curve. Field int, float, double, … Vector, Tensor, … Data_at (center) Image. Field Quad. Surf. Field Tri. Surf. Field Properties Lat. Vol. Field Hex. Vol. Field Tet. Vol. Field NCRR

Meshes Dataflow Datatypes • Mesh -- base class • get_bounding_box, transform, synchronize, dimensionality •

Meshes Dataflow Datatypes • Mesh -- base class • get_bounding_box, transform, synchronize, dimensionality • Point. Cloud. Mesh • Iterators, get_{node, edge, face, cell}, locate, get_weights, add_node • Hex. Vol. Mesh • Iterators, get_{node, edge, face, cell}, locate, get_weights, add_node, add_elem • Image. Mesh • Same, plus new Index type NCRR

Fields • Field: : Generic. Field -- base class • • • Dataflow Datatypes

Fields • Field: : Generic. Field -- base class • • • Dataflow Datatypes Generic. Field<Mesh. Type, Data. Type>, data_at Holds Handle to Mesh Owns Data -- resize_fdata() [new Data. Type for FData{2, 3}d] Freeze/Thaw (data) value(), set_value(), fdata() mesh(), mesh_detach() • All fields derive from Generic. Field • Point. Cloud. Mesh -> Point. Cloud. Field • Image. Mesh -> Image. Field • Persistent: : Datatype: : Property. Manager: : Field: : Generic. Field io(), Per. Type. ID lock/gen map of attrib/values data_at, interfaces • Mesh: : Property. Manager NCRR

Persistent • Serialize data for disk I/O Dataflow Datatypes • Eventually for distributed data

Persistent • Serialize data for disk I/O Dataflow Datatypes • Eventually for distributed data marshalling • Architecture independent • Build atop XDR • Slow for big data • Optional circumvention for Dense. Matrix • Data files are (somewhat) human readable, but should ~not~ be generated / edited by anything other than SCIRun • Use “convert” programs NCRR

Persistent void Dataflow Matrix: : io(Piostream& stream) { /* int version = */ stream.

Persistent void Dataflow Matrix: : io(Piostream& stream) { /* int version = */ stream. begin_class("Matrix", MATRIX_VERSION); Property. Manager: : io(stream); stream. end_class(); } Datatypes void Column. Matrix: : io(Piostream& stream) { /* int version = */stream. begin_class("Column. Matrix", COLUMNMATRIX_VERSION); Matrix: : io(stream); stream. io(rows); if(stream. reading()) { data=scinew double[rows]; } int i; for(i=0; i<rows; i++) stream. io(data[i]); stream. end_class(); } NCRR

Converter: Curve. Field. To. Text Dataflow Datatypes Mesh. Handle m. H = handle->mesh(); Curve.

Converter: Curve. Field. To. Text Dataflow Datatypes Mesh. Handle m. H = handle->mesh(); Curve. Mesh *cm = dynamic_cast<Curve. Mesh *>(m. H. get_rep()); Curve. Mesh: : Node: : iterator niter_end; Curve. Mesh: : Node: : size_type nsize; cm->begin(niter); cm->end(niter_end); cm->size(nsize); cerr << "Number of points = "<< nsize <<"n"; while(niter != niter_end) { Point p; cm->get_center(p, *niter); fprintf(f. Pts, "%lf %lfn", p. x(), p. y(), p. z()); ++niter; } Curve. Mesh: : Edge: : size_type esize; Curve. Mesh: : Edge: : iterator eiter_end; Curve. Mesh: : Node: : array_type edge_nodes(2); cm->size(esize); cm->begin(eiter); cm->end(eiter_end); FILE *f. Edges = fopen(edges. Name, "wt"); cerr << "Number of edges = "<< esize <<"n"; while(eiter != eiter_end) { cm->get_nodes(edge_nodes, *eiter); fprintf(f. Edges, "%d %dn", (int)edge_nodes[0]+base. Index, (int)edge_nodes[1]+base. Index); ++eiter; } NCRR