# PLaSK User Manual

#### Page Contents

- ThermalConductivityFilter2D Class
  - `ThermalConductivityFilter2D`
  - Methods
  - Attributes
  - Descriptions
    - Method Details
      - `ThermalConductivityFilter2D.initialize()`
      - `ThermalConductivityFilter2D.invalidate()`
      - `ThermalConductivityFilter2D.load_xpl()`
    - Attribute Details
      - `ThermalConductivityFilter2D.id`
      - `ThermalConductivityFilter2D.initialized`
      - `ThermalConductivityFilter2D.out`
      - `ThermalConductivityFilter2D.outThermalConductivity`

# ThermalConductivityFilter2D Class

class plask.flow.ThermalConductivityFilter2D(geometry)

  Data filter for thermal conductivity into Cartesian2D geometry.

  Parameters:

    geometry (geometry.Cartesian2D) – Target geometry.

  See also

  `plask.filter` for details on filter usage.

## Methods

`initialize`() | Initialize solver.
`invalidate`() | Set the solver back to uninitialized state.
`load_xpl`(xpl, manager) | Load configuration from XPL reader.

## Attributes

`id` | Id of the solver object.
`initialized` | True if the solver has been initialized.
`out` | Filter output provider.
`outThermalConductivity` | Filter output provider.

## Descriptions

### Method Details

ThermalConductivityFilter2D.initialize()

  Initialize solver.

  This method manually initialized the solver and sets `initialized` to True. Normally calling it is not necessary, as each solver automatically initializes itself when needed.

  Returns:

    solver `initialized` state prior to this method call.

  Return type:

    bool

ThermalConductivityFilter2D.invalidate()

  Set the solver back to uninitialized state.

  This method frees the memory allocated by the solver and sets `initialized` to False.

ThermalConductivityFilter2D.load_xpl(xpl, manager)

  Load configuration from XPL reader.

  This method should be overridden in custom Python solvers.

  Example

      def load_xpl(self, xpl, manager):
          for tag in xpl:
              if tag == 'config':
                  self.a = tag['a']
                  self.b = tag.get('b', 0)
                  if 'c' in tag:
                      self.c = tag['c']
              if tag == 'combined':
                  for subtag in tag:
                      if subtag == 'withtext':
                          self.data = subtag.attrs
                          # Text must be read last
                          self.text = subtag.text
              elif tag == 'geometry':
                  self.geometry = tag.getitem(manager.geo, 'ref')

### Attribute Details

ThermalConductivityFilter2D.id = <property object>

  Id of the solver object. (read only)

  Example

      >>> mysolver.id
      mysolver:category.type

ThermalConductivityFilter2D.initialized = <property object>

  True if the solver has been initialized. (read only)

  Solvers usually get initialized at the beginning of the computations. You can clean the initialization state and free the memory by calling the `invalidate()` method.

ThermalConductivityFilter2D.out = <property object>

  Filter output provider.

  Example

      >>> some_solver.inThermalConductivity = my_filter.outThermalConductivity

ThermalConductivityFilter2D.outThermalConductivity = <property object>

  Filter output provider.

  Example

      >>> some_solver.inThermalConductivity = my_filter.outThermalConductivity