34template <
typename T,
typename S>
36 :
AnalyticalF2D<T,S>(6), _wantedVelocity(wantedVelocity), _start(start),
37 _end(end), _direction(direction), _lambdaMax(lambdaMax), _rise(rise),
43template <
typename T,
typename S>
48 if ( _wantedVelocity(output, input) ) {
49 T scaleLambda = lambda(input[_direction]);
50 output[0] = -scaleLambda*output[0];
51 output[1] = -scaleLambda*output[1];
52 output[2] = scaleLambda;
53 output[5] = scaleLambda;
65template <
typename T,
typename S>
68 if ( x < std::numeric_limits<T>::epsilon() ) {
71 else if (x > T(1)-std::numeric_limits<T>::epsilon() ) {
75 return T(1)/(T(1) +
util::exp( T(1)/(x - T(1) ) + T(1)/x ) );
79template <
typename T,
typename S>
80T Fringe2D<T,S>::lambda(
const T& x)
const
82 return _lambdaMax*(
s((x - _start)/_rise*(_end - _start) ) -
s((x - _end)/_fall*(_end - _start) + T(1.)) );
AnalyticalF are applications from DD to XD, where X is set by the constructor.
Fringe2D(AnalyticalF2D< T, S > &wantedVelocity, T start, T end, int direction, T lambdaMax=.005, T rise=.4, T fall=.2)
bool operator()(T output[6], const S input[2])
Returns coefficients (a1, a2, B11, B12, B21, B22) for a linear velocity force modell where F = a + B*...
std::string & getName()
read and write access to name
platform_constant Fraction s[Q]
ADf< T, DIM > exp(const ADf< T, DIM > &a)
Top level namespace for all of OpenLB.