You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am solving the auxiliary gradient equations for the Navier-Stokes equations in the context of DG methods. I have a NonlinearForm object with which I am calling its Mult method. For the same vector of global DG DOFs, I need to call Mult 3 times for the components of the gradient in 3D, which seems inefficient. I would prefer to call Mult once and get all three gradient component vectors at the same time. I don't think this is possible with the regular NonlinearForm since its Mult method accepts only two arguments of the same size. So I have been looking into BlockNonlinearForm and its MultBlocked method. But now both arguments need to be BlockVectors with the same number of blocks (Block L-Vector to Block L-Vector), whereas in my case, it is (Block 1-vector to Block 3-Vector). Would it be reasonable to make my first BlockVector (the DG DOF vector) have repeated blocks that refer to the same Vector? This is what I have come up with so far:
Would this be correct? Are there any pitfalls with this implementation? Or maybe a better of achieving the same? Note also that I do not intend to modify x_blocks in any way.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am solving the auxiliary gradient equations for the Navier-Stokes equations in the context of DG methods. I have a
NonlinearForm
object with which I am calling itsMult
method. For the same vector of global DG DOFs, I need to callMult
3 times for the components of the gradient in 3D, which seems inefficient. I would prefer to callMult
once and get all three gradient component vectors at the same time. I don't think this is possible with the regularNonlinearForm
since itsMult
method accepts only two arguments of the same size. So I have been looking intoBlockNonlinearForm
and itsMultBlocked
method. But now both arguments need to beBlockVector
s with the same number of blocks (Block L-Vector to Block L-Vector), whereas in my case, it is (Block 1-vector to Block 3-Vector). Would it be reasonable to make my firstBlockVector
(the DG DOF vector) have repeated blocks that refer to the sameVector
? This is what I have come up with so far:Would this be correct? Are there any pitfalls with this implementation? Or maybe a better of achieving the same? Note also that I do not intend to modify x_blocks in any way.
I would greatly appreciate your input.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions