44#include "hydrodynamics/AnalyticalModel.hpp"
46#include "hydrodynamics/CompositeShape.hpp"
47#include "hydrodynamics/Ellipsoid.hpp"
48#include "hydrodynamics/Sphere.hpp"
49#include "utils/simError.h"
53 HydroProp* AnalyticalModel::calcHydroProps(RealType viscosity) {
55 Sphere* sphere =
dynamic_cast<Sphere*
>(shape_);
57 hp = sphere->getHydroProp(viscosity);
60 Ellipsoid* ellipsoid =
dynamic_cast<Ellipsoid*
>(shape_);
61 if (ellipsoid != NULL) {
62 hp = ellipsoid->getHydroProp(viscosity);
65 CompositeShape* composite =
dynamic_cast<CompositeShape*
>(shape_);
66 if (composite != NULL) {
71 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
72 "Could not figure out what kind of shape this is!\n");
73 painCave.severity = OPENMD_ERROR;
82 void AnalyticalModel::writeElements(std::ostream& os) {
84 os <<
"Generated by Hydro\n";
85 Vector3d pos = shape_->getOrigin();
86 os << shape_->getName() <<
"\t" << pos[0] <<
"\t" << pos[1] <<
"\t"
87 << pos[2] << std::endl;
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.