vtf-logo

ISS_VertexField.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00008 #if !defined(__geom_ISS_VertexField_h__)
00009 #define __geom_ISS_VertexField_h__
00010 
00011 #if defined(DEBUG_geom) && !defined(DEBUG_ISS_VertexField)
00012 #define DEBUG_ISS_VertexField
00013 #endif
00014 
00015 #include "../../defs.h"
00016 
00017 #include "../../../ads/array/Array.h"
00018 // Interpolation functions.
00019 #include "../../../numerical/interpolation/simplex.h"
00020 
00021 BEGIN_NAMESPACE_GEOM
00022 
00024 
00031 template<class ISS, 
00032          typename F = typename ISS::Number>
00033 class ISS_VertexField
00034 {
00035   //
00036   // Private types.
00037   //
00038 
00039 private:
00040 
00042   typedef ISS IssType;
00044   typedef typename IssType::SizeType SizeType;
00045 
00046   //
00047   // Public types.
00048   //
00049 
00050 public:
00051 
00053   typedef typename IssType::Number Number;
00055   typedef typename IssType::Vertex Vertex;
00056 
00057   //
00058   // Field types.
00059   //
00060 
00062   typedef F Field;
00064   typedef ads::Array<1,Field,false> FieldContainer;
00066 
00070   typedef typename FieldContainer::parameter_type FieldParameterType;
00072 
00076   typedef typename FieldContainer::void_pointer FieldVoidPointer;
00077 
00078   //
00079   // Data.
00080   //
00081 
00082 private:
00083 
00085   const IssType& _iss;
00087   FieldContainer _fields;
00089   mutable ads::FixedArray<ISS::M + 1,Vertex> _pos;
00091   mutable ads::FixedArray<ISS::M + 1,Field> _val;
00092 
00093   //
00094   // Not implemented.
00095   //
00096 
00097 private:
00098 
00100   ISS_VertexField();
00101 
00103   ISS_VertexField&
00104   operator=(const ISS_VertexField& x);
00105 
00106 public:
00107 
00108   //--------------------------------------------------------------------------
00111 
00113 
00117   template <bool A2>
00118   ISS_VertexField(const IssType& iss,
00119                   const ads::Array<1,Field,A2>& fields) :
00120     _iss(iss),
00121     _fields(fields),
00122     _pos(),
00123     _val() {
00124     assert(_iss.getVerticesSize() == _fields.size());
00125   }
00126 
00128 
00133   ISS_VertexField(const IssType& iss,
00134                   const SizeType numVertices, 
00135                   FieldVoidPointer fields) :
00136     _iss(iss),
00137     _fields(numVertices, fields),
00138     _pos(),
00139     _val() {
00140     assert(_iss.getVerticesSize() == numVertices);
00141   }
00142 
00144   ISS_VertexField(const ISS_VertexField& other) :
00145     _iss(other._iss),
00146     _fields(other._fields),
00147     _pos(),
00148     _val()
00149   {}
00150 
00152   ~ISS_VertexField()
00153   {}
00154 
00156   //--------------------------------------------------------------------------
00159 
00161   FieldParameterType
00162   interpolate(int n, const Vertex& x) const;
00163 
00165 };
00166 
00167 END_NAMESPACE_GEOM
00168 
00169 #define __geom_ISS_VertexField_ipp__
00170 #include "ISS_VertexField.ipp"
00171 #undef __geom_ISS_VertexField_ipp__
00172 
00173 #endif

Generated on Fri Aug 24 12:55:55 2007 for Computational Geometry Package by  doxygen 1.4.7