BiConjugateGradientOptions Class Reference

#include <BiConjugateGradientOptions.hpp>

Inheritance diagram for BiConjugateGradientOptions:

Inheritance graph
[legend]
Collaboration diagram for BiConjugateGradientOptions:

Collaboration graph
[legend]

List of all members.

Public Member Functions

real_t epsilon ()
int maxiter ()
 BiConjugateGradientOptions ()
 ~BiConjugateGradientOptions ()
void get (IdentifierSet &I)
const ReferenceCounting
< Parameter
get (const char *parameterName) const
void reset ()

Static Public Member Functions

static const char * identifier ()

Protected Member Functions

template<typename EnumType>
void get (const char *label, EnumType &e) const
void get (const char *label, real_t &d) const
void get (const char *label, int &i) const
void get (const char *label, std::string &s) const
void add (ReferenceCounting< Parameter > p)

Private Member Functions

std::ostream & put (std::ostream &os) const

Friends

std::ostream & operator<< (std::ostream &os, const ParametrizableObject &P)
 Writes the ParametrizableObject.


Detailed Description

Definition at line 29 of file BiConjugateGradientOptions.hpp.


Constructor & Destructor Documentation

BiConjugateGradientOptions::BiConjugateGradientOptions (  )  [inline, explicit]

Definition at line 61 of file BiConjugateGradientOptions.hpp.

00062   {
00063     // autodoc: "the maximum number of iterations"
00064     add(new IntegerParameter(500, "maxiter"));
00065     // autodoc: "the factor of reduction of the residu"
00066     add(new DoubleParameter (1E-5,"epsilon"));
00067   }

BiConjugateGradientOptions::~BiConjugateGradientOptions (  )  [inline]

Definition at line 69 of file BiConjugateGradientOptions.hpp.

00070   {
00071     ;
00072   }


Member Function Documentation

std::ostream& BiConjugateGradientOptions::put ( std::ostream &  os  )  const [inline, private, virtual]

Implements ParametrizableObject.

Definition at line 33 of file BiConjugateGradientOptions.hpp.

References identifier().

00034   {
00035     os << this->identifier();
00036     return os;
00037   }

Here is the call graph for this function:

static const char* BiConjugateGradientOptions::identifier (  )  [inline, static]

Definition at line 40 of file BiConjugateGradientOptions.hpp.

Referenced by put().

00041   {
00042     // autodoc: "to change bi-conjugate gradient options"
00043     return "bicg";
00044   }

real_t BiConjugateGradientOptions::epsilon (  )  [inline]

Definition at line 47 of file BiConjugateGradientOptions.hpp.

Referenced by BiConjugateGradient::BiConjugateGradient().

00048   {
00049     real_t eps = 0;
00050     get("epsilon",eps);
00051     return eps;
00052   }

int BiConjugateGradientOptions::maxiter (  )  [inline]

Definition at line 54 of file BiConjugateGradientOptions.hpp.

Referenced by BiConjugateGradient::BiConjugateGradient().

00055   {
00056     int maxiter = 0;
00057     get("maxiter",maxiter);
00058     return maxiter;
00059   }

void ParametrizableObject::get ( IdentifierSet I  )  [inline, inherited]

Definition at line 54 of file ParametrizableObject.hpp.

References ParametrizableObject::__parameters.

00055   {
00056     for (ParameterList::iterator i = __parameters.begin();
00057          i != __parameters.end(); ++i)
00058       {
00059         (*(*i).second).get(I);
00060         I.insert((*i).first);
00061       }
00062   }

template<typename EnumType>
void ParametrizableObject::get ( const char *  label,
EnumType &  e 
) const [inline, protected, inherited]

Definition at line 71 of file ParametrizableObject.hpp.

References Parameter::Enum.

00072   {
00073     ReferenceCounting<Parameter> p = get(label);
00074     if((*p).type() == Parameter::Enum) {
00075       e = dynamic_cast<const EnumParameter<EnumType>&>(*p);
00076       return;
00077     }
00078   }

void ParametrizableObject::get ( const char *  label,
real_t &  d 
) const [inline, protected, inherited]

Definition at line 80 of file ParametrizableObject.hpp.

References Parameter::Double.

00081   {
00082     ReferenceCounting<Parameter> p = get(label);
00083     if((*p).type() == Parameter::Double) {
00084       d = dynamic_cast<const DoubleParameter&>(*p);
00085       return;
00086     }      
00087   }

void ParametrizableObject::get ( const char *  label,
int &  i 
) const [inline, protected, inherited]

Definition at line 89 of file ParametrizableObject.hpp.

References Parameter::Integer.

00090   {
00091     ReferenceCounting<Parameter> p = get(label);
00092     if((*p).type() == Parameter::Integer) {
00093       i = dynamic_cast<const IntegerParameter&>(*p);
00094       return;
00095     }      
00096   }

void ParametrizableObject::get ( const char *  label,
std::string &  s 
) const [inline, protected, inherited]

Definition at line 98 of file ParametrizableObject.hpp.

References Parameter::String.

00099   {
00100     ReferenceCounting<Parameter> p = get(label);
00101     if((*p).type() == Parameter::String) {
00102       s = dynamic_cast<const StringParameter&>(*p);
00103       return;
00104     }      
00105   }

const ReferenceCounting<Parameter> ParametrizableObject::get ( const char *  parameterName  )  const [inline, inherited]

Definition at line 117 of file ParametrizableObject.hpp.

References ParametrizableObject::__parameters, ErrorHandler::normal, and stringify().

00118   {
00119     ParameterList::const_iterator i = __parameters.find(parameterName);
00120     if (i != __parameters.end()) {
00121       return (*i).second;
00122     } else {
00123       throw ErrorHandler(__FILE__,__LINE__,
00124                          stringify(parameterName)+" not found",
00125                          ErrorHandler::normal);
00126       return 0;
00127     }
00128   }

Here is the call graph for this function:

void ParametrizableObject::add ( ReferenceCounting< Parameter p  )  [inline, protected, inherited]

Definition at line 65 of file ParametrizableObject.hpp.

References ParametrizableObject::__parameters.

00066   {
00067     __parameters[(*p).label()] = p;
00068   }

void ParametrizableObject::reset (  )  [inline, inherited]

Definition at line 109 of file ParametrizableObject.hpp.

References ParametrizableObject::__parameters.

00110   {
00111     for (ParameterList::iterator i = __parameters.begin();
00112          i != __parameters.end(); ++i) {
00113       (*(*i).second).reset();
00114     }
00115   }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const ParametrizableObject P 
) [friend, inherited]

Writes the ParametrizableObject.

Definition at line 22 of file ParametrizableObject.cpp.

00024 {
00025   os  << P.put(os);
00026   return os;
00027 }


The documentation for this class was generated from the following file:

Generated on Wed Nov 19 00:04:06 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6