VTK  9.3.20240723
Public Types | Public Member Functions | Public Attributes | List of all members
vtkDGOperatorEntry Class Reference

A record for a basis in a function space that is specific to one cell shape. More...

#include <vtkDGOperatorEntry.h>

Public Types

using OperatorFunction = std::function< void(const std::array< double, 3 >, std::vector< double > &)>
 

Public Member Functions

 vtkDGOperatorEntry ()=default
 
 vtkDGOperatorEntry (const vtkDGOperatorEntry &)=default
 
 vtkDGOperatorEntry (int numFunc, int opSize, OperatorFunction op, const std::string &shader)
 
 operator bool () const
 Entries may be implicitly converted to booleans.
 
std::string GetShaderString (const std::string &functionName, const std::string &parameterName) const
 Return a glsl string that defines this operator.
 

Public Attributes

int NumberOfFunctions { 0 }
 The number of functions in the basis.
 
int OperatorSize { 1 }
 The number of coordinates each operator-function evaluates to.
 
OperatorFunction Op
 A function you may call to evaluate the operator.
 
std::string ShaderOp
 A string holding the source code to evaluate all the basis functions.
 

Detailed Description

A record for a basis in a function space that is specific to one cell shape.

OperatorName → vtkCellAttribute::CellTypeInfo (FS, Basis, Order) → CellShape → vtkDGOperatorEntry.

OperatorName: one of "Basis"_token, "BasisGradient"_token, "Curl"_token, "Div"_token, etc. FunctionSpace: one of "constant"_token, "HGRAD"_token, "HCURL"_token, "HDIV"_token. Basis: one of "I"_token, "C"_token, "F"_token. Order: a non-negative integer. CellShape: one of "vtkDGHex"_token, "vtkDGQuad"_token, etc. but may also include "vtkDeRhamCell"_token, or "vtkDGCell"_token. In this way, if a cell does not have its own operator it can see whether a more generic version exists. This accomodates the "constant" function space where all shapes produce the same function.

Definition at line 31 of file vtkDGOperatorEntry.h.

Member Typedef Documentation

◆ OperatorFunction

using vtkDGOperatorEntry::OperatorFunction = std::function<void(const std::array<double, 3>, std::vector<double>&)>

Definition at line 34 of file vtkDGOperatorEntry.h.

Constructor & Destructor Documentation

◆ vtkDGOperatorEntry() [1/3]

vtkDGOperatorEntry::vtkDGOperatorEntry ( )
default

◆ vtkDGOperatorEntry() [2/3]

vtkDGOperatorEntry::vtkDGOperatorEntry ( const vtkDGOperatorEntry )
default

◆ vtkDGOperatorEntry() [3/3]

vtkDGOperatorEntry::vtkDGOperatorEntry ( int  numFunc,
int  opSize,
OperatorFunction  op,
const std::string &  shader 
)
inline

Definition at line 38 of file vtkDGOperatorEntry.h.

Member Function Documentation

◆ operator bool()

vtkDGOperatorEntry::operator bool ( ) const
inline

Entries may be implicitly converted to booleans.

When the function used to invoke the operation is null, the conversion returns false. Otherwise it returns true.

Definition at line 50 of file vtkDGOperatorEntry.h.

◆ GetShaderString()

std::string vtkDGOperatorEntry::GetShaderString ( const std::string &  functionName,
const std::string &  parameterName 
) const

Return a glsl string that defines this operator.

Member Data Documentation

◆ NumberOfFunctions

int vtkDGOperatorEntry::NumberOfFunctions { 0 }

The number of functions in the basis.

Note that each basis function may evaluate to a scalar or a vector. See FunctionSize for more information.

Definition at line 60 of file vtkDGOperatorEntry.h.

◆ OperatorSize

int vtkDGOperatorEntry::OperatorSize { 1 }

The number of coordinates each operator-function evaluates to.

For H(grad) and constant function spaces, this is 1. For H(curl) and H(div), this is 3.

Definition at line 66 of file vtkDGOperatorEntry.h.

◆ Op

OperatorFunction vtkDGOperatorEntry::Op

A function you may call to evaluate the operator.

You pass in the parametric coordinates (always an (r, s, t) 3-tuple) and a vector to hold the function values.

The std::vector<double> you pass to the Op functor must be resized to hold at least nn = NumberOfFunctions * OperatorSize entries before you invoke Op. The first nn entries will have new values written to them.

Definition at line 77 of file vtkDGOperatorEntry.h.

◆ ShaderOp

std::string vtkDGOperatorEntry::ShaderOp

A string holding the source code to evaluate all the basis functions.

Definition at line 80 of file vtkDGOperatorEntry.h.


The documentation for this class was generated from the following file: