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

Diff of /ff3d/solver/Domain.hpp

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

revision 1.2 by delpinux, Fri Feb 28 14:56:53 2003 UTC revision 1.3 by delpinux, Tue Sep 2 16:05:34 2003 UTC
# Line 27  class Scene; Line 27  class Scene;
27  #include <Object.hpp>  #include <Object.hpp>
28  #include <TinyVector.hpp>  #include <TinyVector.hpp>
29    
30    #include <map>
31    
32  /**  /**
33   * @file   Domain.hpp   * @file   Domain.hpp
34   * @author Stephane Del Pino   * @author Stephane Del Pino
# Line 47  private: Line 49  private:
49     */     */
50    bool __isR3;    bool __isR3;
51    
52    ReferenceCounting<Object> __objects; /**< The shape of the domain */    ReferenceCounting<Object>
53      __objects;                    /**< The shape of the domain */
54    
55      const Scene& __scene;         /**< The POV-Ray scene */
56    
57    const Scene& __scene;    std::map<TinyVector<3, real_t>, size_t>
58      __povToReference;             /**< The POV-Ray to internal
59                                       references association*/
60    
61      void __buildReferenceAssociation(const Object& o);
62    
63    const bool __inShape(const TinyVector<3>& X) const    const bool __inShape(const TinyVector<3>& X) const
64    {    {
# Line 57  private: Line 66  private:
66    }    }
67    
68  public:  public:
69      size_t reference(const TinyVector<3, real_t>& ref) const
70      {
71        std::map<TinyVector<3, real_t>, size_t>::const_iterator i
72          = __povToReference.find(ref);
73        if (i == __povToReference.end()) {
74          fferr(0) << "Reference " << ref << " is not defined in the domain\n";
75          std::exit(1);
76        }
77        return (*i).second;
78      }
79    
80    /**    /**
81     * Outputs the Domain \a D in the \p std::ostream \a os.     * Outputs the Domain \a D in the \p std::ostream \a os.
82     */     */
# Line 115  public: Line 135  public:
135    {    {
136      __isR3 = false;      __isR3 = false;
137      __objects = objects;      __objects = objects;
138        this->__buildReferenceAssociation(*__objects);
139    }    }
140    
141    /**    /**

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

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