How do we take the Frechet derivative here? A question concernig a paper on the Kuramoto model In the paper "DYNAMICAL ASPECTS OF MEAN FIELD PLANE ROTATORS
AND THE KURAMOTO MODEL" by  L. Bertini, G. Giacomin, AND K. Pakdaman we read

$$\partial_t q_t(\theta)=\frac12\frac{\partial^2q_t(\theta)}{\partial\theta^2}+K\frac{\partial}{\partial\theta}\left[\left(\int_{\mathbb{S}}\sin(\theta-\theta')q_t(\theta')\,\mathrm{d}\theta'\right)q_t(\theta)\right],\tag{1.9}$$

and further on, we see

$1.3.$ The gradient flow viewpoint. For our purposes the following fact is of crucial importance: $(1.9)$ can be reqritten in the gradient form $$\partial_t q_t(\theta)=\nabla\left[q_t(\theta)\nabla\left(\dfrac{\delta\mathcal{F}(q_t)}{\delta q_t(\theta)}\right)\right],\tag{1.18}$$ where we use $\nabla$ for $\partial_\theta$ for visual impact, $\delta\mathcal{G}(q)/\delta q(\theta)$ is the standard $L^2$ Frechet derivative of the function $\mathcal{G}$ and $$\mathcal{F}(q):=\frac{1}{2}\int_{\mathbb{S}} q(\theta) \log q(\theta)\,\mathrm{d}\theta-\frac K2\int_{\mathbb{S}^2}\cos(\theta-\theta')q(\theta)q(\theta')\,\mathrm{d}\theta\,\mathrm{d}\theta'.\tag{1.19}$$

I am having trouble finding (1.18). I think the difficulty lies in computing the Frechet derivative.
Attempt
When computing a Frechet derivative we are looking for a transformation $A$ such that
$$\frac{\|f(x + v) - f(x) - Av\|}{\|h\|} \xrightarrow[h \to 0]{} 0 $$
The norms here are $L^2$ norms on the space of functions on $S = [0,2\pi)$ with the Lebesgue measure.
So $h$ is a vector in $L^2(S)$.  
A first question is: What do we mean when we say $ \frac{\delta \mathcal{F(q_t)}}{\delta q_t(\theta)}$? Are we taking the derivative in the direction of the function $q_t$? More precisely  are we computing
$$\lim_{h \to 0}\frac{\mathcal{F}(q_t + hq_t) - \mathcal{F}(q_t)}{h} ? \tag{*}$$
In this case we obtain:
$$ \lim_{h\to 0} \frac{1}{2} \frac{1}{h}\int_S (q_t(\theta) + h q_t(\theta)) \log(q_t(\theta) + h q_t(\theta)) - q_t(\theta) \log (q_t(\theta)) d\theta\\
- \frac{K}{2}\frac{1}{h}\int_{S^2} \cos(\theta - \theta')\{ [q_t(\theta) + hq_t(\theta)][q_t(\theta') + hq_t(\theta')] - q_t(\theta) q_t(\theta')\} d\theta d\theta'  \\
= \frac{1}{2} \int_S q_t(\theta) +  q_t(\theta) \log(q_t(\theta))\, d\theta \\
- \frac{K}{2}\int_{S^2} \cos(\theta - \theta')\{ 2q_t(\theta) q_t(\theta')\} d\theta d\theta' 
$$
However, when computing the derivative $\partial_\theta  \frac{\delta \mathcal{F(q_t)}}{\delta q_t(\theta)}$ this is zero, once the value above does not depend on $\theta$ since we integrated on $\theta$.
So this derivative makes no sense for our purposes. Maybe we should note that  the denominator of $ \frac{\delta \mathcal{F(q_t)}}{\delta q_t(\theta)}$ has a $\theta$. So this should mean that we are differentiating in a direction that depends on $\theta$. Maybe we should compute
$$ \lim_{h\to 0} \frac{1}{2} \frac{1}{h}\int_S (q_t(u) + h q_t(\theta)) \log(q_t(u) + h q_t(\theta)) - q_t(u) \log (q_t(u)) du\\
- \frac{K}{2}\frac{1}{h}\int_{S^2} \cos(u - u')\{ [q_t(u) + hq_t(\theta)][q_t(u') + hq_t(\theta')] - q_t(u) q_t(u')\} du du'  \\
= \frac{1}{2} \int_S q_t(\theta) +  q_t(\theta) \log(q_t(u))\, du \\
- \frac{K}{2}\int_{S^2} \cos(u -u')\{ q_t(\theta)q_t(u) + q_t(u') q_t(\theta)\} du du' 
$$
Still I don't see how this could be compatible with (1.9)
Any ideas?
 A: EDIT 2:
