26 template <
typename memoryType>
31 cusp::array1d<int, host_memory>
34 cusp::array1d<int, device_memory>
95 return "Direct Forcing";
cusp::array1d< int, host_memory > tags
vector used to differentiate forcing points from regular ones (host)
virtual void writeData()
Writes the velocity, pressure, force and mass flux data at every save point.
Declaration of the class NSWithBody.
double real
Is a float or a double depending on the machine precision.
cusp::array1d< int, device_memory > tagsD
vector used to differentiate forcing points from regular ones (device)
virtual void initialise()
Initialize the vectors used in the simulation.
virtual void generateQT()
Compute the divergence operator (transpose of the gradient one).
vecD uvD
velocity field (device)
vecH coeffs2
other coefficients of interpolation; quadratic interpolation (host)
void writeMassFluxInfo()
Prints the min, max and sum of the divergences of the velocity field in every cell of the domain...
A fully discrete formulation of the direct forcing method.
vecD coeffsD
coefficients of interpolation (device)
std::map< std::string, componentParameter > parameterDB
Map from a string to a componentParameter.
cusp::array1d< real, host_memory > vecH
Cusp 1D array stored in the host.
Stores information about the computational grid.
DirectForcingSolver(parameterDB *pDB=NULL, domain *dInfo=NULL)
Constructor. Initializes the simulation parameters and the domain info.
cusp::array1d< real, memoryType > pressure
pressure field
virtual void generateA(real alpha)
vecD coeffs2D
other coefficients of interpolation; quadratic interpolation (device)
virtual void projectionStep()
Projects the pressure gradient on to the intermediate velocity field to obtain the divergence-free ve...
cusp::array1d< int, host_memory > tags2
vector used to differentiate forcing points from regular ones (host)
void generateQT(int *QTRows, int *QTCols, real *QTVals)
cusp::array1d< int, device_memory > tags2D
vector used to differentiate forcing points from regular ones (device)
virtual void assembleRHS1()
Assembles the matrix rhs1 for DirectForcingSolver.
virtual std::string name()
Returns the name of the solver as a string.
vecH coeffs
coefficients of interpolation (host)
vecH uv
velocity field (host)
Generic Navier-Stokes solver in the presence of immersed boundaries.
virtual void updateSolverState()
Updates the matrices every time the body is moved.
virtual void generateC()
Generates the right-hand side matrix in the Poisson step.
cusp::array1d< real, device_memory > vecD
Cusp 1D array stored in the device.