7 #ifndef cf3_solver_actions_Proto_Functions_hpp
8 #define cf3_solver_actions_Proto_Functions_hpp
10 #include <boost/proto/core.hpp>
32 for(
Uint i = 0; i != (Exp-1); ++i)
38 template<U
int Exp,
typename Arg>
39 typename boost::proto::result_of::make_expr<
40 boost::proto::tag::function
46 return boost::proto::make_expr<boost::proto::tag::function>(
68 template<
typename ResultT,
typename CoordsT>
72 for(
int i = 0; i != CoordsT::RowsAtCompileTime; ++i)
82 boost::proto::transform< ParsedVectorFunctionTransform >
84 template<
typename ExprT,
typename StateT,
typename DataT>
85 struct impl : boost::proto::transform_impl<ExprT, StateT, DataT>
87 typedef const typename boost::remove_reference<DataT>::type::CoordsT&
result_type;
89 result_type
operator()(
typename impl::expr_param expr,
typename impl::state_param state,
typename impl::data_param data)
const
98 boost::proto::transform< ParsedScalarFunctionTransform >
100 template<
typename ExprT,
typename StateT,
typename DataT>
101 struct impl : boost::proto::transform_impl<ExprT, StateT, DataT>
105 Real
operator()(
typename impl::expr_param expr,
typename impl::state_param state,
typename impl::data_param data)
const
107 std::vector<Real> result(1);
109 return result.back();
119 boost::proto::terminal<VectorFunction>,
120 ParsedVectorFunctionTransform
124 boost::proto::terminal<ScalarFunction>,
125 ParsedScalarFunctionTransform
136 #endif // cf3_solver_actions_Proto_Functions_hpp
Base class of all functions that can be evaluated using "default" C++ semantics.
void evaluate_function(const ProtoEvaluatedFunction &func, const CoordsT &coords, ResultT &result)
void evaluate(const var_t &var_values, ret_t &ret_value) const
Pow function based on Proto docs example.
Top-level namespace for coolfluid.
unsigned int Uint
typedef for unsigned int
std::vector< Real > predefined_values
Real operator()(Real d) const
coolfluid3 header, included almost everywhere
Wrap the vectorial function, adding extra data that may be filled before expression evaluation...
boost::proto::result_of::make_expr< boost::proto::tag::function, pow_fun< Exp >, Arg const & >::type const pow(Arg const &arg)