Rodin/Variational/Derivative.h file

Directional derivative operator for scalar functions.

This file defines the Derivative class, which computes directional derivatives of scalar functions. This generalizes the gradient concept to derivatives in specific directions.

Mathematical Foundation

The directional derivative of a function $ u $ in direction $ \mathbf{v} $ is:

\[ D_{\mathbf{v}} u = \nabla u \cdot \mathbf{v} = \lim_{h \to 0} \frac{u(x + h\mathbf{v}) - u(x)}{h} \]

Coordinate Derivatives

Special cases are partial derivatives:

  • $ \frac{\partial u}{\partial x_i} = D_{\mathbf{e}_i} u $ where $ \mathbf{e}_i $ is the $ i $ -th coordinate direction.

Applications

  • Normal derivatives: $ \frac{\partial u}{\partial n} = \nabla u \cdot \mathbf{n} $
  • Material derivatives in fluid dynamics
  • Characteristic methods for PDEs
  • Shape sensitivity analysis

Usage Example

// Normal derivative on boundary
auto n = BoundaryNormal();
auto normal_deriv = Derivative(u, n);  // ∂u/∂n = ∇u·n

Namespaces

namespace Rodin
The Rodin library for Shape and Topology Optimization.
namespace Rodin::FormLanguage
Module for writing high level abstract expressions.
namespace Rodin::Variational
Module which provides the necessary tools for constructing variational problems.