WARPXM v1.10.0
Loading...
Searching...
No Matches
WmUnstructuredPatchLink Class Reference

The WmUnstructuredPatchLink class is used to define the elements to pull from another patch. More...

#include <wmunstructuredpatch.h>

Detailed Description

The WmUnstructuredPatchLink class is used to define the elements to pull from another patch.

This link can either specify a link between two existing patches From patch: linked patch To patch: host patch

or a link between an existing patch (to) and a virtual patch (from - i.e. boundary condition)

Public Member Functions

 WmUnstructuredPatchLink (const WmUnstructuredPatch &to_patch, int from_patch_index, const std::string &from_patch_name, const std::vector< int > &num_linked_elements_per_layer)
 Constructor.
 
 ~WmUnstructuredPatchLink ()
 Destructor.
 
void setLinkedIndexes (const int *fromIndexes, const int *toIndexes)
 Set the to and from indexes for the link.
 
bool isShared () const
 Is the boundary shared between two existing patches.
 
const WmUnstructuredPatchfrom_patch () const
 Get the patch to transfer data from.
 
const WmUnstructuredPatchto_patch () const
 Get the patch to transfer data to.
 
const std::vector< int > & from_indexes () const
 Get the transfer element indexes to pull from in the From Patch.
 
const std::vector< int > & to_indexes () const
 Get the transfer element indexes to push to in the To Patch.
 
const WmUnstructuredPatchLinkinverse () const
 If patch A is connected to B by this link, the B is connected to A by the inverse link.
 
const std::string & getLinkedSubdomainName () const
 
int getNumElements () const
 
const std::vector< int > & getNumElementsPerLayer () const
 
const int * getLinkedIndexes () const
 
const int * getIndexes () const
 
const WmUnstructuredPatchgetHostPatch () const
 
const WmUnstructuredPatchgetLinkedPatch () const
 
int numBoundaryFaces () const
 

Protected Attributes

const WmUnstructuredPatch_to_patch
 The host (to) patch for the link (must exist)
 
const WmUnstructuredPatch_from_patch
 The linked (from) patch.
 
bool _sharedBoundary
 Is a shared boundary between two existing patches.
 
std::string _from_patch_name
 The linked (from) name - used if this is a boundary condition.
 
int _from_patch_index
 The linked (from) patch index.
 
std::vector< int > _numElementsPerLayer
 Number of elements in each element layer.
 
int _numElements
 Number of elements in the link.
 
std::vector< int > _from_indexes
 Indexes in the from patch to pull from.
 
std::vector< int > _to_indexes
 Indexes in the to patch (host) to push to.
 

Constructor & Destructor Documentation

◆ WmUnstructuredPatchLink()

WmUnstructuredPatchLink::WmUnstructuredPatchLink ( const WmUnstructuredPatch to_patch,
int  from_patch_index,
const std::string &  from_patch_name,
const std::vector< int > &  num_linked_elements_per_layer 
)

Constructor.

Parameters
to_patchHost patch where the data will be transfered to
from_patch_indexPatch from which to take data
from_patch_nameName of patch to take data from
num_linked_elements_per_layerNumber of elements in each element layer of the link

◆ ~WmUnstructuredPatchLink()

WmUnstructuredPatchLink::~WmUnstructuredPatchLink ( )

Destructor.

Member Function Documentation

◆ from_indexes()

const std::vector< int > & WmUnstructuredPatchLink::from_indexes ( ) const
inline

Get the transfer element indexes to pull from in the From Patch.

Returns
List of transfer element indexes

◆ from_patch()

const WmUnstructuredPatch & WmUnstructuredPatchLink::from_patch ( ) const
inline

Get the patch to transfer data from.

Returns
From Patch

◆ getHostPatch()

const WmUnstructuredPatch * WmUnstructuredPatchLink::getHostPatch ( ) const
inline

◆ getIndexes()

const int * WmUnstructuredPatchLink::getIndexes ( ) const
inline

◆ getLinkedIndexes()

const int * WmUnstructuredPatchLink::getLinkedIndexes ( ) const
inline

◆ getLinkedPatch()

const WmUnstructuredPatch * WmUnstructuredPatchLink::getLinkedPatch ( ) const
inline

◆ getLinkedSubdomainName()

const std::string & WmUnstructuredPatchLink::getLinkedSubdomainName ( ) const

◆ getNumElements()

int WmUnstructuredPatchLink::getNumElements ( ) const
inline

◆ getNumElementsPerLayer()

const std::vector< int > & WmUnstructuredPatchLink::getNumElementsPerLayer ( ) const
inline

◆ inverse()

const WmUnstructuredPatchLink & WmUnstructuredPatchLink::inverse ( ) const

If patch A is connected to B by this link, the B is connected to A by the inverse link.

Returns
Link from To Patch to From Patch

◆ isShared()

bool WmUnstructuredPatchLink::isShared ( ) const
inline

Is the boundary shared between two existing patches.

Returns
True if both patches exist (i.e. not a boundary condition)

◆ numBoundaryFaces()

int WmUnstructuredPatchLink::numBoundaryFaces ( ) const
inline

◆ setLinkedIndexes()

void WmUnstructuredPatchLink::setLinkedIndexes ( const int *  fromIndexes,
const int *  toIndexes 
)

Set the to and from indexes for the link.

Parameters
fromIndexesElement indexes to pull from (in from patch)
toIndexesElement indexes to push to (in to patch)

◆ to_indexes()

const std::vector< int > & WmUnstructuredPatchLink::to_indexes ( ) const
inline

Get the transfer element indexes to push to in the To Patch.

Returns
List of transfer element indexes

◆ to_patch()

const WmUnstructuredPatch & WmUnstructuredPatchLink::to_patch ( ) const
inline

Get the patch to transfer data to.

Returns
To Patch

Member Data Documentation

◆ _from_indexes

std::vector<int> WmUnstructuredPatchLink::_from_indexes
protected

Indexes in the from patch to pull from.

◆ _from_patch

const WmUnstructuredPatch* WmUnstructuredPatchLink::_from_patch
protected

The linked (from) patch.

◆ _from_patch_index

int WmUnstructuredPatchLink::_from_patch_index
protected

The linked (from) patch index.

◆ _from_patch_name

std::string WmUnstructuredPatchLink::_from_patch_name
protected

The linked (from) name - used if this is a boundary condition.

◆ _numElements

int WmUnstructuredPatchLink::_numElements
protected

Number of elements in the link.

◆ _numElementsPerLayer

std::vector<int> WmUnstructuredPatchLink::_numElementsPerLayer
protected

Number of elements in each element layer.

◆ _sharedBoundary

bool WmUnstructuredPatchLink::_sharedBoundary
protected

Is a shared boundary between two existing patches.

◆ _to_indexes

std::vector<int> WmUnstructuredPatchLink::_to_indexes
protected

Indexes in the to patch (host) to push to.

◆ _to_patch

const WmUnstructuredPatch& WmUnstructuredPatchLink::_to_patch
protected

The host (to) patch for the link (must exist)


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