Home > matpower7.1 > mips > lib > have_feature_pardiso_object.m

have_feature_pardiso_object

PURPOSE ^

HAVE_FEATURE_PARDISO_OBJECT Detect availability/version info for PARDISO (object interface)

SYNOPSIS ^

function [TorF, vstr, rdate] = have_feature_pardiso_object()

DESCRIPTION ^

HAVE_FEATURE_PARDISO_OBJECT  Detect availability/version info for PARDISO (object interface)

   Feature detection function implementing 'pardiso_object' tag for
   HAVE_FEATURE to detect support for the object-oriented (v6.x and later)
   PARDISO interface.

   See also HAVE_FEATURE, HAVE_FEATURE_PARDISO, HAVE_FEATURE_PARDISO_LEGACY.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [TorF, vstr, rdate] = have_feature_pardiso_object()
0002 %HAVE_FEATURE_PARDISO_OBJECT  Detect availability/version info for PARDISO (object interface)
0003 %
0004 %   Feature detection function implementing 'pardiso_object' tag for
0005 %   HAVE_FEATURE to detect support for the object-oriented (v6.x and later)
0006 %   PARDISO interface.
0007 %
0008 %   See also HAVE_FEATURE, HAVE_FEATURE_PARDISO, HAVE_FEATURE_PARDISO_LEGACY.
0009 
0010 %   MIPS
0011 %   Copyright (c) 2004-2020, Power Systems Engineering Research Center (PSERC)
0012 %   by Ray Zimmerman, PSERC Cornell
0013 %
0014 %   This file is part of MIPS.
0015 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0016 %   See https://github.com/MATPOWER/mips for more info.
0017 
0018 TorF = exist('pardiso', 'file') == 2;
0019 rdate = '';
0020 if TorF
0021     vstr = '6.x+';
0022     try
0023         id = 1;
0024         A = sparse([1 2; 3 4]);
0025         b = [1;1];
0026         p = pardiso(id, 11, 0);
0027         p.factorize(id, A);
0028         x = p.solve(id, A, b);
0029         p.free(id);
0030         p.clear();
0031         if any(x ~= [-1; 1])
0032             TorF = 0;
0033         end
0034     catch
0035         TorF = 0;
0036     end
0037 else
0038     vstr = '';
0039 end

Generated on Fri 09-Oct-2020 11:21:31 by m2html © 2005