Hi Alex, > Yes I began this project by reviewing step-8 > <https://www.google.com/url?q=https%3A%2F%2Fdealii.org%2F8.4.1%2Fdoxygen%2Fdeal.II%2Fstep_8.html&sa=D&sntz=1&usg=AFQjCNE8fid8PZJVBvCz_Ixx08I0EOi-8A> > and > the Handling vector valued problems > <https://dealii.org/8.4.1/doxygen/deal.II/group__vector__valued.html> module. > That led me to using extractors. >
Ok. I didn't mean to be rude by asking, so I hope that you didn't take any offence to me doing so! step-57 > <http://www.google.com/url?q=http%3A%2F%2Fwww.dealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2Fstep_57.html&sa=D&sntz=1&usg=AFQjCNE6vPIRLDSt5O067SsyGpHe2_cctg> > almost clarifies my problem; but unfortunately I don't see its exact > weak form, and rather it just references back to the Stokes tutorial. > Yes, I agree that the fact that there's no explicit expression of the weak form makes it a little difficult to see the direct link between the strong form and the assembly procedure. From what I can discern, these two terms result from the linearisation of the convective term + present_velocity_gradients[q]*phi_u[j]*phi_u[i] + grad_phi_u[j]*present_velocity_values[q]*phi_u[i] So the phi_u[i], the vector valued shape function associated with the i'th DoF, part comes from the discretisation of the vector-valued velocity test function, and the phi_u[j] (and grad_phi_u[j], the gradient of the vector valued shape function associated with the j'th DoF) come from the discretisation of the increment to the velocity field, and present_velocity_gradients[q] is the total velocity vector at quadrature point p. > The term present_velocity_gradients[q]*phi_u[j]*phi_u[i] from its matrix > assembly caught my eye. I think this is similar to my v*gradz*w, which > per a quick test I did is equivalent to gradz*w*v. My understanding is > that dealii::Tensor::operator* automatically transposes (at least in the > abstract) rank 1 tensors to make dot products, which makes all of this > work. > Exactly. Referring back to what you wrote originally, and writing it a similar grouping of terms, present_velocity_gradients[q]*phi_u[j]*phi_u[i] == (present_velocity_gradients[q]*phi_u[j])*phi_u[i] <==> (_w[J]*_gradz[I][J]) * _v[I] on a per-component basis Because of the way the *operator is defined, I think that the intended computation will take place in the following steps: present_velocity_gradients[q]*phi_u[j]*phi_u[i] ==> tmp_tensor * phi_u[i] ==> result_scalar where, obviously, tmp_tensor == present_velocity_gradients[q]*phi_u[j] and, in particular, this is a contraction of the right-most index of the Tensor<2,dim> that is present_velocity_gradients[q] and tmp_tensor * phi_u[i] is just the scalar product of two vectors. Using other groupings, this could also probably be rewritten as phi_u[i]*present_velocity_gradients[q]*phi_u[j] == contract3 <https://www.dealii.org/8.4.0/doxygen/deal.II/classTensor.html#aa85e836a578c5613c8fa51b4ca9d3c98> (phi_u[i],present_velocity_gradients[q],phi_u[j]) I must admit that the implementation of this term does seem a bit ambiguous though. I don't know whether the compiler would preferentially choose this order of operations present_velocity_gradients[q]*(phi_u[j]*phi_u[i]) which also appears (to me, at least) to be legal since a tensor can be scaled from the right by a factor. Maybe Timo could comment on this. Since step-57 > <http://www.google.com/url?q=http%3A%2F%2Fwww.dealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2Fstep_57.html&sa=D&sntz=1&usg=AFQjCNE6vPIRLDSt5O067SsyGpHe2_cctg> > has > to assume something about the indexing of present_velocity_gradients[q], > maybe > Timo or Liang Zhao can definitively answer my original question. > Well, I can say with certainty that the first index of this rank-2 tensor relates to the solution (velocity) field, and the second to the differential operator that is being applied. Its explained here in the documentation of get_function_gradients <https://www.dealii.org/8.4.0/doxygen/deal.II/classFEValuesBase.html#a1d61e4adb57be6465c6fef2b716e7150> (without the extractor) but is admittedly not expanded on in the documentation of the equivalent get_function_gradients <https://www.dealii.org/8.4.0/doxygen/deal.II/classFEValuesViews_1_1Vector.html#a95bd2ea62619577bdb0d3c704ea6185c> for FEValuesViews, which is the type of object returned by fe_values[extractor]. Does this provide the clarification that you've been looking for? > What's the best way to draw a specific person's attention to a question on > the mailing list? :) > Just post a question/request and hope for the best ;-) I'm pretty sure that Timo will read this at some point (won't you Timo?). -- 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 dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.