Another term for $\delta F/\delta q$ is functional derivative, see here.
Original:
When they write $\frac{\delta F(q_t)}{\delta q_t(\theta)}$, I suspect they mean the $L^2$ representative of the Frechet derivative of $F$.  For example, the actual Frechet derivative of the functional 
$$
G:q\mapsto \int g(q(\theta))d\theta
$$
is, for each $Q$ in the domain of $G$,
$$
DG(Q):q\mapsto \int g'(Q(\theta))q(\theta)d\theta.
$$
The $L^2$ (Riesz) representative of this Frechet derivative is $g'(Q)=:\frac{\delta g(Q)}{\delta Q(\theta)}$.  In other words, they seem to define $\delta g(Q)/\delta Q$ to be that function in $L^2$ which satisfies
$$
DG(Q)(q)=\int \frac{\delta G(Q)}{\delta Q(\theta)}q(\theta)d\theta
$$
for all $q$.  Using this definition shows (1.9) and (1.18) are equivalent.
EDIT:
To get (1.9) from (1.18), let us start with $\mathcal F_1(q):=\int_{\mathbb S}q(\theta)\log q(\theta)d\theta$.  The Frechet derivative $D\mathcal F_1(q)$ evaluated at $h\in L^2$ is
$$
D\mathcal F_1(q)(h)=\lim_{\epsilon\to 0}\frac{\mathcal F_1(q+\epsilon h)-\mathcal F_1(q)}{\epsilon}=\int (\ln q(\theta)+1)h(\theta)d\theta.
$$
Hence, 
$$
\frac{\delta\mathcal F_1(q)}{\delta q(\theta)}=\ln q(\theta)+1,
$$
since this is the $L^2$ representative of the Frechet derivative.
Let us now do the second integral, $\mathcal F_2(q):=\int_{\mathbb S^2}\cos(\theta-\theta')q(\theta)q(\theta')d\theta d\theta'$.  In this case, the Frechet derivative is given by
$$
D\mathcal F_2(q)(h)=\int\cos(\theta-\theta')[h(\theta)q(\theta')+q(\theta)h(\theta')]d\theta d\theta'.
$$
Let us change variables $(\theta,\theta')\to (\theta',\theta)$ inside the integral of the second term.  Then we obtain:
$$
D\mathcal F_2(q)(h)=2\int\cos(\theta-\theta')q(\theta')h(\theta)d\theta d\theta'=\int_{\mathbb S}h(\theta)\left(\int_{\mathbb S}2\cos(\theta-\theta')q(\theta')d\theta'\right)d\theta.
$$
Therefore,
$$
\frac{\delta\mathcal F_2(q)}{\delta q(\theta)}=2\int_{\mathbb S}\cos(\theta-\theta')q(\theta')d\theta'.
$$
In sum, using this definition of $\delta F/\delta q$, we have
$$
\frac{\delta \mathcal F(q_t)}{\delta q_t(\theta)}=\frac{1}{2}(\ln q_t(\theta)
+1)-K\int_{\mathbb S}\cos(\theta-\theta')q_t(\theta')d\theta'.
$$
Applying $\nabla$:
$$
\nabla\left(\frac{\delta \mathcal F(q_t)}{\delta q_t(\theta)}\right)=\frac{1}{2}\frac{1}{q_t}\frac{\partial q_t}{\partial \theta}+K\int_{\mathbb S}\sin(\theta-\theta')q_t(\theta')d\theta',
$$
so (1.9) follows after multiplying by $q_t$ and differentiating in $\theta$.
