Nektar++
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
Nektar::MultiRegions::ExpressionOp< TData > Class Template Reference

Whole-field interface of the Expression operator: evaluates one analytical expression per field component at every quadrature point. More...

#include <ExpressionOp.hpp>

Inheritance diagram for Nektar::MultiRegions::ExpressionOp< TData >:
[legend]

Public Member Functions

void SetExpressions (const std::vector< LibUtilities::EquationSharedPtr > &exprs)
 Set the expressions to evaluate, one per field component in component order.
 
void SetTime (const TData &time)
 Set the value substituted for the built-in time variable t in every expression (default 0).
 
void SetScale (const TData &scale)
 Set the factor every evaluated expression value is multiplied by before it is written or appended (default 1).
 
void SetAppend (const bool &append)
 Choose between accumulating onto the output (out += scale * f) and overwriting it (out = scale * f, the default).
 
void SetComponentMask (const std::vector< bool > &cmask)
 Select which output components the expressions are evaluated for (default: all enabled).
 
- Public Member Functions inherited from Nektar::MultiRegions::ElmtOp< FieldState::Phys, FieldState::Phys, TData >
void Apply (LibUtilities::Field< TData, TFieldIn > &in, LibUtilities::Field< TData, TFieldOut > &out)
 Apply the operator to in, writing the result to out.
 
void operator() (LibUtilities::Field< TData, TFieldIn > &in, LibUtilities::Field< TData, TFieldOut > &out)
 Call operator; equivalent to Apply().
 
- Public Member Functions inherited from Nektar::MultiRegions::Operator< TData >
virtual ~Operator ()=default
 
 Operator (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > components)
 Construct the interface part of a concrete operator; called by the factory-registered creator functions.
 

Static Public Member Functions

static std::shared_ptr< ExpressionOp< TData > > Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="", const std::string &implStr="")
 Create an Expression operator through the two-stage element-operator factory and initialise its default settings.
 
static unsigned int GetNumberEvars (const LibUtilities::EquationSharedPtr &expression)
 Count the variables of an expression, i.e. the length of its variable list.
 
- Static Public Member Functions inherited from Nektar::MultiRegions::ElmtOp< FieldState::Phys, FieldState::Phys, TData >
static std::shared_ptr< TOperator< TData > > Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="", const std::string &implStr="")
 Build a complete element operator: the whole-field interface object plus one block operator per element block.
 
static std::string GetOpImpl (const std::string &opName, const std::string &opExecSpace, LibUtilities::SessionReaderSharedPtr session, const StdRegions::StdExpansionSharedPtr &exp=nullptr, const std::string &policyName="")
 Return the implementation for an operator.
 
- Static Public Member Functions inherited from Nektar::MultiRegions::Operator< TData >
template<template< typename > typename TOperator>
static std::shared_ptr< TOperator< TData > > Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > components, const std::string &execStr)
 Create a concrete operator instance through the operator factory.
 
static std::string GetOpExecSpace (std::shared_ptr< LibUtilities::SessionReader > session, const bool warn=true)
 Return the execution space name ("opExecSpace") for an operator.
 
static const DefaultOpImplRule * GetDefaultOpImplRule (const StdRegions::StdExpansionSharedPtr &exp, const std::string &execSpace)
 Return the row of the default implementation table (DefaultOpImplTable.hpp) that a block of elements takes, or null if none does.
 
static std::string GetDefaultOpImpl (const StdRegions::StdExpansionSharedPtr &exp, const std::string &execSpace)
 Return the implementation a block of elements takes when neither the command line nor the session names one for its operator.
 
static std::vector< unsigned int > GetDefaultInterleaveWidths (const MultiRegions::ExpListSharedPtr &expansionList)
 Return the default interleave widths, one per block of expansionList, that persistent Fields (e.g. solution storage, time-integration and linear-solver workspace) built on it should be constructed with.
 
static bool IsDiscontinuousProjection (std::shared_ptr< LibUtilities::SessionReader > session)
 Return true if the session uses a Discontinuous (DG) projection.
 

Static Public Attributes

static const std::string name = "Expression"
 Operator base name; Create() appends the execution space to it to form the factory key.
 

