Lines Matching full:in
5 natively in Julia. These user Q-functions work with both the CPU and CUDA
14 ## Apply mass Q-function in C
16 Before describing how to define user Q-functions in Julia, we will briefly given
17 an example of a user Q-function defined in C. This is the "apply mass"
28 const CeedScalar *const *in,
30 const CeedScalar *u = in[0], *qdata = in[1];
45 In this example, the first input array is `u`, which is the value of the trial
62 ## Apply mass Q-function in Julia
64 We now replicate this Q-function in Julia. The main way of defining user
65 Q-functions in Julia is using the [`@interior_qf`](@ref) macro. The above C code
72 (u, :in, EVAL_INTERP, Q), (qdata, :in, EVAL_NONE, Q),
87 (u, :in, EVAL_INTERP, Q),
88 (qdata, :in, EVAL_NONE, Q),
92 the name of the array, and the second entry is either `:in` or `:out`, according
96 In this case, all the arrays are simply vectors whose size is equal to the
97 number of quadrature points, but in more sophisticated examples (e.g. the [apply
102 ## [Apply diffusion Q-function in Julia](@id applydiff)
105 diffusion" Q-function, used in `ex2-surface`. This Q-function computes the
106 action of the diffusion operator. When written in the form $B^\intercal D B$, in
111 This Q-function is implemented in Julia as follows:
115 (du, :in, EVAL_GRAD, Q, dim),
116 (qdata, :in, EVAL_NONE, Q, dim*(dim+1)÷2),
125 In contrast to the previous example, before the field specifications, this
131 In this example, `dim` is either 1, 2, or 3 according to the spatial dimension
133 the body of the Q-function and make it available to libCEED as a C callback. In
138 Note that `dim` is also available for use in the field specifications. In this
139 example, the field specifications are slightly more involved that in the
142 (du, :in, EVAL_GRAD, Q, dim),
143 (qdata, :in, EVAL_NONE, Q, dim*(dim+1)÷2),
154 The geometric factors stored in `qdata` represent the symmetric matrix $w
155 \det(J) J^{-\intercal} J^{-1}$ evaluated at every quadrature point. In order to
161 symmetric matrices stored in this fashion.
171 First, the matrix $w \det(J) J^{-\intercal} J^{-1}$ is stored in the variable
190 available in GPU code (for example, dynamic dispatch), so if the Q-function is