Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
Nektar::LibUtilities::AnalyticExpressionEvaluator::EvalAWGN Struct Reference
Inheritance diagram for Nektar::LibUtilities::AnalyticExpressionEvaluator::EvalAWGN:
Inheritance graph
[legend]
Collaboration diagram for Nektar::LibUtilities::AnalyticExpressionEvaluator::EvalAWGN:
Collaboration graph
[legend]

Public Member Functions

 EvalAWGN (rgt rn, vr s, cvr c, cvr p, cvr v, ci i, ci l, ci r)
virtual void run_many (ci n)
 declaring this guy pure virtual shortens virtual table. It saves some execution time.
virtual void run_once ()
- Public Member Functions inherited from Nektar::LibUtilities::AnalyticExpressionEvaluator::EvaluationStep
 EvaluationStep (rgt rn, ci i, ci l, ci r, vr s, cvr c, cvr p, cvr v)
virtual ~EvaluationStep ()

Additional Inherited Members

- Public Attributes inherited from Nektar::LibUtilities::AnalyticExpressionEvaluator::EvaluationStep
rgt rng
 reference to random number generator
vr state
 references to arrays holding the common state
cvr consts
cvr params
cvr vars
ci storeIdx
 indices in the above arrays uniquely defining actual command arguments
ci argIdx1
ci argIdx2

Detailed Description

Definition at line 695 of file AnalyticExpressionEvaluator.hpp.

Constructor & Destructor Documentation

Nektar::LibUtilities::AnalyticExpressionEvaluator::EvalAWGN::EvalAWGN ( rgt  rn,
vr  s,
cvr  c,
cvr  p,
cvr  v,
ci  i,
ci  l,
ci  r 
)
inline

Definition at line 697 of file AnalyticExpressionEvaluator.hpp.

: EvaluationStep(rn,i,l,r,s,c,p,v) {}

Member Function Documentation

virtual void Nektar::LibUtilities::AnalyticExpressionEvaluator::EvalAWGN::run_many ( ci  n)
inlinevirtual

declaring this guy pure virtual shortens virtual table. It saves some execution time.

Implements Nektar::LibUtilities::AnalyticExpressionEvaluator::EvaluationStep.

Definition at line 698 of file AnalyticExpressionEvaluator.hpp.

References Nektar::LibUtilities::AnalyticExpressionEvaluator::EvaluationStep::rng, Nektar::LibUtilities::AnalyticExpressionEvaluator::EvaluationStep::state, and Nektar::LibUtilities::AnalyticExpressionEvaluator::EvaluationStep::storeIdx.

{
// assuming the argument to AWGN does not depend on spatial variables =>
boost::variate_generator<RandomGeneratorType&, boost::normal_distribution<> >
_normal(rng, boost::normal_distribution<>(0, state[storeIdx*n]) );
for(int i=0;i<n;i++) { state[storeIdx*n+i] = _normal(); }
}
virtual void Nektar::LibUtilities::AnalyticExpressionEvaluator::EvalAWGN::run_once ( )
inlinevirtual