Rodin/Variational/EQ.h file

Equality comparison operator for functions.

This file defines the EQ class, which implements the equality comparison operation between functions. This operator tests whether two function values are equal at each point in the domain.

Mathematical Foundation

For functions $ f, g : \Omega \to \mathbb{R} $ , the equality operator:

\[ (f = g)(x) = \begin{cases} 1 & \text{if } f(x) = g(x) \\ 0 & \text{otherwise} \end{cases} \]

Numerical Considerations

For floating-point comparisons, consider using approximate equality with a tolerance due to numerical precision limitations.

Applications

  • Indicator functions for specific values
  • Level set definitions
  • Region identification based on function values

Usage Example

auto is_zero = (u == 0.0);  // Boolean function, true where u equals zero

Namespaces

namespace Rodin
The Rodin library for Shape and Topology Optimization.
namespace Rodin::Variational
Module which provides the necessary tools for constructing variational problems.

Classes

template<class LHSDerived, class RHSDerived>
class Rodin::Variational::EQ<FunctionBase<LHSDerived>, FunctionBase<RHSDerived>>
Logical EQ operator between two instances of FunctionBase.