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
Is there a proper way to refine a block vector? I have tried creating grid function views into the individual blocks using MakeTRef and calling the update method on each of the indiviual grid functions. This does not seem to update the original block vector though. I think I need a function that copies the original vector in blocked chunks, create a view on that chunk then use the functionality of the grid functions to interpolate the values on the resized chunks. Is there another way of doing this? I couldn't find an example that used both block vectors and mesh refinement.
After refinement, and updating all (Par)FiniteElementSpaces, (Par)GridFunctions, (Par)LinearForm, and (Par)BilinearForm (e.g. similar to UpdateAndRebalance() in ex15p.cpp), you can propagate the changes to BlockVector by recomputing the block-offsets and calling BlockVector::Update(const Array<int> &bOffsets) with them. After that you will also need to re-associate your (Par)GridFunctions' internal true-vector with the respective blocks in the new BlockVector using MakeTRef as before. Finally, you can update the values inside the BlockVector by calling (Par)GridFunction::SetTrueVector() for each (Par)GridFunction. If you are using a code similar to ex15/ex15p, you can probably just add these BlockVector-related updates to UpdateAndRebalance().
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
-
Is there a proper way to refine a block vector? I have tried creating grid function views into the individual blocks using MakeTRef and calling the update method on each of the indiviual grid functions. This does not seem to update the original block vector though. I think I need a function that copies the original vector in blocked chunks, create a view on that chunk then use the functionality of the grid functions to interpolate the values on the resized chunks. Is there another way of doing this? I couldn't find an example that used both block vectors and mesh refinement.
Beta Was this translation helpful? Give feedback.
All reactions