Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

FieldScatPt Class Reference

field over a grid of arbitrary scattered points. More...

#include <FieldScatPt.h>

Inheritance diagram for FieldScatPt::

FieldWithPtValues Field HandleId List of all members.

Public Methods

 FieldScatPt (const char *fieldname_=NULL)
 FieldScatPt (GridScatPt &grid, const char *fieldname)
 ~FieldScatPt ()
bool redim (GridScatPt &grid, const char *fieldname)
GridScatPtgrid ()
const GridScatPtgrid () const
Vec(NUMT)& values ()
const Vec(NUMT)& values () const
virtual bool ok () const
virtual void minmax (NUMT &min, NUMT &max, GridWithPts *grid=NULL) const
virtual NUMT valueNode (int node, real=DUMMY) const
NUMT& valueNode (int node)
int getNoNodes () const
virtual NUMT valuePt (const Ptv(real) &x, real t=DUMMY)
void operator= (const FieldFunc &func)
void fill (const Vector(NUMT) &new_values)
virtual void print (Os os) const
void scan (Is is)
virtual void fill (NUMT value)
virtual void add (NUMT value)
virtual void mult (NUMT value)
virtual void apply (Func(NUMT) f)
virtual void add (Field &field, int power, NUMT front_factor)
virtual Fieldscale ()
virtual Fieldunscale ()
virtual void unloadData (Os os) const
virtual void loadData (Is is)
virtual void attach (Grid &grid)
virtual GridgetGridBase ()
virtual int getNoPoints () const
virtual int getNoValues () const
virtual Vec(NUMT)& valuesVec ()
virtual const Vec(NUMT)& valuesVec () const
virtual NUMT& valuePoint (int point_no)
virtual NUMT valuePoint (int point_no) const
virtual Ptv(real) getPt (int point_no) const
virtual GridWithPtsgetGridWithPts ()
virtual const GridWithPtsgetGridWithPts () const

Detailed Description

field over a grid of arbitrary scattered points.

NAME: FieldScatPt - field over a grid of arbitrary scattered points

DESCRIPTION:

The class represents a field over a scattered point set. The field is only defined at the discrete points. Hence there is no interpolation functionality. The class consists basically of a "GridScatPt" grid and an array containing the field 'values' at the grid points.


Constructor & Destructor Documentation

FieldScatPt::FieldScatPt ( const char * fieldname_ = NULL ) [inline]
 

FieldScatPt::FieldScatPt ( GridScatPt & grid,
const char * fieldname )
 

See documentation of one of the overloaded constructor.

FieldScatPt::~FieldScatPt ( ) [inline]
 


Member Function Documentation

void FieldScatPt::add ( Field & field,
int power,
NUMT front_factor ) [virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from Field.

void FieldScatPt::add ( NUMT value ) [virtual]
 

adds a constant field to the field. An overloaded version takes a "Field" "f", an integer power "i" and a factor "c" as arguments. The formula "c*f^i" is added to the object field.

Reimplemented from Field.

void FieldScatPt::apply ( Func(NUMT) f ) [virtual]
 

applies a function, like "sin(x)", to the field.

Reimplemented from Field.

void FieldScatPt::attach ( Grid & grid ) [virtual]
 

attaches a grid to the field. Used by the "FieldReader" and "SimResFile" classes when reading fields from files. Specific versions of the function are implemented in the subclasses.

Reimplemented from Field.

void FieldScatPt::fill ( NUMT value ) [virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from Field.

void FieldScatPt::fill ( const Vector(NUMT) & new_values )
 

fill the field values with the values given by a vector. The length of the vector must coincide with the number of grid points.

Grid * FieldScatPt::getGridBase ( ) [virtual]
 

returns a "Grid" base class pointer to the grid associated with the field. Since many field types do not have an associated grid, the function is not meaningful for all fields. The "getGridBase" function is used by the "SimResFile" and "FileReader" classes.

Reimplemented from Field.

const GridWithPts & FieldScatPt::getGridWithPts ( ) const [inline, virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from FieldWithPtValues.

GridWithPts & FieldScatPt::getGridWithPts ( ) [inline, virtual]
 

gives access to the grid object associated with the "FieldWithPtValues" object. The corresponding base class for grid with discrete points is "GridWithPts".

Reimplemented from FieldWithPtValues.

int FieldScatPt::getNoNodes ( ) const [inline]
 

returns the number of field values. To initialize the field values one can create a loop from 1 to "getNoNodes" and for each pass in the loop call "valueNode".

int FieldScatPt::getNoPoints ( ) const [inline, virtual]
 

returns the number of points in the grid.

Reimplemented from FieldWithPtValues.

int FieldScatPt::getNoValues ( ) const [inline, virtual]
 

returns the number of field values (usually equal to the number of points).`\footnote{`In a "GridLattice" grid one can think of a finite difference field defined at the cell centers. Then the number of grid points does not coincide with the number of field values. However, the field is typically characterized as being defined at a finite number of spatial points.`}`

Reimplemented from FieldWithPtValues.

Ptv(real) FieldScatPt::getPt ( int point_no ) const [inline, virtual]
 

returns the coordinate of a point. The point is given by its point number in the grid.

Reimplemented from FieldWithPtValues.

const GridScatPt & FieldScatPt::grid ( ) const [inline]
 

See documentation of one of the overloaded functions.

GridScatPt & FieldScatPt::grid ( ) [inline]
 

returns access to the grid part of the field.

void FieldScatPt::loadData ( Is is ) [virtual]
 

a special scan function used for reading the field from a SimRes file. (See classes "SimResFile" and "FieldReader").

Reimplemented from Field.

void FieldScatPt::minmax ( NUMT & min,
NUMT & max,
GridWithPts * grid = NULL ) const [virtual]
 

finds the minimum and maximum values of the field. Most of the subclass fields have an internal grid and will find the extreme values over this grid. The "minmax" function has an optional argument "grid" that can be supplied. This grid is not used if the field has an internal grid. However, some fields, like "FieldFunc", do not have internal grids and in that case the "grid" argument is required in order to compute the extreme values.

Reimplemented from Field.

void FieldScatPt::mult ( NUMT value ) [virtual]
 

multiplies the field values by a number.

Reimplemented from Field.

bool FieldScatPt::ok ( ) const [virtual]
 

returns true if the object is initialized, for the base class "Field" it just writes an error messages such that if a derived class fails to define an "ok" function, an error message will be written.

Reimplemented from Field.

void FieldScatPt::operator= ( const FieldFunc & func )
 

sets the field values equal to the values generated by an explicit function.

void FieldScatPt::print ( Os os ) const [virtual]
 

prints the field. Most subclass implementations involve printing the field values and the grid.

Reimplemented from Field.

bool FieldScatPt::redim ( GridScatPt & grid,
const char * fieldname )
 

Field & FieldScatPt::scale ( ) [virtual]
 

scale the field values and the space(-time) domain. That is, the original values of the field are overwritten by the new, scaled values. To retrieve the original values, call "unscale". Both "scale" and "unscale" tests a variable first to determine if the field is already scaled or unscaled (calling e.g. "scale" twice then results in no action of the second call).

Reimplemented from Field.

void FieldScatPt::scan ( Is is )
 

void FieldScatPt::unloadData ( Os os ) const [virtual]
 

a special print function that is used for dumping the field to a SimRes file. (See classes "SimResFile" and "FieldWriter").

Reimplemented from Field.

Field & FieldScatPt::unscale ( ) [virtual]
 

the inverse action of "scale".

Reimplemented from Field.

NUMT & FieldScatPt::valueNode ( int node ) [inline]
 

See documentation of one of the overloaded functions.

NUMT FieldScatPt::valueNode ( int node,
real t = DUMMY ) const [inline, virtual]
 

gives access to the field value at a particular grid point. For example, "values( (i)") is identical to "valueNode(i)". The latter is in some sense more ""protected"" and is the generally recommended function for reading and setting field values.

Reimplemented from Field.

NUMT FieldScatPt::valuePoint ( int point_no ) const [inline, virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from FieldWithPtValues.

NUMT & FieldScatPt::valuePoint ( int point_no ) [inline, virtual]
 

returns access to the field value at a spatial point. The point is given by its point number. (If the point is known by its coordinates and not the point number, one can use the "valuePt" function, see class "Field").

Reimplemented from FieldWithPtValues.

NUMT FieldScatPt::valuePt ( const Ptv(real) & x,
real t = DUMMY ) [virtual]
 

evaluates the field at a point in space and time. The time argument can be omitted, the default value is then "DUMMY". Generally, we suggest to use "DUMMY" to check if fields are stationary.

Reimplemented from Field.

const Vec(NUMT) & FieldScatPt::values ( ) const [inline]
 

See documentation of one of the overloaded functions.

Vec(NUMT) & FieldScatPt::values ( ) [inline]
 

gives access to the array containing the field values at the grid points.

const Vec(NUMT) & FieldScatPt::valuesVec ( ) const [inline, virtual]
 

Reimplemented from FieldWithPtValues.

Vec(NUMT) & FieldScatPt::valuesVec ( ) [inline, virtual]
 

Reimplemented from FieldWithPtValues.


Friends And Related Function Documentation

class FieldsScatPt [friend]
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.