Rodin/Variational/OR.h file

Logical OR operator for boolean functions.

This file defines the OR class, which implements the logical OR operation between boolean-valued functions. This operator is used for combining logical conditions in variational formulations.

Mathematical Foundation

For boolean functions $ p, q : \Omega \to \{0,1\} $ , the OR operator:

\[ (p \lor q)(x) = \begin{cases} 1 & \text{if } p(x) = 1 \text{ or } q(x) = 1 \\ 0 & \text{otherwise} \end{cases} \]

Applications

  • Combining region indicators
  • Logical conditions for adaptive methods
  • Piecewise function definitions based on multiple criteria

Usage Example

auto p = (x > 0.0);      // Boolean condition
auto q = (y < 1.0);      // Another condition
auto combined = p || q;  // True if either condition holds

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::OR<BooleanFunctionBase<LHSDerived>, BooleanFunctionBase<RHSDerived>>
Logical OR operator between two instances of BooleanFunctionBase.