Changeset 8f6db64 in tol


Ignore:
Timestamp:
Feb 3, 2009, 9:11:48 AM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
1d83266
Parents:
7c166a2
Message:

New static method force_natural_order
Setting configuration options for

Stop when non positive definite is found
Store allways as L*L', never as L*D*L'
Allow fast factor to sparse convertion

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@557 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/vmatrix_type/vmat.cpp

    r7c166a2 r8f6db64  
    7272  return(done);
    7373} 
     74
     75////////////////////////////////////////////////////////////////////////////////
     76bool BVMat::force_natural_order(bool force)
     77////////////////////////////////////////////////////////////////////////////////
     78{
     79  static bool force_ = false;
     80  bool old = force_;
     81  force_ = force;
     82  if(force)
     83  {
     84    common_->nmethods            = 1 ;
     85    common_->method[0].ordering  = CHOLMOD_NATURAL ;
     86    common_->postorder           = false;
     87  }
     88  else
     89  {
     90    common_->nmethods           = 3 ;
     91    common_->method[0].ordering = CHOLMOD_GIVEN ;
     92    common_->method[1].ordering = CHOLMOD_AMD ;
     93    common_->method[2].ordering = CHOLMOD_METIS ;
     94    common_->postorder          = true;
     95  }
     96  return(old);
     97}
     98
    7499////////////////////////////////////////////////////////////////////////////////
    75100void BVMat::restore_cholmod_common()
    … …  
    118143  common_->error_handler  = cholmod_error_handler;
    119144  common_->try_catch      = NULL;
     145
     146  //Stop when non positive definite is found
     147  common_->quick_return_if_not_posdef = true;
     148
     149  //Store allways as L*L', never as L*D*L'
     150  common_->final_ll = true ;
     151
     152  //Needed to allow fast factor to sparse convertion
     153  common_->final_pack      = true ;
     154  common_->final_super     = false ;
     155  common_->final_monotonic = true;
     156
     157  //We need specific final storement
     158  common_->final_asis = false ;
     159
     160  //Natural order is not forced by default
     161  force_natural_order(false);
     162
    120163/* * /
    121164//MatLab lchol options
Note: See TracChangeset for help on using the changeset viewer.