NeoPZ
|
Implements a vector class which allows to use external storage provided by the user. Utility. More...
#include <pzquad.h>
Public Member Functions | |
TPZManVector (const int64_t size=0) | |
Creates a vector of a given size. More... | |
TPZManVector (const int64_t size, const T ©) | |
Creates a vector of a given size, filling it. More... | |
TPZManVector (const TPZManVector< T, NumExtAlloc > ©) | |
Copy constructor. More... | |
TPZManVector (const TPZVec< T > ©) | |
TPZManVector (const std::initializer_list< T > &list) | |
Creates a vector from a initializer list. More... | |
TPZManVector< T, NumExtAlloc > & | operator= (const TPZManVector< T, NumExtAlloc > ©) |
Assignment operator. More... | |
TPZManVector< T, NumExtAlloc > & | operator= (const std::initializer_list< T > &list) |
initializer list assignment operator More... | |
virtual | ~TPZManVector () |
Destructor. More... | |
int | NAlloc () const |
Returns number of elements allocated for this object. More... | |
void | Expand (const int64_t newsize) |
Expands the allocated storage to fit the newsize parameter. More... | |
void | Shrink () |
It reallocates storage to fit the necessary storage exactly. More... | |
virtual void | Resize (const int64_t newsize, const T &object) |
Resizes the vector object. More... | |
virtual void | Resize (const int64_t newsize) |
Resizes the vector object reallocating the storage if necessary. More... | |
Public Member Functions inherited from TPZVec< T > | |
TPZVec () | |
Creates a vector with size 0. More... | |
TPZVec (const int64_t size) | |
Creates a vector of a given size. More... | |
TPZVec (const int64_t size, const T ©) | |
Creates a vector of a given size. More... | |
TPZVec (const TPZVec< T > ©) | |
Creates a vector with copy constructor. will call the empty constructor on all objects of type T created. More... | |
TPZVec (const std::initializer_list< T > &list) | |
Creates a vector from a initializer list. More... | |
virtual | ~TPZVec () |
destructor, will delete the storage allocated More... | |
void | MigratePages () |
void | ReallocForNuma () |
TPZVec< T > & | operator= (const TPZVec< T > ©) |
will copy the vector into the current vector. More... | |
TPZVec< T > & | operator= (const std::initializer_list< T > &list) |
create a new vector and stores in the current vector More... | |
TPZVec< T > & | operator= (const T &a) |
Operator attribution. Fills the vector with a value of type T. More... | |
T & | operator[] (const int64_t index) const |
Access operator, will perform bounds checking unless the variable NODEBUG is defined. More... | |
T * | begin () const |
Casting operator. Returns The fStore pointer. More... | |
T * | end () const |
Returns a pointer to the last+1 element. More... | |
void | Fill (const T ©, const int64_t from=0, const int64_t numelem=-1) |
Will fill the elements of the vector with a copy object. More... | |
int64_t | NElements () const |
Returns the number of elements of the vector. More... | |
int64_t | size () const |
Returns the number of elements of the vector. More... | |
virtual void | resize (const int64_t newsize) |
void | Print (std::ostream &out=std::cout) |
Prints the structural information of the vector object to the output stream. This method will not print the objects themselves! More... | |
virtual void | clear () |
Empty the vector, make its size zero. More... | |
Private Member Functions | |
int64_t | ExpandSize (const int64_t proposed) const |
Returns a suggested size for expanding the storage to fit the required storage. More... | |
Private Attributes | |
int | fNAlloc |
Number of elements allocated for this object. More... | |
T | fExtAlloc [NumExtAlloc] |
Pointer to the externally allocated space. More... | |
Additional Inherited Members | |
Protected Attributes inherited from TPZVec< T > | |
T * | fStore |
Allocated storage for the vector object. More... | |
int64_t | fNElements |
Number of elements of the vector object. More... | |
Implements a vector class which allows to use external storage provided by the user. Utility.
TPZManVector< T, NumExtAlloc >::TPZManVector | ( | const int64_t | size = 0 | ) |
Creates a vector of a given size.
size | Size of the new vector. It will call the empty constructor on all objects of type T. |
Definition at line 152 of file pzmanvector.h.
TPZManVector< T, NumExtAlloc >::TPZManVector | ( | const int64_t | size, |
const T & | copy | ||
) |
Creates a vector of a given size, filling it.
size | Size of the new vector. |
copy | Model object to initialize the other objects. It will call the empty constructor on all objects of type T created. Copies the object copy to all elements. |
Definition at line 175 of file pzmanvector.h.
|
inline |
Copy constructor.
copy | Original vector.It will call the empty constructor on all objects of type T created. |
Definition at line 203 of file pzmanvector.h.
|
inline |
Definition at line 230 of file pzmanvector.h.
|
inline |
Creates a vector from a initializer list.
list | the initializer list, usually enclosed in curly brackets |
Definition at line 258 of file pzmanvector.h.
|
virtual |
void TPZManVector< T, NumExtAlloc >::Expand | ( | const int64_t | newsize | ) |
Expands the allocated storage to fit the newsize parameter.
newsize | Storage size which is requested.Does nothing if the externally provided storage is larger than newsize. Does not change the size of the vector. |
Definition at line 367 of file pzmanvector.h.
Referenced by TPZTransfer< TVar >::ExpandColumnVectorEntries(), TPZTransfer< TVar >::ExpandDoubleValueEntries(), TPZManVector< TPZPostProcVar, 20 >::NAlloc(), and TPZStack< int, 100 >::TPZStack().
|
private |
Returns a suggested size for expanding the storage to fit the required storage.
proposed | Storage needed for the new vector. |
Definition at line 527 of file pzmanvector.h.
Referenced by TPZManVector< TPZPostProcVar, 20 >::NAlloc(), and TPZManVector< TPZPostProcVar, 20 >::Resize().
|
inline |
Returns number of elements allocated for this object.
Definition at line 92 of file pzmanvector.h.
Referenced by TPZTransfer< TVar >::ExpandColumnVectorEntries(), and TPZTransfer< TVar >::ExpandDoubleValueEntries().
TPZManVector< T, NumExtAlloc > & TPZManVector< T, NumExtAlloc >::operator= | ( | const TPZManVector< T, NumExtAlloc > & | copy | ) |
Assignment operator.
copy | Vector which will be copied. |
Definition at line 285 of file pzmanvector.h.
TPZManVector< T, NumExtAlloc > & TPZManVector< T, NumExtAlloc >::operator= | ( | const std::initializer_list< T > & | list | ) |
initializer list assignment operator
list | list which will be assigned, usually wrapped in curly brackets |
Definition at line 322 of file pzmanvector.h.
|
virtual |
Resizes the vector object.
newsize | Size of the vector. |
object | Object used to initialize the new members. It reallocates storage if necessary, and copies the existing objects onto the new storage. |
Reimplemented from TPZVec< T >.
Definition at line 426 of file pzmanvector.h.
Referenced by TPZElementGroup::AddElement(), TPZSBFemElementGroup::AddElement(), TPZMultiphysicsCompEl< TGeometry >::AddElement(), TPZCompMesh::AdjustBoundaryElements(), TPZInterpolatedElement::AdjustPreferredSideOrder(), TPZSubCompMesh::AllocateNewConnect(), TPZElementMatrix::ApplyConstraints(), TPZCompMesh::BandWidth(), TPZMatLaplacian::BCInterfaceJump(), TPZMatPoisson3d::BCInterfaceJump(), TPZCompEl::BuildConnectList(), TPZNodesetCompute::BuildElementGraph(), TPZSparseBlockDiagonal< TVar >::BuildFromMatrix(), TPZBuildMultiphysicsMesh::BuildHybridMesh(), TPZMultiphysicsCompMesh::BuildMultiphysicsSpace(), TPZRefPattern::BuildSideMesh(), TPZInterpolationSpace::BuildTransferMatrix(), TPZInterpolatedElement::BuildTransferMatrix(), TPZInterpolatedElement::CalcIntegral(), TPZCompElPostProc< TCOMPEL >::CalcResidual(), TPZMultiphysicsCompEl< TGeometry >::CalcResidual(), TPZAgglomerateElement::CalcStiff(), TPZSubCompMesh::CalcStiff(), TPZMultiphysicsCompEl< TGeometry >::CalcStiff(), TPZLadeKim::CheckConv(), CheckElement(), TPZSkylNSymMatrix< TVar >::Clear(), TPZDXGraphMesh::Close(), TPZRenumbering::ColorNodes(), TPZElementMatrix::ComputeDestinationIndices(), TPZCompMesh::ComputeElGraph(), TPZGeoElSide::ComputeNeighbours(), TPZCompMesh::ComputeNodElCon(), TPZInterpolationSpace::ComputeNormal(), TPZReducedSpace::ComputeRequiredData(), TPZInterpolationSpace::ComputeRequiredData(), TPZMohrCoulombPV::ComputeSigma(), TPZMohrCoulombNeto::ComputeSigma(), TPZCompElHDivPressure< TSHAPE >::ComputeSolution(), TPZReducedSpace::ComputeSolution(), TPZInterpolatedElement::ComputeSolution(), TPZInterfaceElement::ComputeSolution(), TPZSBFemVolume::ComputeSolution(), TPZCompElDisc::ComputeSolution(), TPZCompElHDiv< TSHAPE >::ComputeSolutionHDiv(), TPZCompElHDivPressure< TSHAPE >::ComputeSolutionPressureHDiv(), TPZIntRuleT3D::ComputingSymmetricCubatureRule(), TPZIntRuleT::ComputingSymmetricCubatureRule(), TPZL2Projection::Contribute(), TPZL2Projection::ContributeVecShape(), TPZRenumbering::ConvertGraph(), TPZCompElWithMem< TBASE >::CopyIntPtIndicesFrom(), TPZGradientReconstruction::TPZGradientData::CreateGhostsNeighbors(), TPZMHMixedMeshControl::CreateHDivPressureMHMMesh(), TPZMultiphysicsElement::CreateInterface(), TPZInterpolationSpace::CreateInterface(), TPZInterpolatedElement::CreateMidSideConnect(), TPZMHMeshControl::CreateSkeletonElements(), TPZMHMeshControl::DefinePartitionbyCoarseIndices(), pztopology::Pr< TFather >::Diagnostic(), TPZMHMeshControl::DivideBoundarySkeletonElements(), TPZBuildSBFem::DivideSkeleton(), TPZMHMeshControl::DivideSkeletonElements(), TPZVTKGraphMesh::DrawSolution(), TPZMatConvectionProblem::Errors(), TPZAnalysisError::EvaluateError(), TPZSBFemVolume::EvaluateError(), TPZInterfaceElement::EvaluateInterfaceJump(), TPZInterfaceElement::ExistInterfaces(), TPZTransfer< TVar >::ExpandColumnVectorEntries(), TPZAnalysisError::ExpandConnected(), TPZCompElSide::ExpandConnected(), TPZTransfer< TVar >::ExpandDoubleValueEntries(), TPZMixedElasticityMaterial::FillVecShapeIndex(), TPZPoroElastoPlasticAnalysis::FindPorousMaterials(), TPZCompElWithMem< TBASE >::ForcePrepareIntPtIndices(), TPZInterpolatedElement::ForceSideOrder(), TPZGenGrid::GenerateElementsZigZag(), TPZCutHillMcKee::SGraph::GetAdjacentNodes(), TPZCompMesh::GetElementPatch(), TPZSubCompMesh::GetFromSuperMesh(), TPZMHMeshControl::GetMeshes(), TPZMultiphysicsCompEl< TGeometry >::GetReferenceIndexVec(), TPZPlasticTest::GlobalCheckConv(), TPZAnalysisError::hp_Adaptive_Mesh_Design(), TPZAnalysisError::HPAdapt(), TPZMHMeshControl::HybridizeSkeleton(), TPZDohrStructMatrix::IdentifyExternalConnectIndexes(), TPZSubCompMesh::InitializeEF(), TPZSkylNSymMatrix< TVar >::InitializeElem(), TPZInterfaceElement::InitializeElementMatrix(), TPZReducedSpace::InitializeElementMatrix(), TPZMultiphysicsInterfaceElement::InitializeElementMatrix(), TPZInterpolationSpace::InitializeElementMatrix(), TPZCompElLagrange::InitializeElementMatrix(), TPZElementGroup::InitializeElementMatrix(), TPZMultiphysicsCompEl< TGeometry >::InitializeElementMatrix(), TPZGradientReconstruction::TPZGradientData::InitializeGradData(), TPZMultiphysicsCompEl< TGeometry >::InitializeIntegrationRule(), TPZInterfaceElement::InitMaterialData(), TPZSBFemVolume::InitMaterialData(), TPZInterpolationSpace::InitMaterialData(), TPZMultiphysicsInterfaceElement::InitMaterialData(), TPZMultiphysicsCompEl< TGeometry >::InitMaterialData(), TPZGeoMeshBuilder::InsertElement(), TPZGmshReader::InsertElement(), TPZMultiphysicsCompEl< TGeometry >::IntegrateSolution(), TPZCompEl::IntegrateSolution(), TPZDiscontinuousGalerkin::InterfaceJump(), TPZHyperPlaneIntersect::Intersect(), TPZProjectEllipse::LeastSquaresToGetEllipse(), TPZProjectEllipse::LeastSquaresToGetSimpleEllipse(), pztopology::Pr< TFather >::LowerDimensionSides(), pztopology::TPZTetrahedron::LowerDimensionSides(), pztopology::TPZPyramid::LowerDimensionSides(), pztopology::TPZTriangle::LowerDimensionSides(), pztopology::TPZPrism::LowerDimensionSides(), pztopology::TPZQuadrilateral::LowerDimensionSides(), pztopology::TPZCube::LowerDimensionSides(), pztopology::TPZLine::LowerDimensionSides(), TPZSubCompMesh::MakeAllInternal(), TPZSubCompMesh::MakeExternal(), TPZSubCompMesh::MakeInternal(), TPZFlowCompMesh::MaxVelocityOfMesh(), TPZGenGrid::MergeGeoMesh(), TPZManVector< TPZPostProcVar, 20 >::NAlloc(), TPZGradientReconstruction::TPZGradientData::NodeCloserCenterX(), TPZRefPatternTools::NodesHunter(), TPZChunkVector< TPZGraphNode, 10 >::operator=(), TPZAnalysisError::PlotLocal(), TPZAnalysis::PostProcessErrorParallel(), TPZAnalysis::PostProcessErrorSerial(), TPZMetis::Print(), TPZYCMohrCoulombPV::ProjectSigma(), TPZCutHillMcKee::SGraph::PseudoPeripheralNodes(), TPZStack< int, 100 >::Push(), TPZSequenceSolver< TVar >::Read(), TPZEqnArray< TVar >::Read(), TPZElasticity3D::Read(), TPZMixedElasticityMaterial::Read(), TPZStream::Read(), TPZFileEqnStorage< TVar >::ReadBlockPositions(), TPZInterpolatedElement::RecomputeRestraints(), TPZCompElSide::RemoveConnectDuplicates(), TPZCompElSide::RemoveDuplicates(), TPZMultiphysicsElement::RemoveInterface(), TPZInterpolationSpace::RemoveInterface(), TPZMultiphysicsElement::RemoveInterfaces(), TPZInterpolationSpace::RemoveInterfaces(), TPZInterpolatedElement::RemoveSideRestraintsII(), TPZHyperPlaneIntersect::Reorder(), TPZHyperPlaneIntersect::ReorderGeneral(), TPZMetis::Resequence(), TPZCutHillMcKee::Resequence(), TPZSloanRenumbering::Resequence(), TPZElementMatrix::Reset(), TPZEqnArray< TVar >::Reset(), TPZFront< STATE >::Reset(), TPZElastoPlasticAnalysis::ResetMultiPhysics(), TPZPlasticStep< YC_t, TF_t, ER_t >::ResetPlasticMem(), TPZAdmChunkVector< TPZGeoEl *>::Resize(), TPZChunkVector< TPZGraphNode, 10 >::Resize(), TPZYCMohrCoulombPV::ReturnMapLeftEdge(), TPZYCMohrCoulombPV::ReturnMapRightEdge(), TPZCutHillMcKee::SGraph::RootedLevelStructure(), TPZTransfer< TVar >::SetBlocks(), TPZGenGrid::SetData(), TPZSBFemVolume::SetElementGroupIndex(), TPZCompElWithMem< TBASE >::SetFreeIntPtIndices(), TPZMultiphysicsInterfaceElement::SetLeftRightElementIndices(), TPZCompElWithMem< TBASE >::SetMemoryIndices(), TPZSubCompMesh::SetNumberRigidBodyModes(), TPZElasticity3D::SetPostProcessingDirection(), TPZPostProcMat::SetPostProcessVarIndexList(), TPZMHMeshControl::SetSubdomain(), pzshape::TPZShapePrism::Shape(), pzshape::TPZShapePiram::Shape(), TPZSBFemVolume::Shape(), TPZCompMesh::Skyline(), TPZMatElastoPlastic2D< T, TMEM >::Solution(), TPZCompElHDivPressure< TSHAPE >::Solution(), TPZCoupledTransportDarcy::Solution(), TPZMultiphysicsCompEl< TGeometry >::Solution(), TPZInterpolationSpace::Solution(), TPZSBFemVolume::Solution(), TPZPlasticTest::StrainTest(), TPZPlasticTest::StressTest(), TPZSpBlockDiagPivot< TVar >::Substitution2(), TPZAnalysis::ThreadData::ThreadWork(), TPZAdmChunkVector< TPZGeoEl *>::TPZAdmChunkVector(), TPZChunkVector< TPZGraphNode, 10 >::TPZChunkVector(), TPZCompElHDiv< TSHAPE >::TPZCompElHDiv(), TPZCompElHDivPressure< TSHAPE >::TPZCompElHDivPressure(), TPZCompElHDivPressureBound< TSHAPE >::TPZCompElHDivPressureBound(), TPZElasticity3D::TPZElasticity3D(), TPZGmshReader::TPZGmshReader(), TPZGradient::TPZGradient(), TPZMatElastoPlastic< T, TMEM >::TPZMatElastoPlastic(), TPZMaterialData::TPZMaterialData(), TPZMeshSolution::TPZMeshSolution(), TPZMultiphysicsCompMesh::TPZMultiphysicsCompMesh(), TPZMultiphysicsInterfaceElement::TPZMultiphysicsInterfaceElement(), TPZParFrontMatrix< TVar, store, front >::TPZParFrontMatrix(), TPZPostProcMat::TPZPostProcMat(), TPZNonLinMultGridAnalysis::UniformlyRefineMesh(), TPZBuildMultiphysicsMesh::UniformRefineCompEl(), TPZElementGroup::Unwrap(), TPZSparseBlockDiagonal< TVar >::UpdateFrom(), TPZParFrontMatrix< TVar, store, front >::WriteFile(), TPZStackEqnStorage< TVar >::Zero(), TPZFileEqnStorage< TVar >::Zero(), TPZIntRuleT::~TPZIntRuleT(), TPZIntRuleT3D::~TPZIntRuleT3D(), and TPZMultiphysicsCompMesh::~TPZMultiphysicsCompMesh().
|
virtual |
Resizes the vector object reallocating the storage if necessary.
newsize | Size of the vector. It copies the existing objects to the new storage. The new members are not initialized. |
Reimplemented from TPZVec< T >.
Definition at line 482 of file pzmanvector.h.
void TPZManVector< T, NumExtAlloc >::Shrink | ( | ) |
It reallocates storage to fit the necessary storage exactly.
Definition at line 388 of file pzmanvector.h.
Referenced by TPZSkylNSymMatrix< TVar >::Clear(), TPZAdmChunkVector< TPZGeoEl *>::CompactDataStructure(), TPZCutHillMcKee::SGraph::GetAdjacentNodes(), TPZManVector< TPZPostProcVar, 20 >::NAlloc(), TPZChunkVector< TPZGraphNode, 10 >::operator=(), TPZCutHillMcKee::Resequence(), TPZSloanRenumbering::Resequence(), and TPZSloanRenumbering::Resequence2().
|
private |
Pointer to the externally allocated space.
Definition at line 146 of file pzmanvector.h.
Referenced by TPZManVector< TPZPostProcVar, 20 >::Expand(), TPZManVector< TPZPostProcVar, 20 >::operator=(), TPZManVector< TPZPostProcVar, 20 >::Resize(), TPZManVector< TPZPostProcVar, 20 >::Shrink(), TPZManVector< TPZPostProcVar, 20 >::TPZManVector(), and TPZManVector< TPZPostProcVar, 20 >::~TPZManVector().
|
private |
Number of elements allocated for this object.
Definition at line 143 of file pzmanvector.h.
Referenced by TPZManVector< TPZPostProcVar, 20 >::Expand(), TPZManVector< TPZPostProcVar, 20 >::ExpandSize(), TPZManVector< TPZPostProcVar, 20 >::NAlloc(), TPZManVector< TPZPostProcVar, 20 >::operator=(), TPZManVector< TPZPostProcVar, 20 >::Resize(), TPZManVector< TPZPostProcVar, 20 >::Shrink(), TPZManVector< TPZPostProcVar, 20 >::TPZManVector(), and TPZManVector< TPZPostProcVar, 20 >::~TPZManVector().