Diffpack Documentation


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

FieldFunc.h

Go to the documentation of this file.
00001 
00005 typedef NUMT  (*fxtFieldFunc (const) Ptv(real)& x, real time);
00006 
00007 
00008 class FieldFunc : public Field
00009 
00010 {
00011   fxtFieldFunc    f_ptr;    
00012 
00013 public:
00014 
00015   FieldFunc (const char* name = NULL) : Field(name)  { f_ptr = NULL; }
00016   FieldFunc (fxtFieldFunc f_ptr_)     { this->f_ptr = f_ptr_; }
00017   FieldFunc (const FieldFunc& f);
00018  ~FieldFunc ();
00019 
00020   void operator = (fxtFieldFunc funct);
00021   void operator = (const FieldFunc& f);
00022 
00023   virtual bool ok () const { return true; };
00024 
00025   
00026   virtual NUMT valuePt (const Ptv(real)& x, real t = DUMMY);
00027 
00028   
00029   
00030   virtual NUMT operator () (const Ptv(real)& x, real t) const;
00031 
00032   
00033   virtual Ptv(NUMT) derivativePt (const Ptv(real)& x, real t = DUMMY);
00034   virtual void hessianPt (Ptv(NUMT)&, const Ptv(real)& x, real = DUMMY);
00035 
00036   virtual NUMT valueFEM (const FiniteElement& fe, real t = DUMMY);
00037   virtual void derivativeFEM (Ptv(NUMT)& d, const FiniteElement& fe, 
00038                               real t = DUMMY);
00039   virtual void hessianFEM (Ptv(NUMT)&, const FiniteElement& fe, real = DUMMY);
00040   virtual NUMT divergenceFEM (const FiniteElement& fe, real t = DUMMY);
00041 
00042   void minmax (NUMT& min, NUMT& max, GridWithPts& grid, real t = DUMMY) const;
00043   virtual void minmax (NUMT& min, NUMT& max, GridWithPts* grid =NULL) const;
00044 
00045   CLASS_INFO
00046 
00047   VIRTUAL_CAST(FieldFunc)
00048 };
00049 
00050 
00124 class BellFunc : public FieldFunc
00125 
00126 {
00127   VecSimple(real) prms;
00128 public:
00129   BellFunc ();
00130   BellFunc (const VecSimple(real)& parameters);
00131   void setParameters (const VecSimple(real)& parameters);
00132 
00133   virtual NUMT operator () (const Ptv(real)& x, real t) const
00134     { return CAST_CONST_AWAY(BellFunc)->valuePt(x,t); }
00135   virtual NUMT valuePt (const Ptv(real)& x, real t = DUMMY);
00136 };
00137 
00138 

Copyright © 2003 inuTech GmbH. All rights reserved.