pyCAPS
pyCAPS: A Python Extension Module for CAPS
Public Member Functions | Public Attributes | List of all members
_capsBound Class Reference

Functions to interact with a CAPS bound object. More...

Public Member Functions

def getBoundInfo (self, printInfo=True, kwargs)
 Gets bound information for the bound object. More...
 
def fillVertexSets (self)
 Populates VertexSets for the bound. More...
 
def executeTransfer (self, variableName=None)
 Execute data transfer for the bound. More...
 
def viewData (self, variableName=None, kwargs)
 Visualize data in the bound. More...
 
def writeTecplot (self, filename, variableName=None)
 Write a Tecplot compatiable file for the data in the bound. More...
 
def createTree (self, filename="boundName", kwargs)
 Create a HTML dendrogram/tree of the current state of the bound. More...
 

Public Attributes

 boundName
 Bound/transfer name used to set up the data bound. More...
 
 capsProblem
 Reference to the problem object (pyCAPS.capsProblem) the bound belongs to. More...
 
 variables
 List of variables in the bound. More...
 
 vertexSet
 Dictionary of vertex set object (pyCAPS._capsVertexSet) in the bound. More...
 
 dataSetSrc
 Dictionary of "source" data set objects (pyCAPS._capsDataSet) in the bound. More...
 
 dataSetDest
 Dictionary of "destination" data set objects (pyCAPS._capsDataSet) in the bound. More...
 

Detailed Description

Functions to interact with a CAPS bound object.

Should be created with capsProblem.createDataBound or capsProblem.createDataTransfer (not a standalone class).

Member Function Documentation

◆ createTree()

def createTree (   self,
  filename = "boundName",
  kwargs 
)

Create a HTML dendrogram/tree of the current state of the bound.

The HTML file relies on the open-source JavaScript library, D3, to visualize the data. This library is freely available from https://d3js.org/ and is dynamically loaded within the HTML file. If running on a machine without internet access a (miniaturized) copy of the library may be written to a file alongside the generated HTML file by setting the internetAccess keyword to False. If set to True, internet access will be necessary to view the tree.

Parameters
filenameFilename to use when saving the tree (default - "boundName"). Note an ".html" is automatically appended to the name (same with ".json" if embedJSON = False).
**kwargsSee below.

Valid keywords:

Parameters
embedJSONEmbed the JSON tree data in the HTML file itself (default - True). If set to False a seperate file is generated for the JSON tree data.
internetAccessIs internet access available (default True)? If set to True internet access will be necessary to view the tree.

◆ executeTransfer()

def executeTransfer (   self,
  variableName = None 
)

Execute data transfer for the bound.

Parameters
variableNameName of variable to implement the data transfer for. If no name is provided the first variable in bound is used.

◆ fillVertexSets()

def fillVertexSets (   self)

Populates VertexSets for the bound.

Must be called to finalize the bound after all mesh generation aim's have been executed

◆ getBoundInfo()

def getBoundInfo (   self,
  printInfo = True,
  kwargs 
)

Gets bound information for the bound object.

Parameters
printInfoPrint information to sceen if True.
**kwargsSee below.
Returns
State of bound object.

Valid keywords:

Parameters
infoDictReturn a dictionary containing bound information instead of just the state (default - False)

◆ viewData()

def viewData (   self,
  variableName = None,
  kwargs 
)

Visualize data in the bound.

The function currently relies on matplotlib or the capViewer class (webviewer) to plot the data.

Parameters
variableNameName of variable to visualize. If no name is provided the first variable in the bound is used.
**kwargsSee below.

Valid keywords:

Parameters
viewerTypeWhat viewer should be used (default - capsViewer). Options: capsViewer or matplotlib (options are case insensitive). Important: if $filename isn't set to None, the default to changed to matplotlib.
portNumberPort number to start the server listening on (default - 7681).
filenameSave image(s) to file specified (default - None). Not available when using the webviewer
colorMapValid string for a, matplotlib::cm, colormap (default - 'Blues'). Not as options are available when using the webviewer (see capsViewer for additional details).
showImageShow image(s) (default - True).

◆ writeTecplot()

def writeTecplot (   self,
  filename,
  variableName = None 
)

Write a Tecplot compatiable file for the data in the bound.

Parameters
filenameName of file to save data to.
variableNameSingle or list of variables to write data for. If no name is provided all variables in the bound are used.

Member Data Documentation

◆ boundName

boundName

Bound/transfer name used to set up the data bound.

◆ capsProblem

Reference to the problem object (pyCAPS.capsProblem) the bound belongs to.

◆ dataSetDest

dataSetDest

Dictionary of "destination" data set objects (pyCAPS._capsDataSet) in the bound.

◆ dataSetSrc

dataSetSrc

Dictionary of "source" data set objects (pyCAPS._capsDataSet) in the bound.

◆ variables

variables

List of variables in the bound.

◆ vertexSet

vertexSet

Dictionary of vertex set object (pyCAPS._capsVertexSet) in the bound.


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