Public Member Functions | Private Member Functions | Private Attributes | List of all members
oomph::DShape Class Reference

A Class for the derivatives of shape functions The class design is essentially the same as Shape, but there is on additional index that is used to indicate the coordinate direction in which the derivative is taken. More...

#include <shape.h>

Public Member Functions

 DShape (const unsigned &N, const unsigned &P)
 Constructor with two parameters: a single-index shape function. More...
 
 DShape (const unsigned &N, const unsigned &M, const unsigned &P)
 Constructor with three paramters: a two-index shape function. More...
 
 DShape ()
 Default constructor - just assigns a null pointers and zero index sizes. More...
 
 DShape (const DShape &dshape)=delete
 Broken copy constructor. More...
 
void operator= (const DShape &dshape)
 The assignment operator does a shallow copy (resets the pointer to the data) More...
 
void operator= (DShape *const &dshape_pt)
 The assignment operator does a shallow copy (resets the pointer to the data) More...
 
 ~DShape ()
 Destructor, clean up the memory allocated by this object. More...
 
void resize (const unsigned &N, const unsigned &P, const unsigned &M=1)
 Change the size of the storage. Note that (for some strange reason) index2 is the "optional" index, to conform with the existing constructor. More...
 
double & operator() (const unsigned &i, const unsigned &k)
 Overload the round bracket operator for access to the data. More...
 
const double & operator() (const unsigned &i, const unsigned &k) const
 Overload the round bracket operator (const version) More...
 
double & operator() (const unsigned &i, const unsigned &j, const unsigned &k)
 Overload the round bracket operator, with 3 indices. More...
 
const double & operator() (const unsigned &i, const unsigned &j, const unsigned &k) const
 Overload the round bracket operator (const version) More...
 
double & raw_direct_access (const unsigned long &i)
 Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems. More...
 
const double & raw_direct_access (const unsigned long &i) const
 Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems. More...
 
unsigned offset (const unsigned long &i, const unsigned long &j) const
 Caculate the offset in flat-packed C-style, column-major format, required for a given i,j. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems. More...
 
unsigned long nindex1 () const
 Return the range of index 1 of the derivatives of the shape functions. More...
 
unsigned long nindex2 () const
 Return the range of index 2 of the derivatives of the shape functions. More...
 
unsigned long nindex3 () const
 Return the range of index 3 of the derivatives of the shape functions. More...
 

Private Member Functions

void range_check (const unsigned &i, const unsigned &j, const unsigned &k) const
 Private function that checks whether the indices are in range. More...
 

Private Attributes

double * DPsi
 Pointer that addresses the storage that will be used to read and set the shape-function derivatives. The values are packed into a flat array of doubles. More...
 
double * Allocated_storage
 Pointer that addresses the storage allocated by the object on construction. This will be the same as DPsi if the object is not copied. More...
 
unsigned Index1
 Size of the first index of the shape function. More...
 
unsigned Index2
 Size of the second index of the shape function. More...
 
unsigned Index3
 Size of the third index of the shape function. More...
 

Detailed Description

A Class for the derivatives of shape functions The class design is essentially the same as Shape, but there is on additional index that is used to indicate the coordinate direction in which the derivative is taken.

Definition at line 277 of file shape.h.

Constructor & Destructor Documentation

◆ DShape() [1/4]

oomph::DShape::DShape ( const unsigned &  N,
const unsigned &  P 
)
inline

Constructor with two parameters: a single-index shape function.

Definition at line 332 of file shape.h.

References Allocated_storage, DPsi, and oomph::QuadTreeNames::N.

◆ DShape() [2/4]

oomph::DShape::DShape ( const unsigned &  N,
const unsigned &  M,
const unsigned &  P 
)
inline

Constructor with three paramters: a two-index shape function.

Definition at line 340 of file shape.h.

References Allocated_storage, DPsi, and oomph::QuadTreeNames::N.

◆ DShape() [3/4]

oomph::DShape::DShape ( )
inline

Default constructor - just assigns a null pointers and zero index sizes.

Definition at line 349 of file shape.h.

◆ DShape() [4/4]

oomph::DShape::DShape ( const DShape dshape)
delete

Broken copy constructor.

◆ ~DShape()

oomph::DShape::~DShape ( )
inline

Destructor, clean up the memory allocated by this object.

Definition at line 401 of file shape.h.

References Allocated_storage.

Member Function Documentation

◆ nindex1()

unsigned long oomph::DShape::nindex1 ( ) const
inline

◆ nindex2()

unsigned long oomph::DShape::nindex2 ( ) const
inline

◆ nindex3()

unsigned long oomph::DShape::nindex3 ( ) const
inline

Return the range of index 3 of the derivatives of the shape functions.

Definition at line 506 of file shape.h.

References Index3.

Referenced by oomph::ClampedHermiteShellBoundaryConditionElement::dshape_local().

◆ offset()

unsigned oomph::DShape::offset ( const unsigned long &  i,
const unsigned long &  j 
) const
inline

