---
name: "sc_DistShellPairR12"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.2.2-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_DistShellPairR12"
---

# sc\_DistShellPairR12(3)

Distributes shell pairs either statically or dynamically.

## NAME

sc::DistShellPairR12 - Distributes shell pairs either statically or dynamically.

## SYNOPSIS

`#include <distsh.h>`

### Public Member Functions

**DistShellPairR12** (const **Ref**\< **MessageGrp** \> &, int nthread, int mythread, const **Ref**\< **ThreadLock** \> &lock, const **Ref**\< **GaussianBasisSet** \> &bs1, const **Ref**\< **GaussianBasisSet** \> &bs2)\
 *The* **DistShellPairR12** *class is used to distribute shell pair indices among tasks.*  void **init** ()\
 *Resets to the first shell pair.*  void **set\_dynamic** (int d)\
 *Whether or not to use dynamic load balancing.*  void **set\_debug** (int d)\
 *How much stuff to print out.*  void **set\_print\_percent** (int p)\
 *How often to print status from node 0.*  int **get\_task** (int &P, int &Q)\
 *Puts the current PQ shell pair into P and Q and returns 1.*

## Detailed Description

Distributes shell pairs either statically or dynamically.

## Constructor & Destructor Documentation

### sc::DistShellPairR12::DistShellPairR12 (const Ref\< MessageGrp \> &, int nthread, int mythread, const Ref\< ThreadLock \> & lock, const Ref\< GaussianBasisSet \> & bs1, const Ref\< GaussianBasisSet \> & bs2)

The **DistShellPairR12** class is used to distribute shell pair indices among tasks.

Both static (round-robin) and dynamic methods are supported. The only difference between **DistShellPairR12** and **DistShellPair** is that the latter assumes both shell indices belong to the same **GaussianBasisSet** and thus PQ is equivalent to QP.

## Member Function Documentation

### int sc::DistShellPairR12::get\_task (int & P, int & Q)

Puts the current PQ shell pair into P and Q and returns 1.

When there are no more shell pairs to be processed by this processor, 0 is returned. Once we start doing get\_tasks, we have to go to the end if dynamic load balancing is used.

P belongs to bs2, and Q belongs to bs1. If (bs1 == bs2) then P is greater or equal to Q.

## Author

Generated automatically by Doxygen for MPQC from the source code.
