CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Linear Solver for Particle Methods (https://www.cfd-online.com/Forums/main/126984-linear-solver-particle-methods.html)

prapanj November 30, 2013 14:50

Linear Solver for Particle Methods
 
Dear All,

I am using a particle method to solve a fluid mechanics problem. This involves solving a poisson equation every time step. I have my BiCGSTAB code to solve the linear system. But since the particle configuration changes with time, I have to build a new coefficient matrix for every time step. So, I believe there must be a linear solver library out there that can help me do this efficiently.

I started with LIS (since I wish to use a library that is simple with less dependencies). But the problem is that, since the coeff matrix changes size and sparsity every time step, the sparse matrix build involves lot of reallocation of memory and is costing a lot of computation time. I am unable to use OMP parallelization effectively, for the same reason.

I was told that PetsC has a way to allocate the sparse matrix based on a rough estimate of sparsity, to begin with. Will this help? Are there libraries that can solve my issue and get help me solve the poisson equation reasonably fast?

My code is in C, I use OpenMP. I have plans to write a GPU version too.

nw_ds December 2, 2013 20:03

How about a multigrid method (Vcycle or FMG)?? after all it's build to solve poisson equation
and it's easily paralizable whether in omp or gpu


All times are GMT -4. The time now is 17:57.