本文整理汇总了C++中SpinBlock::get_twoInt方法的典型用法代码示例。如果您正苦于以下问题:C++ SpinBlock::get_twoInt方法的具体用法?C++ SpinBlock::get_twoInt怎么用?C++ SpinBlock::get_twoInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpinBlock
的用法示例。
在下文中一共展示了SpinBlock::get_twoInt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: orbs
template<> void Op_component<CreCreDesComp>::build_iterators(SpinBlock& b)
{
if (b.get_sites().size () == 0) return; // blank construction (used in unset_initialised() Block copy construction, for use with STL)
const double screen_tol = dmrginp.oneindex_screen_tol();
vector< int > screened_cdd_ix = (dmrginp.hamiltonian() == BCS) ?
screened_cddcomp_indices(b.get_complementary_sites(), b.get_sites(), v_1, *b.get_twoInt(), v_cc, v_cccc, v_cccd, screen_tol) :
screened_cddcomp_indices(b.get_complementary_sites(), b.get_sites(), v_1, *b.get_twoInt(), screen_tol);
m_op.set_indices(screened_cdd_ix, dmrginp.last_site());
std::vector<int> orbs(1);
for (int i = 0; i < m_op.local_nnz(); ++i)
{
orbs[0] = m_op.get_local_indices()[i];
m_op.get_local_element(i).resize(1);
m_op.get_local_element(i)[0]=boost::shared_ptr<CreCreDesComp>(new CreCreDesComp);
SparseMatrix& op = *m_op.get_local_element(i)[0];
op.set_orbs() = orbs;
op.set_initialised() = true;
op.set_fermion() = true;
//op.set_deltaQuantum() = SpinQuantum(1, SpinOf(orbs[0]), SymmetryOfSpatialOrb(orbs[0]) );
if (dmrginp.hamiltonian() == BCS) {
op.resize_deltaQuantum(4);
SpinQuantum qorb = getSpinQuantum(orbs[0]);
op.set_deltaQuantum(0) = qorb;
op.set_deltaQuantum(1) = SpinQuantum(3, qorb.get_s(), qorb.get_symm());
op.set_deltaQuantum(2) = SpinQuantum(-1, qorb.get_s(), qorb.get_symm());
op.set_deltaQuantum(3) = SpinQuantum(-3, qorb.get_s(), qorb.get_symm());
} else {
op.set_deltaQuantum(1, getSpinQuantum(orbs[0]));
}
}
}