Class documentation of Concepts

Loading...
Searching...
No Matches

#include <karniadakis.hh>

Inheritance diagram for concepts::Karniadakis< type, mode >:
concepts::ShapeFunction1D< Real > concepts::OutputOperator

Public Member Functions

 Karniadakis (const int P, const Real *xP, const int NxP, const int Q=0, const int R=0, const bool cache=true)
 
 Karniadakis (const int P, int NxP, const Real *values, const int Q=0, const int R=0)
 
 Karniadakis (const Karniadakis< type, mode > &arg)
 Copy constructor.
 
uint n () const
 Returns the number of shape functions.
 
uint nP () const
 
const Realvalues () const
 Returns the values of the shape functions.
 

Static Public Member Functions

static void clearCache ()
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.
 

Protected Attributes

Realvalues_
 Values of the shape functions.
 

Detailed Description

template<int type, int mode>
class concepts::Karniadakis< type, mode >

Part of the multidimensional expansion bases for the shape functions of Karniadakis and Sherwin. Computes one of principal functions $\psi^a_i(z)$, $\psi^b_{ij}(z)$ or $\psi^c_{ijk}(z)$ for given polynomial degrees and a set of points.

The constructor computes the values if necessary: they are stored in static hashes and can be reused if requested a second time. There is a method to get a pointer into the array of the computed values, use this at initialization time of the element to get a pointer to the values. The index of the points in which the shape functions are evaluated runs fastest, k is second and i is slowest.

Parameters
typeTemplate parameter: type of the principal function. Can take the values
  • 1 – The principal function $\psi^a_i(z)$ is computed in the constructor.
  • 2 – The principal function $\psi^b_{ij}(z)$ is computed in the constructor.
  • 3 – The principal function $\psi^c_{ijk}(z)$ is computed in the constructor.
modeTemplate parameter: normal, derivatives, divided form. Can take the values
  • 0 – normal
  • 1 – derivatives. The derivatives of principal function are computed in the constructor, ie. ${\psi^a_i}'(z)$, ${\psi^b_{ij}}'(z)$ and ${\psi^c_{ijk}}'(z)$ respectively, depending on the type of the principal function
  • 2 – divided form. The principal function is divided by $1-z$: $\frac{\psi^b_{ij}(z)}{1-z}$ is computed in the constructor. This is only possible for the principal function $\psi^b_{ij}(z)$.
Test:
test::KarniadakisTest
Author
Philipp Frauenfelder, 2000

Definition at line 163 of file karniadakis.hh.

Constructor & Destructor Documentation

◆ Karniadakis() [1/2]

template<int type, int mode>
concepts::Karniadakis< type, mode >::Karniadakis ( const int  P,
const Real xP,
const int  NxP,
const int  Q = 0,
const int  R = 0,
const bool  cache = true 
)

Constructor. Computes the values of the principal function of the given order and in the given points.

(P+1)*(Q+1)*(R+1) is the number of shape functions which have to be computed in NxP points.

Parameters
POrder of the principal function in $\eta_1$
xPPoints
NxPNumber of points
QOrder of the principal function in $\eta_2$
ROrder of the principal function in $\eta_3$
cacheControls if the computed values should be taken from and stored in the cache

◆ Karniadakis() [2/2]

template<int type, int mode>
concepts::Karniadakis< type, mode >::Karniadakis ( const int  P,
int  NxP,
const Real values,
const int  Q = 0,
const int  R = 0 
)

Value copy constructor. Copies precomputed values for the karniadakis polynomials to its value data. The chache is setted false since, the values data will be allocated.

Parameters
POrder of the principal function in $\eta_1$
NxPNumber of quadratur points
valuesprecomputed values
QOrder of the principal function in $\eta_2$
ROrder of the principal function in $\eta_3$
cacheControls if the computed values should be taken from and stored in the cache

Member Function Documentation

◆ clearCache()

template<int type, int mode>
static void concepts::Karniadakis< type, mode >::clearCache ( )
inlinestatic

Definition at line 204 of file karniadakis.hh.

◆ info()

template<int type, int mode>
virtual std::ostream & concepts::Karniadakis< type, mode >::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Implements concepts::ShapeFunction1D< Real >.

◆ n()

uint concepts::ShapeFunction1D< Real >::n ( ) const
inlineinherited

Returns the number of shape functions.

Definition at line 35 of file shapefunction.hh.

◆ nP()

uint concepts::ShapeFunction1D< Real >::nP ( ) const
inlineinherited

Returns the number of abscissas (in which the shape functions are evaluated)

Definition at line 38 of file shapefunction.hh.

◆ values()

const Real * concepts::ShapeFunction1D< Real >::values ( ) const
inlineinherited

Returns the values of the shape functions.

Definition at line 40 of file shapefunction.hh.

Member Data Documentation

◆ values_

Real * concepts::ShapeFunction1D< Real >::values_
protectedinherited

Values of the shape functions.

Definition at line 45 of file shapefunction.hh.


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