Lines Matching refs:function
14 ## Apply mass Q-function in C
17 an example of a user Q-function defined in C. This is the "apply mass"
18 Q-function from `ex1-volume.c`, which computes the action of the mass operator.
22 at each qudarture point). It is the action of $D$ that the Q-function must
23 implement. The C source of the Q-function is:
26 /// libCEED Q-function for applying a mass operator
41 From this example, we see that a user Q-function is a C callback that takes a
46 function evaluated at each quadrature point. The second input array is `qdata`,
49 definition of this Q-function, the `CeedQFunction` object is created by
62 ## Apply mass Q-function in Julia
64 We now replicate this Q-function in Julia. The main way of defining user
66 (both the definition of the Q-function, its creation, and adding the inputs and
80 This creates a [`QFunction`](@ref) object named `apply_qfunc`. The Q-function is
82 [`Ceed`](@ref) object where the Q-function will be created, and the second
98 diffusion Q-function](@ref applydiff)) these arrays could consists of vectors or
100 specifications, the body of the Q-function is provided.
102 ## [Apply diffusion Q-function in Julia](@id applydiff)
104 For a more sophisticated example of a Q-function, we consider the "apply
105 diffusion" Q-function, used in `ex2-surface`. This Q-function computes the
111 This Q-function is implemented in Julia as follows:
126 Q-function includes a _constant definition_ `dim=dim`. The
128 which make the specified values available within the body of the Q-function as
132 of the problem. When the user Q-function is defined, LibCEED.jl will JIT compile
133 the body of the Q-function and make it available to libCEED as a C callback. In
134 the body of this Q-function, `dim` will be available, and its value will be a
147 this array stores the gradient of the trial function at each quadrature point.
163 After the field specifications, we have the body of the Q-function:
177 constant whose value is known as a constant when the Q-function is JIT compiled.
190 available in GPU code (for example, dynamic dispatch), so if the Q-function is
192 of the user Q-function.