|
MFEM v2.0
|
#include <array.hpp>


Public Member Functions | |
| Array (int asize=0, int ainc=0) | |
| Creates array of asize elements. | |
| Array (T *_data, int asize, int ainc=0) | |
| ~Array () | |
| Destructor. | |
| operator T * () | |
| Return the data as 'T *'. | |
| operator const T * () const | |
| Return the data as 'const T *'. | |
| T * | GetData () |
| Returns the data. | |
| void | StealData (T **p) |
| Changes the ownership of the the data. | |
| void | LoseData () |
| NULL-ifies the data. | |
| void | MakeDataOwner () |
| Make the Array own the data. | |
| int | Size () const |
| Logical size of the array. | |
| void | SetSize (int nsize) |
| Change logical size of the array, keep existing entries. | |
| T & | operator[] (int i) |
| Access element. | |
| const T & | operator[] (int i) const |
| Access const element. | |
| int | Append (const T &el) |
| Append element to array, resize if necessary. | |
| int | Append (const Array< T > &els) |
| Append another array to this array, resize if necessary. | |
| int | Prepend (const T &el) |
| Prepend an element to the array, resize if necessary. | |
| T & | Last () |
| Return the last element in the array. | |
| int | Union (const T &el) |
| Append element when it is not yet in the array, return index. | |
| int | Find (const T &el) const |
| Return the first index where 'el' is found; return -1 if not found. | |
| void | DeleteLast () |
| Delete the last entry. | |
| void | DeleteFirst (const T &el) |
| Delete the first 'el' entry. | |
| void | DeleteAll () |
| Delete whole array. | |
| void | Copy (Array ©) const |
| Create a copy of the current array. | |
| void | MakeRef (const Array &master) |
| Make this Array a reference to 'master'. | |
| void | GetSubArray (int offset, int sa_size, Array< T > &sa) |
| void | Print (ostream &out, int width) |
| Prints array to stream with width elements per row. | |
| void | Save (ostream &out) |
| Prints array to stream out. | |
| T | Max () const |
| void | Sort () |
| Sorts the array. | |
| void | operator= (const T &a) |
Private Member Functions | |
| Array< T > & | operator= (Array< T > &) |
| Array copy is not supported. | |
| Array (const Array< T > &) | |
| Array copy is not supported. | |
Friends | |
| void | Swap (Array< T > &, Array< T > &) |
Abstract data type Array.
Array<T> is an automatically increasing array containing elements of the generic type T. The allocated size may be larger then the logical size of the array. The elements can be accessed by the [] operator, the range is 0 to size-1.
| int Array< T >::Append | ( | const T & | el | ) | [inline] |
Append element to array, resize if necessary.
Definition at line 293 of file array.hpp.
Referenced by LinearForm::AddBdrFaceIntegrator(), BilinearForm::AddBdrFaceIntegrator(), LinearForm::AddBoundaryIntegrator(), MixedBilinearForm::AddBoundaryIntegrator(), BilinearForm::AddBoundaryIntegrator(), LinearForm::AddDomainIntegrator(), MixedBilinearForm::AddDomainIntegrator(), BilinearForm::AddDomainIntegrator(), BilinearForm::AddInteriorFaceIntegrator(), BilinearForm::Assemble(), Mesh::Bisection(), FiniteElementSpace::ConstructRefinementData(), ListOfIntegerSets::Insert(), Mesh::LocalRefinement(), Mesh::Mesh(), and Mesh::UniformRefinement().
Append another array to this array, resize if necessary.
Definition at line 301 of file array.hpp.
References Array< T >::Size().
Create a copy of the current array.
Definition at line 140 of file array.hpp.
Referenced by NURBSExtension::NURBSExtension(), RestrictedCoefficient::RestrictedCoefficient(), NURBSPatch::swap(), NURBSPatch::SwapDirections(), and VectorRestrictedCoefficient::VectorRestrictedCoefficient().
| void Array< T >::DeleteAll | ( | ) | [inline] |
Delete whole array.
Definition at line 366 of file array.hpp.
Referenced by FiniteElementSpace::Destructor(), Mesh::Load(), and Mesh::SetState().
| void Array< T >::DeleteFirst | ( | const T & | el | ) | [inline] |
| void Array< T >::DeleteLast | ( | ) | [inline] |
| int Array< T >::Find | ( | const T & | el | ) | const [inline] |
| T* Array< T >::GetData | ( | ) | [inline] |
Returns the data.
Definition at line 88 of file array.hpp.
Referenced by ListOfIntegerSets::AsTable(), and Array< BilinearFormIntegrator * >::Copy().
| void Array< T >::GetSubArray | ( | int | offset, |
| int | sa_size, | ||
| Array< T > & | sa | ||
| ) | [inline] |
Definition at line 386 of file array.hpp.
References Array< T >::SetSize().
Referenced by FiniteElementSpace::GlobalRestrictionMatrix().
| T & Array< T >::Last | ( | ) | [inline] |
Return the last element in the array.
Definition at line 324 of file array.hpp.
References mfem_error().
Referenced by Interpolate(), and Revolve3D().
| void Array< T >::LoseData | ( | ) | [inline] |
NULL-ifies the data.
Definition at line 95 of file array.hpp.
Referenced by ParFiniteElementSpace::LoseDofOffsets(), and ParFiniteElementSpace::LoseTrueDofOffsets().
| void Array< T >::MakeDataOwner | ( | ) | [inline] |
Make this Array a reference to 'master'.
Definition at line 375 of file array.hpp.
References BaseArray::allocsize, BaseArray::data, BaseArray::inc, and BaseArray::size.
| T Array< T >::Max | ( | ) | const |
Finds the maximal element in the array. (uses the comparison operator '<' for class T)
Definition at line 77 of file array.cpp.
References mfem_error().
Referenced by main(), and Transpose().
| Array< T >::operator const T * | ( | ) | const [inline] |
| Array< T >::operator T * | ( | ) | [inline] |
| void Array< T >::operator= | ( | const T & | a | ) | [inline] |
Array copy is not supported.
| T & Array< T >::operator[] | ( | int | i | ) | [inline] |
| const T & Array< T >::operator[] | ( | int | i | ) | const [inline] |
| int Array< T >::Prepend | ( | const T & | el | ) | [inline] |
| void Array< T >::Print | ( | ostream & | out, |
| int | width | ||
| ) |
Prints array to stream with width elements per row.
Definition at line 56 of file array.cpp.
Referenced by NURBSExtension::Print(), NURBSPatch::Print(), and NURBSExtension::PrintCharacteristics().
| void Array< T >::Save | ( | ostream & | out | ) |
| void Array< T >::SetSize | ( | int | nsize | ) | [inline] |
Change logical size of the array, keep existing entries.
Definition at line 255 of file array.hpp.
References mfem_error().
Referenced by BilinearForm::BilinearForm(), FiniteElementSpace::BuildDofToArrays(), Poly_1D::ClosedBasis(), Poly_1D::ClosedPoints(), ComputeFlux(), Array< BilinearFormIntegrator * >::Copy(), IntegrationRules::CubeIntegrationRules(), FiniteElementSpace::DofsToVDofs(), FindPartitioningComponents(), NURBSExtension::Generate2DBdrElementDofTable(), NURBSExtension::Generate2DElementDofTable(), NURBSExtension::Generate3DBdrElementDofTable(), NURBSExtension::Generate3DElementDofTable(), NURBSExtension::GenerateActiveBdrElems(), NURBSExtension::GenerateActiveVertices(), Mesh::GenerateBoundaryElements(), NURBSExtension::GenerateElementDofTable(), Mesh::GenerateFaces(), NURBSExtension::GenerateOffsets(), NURBSExtension::Get2DPatchNets(), NURBSExtension::Get3DPatchNets(), FiniteElementSpace::GetBdrElementDofs(), Mesh::GetBdrElementEdges(), NURBSExtension::GetBdrElementTopo(), NURBSPatchMap::GetBdrPatchKnotVectors(), NURBSExtension::GetBdrPatchKnotVectors(), FiniteElementSpace::GetEdgeDofs(), FiniteElementSpace::GetEdgeInteriorDofs(), Mesh::GetElementColoring(), FiniteElementSpace::GetElementDofs(), Mesh::GetElementEdges(), Mesh::GetElementFaces(), FiniteElementSpace::GetElementInteriorDofs(), NURBSExtension::GetElementLocalToGlobal(), Mesh::GetElementToEdgeTable(), Mesh::GetElementToFaceTable(), NURBSExtension::GetElementTopo(), FiniteElementSpace::GetEssentialVDofs(), FiniteElementSpace::GetFaceDofs(), Mesh::GetFaceEdges(), GridFunction::GetNodalValues(), NURBSExtension::GetPatchKnotVectors(), Table::GetRow(), Array< T >::GetSubArray(), NURBSExtension::GetVertexLocalToGlobal(), Triangle::GetVertices(), Tetrahedron::GetVertices(), Segment::GetVertices(), Quadrilateral::GetVertices(), Point::GetVertices(), Hexahedron::GetVertices(), Mesh::HexUniformRefinement(), Mesh::Load(), Mesh::LoadPatchTopo(), FiniteElementSpace::LocalInterpolation(), Mesh::LocalRefinement(), MatrixArrayCoefficient::MatrixArrayCoefficient(), Mesh::Mesh(), NURBSExtension::NURBSExtension(), NURBSFiniteElement::NURBSFiniteElement(), NURBSPatch::NURBSPatch(), Poly_1D::OpenBasis(), Poly_1D::OpenPoints(), IntegrationRules::PointIntegrationRules(), Mesh::PrintVTK(), Mesh::QuadUniformRefinement(), IntegerSet::Recreate(), IntegrationRules::SegmentIntegrationRules(), IntegrationRules::Set(), Mesh::SetAttributes(), NURBSExtension::SetCoordsFromPatches(), NURBSExtension::SetKnotsFromPatches(), IntegrationRules::SquareIntegrationRules(), NURBSPatch::swap(), IntegrationRules::TetrahedronIntegrationRules(), IntegrationRules::TriangleIntegrationRules(), and Mesh::UpdateNURBS().
| int Array< T >::Size | ( | ) | const [inline] |
Logical size of the array.
Definition at line 101 of file array.hpp.
Referenced by Vector::AddElementVector(), SparseMatrix::AddRow(), SparseMatrix::AddSubMatrix(), DenseMatrix::AdjustDofDirection(), FiniteElementSpace::AdjustVDofs(), Array< T >::Append(), LinearForm::Assemble(), DiscreteLinearOperator::Assemble(), MixedBilinearForm::Assemble(), BilinearForm::Assemble(), ListOfIntegerSets::AsTable(), BilinearForm::BilinearForm(), FiniteElementSpace::BuildDofToArrays(), FiniteElementSpace::BuildElementToDofTable(), NURBSExtension::CheckBdrPatches(), Mesh::CheckDisplacements(), Mesh::CheckPartitioning(), NURBSExtension::CheckPatches(), Poly_1D::ClosedBasis(), Poly_1D::ClosedPoints(), BilinearForm::ComputeElementMatrices(), BilinearForm::ComputeElementMatrix(), ComputeFlux(), FiniteElementSpace::ConstructRefinementData(), NURBSExtension::ConvertToPatches(), IntegrationRules::CubeIntegrationRules(), FiniteElementSpace::D2C_GlobalRestrictionMatrix(), FiniteElementSpace::D2Const_GlobalRestrictionMatrix(), NURBSExtension::DegreeElevate(), NURBSPatch::DegreeElevate(), IntegrationRules::DeleteIntRuleArray(), FiniteElementSpace::DofsToVDofs(), Mesh::ElementToElementTable(), BilinearForm::EliminateEssentialBC(), BilinearForm::EliminateEssentialBCFromDofs(), FiniteElementSpace::EliminateEssentialBCFromGRM(), MixedBilinearForm::EliminateTestDofs(), MixedBilinearForm::EliminateTrialDofs(), BilinearForm::EliminateVDofs(), Mesh::GenerateBoundaryElements(), Mesh::GenerateFaces(), IntegrationRules::Get(), FiniteElementSpace::GetBdrElementDofs(), Mesh::GetBdrElementTransformation(), Mesh::GetEdgeVertices(), Mesh::GetElementArrayEdgeTable(), GridFunction::GetElementAverages(), FiniteElementSpace::GetElementDofs(), Mesh::GetElementFaces(), Mesh::GetElementTransformation(), FiniteElementSpace::GetEssentialVDofs(), FiniteElementSpace::GetFaceDofs(), Mesh::GetFaceEdgeTable(), GridFunction::GetNodalValues(), GroupTopology::GetNumNeighbors(), SparseMatrix::GetSubMatrix(), Vector::GetSubVector(), GridFunction::GetValue(), Mesh::GetVertices(), FiniteElementSpace::GlobalRestrictionMatrix(), NURBSExtension::HavePatches(), NURBSPatch::init(), ListOfIntegerSets::Insert(), IntegerSet::IntegerSet(), Interpolate(), NURBSExtension::KnotInsert(), NURBSPatch::KnotInsert(), Mesh::KnotInsert(), Mesh::Load(), FiniteElementSpace::LocalInterpolation(), Mesh::LocalRefinement(), ListOfIntegerSets::Lookup(), NURBSPatch::MakeUniformDegree(), Mesh::MoveVertices(), NURBSExtension::NURBSExtension(), NURBSPatch::NURBSPatch(), Poly_1D::OpenBasis(), Poly_1D::OpenPoints(), IntegerSet::operator==(), SparseMatrix::PartMult(), IntegerSet::PickRandomElement(), NURBSPatch::Print(), Mesh::PrintVTK(), Mesh::PrintXG(), GridFunction::ProjectCoefficient(), Revolve3D(), NURBSPatch::Rotate3D(), GridFunction::SaveSTL(), Mesh::ScaleElements(), Mesh::ScaleSubdomains(), IntegrationRules::SegmentIntegrationRules(), IntegrationRules::Set(), Mesh::SetAttributes(), NURBSPatchMap::SetBdrPatchDofMap(), NURBSPatchMap::SetBdrPatchVertexMap(), NURBSExtension::SetCoordsFromPatches(), NURBSExtension::SetKnotsFromPatches(), NURBSPatchMap::SetPatchDofMap(), NURBSPatchMap::SetPatchVertexMap(), SparseMatrix::SetSubMatrix(), SparseMatrix::SetSubMatrixTranspose(), Vector::SetSubVector(), Mesh::SetVertices(), ListOfIntegerSets::Size(), IntegerSet::Size(), IntegrationRules::SquareIntegrationRules(), NURBSPatch::swap(), IntegrationRules::TetrahedronIntegrationRules(), Mesh::Transform(), Transpose(), NURBSExtension::UniformRefinement(), NURBSPatch::UniformRefinement(), Mesh::UniformRefinement(), Mesh::UpdateNURBS(), ZZErrorEstimator(), BilinearForm::~BilinearForm(), FiniteElementSpace::~FiniteElementSpace(), LinearForm::~LinearForm(), ListOfIntegerSets::~ListOfIntegerSets(), Mesh::~Mesh(), MixedBilinearForm::~MixedBilinearForm(), NURBSExtension::~NURBSExtension(), NURBSPatch::~NURBSPatch(), and Poly_1D::~Poly_1D().
| void Array< T >::Sort | ( | ) |
Sorts the array.
Definition at line 101 of file array.cpp.
Referenced by IntegerSet::Recreate(), and Mesh::SetAttributes().
| void Array< T >::StealData | ( | T ** | p | ) | [inline] |
| int Array< T >::Union | ( | const T & | el | ) | [inline] |
Append element when it is not yet in the array, return index.
Definition at line 334 of file array.hpp.
Referenced by FiniteElementSpace::ConstructRefinementData().
1.7.4