Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

SolverBase< MainProp, OtherProp, VaryProp, MainPropAlt, OtherPropAlt, VaryPropAlt > Class Template Reference

Base class for one-property rootfinding. More...

#include <solver.h>

Inheritance diagram for SolverBase< MainProp, OtherProp, VaryProp, MainPropAlt, OtherPropAlt, VaryPropAlt >:

DesignByContract Solver< MainProp, OtherProp, VaryProp, MainPropAlt, OtherPropAlt, VaryPropAlt > List of all members.

Public Member Functions

virtual void setLowerBound (const VaryProp &lowerbound)
virtual void setUpperBound (const VaryProp &upperbound)
void setTarget (const OtherProp &op)
 Set the target property.
void setMainProp (const MainProp &mp)
 Set the 'fixed' parameter in the root finding.
SteamCalculator solve (OtherProp maxerror, VaryProp tol)
 Peform the iterations.

Protected Member Functions

 SolverBase (const MainProp &mp, const OtherProp &op)
 Create the solver and assign fixed and target properties.
virtual void setVaryProp (const VaryProp &vp)=0
OtherProp getError_vp (const VaryProp &vp)

Protected Attributes

OtherProp op
MainProp mp
SteamCalculator S
VaryProp lowerbound
VaryProp upperbound

Friends

class ZeroIn< SolverBase, VaryProp, OtherProp >

Detailed Description

template<class MainProp, class OtherProp, class VaryProp, int MainPropAlt, int OtherPropAlt, int VaryPropAlt>
class SolverBase< MainProp, OtherProp, VaryProp, MainPropAlt, OtherPropAlt, VaryPropAlt >

Base class for one-property rootfinding.

Parameters:
MainProp fixed value
OtherProp target value
VaryProp value which is varied unti OtherProp has desired value
See SteamProperty


Member Function Documentation

template<class MainProp, class OtherProp, class VaryProp, int MainPropAlt, int OtherPropAlt, int VaryPropAlt>
SteamCalculator SolverBase< MainProp, OtherProp, VaryProp, MainPropAlt, OtherPropAlt, VaryPropAlt >::solve OtherProp  maxerror,
VaryProp  tol
[inline]
 

Peform the iterations.

Parameters:
maxerror Seek value of OtherProp to within this maximum error
tol Stop iterating when steps of VaryProp are less than this
Returns:
SteamCalculator containing state of steam with the desired conditions of (MainProp,OtherProp)


The documentation for this class was generated from the following file:
Generated on Tue Mar 22 19:07:06 2005 for freesteam by doxygen 1.3.8