Nektar++
|
1D Array More...
#include <SharedArray.hpp>
Public Types | |
typedef Array< OneD, const DataType > | BaseType |
typedef BaseType::iterator | iterator |
typedef BaseType::reference | reference |
typedef BaseType::size_type | size_type |
typedef BaseType::element | element |
Public Types inherited from Nektar::Array< OneD, const DataType > | |
typedef DataType * | ArrayType |
typedef const DataType & | const_reference |
typedef DataType & | reference |
typedef const DataType * | const_iterator |
typedef DataType * | iterator |
typedef DataType | element |
typedef unsigned int | size_type |
Public Member Functions | |
Array () | |
Creates an empty array. | |
Array (unsigned int dim1Size) | |
Creates an array of size dim1Size. | |
Array (unsigned int dim1Size, const DataType &initValue) | |
Creates a 1D array with each element initialized to an initial value. | |
Array (unsigned int dim1Size, const DataType *data) | |
Creates a 1D array a copies data into it. | |
Array (unsigned int dim1Size, const Array< OneD, DataType > &rhs) | |
Array (unsigned int dim1Size, const Array< OneD, const DataType > &rhs) | |
Creates a 1D array that references rhs. | |
Array (const Array< OneD, DataType > &rhs) | |
Array (const Array< OneD, const DataType > &rhs) | |
Creates a reference to rhs. | |
Array< OneD, DataType > & | operator= (const Array< OneD, DataType > &rhs) |
iterator | begin () |
iterator | end () |
reference | operator[] (unsigned int i) |
element * | get () |
element * | data () |
Public Member Functions inherited from Nektar::Array< OneD, const DataType > | |
~Array () | |
Array< OneD, const DataType > & | operator= (const Array< OneD, const DataType > &rhs) |
Creates a reference to rhs. | |
const_iterator | begin () const |
const_iterator | end () const |
const_reference | operator[] (unsigned int i) const |
const element * | get () const |
Returns a c-style pointer to the underlying array. | |
const element * | data () const |
Returns a c-style pointer to the underlying array. | |
size_type | num_dimensions () const |
Returns 1. | |
size_type | num_elements () const |
Returns the array's size. | |
size_type | capacity () const |
unsigned int | GetOffset () const |
Returns the array's offset. | |
bool | Overlaps (const Array< OneD, const DataType > &rhs) const |
Returns true is this array and rhs overlap. |
Static Public Member Functions | |
static Array< OneD, DataType > | CreateWithOffset (const Array< OneD, DataType > &rhs, unsigned int offset) |
Protected Member Functions | |
Array (const Array< OneD, const DataType > &rhs, AllowWrappingOfConstArrays a) | |
void | ChangeSize (unsigned int newSize) |
Friends | |
class | NekVector |
class | NekMatrix |
class | LinearSystem |
Additional Inherited Members | |
Protected Attributes inherited from Nektar::Array< OneD, const DataType > | |
unsigned int | m_size |
unsigned int | m_capacity |
DataType * | m_data |
unsigned int * | m_count |
unsigned int | m_offset |
1D Array
pageNekArrays
Misc notes.
Throught the 1D Array class you will see things like "using BaseType::begin" and "using BaseType::end". This is necessary to bring the methods from the ConstArray into scope in Array class. Typically this is not necessary, but since we have method names which match those in the base class, the base class names are hidden. Therefore, we have to explicitly bring them into scope to use them.
Definition at line 477 of file SharedArray.hpp.
typedef Array<OneD, const DataType> Nektar::Array< OneD, DataType >::BaseType |
Definition at line 480 of file SharedArray.hpp.
typedef BaseType::element Nektar::Array< OneD, DataType >::element |
Definition at line 484 of file SharedArray.hpp.
typedef BaseType::iterator Nektar::Array< OneD, DataType >::iterator |
Definition at line 481 of file SharedArray.hpp.
typedef BaseType::reference Nektar::Array< OneD, DataType >::reference |
Definition at line 482 of file SharedArray.hpp.
typedef BaseType::size_type Nektar::Array< OneD, DataType >::size_type |
Definition at line 483 of file SharedArray.hpp.
|
inline |
Creates an empty array.
Reimplemented from Nektar::Array< OneD, const DataType >.
Definition at line 487 of file SharedArray.hpp.
|
inlineexplicit |
Creates an array of size dim1Size.
If DataType is a fundamental type (double, int, etc.), then the allocated array is uninitialized. If it is any other type, each element is initialized with DataType's default constructor.
Reimplemented from Nektar::Array< OneD, const DataType >.
Definition at line 492 of file SharedArray.hpp.
|
inline |
Creates a 1D array with each element initialized to an initial value.
dim1Size | The array's size. |
initValue | Each element's initial value. |
If DataType is a fundamental type (double, int, etc.), then the initial value is copied directly into each element. Otherwise, the DataType's copy constructor is used to initialize each element.
Reimplemented from Nektar::Array< OneD, const DataType >.
Definition at line 497 of file SharedArray.hpp.
|
inline |
Creates a 1D array a copies data into it.
dim1Size | the array's size. |
data | The data to copy. |
If DataType is a fundamental type (double, int, etc.), then data is copied directly into the underlying storage. Otherwise, the DataType's copy constructor is used to copy each element.
Reimplemented from Nektar::Array< OneD, const DataType >.
Definition at line 502 of file SharedArray.hpp.
|
inline |
Definition at line 507 of file SharedArray.hpp.
|
inline |
Creates a 1D array that references rhs.
dim1Size | The size of the array. This is useful when you want this array to reference a subset of the elements in rhs. |
rhs | Array to reference. This constructor creates an array that references rhs. Any changes to rhs will be reflected in this array. The memory for the array will only be deallocated when both rhs and this array have gone out of scope. |
Reimplemented from Nektar::Array< OneD, const DataType >.
Definition at line 512 of file SharedArray.hpp.
|
inline |
Definition at line 517 of file SharedArray.hpp.
|
inline |
Creates a reference to rhs.
Reimplemented from Nektar::Array< OneD, const DataType >.
Definition at line 522 of file SharedArray.hpp.
|
inlineprotected |
Definition at line 572 of file SharedArray.hpp.
Definition at line 542 of file SharedArray.hpp.
Referenced by Nektar::NekVector< DataType >::NekVector().
|
inlineprotected |
Definition at line 577 of file SharedArray.hpp.
References ASSERTL1.
|
inlinestatic |
Definition at line 533 of file SharedArray.hpp.
References Nektar::Array< OneD, const DataType >::m_offset, and Nektar::Array< OneD, const DataType >::m_size.
Definition at line 561 of file SharedArray.hpp.
Referenced by Nektar::LibUtilities::GaussPoints::CalculateInterpMatrix(), Nektar::LibUtilities::GaussPoints::CalculatePoints(), Nektar::CopyArray(), Nektar::CopyArrayN(), Nektar::NekMatrix< DataType, StandardMatrixTag >::operator=(), and Nektar::NekMatrix< DataType, StandardMatrixTag >::ResizeDataArrayIfNeeded().
Definition at line 545 of file SharedArray.hpp.
Definition at line 558 of file SharedArray.hpp.
Referenced by Nektar::FullBlockMatrixMultiply(), Nektar::FullMatrixFuncs::Invert(), and Nektar::NekVector< DataType >::NekVector().
|
inline |
Definition at line 527 of file SharedArray.hpp.
|
inline |
Definition at line 548 of file SharedArray.hpp.
References ASSERTL1.
|
friend |
Definition at line 569 of file SharedArray.hpp.
|
friend |
Definition at line 567 of file SharedArray.hpp.
|
friend |
Definition at line 564 of file SharedArray.hpp.