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. | |
| DShape (const unsigned &N, const unsigned &M, const unsigned &P) | |
| Constructor with three paramters: a two-index shape function. | |
| DShape () | |
| Default constructor - just assigns a null pointers and zero index sizes. | |
| DShape (const DShape &dshape)=delete | |
| Broken copy constructor. | |
| void | operator= (DShape &dshape) |
| Assignment operator, shallow copy (not recommended so warning given) | |
| void | operator= (DShape *const &dshape_pt) |
| Assignment operator, shallow copy (not reccomended so warning given) | |
| void | shallow_copy_from (DShape &dshape) |
| This function does a shallow copy (resets the pointer to the data) | |
| void | shallow_copy_from (DShape *const &dshape_pt) |
| This function does a shallow copy (resets the pointer to the data) | |
| ~DShape () | |
| Destructor, clean up the memory allocated by this object. | |
| double & | operator() (const unsigned &i, const unsigned &k) |
| Overload the round bracket operator for access to the data. | |
| const double & | operator() (const unsigned &i, const unsigned &k) const |
| Overload the round bracket operator (const version) | |
| double & | operator() (const unsigned &i, const unsigned &j, const unsigned &k) |
| Overload the round bracket operator, with 3 indices. | |
| const double & | operator() (const unsigned &i, const unsigned &j, const unsigned &k) const |
| Overload the round bracket operator (const version) | |
| 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. | |
| 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. | |
| 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. | |
| unsigned long | nindex1 () const |
| Return the range of index 1 of the derivatives of the shape functions. | |
| unsigned long | nindex2 () const |
| Return the range of index 2 of the derivatives of the shape functions. | |
| unsigned long | nindex3 () const |
| Return the range of index 3 of the derivatives of the shape functions. | |
Static Public Attributes | |
| static bool | Suppress_warning_about_assignment = false |
| Boolean used to suppress warning about assignment operator. | |
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. | |
| 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. | |
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. | |
| 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. | |
| unsigned | Index1 |
| Size of the first index of the shape function. | |
| unsigned | Index2 |
| Size of the second index of the shape function. | |
| unsigned | Index3 |
| Size of the third index of the shape function. | |
| bool | Is_dpsi_copied |
| Boolean to indicate whether the data has been copied. | |
| bool | Is_dpsi_a_copy |
| Boolean to indicate whether the data is a copy. | |
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.
Constructor with two parameters: a single-index shape function.
Definition at line 420 of file shape.h.
References Allocated_storage, and DPsi.
Constructor with three paramters: a two-index shape function.
Definition at line 432 of file shape.h.
References Allocated_storage, and DPsi.
|
inline |
|
inline |
Destructor, clean up the memory allocated by this object.
Definition at line 547 of file shape.h.
References Allocated_storage.
Assignment operator, shallow copy (not recommended so warning given)
Definition at line 460 of file shape.h.
References shallow_copy_from(), and Suppress_warning_about_assignment.
Assignment operator, shallow copy (not reccomended so warning given)
Definition at line 489 of file shape.h.
References shallow_copy_from(), and Suppress_warning_about_assignment.
|
inlineprivate |
Private function that checks whether the indices are in range.
Definition at line 388 of file shape.h.
References i, Index1, Index2, and Index3.
Referenced by operator()(), operator()(), operator()(), and operator()().
|
inlineprivate |
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 557 of file shape.h.
References Allocated_storage, DPsi, Index1, Index2, Index3, and Is_dpsi_copied.
This function does a shallow copy (resets the pointer to the data)
Definition at line 519 of file shape.h.
References DPsi, Index1, Index2, Index3, and Is_dpsi_a_copy.
Referenced by oomph::QAdvectionDiffusionElement< DIM, NNODE_1D >::dshape_and_dtest_eulerian_adv_diff(), oomph::QAdvectionDiffusionReactionElement< NREAGENT, DIM, NNODE_1D >::dshape_and_dtest_eulerian_adv_diff_react(), oomph::QAdvectionDiffusionElement< DIM, NNODE_1D >::dshape_and_dtest_eulerian_at_knot_adv_diff(), oomph::QAdvectionDiffusionReactionElement< NREAGENT, DIM, NNODE_1D >::dshape_and_dtest_eulerian_at_knot_adv_diff_react(), oomph::QGeneralisedAdvectionDiffusionElement< DIM, NNODE_1D >::dshape_and_dtest_eulerian_at_knot_cons_adv_diff(), oomph::QGeneralisedAdvectionDiffusionElement< DIM, NNODE_1D >::dshape_and_dtest_eulerian_cons_adv_diff(), operator=(), and operator=().
|
private |
|
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 364 of file shape.h.
Referenced by DShape(), DShape(), operator()(), operator()(), operator()(), operator()(), raw_direct_access(), raw_direct_access(), resize(), shallow_copy_from(), and shallow_copy_from().
|
private |
Size of the first index of the shape function.
Definition at line 372 of file shape.h.
Referenced by nindex1(), range_check(), resize(), shallow_copy_from(), and shallow_copy_from().
|
private |
Size of the second index of the shape function.
Definition at line 375 of file shape.h.
Referenced by nindex2(), offset(), operator()(), operator()(), operator()(), operator()(), range_check(), resize(), shallow_copy_from(), and shallow_copy_from().
|
private |
Size of the third index of the shape function.
Definition at line 378 of file shape.h.
Referenced by nindex3(), offset(), operator()(), operator()(), operator()(), operator()(), range_check(), resize(), shallow_copy_from(), and shallow_copy_from().
|
private |
Boolean to indicate whether the data is a copy.
Definition at line 384 of file shape.h.
Referenced by shallow_copy_from(), and shallow_copy_from().
|
private |
Boolean used to suppress warning about assignment operator.
Definition at line 674 of file shape.h.
Referenced by operator=(), and operator=().