forward declarations More...
#include <DiffusionLHDGAssemblyHelper.h>
Public Types | |
typedef T | value_type |
Public Member Functions | |
MooseArray () | |
Default constructor. More... | |
MooseArray (const unsigned int size) | |
MooseArray (const unsigned int size, const T &default_value) | |
MooseArray (const MooseArray &rhs) | |
~MooseArray ()=default | |
void | setAllValues (const T &value) |
Sets all values of the array to the passed in value. More... | |
void | release () |
Manually deallocates the data pointer. More... | |
void | clear () |
Change the number of elements the array can store to zero. More... | |
template<bool value_initialize = false> | |
void | resize (unsigned int size) |
Change the number of elements the array can store. More... | |
void | resize (unsigned int size, const T &default_value) |
Change the number of elements the array can store. More... | |
unsigned int | size () const |
The number of elements that can currently be stored in the array. More... | |
T & | operator[] (const unsigned int i) |
Get element i out of the array. More... | |
const T & | operator[] (const unsigned int i) const |
Get element i out of the array. More... | |
void | swap (MooseArray &rhs) |
Swap memory in this object with the 'rhs' object. More... | |
void | shallowCopy (const MooseArray &rhs) |
Doesn't actually make a copy of the data. More... | |
void | shallowCopy (std::vector< T > &rhs) |
Doesn't actually make a copy of the data. More... | |
MooseArray< T > & | operator= (const std::vector< T > &rhs) |
Actual operator=... More... | |
MooseArray< T > & | operator= (const MooseArray< T > &rhs) |
Actual operator=... More... | |
std::vector< T > | stdVector () const |
Extremely inefficient way to produce a std::vector from a MooseArray! More... | |
const T * | data () const |
Reference to first element of array. More... | |
T * | data () |
Private Attributes | |
std::unique_ptr< T[]> | _data_ptr |
Smart pointer storage. More... | |
T * | _data |
unsigned int | _size |
The current number of elements the array can hold. More... | |
unsigned int | _allocated_size |
Number of allocated memory positions for storage. More... | |
forward declarations
Definition at line 25 of file DiffusionLHDGAssemblyHelper.h.
typedef T MooseArray< T >::value_type |
Definition at line 20 of file MooseArray.h.
|
inline |
Default constructor.
Doesn't initialize anything.
Definition at line 25 of file MooseArray.h.
|
inlineexplicit |
size | The initial size of the array. |
Definition at line 30 of file MooseArray.h.
|
inlineexplicit |
size | The initial size of the array. |
default_value | The default value to set. |
Definition at line 39 of file MooseArray.h.
|
inlineexplicit |
Definition at line 47 of file MooseArray.h.
|
default |
|
inline |
Change the number of elements the array can store to zero.
Will destroy data currently in array!
Note that this does not free unused memory. This is done for speed.
Definition at line 208 of file MooseArray.h.
|
inline |
|
inline |
Definition at line 181 of file MooseArray.h.
|
inline |
Actual operator=...
really does make a copy of the data
If you don't want a copy use shallowCopy()
Definition at line 316 of file MooseArray.h.
|
inline |
Actual operator=...
really does make a copy of the data
If you don't want a copy use shallowCopy()
Definition at line 330 of file MooseArray.h.
|
inline |
Get element i out of the array.
Definition at line 266 of file MooseArray.h.
|
inline |
Get element i out of the array.
Definition at line 276 of file MooseArray.h.
|
inline |
Manually deallocates the data pointer.
Definition at line 66 of file MooseArray.h.
Referenced by Assembly::modifyFaceWeightsDueToXFEM(), Assembly::modifyWeightsDueToXFEM(), Assembly::~Assembly(), NodeElemConstraintBase::~NodeElemConstraintBase(), and NodeFaceConstraint::~NodeFaceConstraint().
|
inline |
Change the number of elements the array can store.
Will allocate more memory if necessary.
Can destroy data currently in array! Basically, data retention not guaranteed.
Note that this does not free unused memory. This is done for speed.
size | The new size of the array |
value_initialize | Whether to perform value initialization of the array instead of default initialization |
Definition at line 216 of file MooseArray.h.
Referenced by MooseVariableScalar::computeAD(), Assembly::computeADFace(), NodeFaceConstraint::computeJacobian(), NodeFaceConstraint::computeOffDiagJacobian(), Coupleable::coupledArrayDotDu(), Coupleable::coupledDot(), Coupleable::coupledDotDot(), Coupleable::coupledDotDotDu(), Coupleable::coupledDotDotOld(), Coupleable::coupledDotDu(), Coupleable::coupledDotOld(), Coupleable::coupledNodalDotDot(), Coupleable::coupledNodalDotDotOld(), Coupleable::coupledNodalDotOld(), Coupleable::coupledVectorDotDotDu(), Coupleable::coupledVectorDotDu(), MooseVariableDataBase< OutputType >::getArrayDoFValues(), NodeElemConstraint::getConnectedDofIndices(), MooseVariableDataBase< OutputType >::matrixTagValue(), MooseArray< libMesh::VectorValue >::MooseArray(), MooseVariableDataBase< OutputType >::MooseVariableDataBase(), MooseVariableDataBase< OutputType >::nodalMatrixTagValue(), Assembly::reinitFVFace(), and Assembly::resizeADMappingObjects().
|
inline |
Change the number of elements the array can store.
Will allocate more memory if necessary.
Can destroy data currently in array! Basically, data retention not guaranteed.
Note that this does not free unused memory. This is done for speed.
Also note that default_value is only applied to NEW entries.
Definition at line 235 of file MooseArray.h.
|
inline |
Sets all values of the array to the passed in value.
value | The value every entry of the array will be set to. |
Definition at line 200 of file MooseArray.h.
Referenced by MooseArray< libMesh::VectorValue >::MooseArray().
|
inline |
Doesn't actually make a copy of the data.
Just makes this object operate on the same data.
Definition at line 296 of file MooseArray.h.
Referenced by Assembly::reinitElemFaceRef(), Assembly::reinitFE(), Assembly::reinitFEFace(), Assembly::reinitFEFaceNeighbor(), Assembly::reinitMortarElem(), Assembly::reinitNeighbor(), and Assembly::reinitNeighborFaceRef().
|
inline |
Doesn't actually make a copy of the data.
Just makes this object operate on the same data.
Definition at line 306 of file MooseArray.h.
|
inline |
The number of elements that can currently be stored in the array.
Definition at line 259 of file MooseArray.h.
Referenced by NodalPatchRecovery::compute(), ArrayDGKernel::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighResidual(), TimeDerivative::computeJacobian(), Kernel::computeJacobian(), ArrayKernel::computeJacobian(), IntegratedBC::computeJacobian(), ArrayIntegratedBC::computeJacobian(), EigenKernel::computeJacobian(), NodeElemConstraint::computeJacobian(), FVBoundaryScalarLagrangeMultiplierConstraint::computeJacobian(), KernelValue::computeJacobian(), KernelGrad::computeJacobian(), NonlocalKernel::computeJacobian(), NonlocalIntegratedBC::computeJacobian(), NodeFaceConstraint::computeJacobian(), ArrayLowerDIntegratedBC::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), ArrayKernel::computeOffDiagJacobian(), NodeElemConstraint::computeOffDiagJacobian(), FVScalarLagrangeMultiplierConstraint::computeOffDiagJacobian(), ArrayKernel::computeOffDiagJacobianScalar(), ArrayKernel::computeResidual(), ArrayLowerDIntegratedBC::computeResidual(), FVBoundaryScalarLagrangeMultiplierConstraint::computeResidual(), FVScalarLagrangeMultiplierConstraint::computeResidual(), MultiAppVariableValueSampleTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), Assembly::modifyArbitraryWeights(), Assembly::modifyFaceWeightsDueToXFEM(), Assembly::modifyWeightsDueToXFEM(), MooseArray< libMesh::VectorValue >::MooseArray(), NodalPatchRecoveryBase::nodalPatchRecovery(), MooseVariableData< OutputType >::phiFaceSize(), MooseVariableData< OutputType >::phiSize(), Assembly::reinitFEFace(), and MaterialPropertyBase< T, false >::size().
std::vector< T > MooseArray< T >::stdVector | ( | ) | const |
Extremely inefficient way to produce a std::vector from a MooseArray!
Definition at line 344 of file MooseArray.h.
Referenced by Assembly::reinitElemAndNeighbor().
|
inline |
Swap memory in this object with the 'rhs' object.
rhs | The object we are swapping with |
Definition at line 286 of file MooseArray.h.
|
private |
Number of allocated memory positions for storage.
Definition at line 195 of file MooseArray.h.
Referenced by MooseArray< libMesh::VectorValue >::release(), MooseArray< libMesh::VectorValue >::shallowCopy(), and MooseArray< libMesh::VectorValue >::swap().
|
private |
Definition at line 189 of file MooseArray.h.
Referenced by MooseArray< libMesh::VectorValue >::data(), MooseArray< libMesh::VectorValue >::MooseArray(), MooseArray< libMesh::VectorValue >::operator=(), MooseArray< libMesh::VectorValue >::release(), MooseArray< libMesh::VectorValue >::shallowCopy(), and MooseArray< libMesh::VectorValue >::swap().
|
private |
Smart pointer storage.
Definition at line 186 of file MooseArray.h.
Referenced by MooseArray< libMesh::VectorValue >::release(), and MooseArray< libMesh::VectorValue >::swap().
|
private |
The current number of elements the array can hold.
Definition at line 192 of file MooseArray.h.
Referenced by MooseArray< libMesh::VectorValue >::MooseArray(), MooseArray< libMesh::VectorValue >::operator=(), MooseArray< libMesh::VectorValue >::release(), MooseArray< libMesh::VectorValue >::shallowCopy(), and MooseArray< libMesh::VectorValue >::swap().