MFEM  v4.1.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Attributes | List of all members
mfem::Mesh::GeometryList Class Reference

List of mesh geometries stored as Array<Geometry::Type>. More...

#include <mesh.hpp>

Inheritance diagram for mfem::Mesh::GeometryList:
[legend]
Collaboration diagram for mfem::Mesh::GeometryList:
[legend]

Public Member Functions

 GeometryList (Mesh &mesh)
 Construct a GeometryList of all element geometries in mesh. More...
 
 GeometryList (Mesh &mesh, int dim)
 Construct a GeometryList of all geometries of dimension dim in mesh. More...
 
- Public Member Functions inherited from mfem::Array< Geometry::Type >
 Array ()
 Creates an empty array. More...
 
 Array (MemoryType mt)
 Creates an empty array with a given MemoryType. More...
 
 Array (int asize)
 Creates array of asize elements. More...
 
 Array (Geometry::Type *_data, int asize)
 
 Array (const Array &src)
 Copy constructor: deep copy. More...
 
 Array (const Array< CT > &src)
 Copy constructor (deep copy) from an Array of convertable type. More...
 
 ~Array ()
 Destructor. More...
 
Array< Geometry::Type > & operator= (const Array< Geometry::Type > &src)
 Assignment operator: deep copy. More...
 
Arrayoperator= (const Array< CT > &src)
 Assignment operator (deep copy) from an Array of convertable type. More...
 
void operator= (const Geometry::Type &a)
 
 operator Geometry::Type * ()
 Return the data as 'T *'. More...
 
 operator const Geometry::Type * () const
 Return the data as 'const T *'. More...
 
Geometry::TypeGetData ()
 Returns the data. More...
 
const Geometry::TypeGetData () const
 Returns the data. More...
 
Memory< Geometry::Type > & GetMemory ()
 Return a reference to the Memory object used by the Array. More...
 
const Memory< Geometry::Type > & GetMemory () const
 Return a reference to the Memory object used by the Array, const version. More...
 
bool UseDevice () const
 Return the device flag of the Memory object used by the Array. More...
 
bool OwnsData () const
 Return true if the data will be deleted by the array. More...
 
void StealData (Geometry::Type **p)
 Changes the ownership of the data. More...
 
void LoseData ()
 NULL-ifies the data. More...
 
void MakeDataOwner () const
 Make the Array own the data. More...
 
int Size () const
 Logical size of the array. More...
 
void SetSize (int nsize)
 Change logical size of the array, keep existing entries. More...
 
void SetSize (int nsize, const Geometry::Type &initval)
 Same as SetSize(int) plus initialize new entries with 'initval'. More...
 
void SetSize (int nsize, MemoryType mt)
 Resize the array to size nsize using MemoryType mt. Note that unlike the other versions of SetSize(), the current content of the array is not preserved. More...
 
int Capacity () const
 
void Reserve (int capacity)
 Ensures that the allocated size is at least the given size. More...
 
Geometry::Typeoperator[] (int i)
 Access element. More...
 
const Geometry::Typeoperator[] (int i) const
 Access const element. More...
 
int Append (const Geometry::Type &el)
 Append element to array, resize if necessary. More...
 
int Append (const Geometry::Type *els, int nels)
 Append another array to this array, resize if necessary. More...
 
int Append (const Array< Geometry::Type > &els)
 Append another array to this array, resize if necessary. More...
 
int Prepend (const Geometry::Type &el)
 Prepend an element to the array, resize if necessary. More...
 
Geometry::TypeLast ()
 Return the last element in the array. More...
 
const Geometry::TypeLast () const
 
int Union (const Geometry::Type &el)
 Append element when it is not yet in the array, return index. More...
 
int Find (const Geometry::Type &el) const
 Return the first index where 'el' is found; return -1 if not found. More...
 
int FindSorted (const Geometry::Type &el) const
 Do bisection search for 'el' in a sorted array; return -1 if not found. More...
 
void DeleteLast ()
 Delete the last entry. More...
 
