Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#12 closed defect (fixed)

set_quantity API

Reported by: ole Owned by: ole
Priority: normal Milestone: ANUGA maintenance
Component: Architecture and API Version:
Severity: normal Keywords:
Cc:

Description (last modified by ole)

Suggestion for set_quantity

set_quantity(name, X, location, region) where name: Name of quantity X:

-Compatible list, -compatible list or numeric array, -constant -list of points or array with attribute values (use LS) (How to distinguish this from a numeric array? - perhaps use keyword arguments for everything) -callable object (f: x, y -> z) where x,y,z are arrays

  • inline
  • file functions
  • polygon functions -another quantity Q or an expression of the form

a*Q+b*R+c, where a,b,c are scalars, arrays or quantities

Q,R are quantities (or 1?)

  • pts filename (use LS and caching) (how to select attribute?)
  • general expression to be parsed

location: Where values are to be stored.

Permissible options are: vertices, edges, centroid, unique_vertices

region: Identify subset of triangles. Permissible values are

  • tag name (refers to tagged region)
  • indices (refers to specific triangles)
  • polygon (identifies region)

(incorporate uniqueness/non-uniqueness)

IDEA for set_quantity:

Use keywords and call underlying specific method, e.g.

if filename is not None:

vertex_values = caching( fitfunc, filename, dependencies = ...) set_quantity(..., ..., vertex_values)

elif:

Largely done. Should create class Point_set representing points and attribute(s) Include filename too? Yep (and selected attributes) This could also facilitate use of multiple point sources (e.g. at different resolutions)

Change History (5)

comment:1 Changed 19 years ago by ole

  • Status changed from new to assigned

comment:2 Changed 19 years ago by ole

  • Description modified (diff)

comment:3 Changed 19 years ago by ole

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:4 Changed 19 years ago by ole

  • Component changed from Compilation and installation to Architecture and API

comment:5 Changed 19 years ago by ole

  • Milestone changed from Pyvolution API finished to Pyvolution API maintenance
Note: See TracTickets for help on using tickets.