Skip to content

Multicomponent Linear Solve #2976

Answered by WeiqunZhang
alahyari asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, I believe there will be saving if all three components are solved together. Although our cell-centered Poisson only supports one component, we do have another solver that can be used for this. In Src/LinearSolvers/MLMG/, there is amrex::MLALaplacian that can be used to solve $a A u - b \nabla u = f$. Here $a$ and $b$ are scalars (i.e., amrex::Real) and $A$ is a cell-centered MultiFab. If you use a_ncomp=3 in the constructor of MLALaplacian and call MLALaplacian::setScalars(0.0, -1.0), the system will become three Poisson equations. Note that you don't need to call MLALaplacian::setACoeffs because $a$ is zero. Alternatively, you can extend amrex::MLPoisson to support multiple componen…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alahyari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants