WARPXM v1.10.0
Loading...
Searching...
No Matches
wxm::variable::distributed_variable_t Class Referenceabstract

Defines an interface for variables that exits over distributed memory. More...

#include <distributed_variable.h>

Inheritance diagram for wxm::variable::distributed_variable_t:
wxm::variable::variable_t WxObject wxm::dfem::variable::UniqueDistributedVariable wxm::dfem::variable::distributed_variable_t

Detailed Description

Defines an interface for variables that exits over distributed memory.

Public Member Functions

virtual void setup (const WxCryptSet &wxc)
 Setup the distributed variable.
 
const std::vector< std::string > & subdomain_names () const
 Get a list of subdomains on which this distributed variable exists.
 
bool on_subdomain (const std::string &subdomain_name) const
 Check if this distributed variable exists on a given subdomain.
 
virtual wxm::array::patch_array_tpatch_array (const int component_index, const int patch_index)=0
 Aquire a patch array for a specified component.
 
virtual const wxm::array::patch_array_tpatch_array (const int component_index, const int patch_index) const =0
 Aquire a patch array for a specified component.
 
virtual bool has_patch_array (const int component_index, const int patch_index) const =0
 Query if the patch (or component) exist for a variable.
 
virtual void load_subdomain_data (WxIoBase &io, int component_index, const std::string &subdomain, WxIoNodeType comp_group)=0
 Loads data from file into a particular component/subdomain section.
 
- Public Member Functions inherited from wxm::variable::variable_t
virtual ~variable_t ()
 Destroy object.
 
virtual void setup (const WxCryptSet &wxc)
 Setup object using supplied crypset.
 
virtual void fill (const std::vector< real > &values)=0
 For each component, apply a fill value throughout the domain.
 
virtual void swap (variable_t &other)=0
 Swap the internal data storage of this variable with otherVar leaving the outer shell the same, given both have same size and properties.
 
virtual bool check_compatible (const variable_t &other) const =0
 Compares this variable to another supplied variable_t and report if they are swap compatible.
 
virtual void dump (WxIoBase &io, WxIoNodeType &group_node) const
 Dump object to file.
 
virtual void load (WxIoBase &io, const WxIoNodeType &group_node)
 Load object from file.
 
bool has_component (const std::string &component_name) const
 Check if this variable has a component matching the name supplied.
 
int num_components () const
 Returns number of components represented in the variable.
 
const std::vector< std::string > & component_names () const
 Get names of all components.
 
int component_index (const std::string &component_name) const
 Returns the component number associated with the componentName.
 
const std::string & component_name (const int component_index) const
 Returns the component name for a given index.
 
const WmSolverBaseget_parent () const
 Get the parent solver.
 
- Public Member Functions inherited from WxObject
virtual ~WxObject ()
 Dtor: destroy object.
 
void setIo (WxIoBase &io)
 Set the I/O pointer for use in object.
 
void setMsg (WxMsgBase &msg)
 Set the msg pointer for use in object.
 
WxIoBasegetIo ()
 Return reference to I/O object.
 
const WxIoBasegetIo () const
 Return constant reference to I/O object.
 
WxMsgBasegetMsg ()
 Return reference to msg object.
 
const WxMsgBasegetMsg () const
 Return const reference to msg object.
 
virtual void setup (const WxCryptSet &wxc)
 Setup object using supplied crypset.
 
virtual void init ()
 Initialize the object.
 
virtual void finishBuild ()
 Finish building the object.
 
virtual void load (WxIoBase &io, const WxIoNodeType &grpNode)
 Load object from file.
 
virtual void dump (WxIoBase &io, WxIoNodeType &grpNode) const
 Dump object to file.
 
virtual std::string name () const
 Get name of object.
 
void setName (const std::string &nm)
 Set object's name.
 

Protected Member Functions

 distributed_variable_t (const WmConstOpaquePtr &parent_solver)
 Forces the distributed variable to be a base class.
 
