FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
IpolDelimiter.hpp
1
2//
3// $Id: IpolDelimiter.hpp,v 1.3 2008/01/14 19:05:50 werner Exp $
4//
6#ifndef __IPOL_INTERPOLATION_TRAIT_HPP
7#define __IPOL_INTERPOLATION_TRAIT_HPP "Created 11.06.2004 22:28:21 by bzfbenge"
8
9/*
10 Do NOT include math.h, because this is incompatible
11 with the Intel's math header file that is used by VecAl.hpp!
12#include <math.h>
13*/
14
15#include "Index.hpp"
16
17namespace Fiber
18{
19
36template <class Type>
38{
39public:
40
41static const Type&limit(const Type&T)
42 {
43 return T;
44 }
45};
46
47
48#if 0
53{
54public:
55
57 {
58 if (i<0 || i>=size) return 0;
59 return i;
60 }
61
62static index_t right(index_t i, index_t size)
63 {
64 if (i<0 || i>=size) return size;
65 return i;
66 }
67};
68
72class PeriodicBoundary
73{
74public:
75static index_t left(index_t i, index_t size)
76 {
77 if (i>=size) return i % size;
78 if (i<0) return i % size + size;
79 return i;
80 }
81
82static index_t right(index_t i, index_t size)
83 {
84 return left(i,size);
85 }
86};
87
91class ReflectedBoundary
92{
93public:
94static index_t left(index_t i, index_t size)
95 {
96 if (i>=2*size) i %= 2*size;
97 if (i>=size) return size-i;
98 if (i<size ) i %= 2*size;
99 if (i<0) return size+i;
100 return i;
101 }
102
103static index_t right(index_t i, index_t size)
104 {
105 return left(i,size);
106 }
107};
108#endif
109
110
111} /* namespace Fiber */
112
113#endif /* __IPOL_INTERPOLATION_TRAIT_HPP */
114
valarray< size_t > size() const
ios_base & left(ios_base &__base)
ios_base & right(ios_base &__base)
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Definition IpolDelimiter.hpp:38
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
IndexTypeConfig< sizeof(void *)>::index_t index_t
Define the index type as according to the size of a pointer, i.e.
Definition Index.hpp:22