Judy,
How to obtain the value of each quadrature point locally with reference
to q_index, (I made this: std::cout << fe_values.quadrature_point <<, in
step-3 and step-8, since q_index is looping there), when loops each
cell, if my 1D PDE's right-hand-side is a function of x, f(x)?
In step-3 and step-8, I set to Q1 element by switching a parameter in
Class Constructor. When I std::cout << q_index <<, I saw 2 indices {0,
1} returned, does that mean 2 quadrature points are used? I also
std::cout << fe_values.JxW(q_index) <<, that gave me 0.005 corresponding
to both indices, so I guess 0.5 for quadrature weights, since I meshed
10 cells in 1D domain of (0, 0.1). However, when I std::cout <<
fe_values.quadrature_point <<, I did not see expected values {0, 1}
locally for weights {0.5, 0.5}, when loops each cell.
I must be wrong in guessing fe_values.JxW(q_index) and
fe_values.quadrature_point. Does step-3 or step-8 use 2 quadrature
points for Q1 element for 1D PDE, and how to obtain the value of each
quadrature point locally with reference to q_index, if I want to build
f(x), in terms of quadrature point locally?
I have to admit that I don't understand your questions, principally
because I don't understand the (pseudo)code you show. When you say
(I made this: std::cout << fe_values.quadrature_point << ...
what specifically does that look like? This code does not compile, so I
don't know what it is you tried and I can't match that with the output
you show.
Can you re-state your question where you expand all of the little code
snippets into the exact code you use?
Separately: What do you mean by "quadrature point value"? A quadrature
point is a *point*: it has one or more coordinates. The *value* is
something that *a function returns* to you when evaluated at a point.
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/caa99a44-aae8-41da-af98-e2d15b79112a%40colostate.edu.