I am of course using const FEValuesExtractors::Vector velocities (0); etc for
most of the things I need. now out of the following, in the loop over all the
cells: I have
pf_fe_values[pressure].get_function_values (pf_solution,
pf_values);
pf_fe_values[pressure].get_function_gradients (pf_solution,
grad_pf_values);
phi_fe_values.get_function_values (phi_solution, phi_values);
phi_fe_values.get_function_gradients (phi_solution,
grad_phi_values);
vf_fe_values.get_function_values (vf_solution, vf_values);
vf_fe_values.get_function_divergences (vf_solution, div_vf_values);
> and the LAST one for get_function_divergences does not seem to work. It is
> telling me there is no member function called get_function_divergeneces. I
> am
This is correct -- FEValues has functions such as get_function_values and
get_function_gradients, but not get_function_divergences. That's because
FEValues corresponds to a general collection of vector components. But the
divergence is an operation that is only defined if there are exactly dim
vector components, which FEValues can not assume to be the case.
But if you use a FEValuesExtractors argument and say
vr_fe_values[velocities]
then you are selecting a subset of exactly dim components, and for those the
divergence operation is well defined. Consequently...
a little confused as elsewhere i
use vr_fe_values[velocities].get_function_divergences (rock_solution,
div_vr_values); and this works fine.
...this works.
I have also tried vf_fe_values[velocities].get_function_divergences
(vf_solution, div_vf_values); - now this does not give me the same error, the
program runs but i get:
An error occurred in line <2364> of file
</scratch/leej/dealnew/dealii-8.5.0/source/fe/fe_values.cc> in function
void dealii::internal::do_function_values(const Number*, const
dealii::Table<2, double>&, const dealii::FiniteElement<dim, spacedim>&, const
std::vector<unsigned int>&, dealii::VectorSlice<std::vector<VectorType> >&,
bool, unsigned int) [with int dim = 2; int spacedim = 2; VectorType =
dealii::Vector<double>; Number = double]
The violated condition was:
(values[i].size()) == (result_components)
Additional information:
Dimension 0 not equal to 2.
This is a completely separate issue. I don't know how exactly you got there,
but it seems to me that the output vector you passed to the function has the
wrong size. Did you size it correctly?
I also get the same no member function call when used with the
get_function_values on the same variable with FEValuesExtractors and adding
[velocities]
That is again a separate issue -- the VectorView::get_function_values function
just takes different argument types.
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].
For more options, visit https://groups.google.com/d/optout.