ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/hydrodynamics/ApproximationModel.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/hydrodynamics/ApproximationModel.cpp (file contents):
Revision 2665 by tim, Thu Mar 23 15:03:33 2006 UTC vs.
Revision 2675 by tim, Wed Mar 29 18:09:26 2006 UTC

# Line 48 | Line 48 | namespace oopse {
48   #include "applications/hydrodynamics/Ellipsoid.hpp"
49   #include "applications/hydrodynamics/CompositeShape.hpp"
50   #include "math/LU.hpp"
51 + #include "utils/simError.h"
52   namespace oopse {
53   /**
54   * Reference:
# Line 57 | Line 58 | ApproximationModel::ApproximationModel(StuntDouble* sd
58   */
59  
60   ApproximationModel::ApproximationModel(StuntDouble* sd, SimInfo* info): HydrodynamicsModel(sd, info){
60 /*
61    DynamicProperty::const_iterator iter;
61  
63    iter = extraParams.find("Viscosity");
64    if (iter != extraParams.end()) {
65        boost::any param = iter->second;
66        viscosity = boost::any_cast<double>(param);
67    }else {
68        std::cout << "ApproximationModel Error\n" ;
69    }
70
71    iter = extraParams.find("Temperature");
72    if (iter != extraParams.end()) {
73        boost::any param = iter->second;
74        temperature = boost::any_cast<double>(param);
75    }else {
76        std::cout << "ApproximationModel Error\n" ;
77    }    
78 */
62   }
63  
64   bool ApproximationModel::calcHydroProps(Spheric* spheric, double viscosity, double temperature) {
# Line 89 | Line 72 | bool ApproximationModel::calcHydroProps(CompositeShape
72      return internalCalcHydroProps(static_cast<Shape*>(compositeShape), viscosity, temperature);
73   }
74  
75 <
93 < bool ApproximationModel::internalCalcHydroProps(Shape* shape, double viscosity, double temperature) {
75 > void ApproximationModel::init() {
76      if (!createBeads(beads_)) {
77 <        std::cout << "can not create beads" << std::endl;
78 <        return false;
77 >      sprintf(painCave.errMsg, "ApproximationModel::init() : Can not create beads\n");
78 >      painCave.isFatal = 1;
79 >      simError();        
80      }
81 +
82 + }
83 +
84 + bool ApproximationModel::internalCalcHydroProps(Shape* shape, double viscosity, double temperature) {
85  
86      bool ret = true;
87      HydroProps cr;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines