PSCF v1.1
Public Member Functions | List of all members
pscfpp.param.Parameter Class Reference

A Parameter represents a single parameter in a parameter file. More...

Public Member Functions

def __init__ (self, label, val)
 Constructor. More...
 
def setValue (self, val)
 Set the new value to the Parameter object. More...
 
def __str__ (self)
 Unindented string representation of this Parameter object. More...
 
def getString (self, depth='')
 Indented string for the Parameter object. More...
 
def returnData (self)
 Return the stored value. More...
 

Detailed Description

A Parameter represents a single parameter in a parameter file.

A Parameter object contains the label and value of a single parameter. A single parameter is represented in a parameter file by a single line containing a label followed by one or more values separated by spaces.

Definition at line 452 of file param.py.

Constructor & Destructor Documentation

◆ __init__()

def pscfpp.param.Parameter.__init__ (   self,
  label,
  val 
)

Member Function Documentation

◆ setValue()

def pscfpp.param.Parameter.setValue (   self,
  val 
)

Set the new value to the Parameter object.

This function sets the new value, parameter val, for this Parameter object.

Parameters
valthe expected new value.

Definition at line 475 of file param.py.

References pscfpp.param.getValue(), pscfpp.param.Parameter.val, pscfpp.param.Array.val, and pscfpp.param.Matrix.val.

◆ __str__()

def pscfpp.param.Parameter.__str__ (   self)

Unindented string representation of this Parameter object.

This function returns the unindented string representation for this Parameter object, containing a label followed by the value.

Definition at line 491 of file param.py.

References pscfpp.param.Composite.getString(), pscfpp.param.Parameter.getString(), pscfpp.param.Array.getString(), and pscfpp.param.Matrix.getString().

Referenced by pscfpp.field.Field.write(), pscfpp.output.Thermo.write(), and pscfpp.output.State.write().

◆ getString()

def pscfpp.param.Parameter.getString (   self,
  depth = '' 
)

Indented string for the Parameter object.

This function returns the indented string representation for the Parameter object in the param file format, with prefix depth as the passed-in parameter.

Parameters
depththe spaces string as the prefix depth.

Definition at line 504 of file param.py.

References pscfpp.param.Parameter.val, pscfpp.param.Array.val, and pscfpp.param.Matrix.val.

Referenced by pscfpp.param.Composite.__str__(), pscfpp.param.Parameter.__str__(), pscfpp.param.Array.__str__(), pscfpp.param.Matrix.__str__(), and pscfpp.param.Composite.write().

◆ returnData()

def pscfpp.param.Parameter.returnData (   self)

Return the stored value.

This function returns the value stored in the Parameter object.

Return value:

The value stored in the Parameter object.

Definition at line 531 of file param.py.

References pscfpp.param.Parameter.val, pscfpp.param.Array.val, and pscfpp.param.Matrix.val.


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