00001 #ifndef __FIBER_GRID_EUCLIDEANMETRIC_HPP
00002 #define __FIBER_GRID_EUCLIDEANMETRIC_HPP
00003
00004 #include <eagle/PhysicalSpace.hpp>
00005 #include "Grid.hpp"
00006
00007 namespace Fiber
00008 {
00009
00020 struct EuclideanMetric
00021 {
00022 typedef Eagle::PhysicalSpace::point point;
00023 typedef Eagle::PhysicalSpace::vector tvector;
00024
00025 static double norm2(index_t i0, index_t i1,
00026 const point&P0,
00027 const point&P1,
00028 const tvector&V)
00029 {
00030 return Eagle::norm2(V);
00031 }
00032
00033 static double norm(index_t i0, index_t i1,
00034 const point&P0,
00035 const point&P1,
00036 const tvector&V)
00037 {
00038 return Eagle::norm(V);
00039 }
00040
00041 static double distance(index_t i0, index_t i1,
00042 const point&P0,
00043 const point&P1)
00044 {
00045 return Eagle::norm(P0-P1);
00046 }
00047 };
00048
00049
00050 }
00051
00052 #endif
00053
00054