Caculate the offset in flat-packed C-style, column-major format, required for a given i,j. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems.

Definition at line 487 of file shape.h.

References i, Index2, and Index3.

Referenced by oomph::RefineablePVDEquations< DIM >::fill_in_generic_contribution_to_residuals_pvd(), oomph::PVDEquations< DIM >::fill_in_generic_contribution_to_residuals_pvd(), oomph::RefineablePVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), and oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure().

◆ operator()() [1/4]

double & oomph::DShape::operator() ( const unsigned &  i,
const unsigned &  j,
const unsigned &  k 
)
inline

Overload the round bracket operator, with 3 indices.

Definition at line 444 of file shape.h.

References DPsi, i, Index2, Index3, and range_check().

◆ operator()() [2/4]

const double & oomph::DShape::operator() ( const unsigned &  i,
const unsigned &  j,
const unsigned &  k 
) const
inline

Overload the round bracket operator (const version)

Definition at line 455 of file shape.h.

References DPsi, i, Index2, Index3, and range_check().

◆ operator()() [3/4]

double & oomph::DShape::operator() ( const unsigned &  i,
const unsigned &  k 
)
inline

Overload the round bracket operator for access to the data.

Definition at line 426 of file shape.h.

References DPsi, i, Index2, Index3, and range_check().

◆ operator()() [4/4]

const double & oomph::DShape::operator() ( const unsigned &  i,
const unsigned &  k 
) const
inline

Overload the round bracket operator (const version)

Definition at line 435 of file shape.h.

References DPsi, i, Index2, Index3, and range_check().

◆ operator=() [1/2]

void oomph::DShape::operator= ( const DShape dshape)
inline

The assignment operator does a shallow copy (resets the pointer to the data)

Definition at line 356 of file shape.h.

References DPsi, oomph::OneDimHermite::dshape(), Index1, Index2, and Index3.

◆ operator=() [2/2]

void oomph::DShape::operator= ( DShape *const &  dshape_pt)
inline

The assignment operator does a shallow copy (resets the pointer to the data)

Definition at line 378 of file shape.h.

References DPsi, Index1, Index2, and Index3.

◆ range_check()

void oomph::DShape::range_check ( const unsigned &  i,
const unsigned &  j,
const unsigned &  k 
) const
inlineprivate

Private function that checks whether the indices are in range.

Definition at line 300 of file shape.h.

References i, Index1, Index2, and Index3.

Referenced by operator()().

◆ raw_direct_access() [1/2]

double & oomph::DShape::raw_direct_access ( const unsigned long &  i)
inline

Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems.

Definition at line 469 of file shape.h.

References DPsi, and i.

Referenced by oomph::RefineablePVDEquations< DIM >::fill_in_generic_contribution_to_residuals_pvd(), oomph::PVDEquations< DIM >::fill_in_generic_contribution_to_residuals_pvd(), oomph::RefineablePVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), and oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure().

◆ raw_direct_access() [2/2]

const double & oomph::DShape::raw_direct_access ( const unsigned long &  i) const
inline

Direct access to internal storage of data in flat-packed C-style column-major format. WARNING: Only for experienced users. Only use this if raw speed is of the essence, as in the solid mechanics problems.

Definition at line 478 of file shape.h.

References DPsi, and i.

◆ resize()

void oomph::DShape::resize ( const unsigned &  N,
const unsigned &  P,
const unsigned &  M = 1 
)
inline

Change the size of the storage. Note that (for some strange reason) index2 is the "optional" index, to conform with the existing constructor.

Definition at line 410 of file shape.h.

References Allocated_storage, DPsi, Index1, Index2, Index3, and oomph::QuadTreeNames::N.

Member Data Documentation

◆ Allocated_storage

double* oomph::DShape::Allocated_storage
private

Pointer that addresses the storage allocated by the object on construction. This will be the same as DPsi if the object is not copied.

Definition at line 288 of file shape.h.

Referenced by DShape(), resize(), and ~DShape().

◆ DPsi

double* oomph::DShape::DPsi
private

Pointer that addresses the storage that will be used to read and set the shape-function derivatives. The values are packed into a flat array of doubles.

Definition at line 283 of file shape.h.

Referenced by DShape(), operator()(), operator=(), raw_direct_access(), and resize().

◆ Index1

unsigned oomph::DShape::Index1
private

Size of the first index of the shape function.

Definition at line 291 of file shape.h.

Referenced by nindex1(), operator=(), range_check(), and resize().

◆ Index2

unsigned oomph::DShape::Index2
private

Size of the second index of the shape function.

Definition at line 294 of file shape.h.

Referenced by nindex2(), offset(), operator()(), operator=(), range_check(), and resize().

◆ Index3

unsigned oomph::DShape::Index3
private

Size of the third index of the shape function.

Definition at line 297 of file shape.h.

Referenced by nindex3(), offset(), operator()(), operator=(), range_check(), and resize().


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