UnitTests_DMRGBlock_SetDiskStorage.cpp
9 PETSC_EXTERN PetscErrorCode SetRow(const Mat& A, const PetscInt& row, const std::vector<PetscInt>& idxn);
40 ierr = PetscPrintf(PETSC_COMM_WORLD,"Writing data to: %s\n", blk.SaveDir().c_str()); CHKERRQ(ierr);
46 ierr = PetscPrintf(PETSC_COMM_WORLD,"Reading data from: %s\n", blk.SaveDir().c_str()); CHKERRQ(ierr);
48 ierr = PetscPrintf(PETSC_COMM_WORLD,"Writing data to: %s\n", blk.SaveDir().c_str()); CHKERRQ(ierr);
50 ierr = PetscPrintf(PETSC_COMM_WORLD,"Reading data from: %s\n", blk.SaveDir().c_str()); CHKERRQ(ierr);
52 ierr = PetscPrintf(PETSC_COMM_WORLD,"Writing data to: %s\n", blk.SaveDir().c_str()); CHKERRQ(ierr);
58 ierr = PetscPrintf(PETSC_COMM_WORLD,"Reading data from: %s\n", blk.SaveDir().c_str()); CHKERRQ(ierr);
60 ierr = PetscPrintf(PETSC_COMM_WORLD,"Writing data to: %s\n", blk.SaveDir().c_str()); CHKERRQ(ierr);
62 ierr = PetscPrintf(PETSC_COMM_WORLD,"Reading data from: %s\n", blk.SaveDir().c_str()); CHKERRQ(ierr);
64 ierr = PetscPrintf(PETSC_COMM_WORLD,"Writing data to: %s\n", blk.SaveDir().c_str()); CHKERRQ(ierr);
PetscErrorCode EnsureRetrieved()
Ensures that the block matrices have been retrieved if the block is initialized, otherwise does nothi...
Definition: DMRGBlock.cpp:1098
PETSC_EXTERN PetscErrorCode Makedir(const std::string &dir_name)
Creates a directory named dir_name.
Definition: MiscTools.cpp:306
std::string SaveDir() const
Returns the value of save_dir where the block data will be read from/written.
Definition: DMRGBlock.hpp:287
Base class for the implementation of a block of spin sites.
Definition: DMRGBlock.hpp:79
PetscErrorCode AssembleOperators()
Ensures that all operators are assembled.
Definition: DMRGBlock.cpp:825
PetscErrorCode EnsureSaved()
Ensures that the block matrices have been saved if the block is initialized, otherwise does nothing...
Definition: DMRGBlock.cpp:1090
PetscErrorCode SetDiskStorage(const std::string &read_dir_in, const std::string &write_dir_in)
Tells where to read from and save the operators and data about the block.
Definition: DMRGBlock.cpp:857
PetscErrorCode CheckSectors() const
Checks whether sector indexing was done properly.
Definition: DMRGBlock.cpp:429
Mat Sz(const PetscInt &Isite) const
Returns the matrix pointer to the operator at site Isite.
Definition: DMRGBlock.hpp:353
PetscErrorCode Destroy()
Destroys all operator matrices and frees memory.
Definition: DMRGBlock.cpp:655
PetscErrorCode Initialize(const MPI_Comm &comm_in)
Initializes block object's MPI attributes.
Definition: DMRGBlock.cpp:31
Mat Sp(const PetscInt &Isite) const
Returns the matrix pointer to the operator at site Isite.
Definition: DMRGBlock.hpp:359