|
SOFUS ..
|

Functions | |
| template<class T > | |
| std::complex< T > | CalcHz (const T &s, const T &l, const T &z, const T &k, const GLQuad2D< T > *gl) |
| template<class T > | |
| int | CalcCwFieldRef (const sysparm_t< T > *sysparm, const ApertureData< T > *data, const T *pos, const size_t nPositions, std::complex< T > **odata, void *pBar) |
| template<class T > | |
| int | CalcCwFieldFourRef (const sysparm_t< T > *sysparm, const ApertureData< T > *data, const T *pos, const size_t nPositions, std::complex< T > **odata) |
| template<class T > | |
| int | CalcCwFocusNaiveFast (const sysparm_t< T > *sysparm, const ApertureData< T > &data, const T *pos, const size_t nPositions, std::complex< T > **odata) |
| template<class T > | |
| std::complex< T > | CalcSingleFast (const T &s1, const T &s2, const T &l, const T &z, const T &k, const T *uxs, const T *uweights, const size_t nUs) |
| template<class T > | |
| int | CalcCwTimeReversal (const fnm::sysparm_t< T > *sysparm, const ApertureData< T > *pData0, const ApertureData< T > *pData1, const T *pos, const size_t nPositions, const std::complex< T > *pFieldValues, const size_t nComplexValues, std::complex< T > **odata, sps::ProgressBarInterface *pBar) |
| template<class T > | |
| int | CalcCwBackThreaded (const fnm::sysparm_t< T > *sysparm, const ApertureData< T > *data, const T *pos, const size_t nPositions, const std::complex< T > *pWeights, const size_t nWeights, std::complex< T > **odata, sps::ProgressBarInterface *pbar) |
| template<class T > | |
| int | CalcCwThreaded (const fnm::sysparm_t< T > *sysparm, const ApertureData< T > *data, const T *pos, const size_t nPositions, std::complex< T > **odata, sps::ProgressBarInterface *pbar) |
| template<class T > | |
| void | CalcCwField (const sysparm_t< T > *sysparm, const ApertureData< T > &data, const T *pos, const size_t nPositions, std::complex< T > **odata) |
| template<class T > | |
| int | CalcCwFocus (const sysparm_t< T > *sysparm, const ApertureData< T > &data, const T *pos, const size_t nPositions, std::complex< T > **odata) |
| template<class T > | |
| int | CalcCwFocusRef (const sysparm_t< T > *sysparm, const ApertureData< T > &data, const T *pos, const size_t nPositions, std::complex< T > **odata) |
| int CalcCwBackThreaded | ( | const fnm::sysparm_t< T > * | sysparm, |
| const ApertureData< T > * | data, | ||
| const T * | pos, | ||
| const size_t | nPositions, | ||
| const std::complex< T > * | pWeights, | ||
| const size_t | nWeights, | ||
| std::complex< T > ** | odata, | ||
| sps::ProgressBarInterface * | pbar | ||
| ) |
| void CalcCwField | ( | const sysparm_t< T > * | sysparm, |
| const ApertureData< T > & | data, | ||
| const T * | pos, | ||
| const size_t | nPositions, | ||
| std::complex< T > ** | odata | ||
| ) |
Naive integral, no re-use of parts and many abcissa are needed when projection is far away from rectangle.
Consider renaming to CalcCwNaive
| sysparm | |
| data | |
| pos | |
| nPositions | |
| odata |
| int CalcCwFieldFourRef | ( | const sysparm_t< T > * | sysparm, |
| const ApertureData< T > * | data, | ||
| const T * | pos, | ||
| const size_t | nPositions, | ||
| std::complex< T > ** | odata | ||
| ) |
CalcCwFieldFourRef
Same as CalcCwFieldRef except the number of integrals is reduced to four
| sysparm | |
| data | |
| pos | |
| nPositions | |
| odata |
| int CalcCwFieldRef | ( | const sysparm_t< T > * | sysparm, |
| const ApertureData< T > * | data, | ||
| const T * | pos, | ||
| const size_t | nPositions, | ||
| std::complex< T > ** | odata, | ||
| void * | pBar | ||
| ) |
Spatial impulse response computed at the positions pos for a frequency f0. The principle of superposition is used as shown below and the ranges of integration are reduced to give the most accurate result with the least amount of abcissas. This is a reference implementation. Eight integrals are evaluated, which can be reduced to four. See CalcCwFieldFourRef
The frequency f0 as well as the positional information for the aperture is contained in the ApertureData structure data.
Superposition principle:
^
|
+-----+-----+-----------+ (x,y)
| | | |
+-----+-----+-----------+
| | | |
| | | |
| | | | =
+ o-----+-----------+---->
| | |
hh | | |
| | |
+-----+-----+-----------+
hw
^ ^ ^ ^
| | | |
+-----------------------+ (x,y) | +-----------+ (x,y) +-----+-----+-----------+ (x,y) | +-----------+ (x,y)
| | | | | | | | | | | |
+ | | | | | +-----+-----------------+ + | +-----------+
| | | | | | | | | |
| | | | | | hh | | hh | |
| | | - | | | - | | + | |
| o-----------------|----> o-----+-----------+----> + o----------------------> + o---------------------->
| | | | |
hh | | | | |
| | | | |
+-----------+-----------+ +-----------+ +-----+-----+
hw hw hw
where
is the kernel function
| sysparm | |
| data | Structure holding element positions and f0 |
| pos | Positions |
| nPositions | # of positions |
| odata | complex output |
| pBar | progress bar |
| int CalcCwFocus | ( | const sysparm_t< T > * | sysparm, |
| const ApertureData< T > & | data, | ||
| const T * | pos, | ||
| const size_t | nPositions, | ||
| std::complex< T > ** | odata | ||
| ) |
The positions must all equal the focus point and the number should match the number of elements. By doing so, a set of phases is computed for focusing. The function uses CalcHzFast for phase calculations.
| sysparm | |
| data | |
| pos | |
| nPositions | |
| odata |
| int CalcCwFocusNaiveFast | ( | const sysparm_t< T > * | sysparm, |
| const ApertureData< T > & | data, | ||
| const T * | pos, | ||
| const size_t | nPositions, | ||
| std::complex< T > ** | odata | ||
| ) |
Compute CW response at multiple positions. The range of integration is naive so it is accurate when projections lie inside an element, but requires a huge amount of abcissas to get a usuable result, when projections lie outside an element.
| sysparm | |
| data | |
| pos | |
| nPositions | |
| odata |
| int CalcCwFocusRef | ( | const sysparm_t< T > * | sysparm, |
| const ApertureData< T > & | data, | ||
| const T * | pos, | ||
| const size_t | nPositions, | ||
| std::complex< T > ** | odata | ||
| ) |
Reference implementation of the function above. Uses CalcCwFieldRef for phase calculations
| sysparm | |
| data | |
| pos | |
| nPositions | |
| odata |
| int CalcCwThreaded | ( | const fnm::sysparm_t< T > * | sysparm, |
| const ApertureData< T > * | data, | ||
| const T * | pos, | ||
| const size_t | nPositions, | ||
| std::complex< T > ** | odata, | ||
| sps::ProgressBarInterface * | pbar | ||
| ) |
Multi-threaded version of CalcCwFieldRef. This is the function to use.
| sysparm | |
| data | |
| pos | |
| nPositions | |
| odata | |
| pbar |
| int CalcCwTimeReversal | ( | const fnm::sysparm_t< T > * | sysparm, |
| const ApertureData< T > * | pData0, | ||
| const ApertureData< T > * | pData1, | ||
| const T * | pos, | ||
| const size_t | nPositions, | ||
| const std::complex< T > * | pFieldValues, | ||
| const size_t | nComplexValues, | ||
| std::complex< T > ** | odata, | ||
| sps::ProgressBarInterface * | pBar | ||
| ) |
| std::complex< T > CalcHz | ( | const T & | s, |
| const T & | l, | ||
| const T & | z, | ||
| const T & | k, | ||
| const GLQuad2D< T > * | gl | ||
| ) |
Field above a corner of an element with dimensions
and
computed using Gauss-Legendre integration
Reference implementation, see Rapid calculations of time-harmonic nearfield pressures produced by rectangular pistons, J. McGough, 2004
| s | width (x-dimension) |
| l | height (y-dimension) |
| z | distance to element |
| k | wave-number |
| gl | Abcissae and weights for integration |
| std::complex< T > CalcSingleFast | ( | const T & | s1, |
| const T & | s2, | ||
| const T & | l, | ||
| const T & | z, | ||
| const T & | k, | ||
| const T * | uxs, | ||
| const T * | uweights, | ||
| const size_t | nUs | ||
| ) |
CalcSingleFast. TODO: Implement this for double
| s1 | lower limit |
| s2 | upper limit |
| l | adjacent edge |
| z | z-coordinate |
| k | wave numer |
| uxs | abcissae |
| uweights | weights |
| nUs | number of abcissae |