Blender V2.61 - r43446
|
output parameter debug message? More...
#include <parametrizer.h>
output parameter debug message?
Parameter calculator for the LBM Solver class
Definition at line 50 of file parametrizer.h.
Parametrizer::Parametrizer | ( | void | ) |
default contructor
Definition at line 50 of file parametrizer.cpp.
Parametrizer::~Parametrizer | ( | ) |
destructor
Definition at line 76 of file parametrizer.cpp.
scale a given speed vector in m/s to lattice values usage string is only needed for debugging
Definition at line 178 of file parametrizer.cpp.
bool Parametrizer::calculateAllMissingValues | ( | double | time, |
bool | silent | ||
) |
function that tries to calculate all the missing values from the given ones prints errors and returns false if thats not possible currently needs time value as well
Definition at line 309 of file parametrizer.cpp.
References calculateAniStart(), calculateAniStepsPerFrame(), calculateCellSize(), calculateGravity(), calculateOmega(), checkSeenValues(), debMsgStd, DM_IMPORTANT, DM_MSG, DM_NOTIFY, DM_WARNING, credits_svn_gen::e, errFatal, errMsg, AnimChannel< Scalar >::get(), getAniFrameTime(), getCurrentGStar(), i, init(), isSimworldOk(), norm(), PARAM_ANIFRAMETIME, PARAM_ANISTART, PARAM_DENSITY, PARAM_DOMAINSIZE, PARAM_GRAVITY, PARAM_GSTAR, PARAM_NORMALIZEDGSTAR, PARAM_NUMIDS, PARAM_SIZE, PARAM_SURFACETENSION, PARAM_VISCOSITY, ParamStrings, PRINT_NTLVEC, seenThis(), setAniFrameTimeChannel(), setTimestep(), SIMWORLD_INITERROR, and sqrt().
Referenced by LbmFsgrSolver::adaptTimestep(), LbmFsgrSolver::initGeometryFlags(), and LbmFsgrSolver::initializeSolverMemory().
int Parametrizer::calculateAniStart | ( | void | ) |
get start time of animation
Definition at line 245 of file parametrizer.cpp.
Referenced by calculateAllMissingValues().
int Parametrizer::calculateAniStepsPerFrame | ( | int | frame | ) |
get no of steps for a singel animation frame
get no of steps for a single animation frame
Definition at line 250 of file parametrizer.cpp.
References checkSeenValues(), errFatal, getAniFrameTime(), PARAM_ANIFRAMETIME, and SIMWORLD_INITERROR.
Referenced by calculateAllMissingValues().
ParamFloat Parametrizer::calculateCellSize | ( | void | ) |
get time step size for lbm (equals mTimeFactor)
calculate size of a single cell
Definition at line 189 of file parametrizer.cpp.
Referenced by calculateAllMissingValues(), and LbmFsgrSolver::initializeSolverGrids().
void Parametrizer::calculatedThis | ( | int | cac | ) | [inline] |
add this flag to the calculated values
Definition at line 82 of file parametrizer.h.
ParamVec Parametrizer::calculateGravity | ( | double | time | ) |
get external force x component
Definition at line 215 of file parametrizer.cpp.
References errMsg, and AnimChannel< Scalar >::get().
Referenced by LbmFsgrSolver::adaptTimestep(), calculateAllMissingValues(), and LbmFsgrSolver::initLevelOmegas().
ParamFloat Parametrizer::calculateLatticeViscosity | ( | double | time | ) |
calculate the lattice viscosity
Definition at line 226 of file parametrizer.cpp.
References checkSeenValues(), errMsg, AnimChannel< Scalar >::get(), PARAM_STEPTIME, and PARAM_VISCOSITY.
Referenced by calculateOmega().
calculate lattice velocity from real world value [m/s]
Definition at line 283 of file parametrizer.cpp.
Referenced by LbmFsgrSolver::initGeometryFlags(), LbmFsgrSolver::initMovingObstacles(), and LbmFsgrSolver::recalculateObjectSpeeds().
int Parametrizer::calculateNoOfSteps | ( | ParamFloat | timelen | ) |
get no. of timesteps for LBM
Definition at line 264 of file parametrizer.cpp.
ParamFloat Parametrizer::calculateOmega | ( | double | time | ) |
get omega for LBM
get omega for LBM from channel
Definition at line 205 of file parametrizer.cpp.
References calculateLatticeViscosity(), and errMsg.
Referenced by calculateAllMissingValues(), and LbmFsgrSolver::initLevelOmegas().
calculate real world [m/s] velocity from lattice value
Definition at line 290 of file parametrizer.cpp.
int Parametrizer::calculateStepsForSecs | ( | ParamFloat | s | ) |
get no of steps for the given length in seconds
Definition at line 240 of file parametrizer.cpp.
ParamFloat Parametrizer::calculateSurfaceTension | ( | void | ) |
get extent of the domain = (1,1,1) if parametrizer not used, (x,y,z) [m] otherwise
get (scaled) surface tension
bool Parametrizer::checkCalculatedValues | ( | int | check | ) | [inline] |
check if the calculated flags are set in the values int
Definition at line 86 of file parametrizer.h.
bool Parametrizer::checkSeenValues | ( | int | check | ) | [inline] |
check if the flags are set in the values int
Definition at line 79 of file parametrizer.h.
Referenced by calculateAllMissingValues(), calculateAniStepsPerFrame(), and calculateLatticeViscosity().
ParamFloat Parametrizer::getAniFrameTime | ( | int | frame | ) |
get time of an animation frame (renderer)
Definition at line 161 of file parametrizer.cpp.
References DEBUG_PARAMCHANNELS, errMsg, and AnimChannel< Scalar >::get().
Referenced by calculateAllMissingValues(), calculateAniStepsPerFrame(), getCurrentAniFrameTime(), and SimulationObject::getFrameTime().
ParamFloat Parametrizer::getAniStart | ( | void | ) | [inline] |
get starting time of the animation (renderer)
Definition at line 167 of file parametrizer.h.
Referenced by SimulationObject::getStartTime().
AttributeList* Parametrizer::getAttributeList | ( | ) | [inline] |
Returns the attribute list pointer
Definition at line 206 of file parametrizer.h.
Referenced by parseAttrList().
ParamFloat Parametrizer::getCellSize | ( | void | ) | [inline] |
get the size of a single lbm cell
Definition at line 198 of file parametrizer.h.
Referenced by LbmFsgrSolver::advanceParticles(), and LbmFsgrSolver::initializeSolverMemory().
ParamFloat Parametrizer::getCurrentAniFrameTime | ( | ) | [inline] |
Definition at line 90 of file parametrizer.h.
References getAniFrameTime().
Referenced by LbmFsgrSolver::getVelocityAt(), and SimulationObject::step().
ParamFloat Parametrizer::getCurrentGStar | ( | void | ) |
get g star value with fhvol calculations
Definition at line 299 of file parametrizer.cpp.
Referenced by LbmFsgrSolver::adaptTimestep(), and calculateAllMissingValues().
ParamFloat Parametrizer::getDensity | ( | void | ) | [inline] |
get fluid density
Definition at line 172 of file parametrizer.h.
ParamFloat Parametrizer::getDomainSize | ( | void | ) | [inline] |
get the size of a single lbm cell
Definition at line 193 of file parametrizer.h.
ParamFloat Parametrizer::getFluidVolumeHeight | ( | void | ) | [inline] |
get g star value
Definition at line 188 of file parametrizer.h.
ParamVec Parametrizer::getGravity | ( | double | time | ) | [inline] |
Definition at line 138 of file parametrizer.h.
References AnimChannel< Scalar >::get().
Referenced by LbmFsgrSolver::advanceParticles().
ParamFloat Parametrizer::getGStar | ( | void | ) | [inline] |
get g star value
Definition at line 177 of file parametrizer.h.
ParamFloat Parametrizer::getMaxTimestep | ( | void | ) | [inline] |
get the length of a single time step
Definition at line 151 of file parametrizer.h.
Referenced by LbmFsgrSolver::adaptTimestep().
ParamFloat Parametrizer::getMinTimestep | ( | void | ) | [inline] |
get the length of a single time step
Definition at line 153 of file parametrizer.h.
Referenced by LbmFsgrSolver::adaptTimestep().
ParamFloat Parametrizer::getNormalizedGStar | ( | void | ) | [inline] |
get normalized g star value
Definition at line 183 of file parametrizer.h.
ParamFloat Parametrizer::getSimulationMaxSpeed | ( | void | ) | [inline] |
get maximum allowed speed for maxspeed setup
Definition at line 211 of file parametrizer.h.
Referenced by LbmFsgrSolver::adaptTimestep(), and LbmFsgrSolver::initGeometryFlags().
ParamFloat Parametrizer::getSoundSpeed | ( | void | ) | [inline] |
get speed of sound
Definition at line 128 of file parametrizer.h.
int Parametrizer::getTadapLevels | ( | void | ) | [inline] |
get maximum allowed omega for time adaptivity
Definition at line 226 of file parametrizer.h.
ParamFloat Parametrizer::getTadapMaxOmega | ( | void | ) | [inline] |
get maximum allowed omega for time adaptivity
Definition at line 216 of file parametrizer.h.
ParamFloat Parametrizer::getTadapMaxSpeed | ( | void | ) | [inline] |
get maximum allowed speed for time adaptivity
Definition at line 221 of file parametrizer.h.
Referenced by LbmFsgrSolver::adaptTimestep(), and LbmFsgrSolver::initGeometryFlags().
ParamFloat Parametrizer::getTimeFactor | ( | void | ) | [inline] |
get the time scaling factor
Definition at line 158 of file parametrizer.h.
ParamFloat Parametrizer::getTimestep | ( | void | ) |
get the length of a single time step
get extent of the domain = (1,1,1) if parametrizer not used, (x,y,z) [m] otherwise
get (scaled) surface tension
get the length of a single time step
Definition at line 278 of file parametrizer.cpp.
Referenced by LbmFsgrSolver::adaptTimestep(), LbmFsgrSolver::advanceParticles(), LbmFsgrSolver::fineAdvance(), SimulationObject::getTimestep(), LbmFsgrSolver::handleCpdata(), LbmFsgrSolver::initCpdata(), LbmFsgrSolver::initGeometryFlags(), LbmFsgrSolver::initializeSolverMemory(), LbmFsgrSolver::initLevelOmegas(), LbmFsgrSolver::initMovingObstacles(), and SimulationObject::step().
void Parametrizer::initAniFrameTimeChannel | ( | vector< ParamFloat > | val, |
vector< double > | time | ||
) |
Definition at line 534 of file parametrizer.cpp.
References errMsg, PARAM_ANIFRAMETIME, AnimChannel< Scalar >::printChannel(), seenThis(), and simple_enum_gen::val.
Referenced by ntlWorld::addDomain().
void Parametrizer::initGravityChannel | ( | vector< ParamVec > | val, |
vector< double > | time | ||
) |
Definition at line 518 of file parametrizer.cpp.
References errMsg, PARAM_GRAVITY, AnimChannel< Scalar >::printChannel(), seenThis(), and simple_enum_gen::val.
Referenced by ntlWorld::addDomain().
void Parametrizer::initViscosityChannel | ( | vector< ParamFloat > | val, |
vector< double > | time | ||
) |
Definition at line 495 of file parametrizer.cpp.
References errMsg, PARAM_VISCOSITY, AnimChannel< Scalar >::printChannel(), seenThis(), and simple_enum_gen::val.
Referenced by ntlWorld::addDomain().
bool Parametrizer::isUsed | ( | ) | [inline] |
is the parametrizer used at all?
Definition at line 67 of file parametrizer.h.
void Parametrizer::parseAttrList | ( | void | ) |
Initilize variables fom attribute list
Definition at line 84 of file parametrizer.cpp.
References errFatal, errMsg, getAttributeList(), PARAM_ANIFRAMETIME, PARAM_ANISTART, PARAM_DENSITY, PARAM_DOMAINSIZE, PARAM_GRAVITY, PARAM_GSTAR, PARAM_NORMALIZEDGSTAR, PARAM_SOUNDSPEED, PARAM_STEPTIME, PARAM_TIMEFACTOR, PARAM_VISCOSITY, AttributeList::readChannelFloat(), AttributeList::readChannelVec3d(), AttributeList::readFloat(), AttributeList::readString(), seenThis(), and SIMWORLD_INITERROR.
Referenced by SimulationObject::initializeLbmSimulation().
void Parametrizer::seenThis | ( | int | seen | ) | [inline] |
add this flag to the seen values
Definition at line 70 of file parametrizer.h.
References errorOut.
Referenced by calculateAllMissingValues(), initAniFrameTimeChannel(), initGravityChannel(), initViscosityChannel(), parseAttrList(), setAniFrameTimeChannel(), setAniStart(), setDensity(), setDomainSize(), setFluidVolumeHeight(), setGravity(), setGStar(), setNormalizedGStar(), setSimulationMaxSpeed(), setSize(), setSoundSpeed(), setTimeFactor(), setTimestep(), and setViscosity().
void Parametrizer::setAniFrameTimeChannel | ( | ParamFloat | set | ) |
set time of an animation frame (renderer)
Definition at line 527 of file parametrizer.cpp.
References errMsg, PARAM_ANIFRAMETIME, AnimChannel< Scalar >::printChannel(), and seenThis().
Referenced by ntlWorld::addDomain(), and calculateAllMissingValues().
void Parametrizer::setAniStart | ( | ParamFloat | set | ) | [inline] |
set starting time of the animation (renderer)
Definition at line 165 of file parametrizer.h.
References PARAM_ANISTART, and seenThis().
Referenced by ntlWorld::addDomain().
void Parametrizer::setAttrList | ( | AttributeList * | set | ) | [inline] |
set active flag for parametrizer
set attr list pointer
Definition at line 204 of file parametrizer.h.
Referenced by SimulationObject::initializeLbmSimulation().
void Parametrizer::setCalculatedValues | ( | int | set | ) | [inline] |
set the calculated flags integer
Definition at line 84 of file parametrizer.h.
void Parametrizer::setCellSize | ( | ParamFloat | set | ) | [inline] |
set the size of a single lbm cell (dont use, normally set by domainsize and resolution)
Definition at line 196 of file parametrizer.h.
void Parametrizer::setDensity | ( | ParamFloat | set | ) | [inline] |
set fluid density
Definition at line 170 of file parametrizer.h.
References PARAM_DENSITY, and seenThis().
void Parametrizer::setDesiredTimestep | ( | ParamFloat | set | ) | [inline] |
set a desired step time for rescaling/adaptive timestepping
Definition at line 149 of file parametrizer.h.
Referenced by LbmFsgrSolver::adaptTimestep(), and LbmFsgrSolver::initGeometryFlags().
void Parametrizer::setDomainSize | ( | ParamFloat | set | ) | [inline] |
set the size of a single lbm cell
Definition at line 191 of file parametrizer.h.
References PARAM_DOMAINSIZE, and seenThis().
Referenced by ntlWorld::addDomain().
void Parametrizer::setFluidVolumeHeight | ( | ParamFloat | set | ) | [inline] |
set g star value
Definition at line 186 of file parametrizer.h.
References PARAM_FLUIDVOLHEIGHT, and seenThis().
Referenced by LbmFsgrSolver::fineAdvance(), and LbmFsgrSolver::initializeSolverMemory().
void Parametrizer::setFrameNum | ( | int | frame | ) |
advance to next render/output frame
Definition at line 153 of file parametrizer.cpp.
References errMsg.
Referenced by SimulationObject::setFrameNum().
void Parametrizer::setGravity | ( | ParamFloat | setx, |
ParamFloat | sety, | ||
ParamFloat | setz | ||
) |
set the external force
Definition at line 504 of file parametrizer.cpp.
References errMsg, PARAM_GRAVITY, AnimChannel< Scalar >::printChannel(), and seenThis().
Referenced by ntlWorld::addDomain().
void Parametrizer::setGravity | ( | ParamVec | set | ) |
Definition at line 511 of file parametrizer.cpp.
References errMsg, PARAM_GRAVITY, AnimChannel< Scalar >::printChannel(), and seenThis().
void Parametrizer::setGStar | ( | ParamFloat | set | ) | [inline] |
set g star value
Definition at line 175 of file parametrizer.h.
References PARAM_GSTAR, and seenThis().
void Parametrizer::setNormalizedGStar | ( | ParamFloat | set | ) | [inline] |
set normalized g star value
Definition at line 181 of file parametrizer.h.
References PARAM_NORMALIZEDGSTAR, and seenThis().
Referenced by ntlWorld::addDomain().
void Parametrizer::setSeenValues | ( | int | set | ) | [inline] |
set the flags integer
Definition at line 77 of file parametrizer.h.
void Parametrizer::setSimulationMaxSpeed | ( | ParamFloat | set | ) | [inline] |
set maximum allowed speed for maxspeed setup
Definition at line 209 of file parametrizer.h.
References PARAM_SIMMAXSPEED, and seenThis().
Referenced by LbmFsgrSolver::fineAdvance(), LbmFsgrSolver::initGeometryFlags(), and LbmFsgrSolver::initializeSolverMemory().
void Parametrizer::setSize | ( | int | ijk | ) | [inline] |
init domain resoultion
Definition at line 161 of file parametrizer.h.
References PARAM_SIZE, and seenThis().
Referenced by ntlWorld::addDomain(), LbmFsgrSolver::initializeSolverMemory(), and LbmSolverInterface::parseStdAttrList().
void Parametrizer::setSize | ( | int | i, |
int | j, | ||
int | k | ||
) | [inline] |
Definition at line 162 of file parametrizer.h.
References i, PARAM_SIZE, and seenThis().
void Parametrizer::setSoundSpeed | ( | ParamFloat | set | ) | [inline] |
set speed of sound
Definition at line 126 of file parametrizer.h.
References PARAM_SOUNDSPEED, and seenThis().
void Parametrizer::setTadapLevels | ( | int | set | ) | [inline] |
set maximum allowed omega for time adaptivity
Definition at line 224 of file parametrizer.h.
Referenced by LbmFsgrSolver::initializeSolverMemory().
void Parametrizer::setTadapMaxOmega | ( | ParamFloat | set | ) | [inline] |
set maximum allowed omega for time adaptivity
Definition at line 214 of file parametrizer.h.
void Parametrizer::setTadapMaxSpeed | ( | ParamFloat | set | ) | [inline] |
set maximum allowed speed for time adaptivity
Definition at line 219 of file parametrizer.h.
void Parametrizer::setTimeFactor | ( | ParamFloat | set | ) | [inline] |
set the time scaling factor
Definition at line 156 of file parametrizer.h.
References PARAM_TIMEFACTOR, and seenThis().
void Parametrizer::setTimestep | ( | ParamFloat | set | ) | [inline] |
set the length of a single time step
Definition at line 145 of file parametrizer.h.
References PARAM_STEPTIME, and seenThis().
Referenced by calculateAllMissingValues().
void Parametrizer::setViscosity | ( | ParamFloat | set | ) |
set kinematic viscosity
Definition at line 488 of file parametrizer.cpp.
References errMsg, PARAM_VISCOSITY, AnimChannel< Scalar >::printChannel(), and seenThis().
Referenced by ntlWorld::addDomain().