18 template <
typename memoryType>
21 typedef typename cusp::array1d<real, memoryType>::iterator ValueIterator;
22 typedef typename cusp::array1d_view<ValueIterator> View;
28 ETRows = (nx-1)*ny + nx*(ny-1);
32 cusp::array1d<real, memoryType> F(ETRows), fTemp(2*totalPoints);
40 for(
int l=0; l < numBodies; l++)
48 cusp::blas::fill(fView, 0.0);
52 cusp::blas::fill(fView, 0.0);
56 fView = View(fTemp.begin() + totalPoints, fTemp.end());
57 cusp::blas::fill(fView, 0.0);
59 cusp::multiply(ET, fTemp, F);
65 cusp::blas::fill(fView, 0.0);
69 cusp::blas::fill(fView, 0.0);
71 cusp::multiply(ET, fTemp, F);
double real
Is a float or a double depending on the machine precision.
Declaration of the kernels to calculate the forces acting on a body The method is described in Lai & ...
real forceX
force acting on each body in the x-direction
real forceY
force acting on each body in the y-direction
virtual void calculateForce()
Calculates forces acting on each immersed body.
Generic Navier-Stokes solver in the presence of immersed boundaries.
Solves the Navier-Stokes equations in a rectangular domain.