Protected Member Functions

 ExpressionOp (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
 Construct the interface part of a concrete implementation; called by the factory-registered creator functions.
 
 ~ExpressionOp () override=default
 
void v_Apply (LibUtilities::Field< TData, FieldState::Phys > &in, LibUtilities::Field< TData, FieldState::Phys > &out) override
 Evaluate the expressions block by block: checks that the fields conform and that expressions have been set, then hands each input/output block pair to its block operator.
 
- Protected Member Functions inherited from Nektar::MultiRegions::ElmtOp< FieldState::Phys, FieldState::Phys, TData >
 ElmtOp (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
 Construct the interface part of a concrete operator; called by the factory-registered creator functions.
 
 ~ElmtOp () override=default
 
virtual void v_Apply (LibUtilities::Field< TData, TFieldIn > &in, LibUtilities::Field< TData, TFieldOut > &out)=0
 Implementation hook for Apply().
 

Protected Attributes

bool m_isExpressionsDefined = false
 Whether SetExpressions() has been called; Apply() asserts this.
 
std::vector< std::shared_ptr< ExpressionBlockOp< TData > > > m_blockOp
 One block operator per element block, filled by ElmtOp::Create.
 
std::vector< std::shared_ptr< ExpressionBlockOp< TData > > > m_blockHostOp
 Host block operator of each block whose own could not evaluate some expressions set, otherwise null. Created by SetExpressions().
 
std::vector< bool > m_useHostOp
 Whether each block evaluates the current expressions with its host block operator.
 
bool m_warnOnceHostOp = false
 Set once the use of a host block operator has been warned about, for the current expressions.
 
std::vector< bool > m_cmask
 Settings forwarded to the block operators, kept for those of m_blockHostOp, created after them.
 
TData m_time = 0.0
 
TData m_scale = 1.0
 
bool m_append = false
 
- Protected Attributes inherited from Nektar::MultiRegions::Operator< TData >
MultiRegions::ExpListSharedPtr m_expansionList
 Expansion list the operator acts on.
 
std::vector< std::string > m_components
 Names of the field components the operator was built for.
 
LibUtilities::NekDataWarehouseSharedPtr m_dataWarehouse
 Data warehouse shared with the other operators on the expansion list, used to build and cache shared tables (basis matrices, mode indices, geometric factors) once.
 

Friends

class ElmtOp< FieldState::Phys, FieldState::Phys, TData >
 

Detailed Description

template<typename TData>
class Nektar::MultiRegions::ExpressionOp< TData >

Whole-field interface of the Expression operator: evaluates one analytical expression per field component at every quadrature point.

As with the other element-operator interfaces, deriving from ElmtOp<FieldState::Phys, FieldState::Phys, TData> sets the Apply() parameter types at compile time: both fields must be in physical space. Unusually for an element operator, the input field is not transformed – it supplies the values of any extra expression variables (EVARS) beyond the built-in x, y, z and t, and merely sets the storage layout when there are none. The operator holds one ExpressionBlockOp per element block (m_blockOp) and its v_Apply() delegates each block of the input/output fields to the matching block operator.

The evaluation settings live in the block operators; every setter here simply forwards its value to all of them. The intended workflow is Create(), then optionally SetComponentMask(), then SetExpressions() – mandatory, Apply() asserts otherwise – then optionally SetTime(), SetScale() and SetAppend(), then Apply(). Expressions may be swapped at any time between applications.

SetTime(), SetScale() and SetAppend() are order-free and may be changed between applications. SetComponentMask() is not: the mask must be final before SetExpressions() is called, and changing it afterwards requires calling SetExpressions() again (the in-tree callers in MultiRegions/BndCondOps set the mask first).

Template Parameters
TDataFloating-point type of the field data.
See also
ExpressionBlockOp for the per-block settings and the v_SetExpressions() hook the back-ends implement.

Definition at line 114 of file ExpressionOp.hpp.

Constructor & Destructor Documentation

◆ ExpressionOp()

template<typename TData >
Nektar::MultiRegions::ExpressionOp< TData >::ExpressionOp ( const MultiRegions::ExpListSharedPtr &  expansionList,
const std::vector< std::string > &  components 
)
inlineprotected

Construct the interface part of a concrete implementation; called by the factory-registered creator functions.

Parameters
expansionListExpansion list the operator acts on.
componentsComponent names the operator is set up for.

Definition at line 372 of file ExpressionOp.hpp.

375 components)
376 {
377 }
friend class ElmtOp< FieldState::Phys, FieldState::Phys, TData >

◆ ~ExpressionOp()

template<typename TData >
Nektar::MultiRegions::ExpressionOp< TData >::~ExpressionOp ( )
overrideprotecteddefault

Member Function Documentation

◆ Create()

template<typename TData >
static std::shared_ptr< ExpressionOp< TData > > Nektar::MultiRegions::ExpressionOp< TData >::Create ( const MultiRegions::ExpListSharedPtr &  expansionList,
const std::vector< std::string > &  components,
const std::string &  execStr = "",
const std::string &  implStr = "" 
)
inlinestatic

Create an Expression operator through the two-stage element-operator factory and initialise its default settings.

After the interface object and its per-block operators are built by ElmtOp::Create, every block operator is given the defaults: all components enabled in the mask, time 0 and scale 1 (the append flag defaults to false in ExpressionBlockOp). No expressions are set – SetExpressions() must be called before the first Apply().

Parameters
expansionListExpansion list the operator acts on; its Collections define the blocks.
componentsNames of the field components; their count sizes the default component mask.
execStrExecution space ("Serial", "AVX" or "Device"); if empty, taken from the session's "opExecSpace" command-line argument or, failing that, the build's default (see ElmtOp::Create).
implStrBlock implementation part of the factory key. This family registers only "Generic", so any other request falls back to it (see ElmtBlockOp::Create).
Returns
The newly created operator, ready for SetExpressions().

Definition at line 146 of file ExpressionOp.hpp.

150 {
151 auto op =
152 ElmtOp<FieldState::Phys, FieldState::Phys, TData>::template Create<
153 ExpressionOp, ExpressionBlockOp>(expansionList, components,
154 execStr, implStr);
155
156 // Default component mask, true for all components, time 0 and scale
157 // 1.
158 op->m_blockHostOp.resize(op->m_blockOp.size(), nullptr);
159 op->m_useHostOp.resize(op->m_blockOp.size(), false);
160 op->SetComponentMask(std::vector<bool>(components.size(), true));
161 op->SetTime(0.0);
162 op->SetScale(1.0);
163 return op;
164 }
static std::shared_ptr< ExpressionOp< TData > > Create(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="", const std::string &implStr="")
Create an Expression operator through the two-stage element-operator factory and initialise its defau...
ExpressionOp(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
Construct the interface part of a concrete implementation; called by the factory-registered creator f...

References Nektar::MultiRegions::ElmtOp< FieldState::Phys, FieldState::Phys, TData >::Create(), and Nektar::MultiRegions::ExpressionBlockOp< TData >::SetComponentMask().

Referenced by Nektar::detail::HOPressureBndCondOpImpl< ExecSpace, TData >::BuildBoundaryVelocityData(), TestExpression< TData >::RunTestCase(), and Nektar::detail::HOutflowBndCondOpImpl< ExecSpace, TData >::ValidateAndBuildVelocityBoundaryData().

◆ GetNumberEvars()

template<typename TData >
static unsigned int Nektar::MultiRegions::ExpressionOp< TData >::GetNumberEvars ( const LibUtilities::EquationSharedPtr &  expression)
inlinestatic

Count the variables of an expression, i.e. the length of its variable list.

The list contains the built-in x y z t (the LibUtilities::Equation default) plus any extra field variables (EVARS) declared in the session; the count is therefore at least four; the back-ends assume those four are present, and use the count to decide how many input-field components to gather per point.

Parameters
expressionExpression whose variable list is counted.
Returns
Number of comma/space-separated names in the list.

Definition at line 331 of file ExpressionOp.hpp.

333 {
334 // Extract the number of expression variables (EVARS).
335 // Note that we use four by default: x, y, z, t
336 std::vector<std::string> vars;
337 auto variableList = expression->GetVlist();
338 StringUtils::Split(vars, variableList, StringUtils::IsAnyOf(", "));
339 return vars.size();
340 }
Container & Split(Container &result, std::string_view input, Pred pred, TokenCompressMode mode=eTokenCompressOff)
Splits input at characters matching pred into result, which is cleared first. An empty input gives a ...

References Nektar::StringUtils::Split().

Referenced by Nektar::MultiRegions::ExpressionOp< TData >::SetExpressions().

◆ SetAppend()

template<typename TData >
void Nektar::MultiRegions::ExpressionOp< TData >::SetAppend ( const bool &  append)
inline

Choose between accumulating onto the output (out += scale * f) and overwriting it (out = scale * f, the default).

Definition at line 272 of file ExpressionOp.hpp.

273 {
275
276 // Loop over the blocks.
277 for (unsigned int blk = 0; blk < m_blockOp.size(); ++blk)
278 {
279 this->m_blockOp[blk]->SetAppend(append);
280 if (m_blockHostOp[blk])
281 {
282 m_blockHostOp[blk]->SetAppend(append);
283 }
284 }
285 }
std::vector< std::shared_ptr< ExpressionBlockOp< TData > > > m_blockOp
One block operator per element block, filled by ElmtOp::Create.
std::vector< std::shared_ptr< ExpressionBlockOp< TData > > > m_blockHostOp
Host block operator of each block whose own could not evaluate some expressions set,...
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const bool append

References Nektar::MultiRegions::ExpressionOp< TData >::m_append, Nektar::MultiRegions::ExpressionOp< TData >::m_blockHostOp, and Nektar::MultiRegions::ExpressionOp< TData >::m_blockOp.

◆ SetComponentMask()

template<typename TData >
void Nektar::MultiRegions::ExpressionOp< TData >::SetComponentMask ( const std::vector< bool > &  cmask)
inline

Select which output components the expressions are evaluated for (default: all enabled).

Parameters
cmaskOne flag per component, in component order; Apply() asserts its size matches the number of expressions.
Note
Call this before SetExpressions() (see the class notes on the setter ordering).
Masked-out output components are not guaranteed to be left untouched.

Definition at line 301 of file ExpressionOp.hpp.

302 {
303 m_cmask = cmask;
304
305 // Loop over the blocks.
306 for (unsigned int blk = 0; blk < m_blockOp.size(); ++blk)
307 {
308 this->m_blockOp[blk]->SetComponentMask(cmask);
309 if (m_blockHostOp[blk])
310 {
311 m_blockHostOp[blk]->SetComponentMask(cmask);
312 }
313 }
314 }
std::vector< bool > m_cmask
Settings forwarded to the block operators, kept for those of m_blockHostOp, created after them.

References Nektar::MultiRegions::ExpressionOp< TData >::m_blockHostOp, Nektar::MultiRegions::ExpressionOp< TData >::m_blockOp, and Nektar::MultiRegions::ExpressionOp< TData >::m_cmask.

◆ SetExpressions()

template<typename TData >
void Nektar::MultiRegions::ExpressionOp< TData >::SetExpressions ( const std::vector< LibUtilities::EquationSharedPtr > &  exprs)
inline

Set the expressions to evaluate, one per field component in component order.

The variable count of each expression is extracted with GetNumberEvars() and stored on the block operators with SetNumEvars(); the expressions go through their v_SetExpressions() hook. Also marks the operator ready for Apply().

Parameters
exprsParsed expressions; their number must equal the number of components of the fields later passed to Apply().

Definition at line 183 of file ExpressionOp.hpp.

185 {
186 // Check number of EVARS for new expressions
187 std::vector<unsigned int> numEvars;
188 for (unsigned int ne = 0; ne < exprs.size(); ++ne)
189 {
190 numEvars.push_back(this->GetNumberEvars(exprs[ne]));
191 }
192
193 // A block whose back-end cannot evaluate the expressions, a device
194 // without some function of the host interpreter, evaluates them on
195 // the host instead. Its host block operator is created the first
196 // time, and kept for when the expressions are set again.
197 m_warnOnceHostOp = false;
198 for (unsigned int blk = 0; blk < m_blockOp.size(); ++blk)
199 {
200 m_useHostOp[blk] = !m_blockOp[blk]->IsAvailable(exprs);
201 if (m_useHostOp[blk])
202 {
203 if (!m_blockHostOp[blk])
204 {
206 blk,
208 .GetExpVector()[0],
209 this->m_expansionList->GetDataWarehouseSharedPtr(),
210 "Serial", "Generic");
211 m_blockHostOp[blk]->SetComponentMask(m_cmask);
212 m_blockHostOp[blk]->SetTime(m_time);
213 m_blockHostOp[blk]->SetScale(m_scale);
214 m_blockHostOp[blk]->SetAppend(m_append);
215 }
216 m_blockHostOp[blk]->SetExpressions(exprs);
217 m_blockHostOp[blk]->SetNumEvars(numEvars);
218 }
219 else
220 {
221 this->m_blockOp[blk]->SetExpressions(exprs);
222 this->m_blockOp[blk]->SetNumEvars(numEvars);
223 }
224 }
225
227 }
static std::shared_ptr< ExpressionBlockOp< TData > > Create(const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr)
Create one block operator through the block-operator factory.
bool m_isExpressionsDefined
Whether SetExpressions() has been called; Apply() asserts this.
std::vector< bool > m_useHostOp
Whether each block evaluates the current expressions with its host block operator.
bool m_warnOnceHostOp
Set once the use of a host block operator has been warned about, for the current expressions.
static unsigned int GetNumberEvars(const LibUtilities::EquationSharedPtr &expression)
Count the variables of an expression, i.e. the length of its variable list.
MultiRegions::ExpListSharedPtr m_expansionList
Expansion list the operator acts on.
Definition Operator.hpp:349
Collections::Collection GetCollection(MultiRegions::ExpListSharedPtr expansionList, unsigned int block_idx)

References Nektar::MultiRegions::ExpressionBlockOp< TData >::Create(), Nektar::MultiRegions::GetCollection(), Nektar::MultiRegions::ExpressionOp< TData >::GetNumberEvars(), Nektar::MultiRegions::ExpressionOp< TData >::m_append, Nektar::MultiRegions::ExpressionOp< TData >::m_blockHostOp, Nektar::MultiRegions::ExpressionOp< TData >::m_blockOp, Nektar::MultiRegions::ExpressionOp< TData >::m_cmask, Nektar::MultiRegions::Operator< TData >::m_expansionList, Nektar::MultiRegions::ExpressionOp< TData >::m_isExpressionsDefined, Nektar::MultiRegions::ExpressionOp< TData >::m_scale, Nektar::MultiRegions::ExpressionOp< TData >::m_time, Nektar::MultiRegions::ExpressionOp< TData >::m_useHostOp, and Nektar::MultiRegions::ExpressionOp< TData >::m_warnOnceHostOp.

◆ SetScale()

template<typename TData >
void Nektar::MultiRegions::ExpressionOp< TData >::SetScale ( const TData &  scale)
inline

Set the factor every evaluated expression value is multiplied by before it is written or appended (default 1).

Definition at line 252 of file ExpressionOp.hpp.

253 {
254 m_scale = scale;
255
256 // Loop over the blocks.
257 for (unsigned int blk = 0; blk < m_blockOp.size(); ++blk)
258 {
259 this->m_blockOp[blk]->SetScale(scale);
260 if (m_blockHostOp[blk])
261 {
262 m_blockHostOp[blk]->SetScale(scale);
263 }
264 }
265 }

References Nektar::MultiRegions::ExpressionOp< TData >::m_blockHostOp, Nektar::MultiRegions::ExpressionOp< TData >::m_blockOp, and Nektar::MultiRegions::ExpressionOp< TData >::m_scale.

◆ SetTime()

template<typename TData >
void Nektar::MultiRegions::ExpressionOp< TData >::SetTime ( const TData &  time)
inline

Set the value substituted for the built-in time variable t in every expression (default 0).

Definition at line 233 of file ExpressionOp.hpp.

234 {
235 m_time = time;
236
237 // Loop over the blocks.
238 for (unsigned int blk = 0; blk < m_blockOp.size(); ++blk)
239 {
240 this->m_blockOp[blk]->SetTime(time);
241 if (m_blockHostOp[blk])
242 {
243 m_blockHostOp[blk]->SetTime(time);
244 }
245 }
246 }

References Nektar::MultiRegions::ExpressionOp< TData >::m_blockHostOp, Nektar::MultiRegions::ExpressionOp< TData >::m_blockOp, and Nektar::MultiRegions::ExpressionOp< TData >::m_time.

◆ v_Apply()

template<typename TData >
void Nektar::MultiRegions::ExpressionOp< TData >::v_Apply ( LibUtilities::Field< TData, FieldState::Phys > &  in,
LibUtilities::Field< TData, FieldState::Phys > &  out 
)
inlineoverrideprotected

Evaluate the expressions block by block: checks that the fields conform and that expressions have been set, then hands each input/output block pair to its block operator.

Parameters
inPhysical-space field supplying the EVAR values; not modified unless it is the same object as out.
outPhysical-space field receiving the evaluated expressions; in append mode its existing values are accumulated onto.

Definition at line 393 of file ExpressionOp.hpp.

395 {
396 ASSERTL1(in.GetNumComponents() == out.GetNumComponents(),
397 "Number of input and output components differ");
398
399 ASSERTL1(in.GetNumHomoModes() == out.GetNumHomoModes(),
400 "Number of input and output homogeneous modes differ");
401
403 "No expressions defined for this Operator. Define with "
404 "SetExpressions().")
405
406 // Loop over the blocks.
407 for (unsigned int blk = 0; blk < this->m_blockOp.size(); ++blk)
408 {
409 // Block dependent.
410 auto &inblock = in.GetBlocks()[blk];
411 auto &outblock = out.GetBlocks()[blk];
412
413 if (m_useHostOp[blk])
414 {
416 "Expression evaluated on the host: the execution "
417 "space cannot evaluate it.");
418 m_warnOnceHostOp = true;
419 this->m_blockHostOp[blk]->Apply(inblock, outblock);
420 }
421 else
422 {
423 this->m_blockOp[blk]->Apply(inblock, outblock);
424 }
425 }
426 }
#define WARNINGL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT in
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT out

References ASSERTL1, Nektar::MultiRegions::ExpressionOp< TData >::m_useHostOp, Nektar::MultiRegions::ExpressionOp< TData >::m_warnOnceHostOp, and WARNINGL0.

Friends And Related Symbol Documentation

◆ ElmtOp< FieldState::Phys, FieldState::Phys, TData >

template<typename TData >
friend class ElmtOp< FieldState::Phys, FieldState::Phys, TData >
friend

Definition at line 1 of file ExpressionOp.hpp.

Member Data Documentation

◆ m_append

template<typename TData >
bool Nektar::MultiRegions::ExpressionOp< TData >::m_append = false
protected

◆ m_blockHostOp

template<typename TData >
std::vector<std::shared_ptr<ExpressionBlockOp<TData> > > Nektar::MultiRegions::ExpressionOp< TData >::m_blockHostOp
protected

◆ m_blockOp

template<typename TData >
std::vector<std::shared_ptr<ExpressionBlockOp<TData> > > Nektar::MultiRegions::ExpressionOp< TData >::m_blockOp
protected

◆ m_cmask

template<typename TData >
std::vector<bool> Nektar::MultiRegions::ExpressionOp< TData >::m_cmask
protected

Settings forwarded to the block operators, kept for those of m_blockHostOp, created after them.

Definition at line 359 of file ExpressionOp.hpp.

Referenced by Nektar::MultiRegions::ExpressionOp< TData >::SetComponentMask(), and Nektar::MultiRegions::ExpressionOp< TData >::SetExpressions().

◆ m_isExpressionsDefined

template<typename TData >
bool Nektar::MultiRegions::ExpressionOp< TData >::m_isExpressionsDefined = false
protected

Whether SetExpressions() has been called; Apply() asserts this.

Definition at line 344 of file ExpressionOp.hpp.

Referenced by Nektar::MultiRegions::ExpressionOp< TData >::SetExpressions().

◆ m_scale

template<typename TData >
TData Nektar::MultiRegions::ExpressionOp< TData >::m_scale = 1.0
protected

◆ m_time

template<typename TData >
TData Nektar::MultiRegions::ExpressionOp< TData >::m_time = 0.0
protected

◆ m_useHostOp

template<typename TData >
std::vector<bool> Nektar::MultiRegions::ExpressionOp< TData >::m_useHostOp
protected

Whether each block evaluates the current expressions with its host block operator.

Definition at line 352 of file ExpressionOp.hpp.

Referenced by Nektar::MultiRegions::ExpressionOp< TData >::SetExpressions(), and Nektar::MultiRegions::ExpressionOp< TData >::v_Apply().

◆ m_warnOnceHostOp

template<typename TData >
bool Nektar::MultiRegions::ExpressionOp< TData >::m_warnOnceHostOp = false
protected

Set once the use of a host block operator has been warned about, for the current expressions.

Definition at line 355 of file ExpressionOp.hpp.

Referenced by Nektar::MultiRegions::ExpressionOp< TData >::SetExpressions(), and Nektar::MultiRegions::ExpressionOp< TData >::v_Apply().

◆ name

template<typename TData >
const std::string Nektar::MultiRegions::ExpressionOp< TData >::name = "Expression"
inlinestatic

Operator base name; Create() appends the execution space to it to form the factory key.

Definition at line 168 of file ExpressionOp.hpp.