2 % Copyright (C) 2009-2015 Peter Rakyta, Ph.D.
4 % This program is free software: you can redistribute it and/or modify
5 % it under the terms of the GNU General Public License as published by
6 % the Free Software Foundation, either version 3 of the License, or
7 % (at your option) any later version.
9 % This program is distributed in the hope that it will be useful,
10 % but WITHOUT ANY WARRANTY; without even the implied warranty of
11 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 % GNU General Public License
for more details.
14 % You should have received a copy of the GNU General Public License
15 % along with
this program. If not, see http:
17 %> @addtogroup basic Basic Functionalities
20 %> @brief A
class containing methodes
for displaying several standard messages.
22 %> @brief A
class containing methodes for displaying several standard messages.
26 properties ( Access =
protected )
27 %> An instance of structure #
Opt 33 %% Contructor of the
class 34 %> @brief Constructor of the
class.
36 %> @
return An instance of the
class Messages 46 %> @brief Displays output messages on the screen
47 %> @
param message String containing the message to be displayed
48 %> @
param nosilent Set
true to
override the silent option given in #
Opt.
Silent.
49 function display( obj, message, nosilent )
51 if ~exist(
'message',
'var')
52 obj.
display( ['Class ', class(obj), ' is created.']);
56 if isprop('Silent', obj)
57 if ~obj.Silent || exist('nosilent', 'var')
61 if ~obj.
Opt.Silent || exist('nosilent', 'var')
67 fid = fopen('debug.txt', 'a');
68 fprintf(fid, [message,'\n']);
76 %> @brief Retrives the structure containing the calculation parameters
77 %> @return Return an instance of structure
#Opt. 78 function ret =
getOpt( obj )
84 methods (Static =
true)
86 %> @brief Throws a
"bad input type" warning, with
using the
default value.
87 %> @
param variable A
string conatining the name of the variable.
88 %> @
param type A
string describing the desired type.
90 warning(
'MATLAB:BadArgument',[
'Argument "',variable,
'" is not a(an) ',type,
'. Setting it to default.']);
94 %> @brief Throws a
"bad input type" warning without setting it to
default.
95 %> @
param variable A
string conatining the name of the variable.
96 %> @
param type A
string describing the desired type.
98 warning(
'MATLAB:BadArgument',[
'Argument "',variable,
'" is not a(an) ',type,
'.']);
102 %> @brief Throws an
"iteration exceeded" warning.
104 warning('MATLAB:IterExceed','Number of iteration steps reached its limit. Return with initial values!');
function Messages(Opt)
Constructor of the class.
A class containing methodes for displaying several standard messages.
static function BadInputTypeNoDefault(variable, type)
Throws a "bad input type" warning without setting it to default.
Structure Opt contains the basic computational parameters used in EQuUs.
function display(message, nosilent)
Displays output messages on the screen.
function Transport(Energy, B)
Calculates the conductance at a given energy value.
static function BadInputType(variable, type)
Throws a "bad input type" warning, with using the default value.
function getOpt()
Retrives the structure containing the calculation parameters.
Structure param contains data structures describing the physical parameters of the scattering center ...
Property Opt
An instance of structure Opt.
static function ExceedIteration()
Throws an "iteration exceeded" warning.
Silent
Set 1 in order to supress output messages.
function structures(name)