Index

NAME

FieldsScatPt - vector field of FieldScatPt components


INCLUDE

include "FieldScatPt.h"

SYNTAX

 class FieldsScatPt : public FieldsWithPtValues
 {
 protected:
   VecSimplest(Handle(FieldScatPt)) fesfvec;  // array of scalar field pointers

 public:
   FieldsScatPt ();
   FieldsScatPt (int n,            // allocates n empty FieldScatPt components
             const char* fieldname);
   FieldsScatPt (GridScatPt& grid, // makes nsd fields
             const char* fieldname);
  ~FieldsScatPt ();

   virtual void redim (int nsf, const char* fieldname);
   bool redim (GridScatPt& grid, const char* fieldname);
   virtual bool ok () const;

         FieldScatPt& operator () (int i);
   const FieldScatPt& operator () (int i) const;

   virtual       FieldWithPtValues& component (int i);
   virtual const FieldWithPtValues& component (int i) const;

   virtual void attach (Field& f, int i = 1);
   void attach (FieldScatPt&  field, int i = 1);
   void attach (FieldsScatPt& fields);

   void fill (NUMT value);

   virtual void valuePt  (Ptv(NUMT)& vec, const Ptv(real)& x, real t = DUMMY);
   virtual void valueFEM (Ptv(NUMT)& vec, const FiniteElement& fe,
                          real t = DUMMY);

   virtual int getNoFields () const;
   virtual int getNoValues () const;

   virtual Field* getFieldBase (int i = 1) const;

   CLASS_INFO

   VIRTUAL_CAST(FieldsScatPt)

   // temporary:

   COPY_CONSTRUCTOR(FieldsScatPt);

 };



KEYWORDS

scattered points, point collection, vector field



DESCRIPTION

The  class  implements  a  vector  field  as  an array of handles
(pointers) to scalar fields of type FieldScatPt.  The  design  of
the  class  is similar to the classes FieldsFE, FieldsLattice and
FieldsPiWisConst.  Tensor fields are represented by  FieldsScatPt
by  specifying  the  number  of  tensor  components as the vector
length.



CONSTRUCTORS AND INITIALIZATION

There are three types of constructors. 1) A constructor  with  no
arguments (except for a field name). It requires further initial­
ization: redim for the number of vector components and attach  to
attach an existing FieldScatPt to each component.  2) A construc­
tor that takes the number of vector components in the field (plus
a  field  name). Further initialization: Use the attach functions
to attach scalar fields for each vector component.



MEMBER FUNCTIONS

attach - attaches an existing scalar field to one of  the  compo­
nents in the vector field.

fill  -  sets  all values of all the vector components equal to a
given real number.



SEE ALSO

class FieldScatPt, class GridFE


DEVELOPED BY

SINTEF Applied Mathematics, Oslo, Norway, and University of Oslo,
Dept. of Mathematics, Norway


AUTHOR

Hans Petter Langtangen, SINTEF/UiO