PetscErrorCode Block::SpinBase::Initialize ( const MPI_Comm &  comm_in,
const PetscInt &  num_sites_in,
const PetscInt &  num_states_in,
const PetscBool &  init_ops = PETSC_TRUE 
)

Initializes block object with input attributes and array of matrix operators.

Postcondition
Arrays of operator matrices are initialized to the correct number of sites and states.
Todo:
Consider interfacing this to the object constructor.
Options:
  • -verbose
  • -log_io

If num_states_in is PETSC_DEFAULT, the number of states is calculated exactly from the number of sites

When creating a block for one site, the single-site operators are initialized using the default values and matrix operators for spin-1/2 defined in Block::SpinBase::loc_dim, Block::SpinBase::loc_qn_list and Block::SpinBase::loc_qn_size

When more than one site is requested, all operator matrices are created with the correct sizes based on the number of states

Parameters
comm_inMPI communicator
num_sites_inNumber of sites
num_states_inNumber of states (or PETSC_DEFAULT)
init_opsWhether to initialize operators automatically when num_sites_in > 1

Definition at line 44 of file DMRGBlock.cpp.

This site was generated by Sphinx using Doxygen with a customized theme from doxygen-bootstrapped.