blitzdg
an open-source project aiming to implement parallel discontinuous Galerkin (dg) solvers for common partial differential equations systems using blitz++ for array and tensor manipulations and MPI for distributed parallelism.
expression.h
1 
2 // Copyright Joakim Karlsson & Kim Gräsman 2010-2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifndef IGLOO_EXPRESSION_H
8 #define IGLOO_EXPRESSION_H
9 
10 #include "./notexpression.h"
11 #include "./andexpression.h"
12 #include "./orexpression.h"
13 
14 namespace snowhouse {
15 
16  template<typename T>
17  struct Expression
18  {
19  NotExpression<T> operator!() const
20  {
21  return NotExpression<T>(static_cast<const T&>(*this));
22  }
23 
24  template< typename Right >
25  AndExpression<T, Right> operator&&(const Right& right) const
26  {
27  return AndExpression<T, Right>(static_cast<const T&>(*this), right);
28  }
29 
30  template< typename Right >
31  OrExpression<T, Right> operator||(const Right& right) const
32  {
33  return OrExpression<T, Right>(static_cast<const T&>(*this), right);
34  }
35  };
36 }
37 
38 #endif
Definition: assert.h:13
Definition: orexpression.h:15
Definition: andexpression.h:15
Definition: notexpression.h:15
Definition: expression.h:17