Skip to content

Modifying MLMG to solve general advection diffusion Equation #3509

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

You must be logged in to vote

That should work. Note that you are allowed to override non-pure virtual functions too if it's needed. For the $$\nabla \cdot (\mathbf{v} \phi)$$ term, you might want to consider write it as $$(\nabla \cdot \mathbf{v}) \phi + \mathbf{v} \cdot \nabla \phi.$$ Then the first term can be merged into the A term, and the grad term is easy to compute at the domain and coarse/fine boundaries. The applyBC function we have fills the domain ghost cells with values that allow you to compute the derivative on the face. So you just need to average two faces to get it to the cell center.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ankithadas
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