<div dir="ltr">Hi All,<div><br></div><div style>For a 1-D problem with multiple variables (u, v, w), it is natural to put those unknowns in a Vec for SNES to solve, like,</div><div style><br></div><div style>u0, v0, w0, u1, v1, w1, ... uN, vN, wN</div>
<div style><br></div><div style>as it would reduce the band width of the Jacobian matrix.</div><div style><br></div><div style>When passing this kind of structure to FormFunction, it is however not convenient to access values as you need to jump around to get u(i-1), u(i) and u(i+1). It is more convenient to have the structure in an order like</div>
<div style><br></div><div style>u0, u1, ... uN, v0, v1, ... vN, w0, w1, ... wN</div><div style><br></div><div style>Thus I need some way to map b/w them. I looked at the manual, it seems that AO is probably the thing I am looking for. However, there are no specific examples for them. I also tried VecScatter, split the original Vec to three Vec(s), however, I am not quite sure if it is the right concept to use for this kind of scenario.</div>
<div style><br></div><div style>Does anyone have experience on this topic (I bet it is quite common).</div><div style><br></div><div style><br></div><div style>Best,</div><div style><br></div><div style>Ling</div></div>