Commit eec448ea authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

reinvented value function

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1265
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 1d8c081f
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: polymodel.cc,v 1.5 2003-01-03 18:50:39 forbrig Exp $
* $Id: polymodel.cc,v 1.6 2003-01-03 18:56:53 forbrig Exp $
* \author Thomas Forbriger
* \date 30/12/2002
*
......@@ -13,14 +13,16 @@
*
* REVISIONS and CHANGES
* - 30/12/2002 V1.0 Thomas Forbriger
* - 03/01/2003 V1.1 version with means compiles
* - 03/01/2003 V1.1
* - version with means compiles
* - reinvented value function
*
* ============================================================================
*/
#define TF_POLYMODEL_CC_VERSION \
"TF_POLYMODEL_CC V1.1"
#define TF_POLYMODEL_CC_CVSID \
"$Id: polymodel.cc,v 1.5 2003-01-03 18:50:39 forbrig Exp $"
"$Id: polymodel.cc,v 1.6 2003-01-03 18:56:53 forbrig Exp $"
#include <gremlin1/polymodel.h>
#include <tfxx/error.h>
......@@ -207,6 +209,24 @@ namespace gremlin1 {
/*----------------------------------------------------------------------*/
//! calculate parameter value at given depth
Tvalue PolynomialModelFile::value(const int& ipar,
const Tvalue& depth,
const int& isec) const
{
int is=valid_section_index(isec);
int ip=valid_parameter_index(ipar);
Tvalue retval=Mpara(1,is,ip);
if (!ishalfspace(is))
{
Tvalue x=polyarg(depth,is);
retval=Mpara(1,is,ip)+x*(Mpara(2,is,ip)+x*Mpara(3,is,ip));
}
return(retval);
}
/*----------------------------------------------------------------------*/
//! concatenate follow-sections
void PolynomialModelFile::make_follow()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment