WARPXM v1.10.0
Loading...
Searching...
No Matches
wxm::dfem::array::UniquePatchArray Class Reference

The UniquePatchArray class defines a dataset associated with a patch of the domain which has a single value This class will be used for discontinuous FEM methods. More...

#include <unique_patch_array.h>

Inheritance diagram for wxm::dfem::array::UniquePatchArray:
wxm::array::patch_array_t wxm::array::array_allocation_t< real >

Detailed Description

The UniquePatchArray class defines a dataset associated with a patch of the domain which has a single value This class will be used for discontinuous FEM methods.

Public Member Functions

 UniquePatchArray (const WmUnstructuredPatch &patch, const WxRange &element_range)
 Constructor for UniquePatchArray.
 
 UniquePatchArray (const UniquePatchArray &other)
 Copy Constructor.
 
virtual ~UniquePatchArray ()
 Virtual Destructor.
 
const WmUnstructuredPatchpatch () const
 Get the patch this array is setup for.
 
virtual void dump (WxIoBase &io, WxIoNodeType &group_node) const
 Write out the array to file.
 
virtual void load (WxIoBase &io, const WxIoNodeType &group_nodes)
 Load object from file.
 
const WxRangeelement_range () const
 Get the range of data associated with each mesh element.
 
realoperator[] (int index) override
 Return data at index 0 This overrides default behavior to take index 0 because size should be 1.
 
const realoperator[] (int index) const override
 Return data at index 0 This overrides default behavior to take index 0 because size should be 1.
 
- Public Member Functions inherited from wxm::array::patch_array_t
 patch_array_t ()=default
 Default Constructor.
 
 patch_array_t (const WxRange &range)
 Allocate the array for a given range.
 
 patch_array_t (const patch_array_t &other)=default
 Copy Constructor.
 
virtual ~patch_array_t ()
 Destructor.
 
patch_array_toperator= (const patch_array_t &other)
 Assignment operator - makes a shallow copy.
 
const WxRangeinterior_range () const
 Returns range of interior of dataset.
 
- Public Member Functions inherited from wxm::array::array_allocation_t< real >
 array_allocation_t ()=default
 Default Constructor.
 
 array_allocation_t (const WxRange &range)
 Allocate the array for a given range.
 
 array_allocation_t (const array_allocation_t &other)=default
 Copy Constructor.
 
virtual ~array_allocation_t ()
 Destructor.
 
array_allocation_toperator= (const array_allocation_t &other)
 Assignment operator - makes a shallow copy.
 
void fill (const real &value)
 Fill array with a value.
 
realdata ()
 Access the underlying data array.
 
const realdata () const
 
virtual realoperator[] (int index)
 
virtual const realoperator[] (int index) const
 
realoperator() (size_t i, size_t j)
 2D array access
 
const realoperator() (size_t i, size_t j) const
 2D array access
 
const realoperator() (size_t i, size_t j, size_t k) const
 3D array access
 
realoperator() (size_t i, size_t j, size_t k)
 3D array access
 
const WxRangerange () const
 

Protected Attributes

const WmUnstructuredPatch_patch
 Patch associated with array.
 
WxRange _element_range
 Range describing each element.
 
WxRange _global_range
 Range describing global dataset in subdomain - used for data io.
 
WxRange _local_range
 Range describing local dataset in subdomain - used for data io.
 
- Protected Attributes inherited from wxm::array::patch_array_t
WxRange _interior_range
 Range describing interior range of dataset.
 
- Protected Attributes inherited from wxm::array::array_allocation_t< real >
WxRange _range
 Range of data.
 
std::shared_ptr< std::vector< real > > _data
 Shared pointer containing data.
 

Friends

std::ostream & operator<< (std::ostream &stream, const wxm::dfem::array::UniquePatchArray &array)
 

Additional Inherited Members

- Protected Member Functions inherited from wxm::array::array_allocation_t< real >
void copy (const array_allocation_t &other)
 
void link (const array_allocation_t &other)
 
void allocate ()
 
void terminate ()
 

Constructor & Destructor Documentation

◆ UniquePatchArray() [1/2]

wxm::dfem::array::UniquePatchArray::UniquePatchArray ( const WmUnstructuredPatch patch,
const WxRange element_range 
)

Constructor for UniquePatchArray.

Parameters
patchPatch associated with dataset
element_rangeRange of data defined for each element

◆ UniquePatchArray() [2/2]

wxm::dfem::array::UniquePatchArray::UniquePatchArray ( const UniquePatchArray other)

Copy Constructor.

◆ ~UniquePatchArray()

virtual wxm::dfem::array::UniquePatchArray::~UniquePatchArray ( )
virtual

Virtual Destructor.

Member Function Documentation

◆ dump()

virtual void wxm::dfem::array::UniquePatchArray::dump ( WxIoBase io,
WxIoNodeType group_node 
) const
virtual

Write out the array to file.

Parameters
ioI/O object to use for writing
group_nodegroup node to write to

◆ element_range()

const WxRange & wxm::dfem::array::UniquePatchArray::element_range ( ) const
inline

Get the range of data associated with each mesh element.

Returns
Element range

◆ load()

virtual void wxm::dfem::array::UniquePatchArray::load ( WxIoBase io,
const WxIoNodeType group_nodes 
)
virtual

Load object from file.

This method is passed a group node from which its data should be read and then constructed.

Parameters
ioI/O object to use for writing
group_nodesgroup nodes to read from

◆ operator[]() [1/2]

const real & wxm::dfem::array::UniquePatchArray::operator[] ( int  index) const
inlineoverridevirtual

Return data at index 0 This overrides default behavior to take index 0 because size should be 1.

Returns
data[0]

Reimplemented from wxm::array::array_allocation_t< real >.

◆ operator[]() [2/2]

real & wxm::dfem::array::UniquePatchArray::operator[] ( int  index)
inlineoverridevirtual

Return data at index 0 This overrides default behavior to take index 0 because size should be 1.

Returns
data[0]

Reimplemented from wxm::array::array_allocation_t< real >.

◆ patch()

const WmUnstructuredPatch & wxm::dfem::array::UniquePatchArray::patch ( ) const
inline

Get the patch this array is setup for.

Returns
Patch

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  stream,
const wxm::dfem::array::UniquePatchArray array 
)
friend

Member Data Documentation

◆ _element_range

WxRange wxm::dfem::array::UniquePatchArray::_element_range
protected

Range describing each element.

◆ _global_range

WxRange wxm::dfem::array::UniquePatchArray::_global_range
protected

Range describing global dataset in subdomain - used for data io.

◆ _local_range

WxRange wxm::dfem::array::UniquePatchArray::_local_range
protected

Range describing local dataset in subdomain - used for data io.

◆ _patch

const WmUnstructuredPatch& wxm::dfem::array::UniquePatchArray::_patch
protected

Patch associated with array.


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