- Protected Member Functions inherited from wxm::variable::variable_t
 variable_t (const WmConstOpaquePtr &parent_solver)
 Constructor sets up basic variable container, but no properties or specifics.
 
- Protected Member Functions inherited from WxObject
 WxObject ()
 Create object, that will be initialized subsequently.
 
 WxObject (const std::string &name)
 Create object with given name bypassing object setup phase Protected because there is no reason to have a WxObject directly, as it is meant to be a parent class.
 

Protected Attributes

std::vector< std::string > _subdomain_names
 List of subdomains on which this distributed variable exists.
 
std::vector< std::string > _virtual_subdomains
 List of subdomains on which this distributed variable exists.
 
- Protected Attributes inherited from wxm::variable::variable_t
std::vector< std::string > _component_names
 List of component names in order.
 

Constructor & Destructor Documentation

◆ distributed_variable_t()

wxm::variable::distributed_variable_t::distributed_variable_t ( const WmConstOpaquePtr parent_solver)
protected

Forces the distributed variable to be a base class.

Member Function Documentation

◆ has_patch_array()

virtual bool wxm::variable::distributed_variable_t::has_patch_array ( const int  component_index,
const int  patch_index 
) const
pure virtual

Query if the patch (or component) exist for a variable.

Parameters
component_indexComponent of interest
patch_indexPatch of interest
Returns
True if variable exists on patch

Implemented in wxm::dfem::variable::distributed_variable_t, and wxm::dfem::variable::UniqueDistributedVariable.

◆ load_subdomain_data()

virtual void wxm::variable::distributed_variable_t::load_subdomain_data ( WxIoBase io,
int  component_index,
const std::string &  subdomain,
WxIoNodeType  comp_group 
)
pure virtual

Loads data from file into a particular component/subdomain section.

Implemented in wxm::dfem::variable::distributed_variable_t, and wxm::dfem::variable::UniqueDistributedVariable.

◆ on_subdomain()

bool wxm::variable::distributed_variable_t::on_subdomain ( const std::string &  subdomain_name) const
inline

Check if this distributed variable exists on a given subdomain.

Parameters
subdomain_nameSubdomain in question
Returns
True if distributed variable exists on subdomain

◆ patch_array() [1/2]

virtual const wxm::array::patch_array_t & wxm::variable::distributed_variable_t::patch_array ( const int  component_index,
const int  patch_index 
) const
pure virtual

Aquire a patch array for a specified component.

Parameters
component_indexComponent of interest
patch_indexPatch of interest
Returns
Array containing patch data

Implemented in wxm::dfem::variable::distributed_variable_t, and wxm::dfem::variable::UniqueDistributedVariable.

◆ patch_array() [2/2]

virtual wxm::array::patch_array_t & wxm::variable::distributed_variable_t::patch_array ( const int  component_index,
const int  patch_index 
)
pure virtual

Aquire a patch array for a specified component.

Parameters
component_indexComponent of interest
patch_indexPatch of interest
Returns
Array containing patch data

Implemented in wxm::dfem::variable::distributed_variable_t, and wxm::dfem::variable::UniqueDistributedVariable.

◆ setup()

virtual void wxm::variable::distributed_variable_t::setup ( const WxCryptSet wxc)
virtual

Setup the distributed variable.

This call will also setup the underlying WmVariable class

Parameters
wxcCryptset

Reimplemented from wxm::variable::variable_t.

Reimplemented in wxm::dfem::variable::distributed_variable_t, and wxm::dfem::variable::UniqueDistributedVariable.

◆ subdomain_names()

const std::vector< std::string > & wxm::variable::distributed_variable_t::subdomain_names ( ) const
inline

Get a list of subdomains on which this distributed variable exists.

Returns

Member Data Documentation

◆ _subdomain_names

std::vector<std::string> wxm::variable::distributed_variable_t::_subdomain_names
protected

List of subdomains on which this distributed variable exists.

◆ _virtual_subdomains

std::vector<std::string> wxm::variable::distributed_variable_t::_virtual_subdomains
protected

List of subdomains on which this distributed variable exists.


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