On 12/11/22 16:08, Kev Se wrote:
Now, for the residual I need this term for my "last solution" vector, but I couldn't find a corresponding function for that problem. What I did find was

/fe_iv[component_1].get_function_values((vF_dot_n > 0), last_solution_ghost, tmp_array);/

which, however, does not operate point-wise but rather determines the value vector for the entire cell(?),

Well, for the entire *face*, but the issue is clear anyway. I think it would probably be useful to introduce a function that, instead of a single here_or_there argument, takes a vector of n_quadrature_points such bool values -- in your case, the values of the expression vf[q]*n[q]>0. As is always the case, we would of course welcome such a patch.

Looking at the implementation, this shouldn't actually be very difficult. You'd create a copy of the existing get_function_values_from_local_dof_values() that takes such a vector<bool> as argument, and call that from the new get_function_values() function that takes such a bool vector.



and then I have to query /tmp_array/ at given point /q_point/. Since I need to recalculate /beta_dot_n/ at every point, this means a lot of additional copy operations. I did not fully understand if/get_function_values_from_local_dof_values/() is the way to go? My current solution is to use a "workaround" of sorts, by pre-calculating the averages and jumps outside the "three" loop over qpoints and DOFs i and j, and inside the loop the use

/last_solution//_average*beta_dot_n + 
0.5*abs(beta_dot_n)*//last_solution//_jump/

This avoids the copies of vectors, but of course is not much cheaper either.

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           www: http://www.math.colostate.edu/~bangerth/


--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/be203431-06dd-673f-2f38-4deda05c5fee%40colostate.edu.

Reply via email to