Favago Transport Programming Interface

Introduction

Interfaces

root/

root/utils

Data structures

Examples







adaptiveQ

  Copyright (C) 2009-2015 Peter Rakyta, Ph.D.
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see http://www.gnu.org/licenses/.

Description

Returns an interface for controlling the distribution of the transverse momentum points. A minimal list of transverse momentums (qvec) and the corresponding function values (y) of fhandle are dynamicaly created in order to obtain the values of fhandle over the elements of interpq via interpolation. (Typically qvec conatins significantly less elements than interpq.)

Available

Favago TPI v4.6 or later

Syntax

interface = adaptiveQ(Opt, interpq, varargin)

Parameters
Opt An instance of the structure Opt.
interpq List of transverse momentum points at which fhandle is calculated via interpolation.
varargin Optional parameters given by a sequence ...'name', value,... . Possible parameters are:
  • resume

    Logical value. If true, the iteration cintinues with the loaded data, or false (default) otherwise.
  • outFileName

    The filename to export the calculated data. If it is empty (default) no data are exported.
  • interp_method

    The interpolation method to be used to calculate interpy. The default method is spline.

Attributes

  • start_qnum

    The number of elements in qvec in the first iteration.
  • interpq

    The list of transverse momentums where the function fhandle is desired to be calculated.
  • interpy

    The interpolated values of fhandle over the elements of interpq.
  • qvec

    The dynamically created vector of the transverse momentums.
  • y

    The function values of fhandle calculated over the elements of qvec.
  • maxiter

    Maximum of the iterations.
  • resume

    Logical value. If true, the iteration cintinues with the loaded data, or false (default) otherwise.
  • outFileName

    The filename to export the calculated data.

Methods

adaptiveQ::runAdaptiveIterations

Description


Runs the adaptive iterations to obtain the elemets of qvec where the function fhandle changes the most.

Syntax

interface.runAdaptiveIterations( fhandle )

Parameters
fhandle The function handle to be calculated over the transvese momentum points: y = fhandle( qvec ), where y is an MxN matrix, and qvec is a vector of transverse momentums containing of M elemets.



adaptiveQ::initialize

Description


Initializes y=fhandle( qvec ) for the first iteration.

Syntax

interface.initialize( fhandle )

Parameters
fhandle The function handle to be calculated over the transvese momentum points: y = fhandle( qvec ), where y is an MxN matrix, and qvec is a vector of transverse momentums containing of M elemets.



adaptiveQ::MemberWrite

Sets the value of an attribute in the interface.

Syntax

interface.MemberWrite(MemberName, input)

Parameters
MemberName The name of the attribute to be set.
input The value to be set.



adaptiveQ::MemberRead

Description


Reads the value of an attribute in the interface.

Syntax

ret = interface.MemberRead(MemberName)

Parameters
MemberName The name of the attribute.

Return
ret The value of the attribute.



adaptiveQ::MemberClear

Description


Clears the value of an attribute in the interface.

Syntax

interface.MemberClear(MemberName)

Parameters
MemberName The name of the attribute.