/[ff3d]/ff3d/solver/UserFunction.hpp
ViewVC logotype

Diff of /ff3d/solver/UserFunction.hpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by delpinux, Sun Sep 21 14:32:51 2003 UTC revision 1.4 by delpinux, Mon Nov 3 18:56:04 2003 UTC
# Line 58  class UserFunction Line 58  class UserFunction
58    /*! Unary minus for UserFunctions    /*! Unary minus for UserFunctions
59      \todo Make this function virtual.      \todo Make this function virtual.
60     */     */
61    const UserFunction operator- () const;    UserFunction operator- () const;
62    
63    //! operator= : allow affectation of a UserFunction.    //! operator= : allow affectation of a UserFunction.
64    const UserFunction& operator = (const UserFunction& F)    const UserFunction& operator = (const UserFunction& F)
# Line 105  class UnaryMinusUserFunction Line 105  class UnaryMinusUserFunction
105    : public UserFunction    : public UserFunction
106  {  {
107  private:  private:
108    ReferenceCounting<UserFunction> __u;    ConstReferenceCounting<UserFunction> __u;
109    
110  public:  public:
111    real_t operator()(const TinyVector<3>& X) const    real_t operator()(const TinyVector<3>& X) const
# Line 119  public: Line 119  public:
119      ;      ;
120    }    }
121    
122    UnaryMinusUserFunction(ReferenceCounting<UserFunction> U)    UnaryMinusUserFunction(ConstReferenceCounting<UserFunction> U)
123      : __u(U)      : __u(U)
124    {    {
125      ;      ;
# Line 809  class FEMUserFunction Line 809  class FEMUserFunction
809    ~FEMUserFunction();    ~FEMUserFunction();
810  };  };
811    
812    class FEM0UserFunction
813      : public UserFunction
814    {
815     private:
816      //! The Mesh on which lives the function.
817      ReferenceCounting<Mesh> __mesh;
818    
819      //! The vector of cell values.
820      Vector<real_t>__values;
821    
822     public:
823    
824      //! Evaluates the FEM0UserFunction at point \a X.
825      real_t operator()(const TinyVector<3>& V) const;
826    
827      //! Access to the value at the ith vertex of the mesh \a M.
828      inline real_t& operator[](const size_t& i)
829      {
830        return __values[i];
831      }
832    
833      //! Read only Access to the value at the ith cell of the mesh \a M.
834      inline const real_t& operator[](const size_t& i) const
835      {
836        return __values[i];
837      }
838    
839      //! Affects a \a Vector to the FEM0UserFunction.
840      void operator=(Vector<real_t>& u);
841    
842      //! Read-only access to the mesh pointed by \a M.
843      const Mesh& mesh() const
844      {
845        return (*__mesh);
846      }
847    
848      //! Constructs a FEM0UserFunction using a pointer on a Mesh and a UserFunction
849      FEM0UserFunction(ReferenceCounting<Mesh> pmesh, const UserFunction& F);
850    
851      //! Constructs a FEMUserFunction using a pointer on a Mesh and a real_t
852      FEM0UserFunction(ReferenceCounting<Mesh> pmesh, const real_t d);
853    
854      /*!
855        Constructs a FEMUserFunction using a pointer on a Mesh and a Vector of data.
856        \warning Will have to change this for the vectorial case.
857      */
858      FEM0UserFunction(ReferenceCounting<Mesh> pmesh, const Vector<real_t>& F);
859    
860      //! Copy Constructor.
861      FEM0UserFunction(const FEM0UserFunction& F);
862    
863      //! Destructor.
864      ~FEM0UserFunction();
865    };
866    
867    
868  class Scene;  class Scene;
869  class Object;  class Object;
870    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26