void DeleteFirst (const Geometry::Type &el)
 Delete the first 'el' entry. More...
 
void DeleteAll ()
 Delete whole array. More...
 
void Copy (Array &copy) const
 Create a copy of the current array. More...
 
void MakeRef (Geometry::Type *, int)
 Make this Array a reference to a pointer. More...
 
void MakeRef (const Array &master)
 Make this Array a reference to 'master'. More...
 
void GetSubArray (int offset, int sa_size, Array< Geometry::Type > &sa) const
 
void Print (std::ostream &out=mfem::out, int width=4) const
 Prints array to stream with width elements per row. More...
 
void Save (std::ostream &out, int fmt=0) const
 Save the Array to the stream out using the format fmt. The format fmt can be: More...
 
void Load (std::istream &in, int fmt=0)
 Read an Array from the stream in using format fmt. The format fmt can be: More...
 
void Load (int new_size, std::istream &in)
 Set the Array size to new_size and read that many entries from the stream in. More...
 
Geometry::Type Max () const
 Find the maximal element in the array, using the comparison operator < for class T. More...
 
Geometry::Type Min () const
 Find the minimal element in the array, using the comparison operator < for class T. More...
 
void Sort ()
 Sorts the array. This requires operator< to be defined for T. More...
 
void Sort (Compare cmp)
 Sorts the array using the supplied comparison function object. More...
 
void Unique ()
 
int IsSorted ()
 return true if the array is sorted. More...
 
void PartialSum ()
 Partial Sum. More...
 
Geometry::Type Sum ()
 Sum all entries. More...
 
void Assign (const Geometry::Type *)
 Copy data from a pointer. Size() elements are copied. More...
 
void CopyTo (U *dest)
 
void CopyFrom (const U *src)
 
Geometry::Typebegin ()
 
const Geometry::Typebegin () const
 
Geometry::Typeend ()
 
const Geometry::Typeend () const
 
long MemoryUsage () const
 
const Geometry::TypeRead (bool on_dev=true) const
 Shortcut for mfem::Read(a.GetMemory(), a.Size(), on_dev). More...
 
const Geometry::TypeHostRead () const
 Shortcut for mfem::Read(a.GetMemory(), a.Size(), false). More...
 
Geometry::TypeWrite (bool on_dev=true)
 Shortcut for mfem::Write(a.GetMemory(), a.Size(), on_dev). More...
 
Geometry::TypeHostWrite ()
 Shortcut for mfem::Write(a.GetMemory(), a.Size(), false). More...
 
Geometry::TypeReadWrite (bool on_dev=true)
 Shortcut for mfem::ReadWrite(a.GetMemory(), a.Size(), on_dev). More...
 
Geometry::TypeHostReadWrite ()
 Shortcut for mfem::ReadWrite(a.GetMemory(), a.Size(), false). More...
 

Protected Attributes

Geometry::Type geom_buf [Geometry::NumGeom]
 
- Protected Attributes inherited from mfem::Array< Geometry::Type >
Memory< Geometry::Typedata
 Pointer to data. More...
 
int size
 Size of the array. More...
 

Additional Inherited Members

- Protected Member Functions inherited from mfem::Array< Geometry::Type >
void GrowSize (int minsize)
 

Detailed Description

List of mesh geometries stored as Array<Geometry::Type>.

Definition at line 817 of file mesh.hpp.

Constructor & Destructor Documentation

mfem::Mesh::GeometryList::GeometryList ( Mesh mesh)
inline

Construct a GeometryList of all element geometries in mesh.

Definition at line 823 of file mesh.hpp.

mfem::Mesh::GeometryList::GeometryList ( Mesh mesh,
int  dim 
)
inline

Construct a GeometryList of all geometries of dimension dim in mesh.

Definition at line 828 of file mesh.hpp.

Member Data Documentation

Geometry::Type mfem::Mesh::GeometryList::geom_buf[Geometry::NumGeom]
protected

Definition at line 820 of file mesh.hpp.


The documentation for this class was generated from the following file: