FiberVISH
0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
fiber
vector
DeriveArray.hpp
1
#error Deprecated header do not use!
2
4
//
5
// $Id: DeriveArray.hpp,v 1.2 2008/01/14 19:05:50 werner Exp $
6
//
8
#ifndef __FIBER_DERIVEARRAY_HPP
9
#define __FIBER_DERIVEARRAY_HPP "Created 30.07.2006 22:30:21 by werner"
10
11
#include "MultiArray.hpp"
12
#include "IpolDelimiter.hpp"
13
#include "Interpolate.hpp"
14
15
namespace
Fiber
16
{
17
21
template
<
class
Interpol,
int
DerivativeDimension,
class
Delimiter = NoDelimiter<
typename
Interpol::value_type> >
22
struct
DeriveArray
23
{
24
template
<
int
N,
class
Type>
25
static
void
compute(
MultiArray<N, Type>
&result,
const
MultiArray<N, Type>
&D)
26
{
27
MultiIndex<N>
idx;
28
FixedArray<double, N>
point
;
29
Interpolate<N, Type, Interpol , double, Delimiter, DerivativeDimension>
30
ipol(D,
point
);
31
32
do
33
{
34
for
(
int
i=0; i<N; i++)
35
point
[i] = idx[i];
36
37
result[ idx ] = ipol.eval();
38
}
39
while
( idx.inc( D.Size() ) );
40
}
41
47
template
<
int
N,
class
Type>
48
static
bool
computeNthDerivative
(
MultiArray<N, Type>
&result,
const
MultiArray<N, Type>
&D,
int
NthDerivative
)
49
{
50
if
(
NthDerivative
==
DerivativeDimension
)
51
{
52
compute( result, D);
53
return
true
;
54
}
55
return
DeriveArray<Interpol, DerivativeDimension-1, Delimiter>::computeNthDerivative
(result, D,
NthDerivative
);
56
}
57
};
58
59
template
<
class
Interpol,
class
Delimiter>
60
struct
DeriveArray
<
Interpol
, -1,
Delimiter
>
61
{
62
template
<
int
N,
class
Type>
63
static
void
compute(
MultiArray<N, Type>
&result,
const
MultiArray<N, Type>
&D)
64
{}
65
66
template
<
int
N,
class
Type>
67
static
bool
computeNthDerivative
(
MultiArray<N, Type>
&result,
const
MultiArray<N, Type>
&D,
int
)
68
{
69
return
false
;
70
}
71
};
72
73
}
// namespace Fiber
74
75
#endif
/* __Fiber_DERIVEARRAY_HPP */
76
Eagle::Interpol
Eagle::PhysicalSpace::point
Fiber::CreativeIterator
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition
CreativeIterator.hpp:34
Fiber
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition
FAQ.dox:2
Fiber::DeriveArray
Compute the partial derivative of a multidimensional array.
Definition
DeriveArray.hpp:23
Fiber::DeriveArray::computeNthDerivative
static bool computeNthDerivative(MultiArray< N, Type > &result, const MultiArray< N, Type > &D, int NthDerivative)
Compute the 1st derivate of the given array in the nth dimension.
Definition
DeriveArray.hpp:48
Generated on Sun Mar 1 2026 10:23:09 for FiberVISH by
1.9.8