63template <
typename TData>
67 static std::shared_ptr<ReynoldsStressOp<TData>>
Create(
69 const std::vector<std::string> &components,
70 const std::string &execStr =
"")
73 expansionList, components, execStr);
76 static inline const std::string
name =
"ReynoldsStress";
81 const std::vector<std::string> &velocityNames)
83 std::vector<std::string> names;
84 for (
unsigned int a = 0; a < velocityNames.size(); ++a)
86 for (
unsigned int b = a; b < velocityNames.size(); ++b)
88 names.push_back(velocityNames[a] + velocityNames[b]);
96 void Configure(
const std::vector<unsigned int> &velocityComponents)
127 const std::vector<std::string> &components)
128 : MultiRegions::
Operator<TData>(expansionList, components)
135 const std::vector<unsigned int> &velocityComponents) = 0;
Whole-field operator base class and factory machinery shared by every operator family in the MultiReg...
A Field represents expansion data to be operated on.
Common base class of the operator family interfaces: holds the expansion list, component names and da...
Accumulate the scaled pairwise products of the velocity components.
virtual void v_Configure(const std::vector< unsigned int > &velocityComponents)=0
void operator()(LibUtilities::Field< TData, FieldState::Phys > &velocity, LibUtilities::Field< TData, FieldState::Phys > &products)
As Apply().
static std::shared_ptr< ReynoldsStressOp< TData > > Create(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="")
void Configure(const std::vector< unsigned int > &velocityComponents)
velocityComponents are the indices of the velocity components in the velocity field,...
TData m_scale
Factor applied to the products before they are added.
virtual void v_Apply(LibUtilities::Field< TData, FieldState::Phys > &velocity, LibUtilities::Field< TData, FieldState::Phys > &products)=0
ReynoldsStressOp(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
static const std::string name
static std::vector< std::string > ProductNames(const std::vector< std::string > &velocityNames)
Names of the product components, e.g. uu, uv, uw, vv, vw, ww, formed from the names of the selected v...
~ReynoldsStressOp() override=default
void Apply(LibUtilities::Field< TData, FieldState::Phys > &velocity, LibUtilities::Field< TData, FieldState::Phys > &products)
Add the scaled products of velocity to products, which leave at the interleave width of velocity.
void SetScale(const TData scale)
Set the factor applied to the products before they are added.
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.