CG
Version 25
|
#include <SmParameters.h>
Public Member Functions | |
SmParameters (const int &numberOfDimensions0=3) | |
~SmParameters () | |
virtual int | chooseUserDefinedBoundaryValues (int side, int axis, int grid, CompositeGrid &cg) |
Interactively define user specific values for boundary conditions. | |
virtual int | displayPdeParameters (FILE *file=stdout) |
Display PDE parameters. | |
virtual aString | getTimeSteppingName () const |
return the name of the time-stepping method | |
virtual int | initializeTimings () |
Define the items that will be timed (this is a virtual function that may be overloaded by derived classes) | |
bool | isFirstOrderSystem () const |
return true if we are solving a first order system | |
bool | isSecondOrderSystem () const |
return true if we are solving a second order system | |
virtual int | saveParametersToShowFile () |
Save PDE specific parameters in the show file. | |
virtual int | setParameters (const int &numberOfDimensions0=2, const aString &reactionName=nullString) |
initialize the parameters. | |
virtual int | setPdeParameters (CompositeGrid &cg, const aString &command=nullString, DialogData *interface=NULL) |
Prompt for changes in the PDE parameters. | |
virtual int | setTwilightZoneFunction (const TwilightZoneChoice &choice, const int °reeSpace=2, const int °reeTime=1) |
set the twilight-zone function. | |
virtual int | updateToMatchGrid (CompositeGrid &cg, IntegerArray &sharedBoundaryCondition) |
Update the parameters when the grid has changed. | |
Public Member Functions inherited from Parameters | |
bool | registerBC (int id, const aString &name, bool replace=false) |
Add a bc with an integer identifier and a string name. | |
bool | registerInterfaceType (int id, const aString &name, bool replace=false) |
Add a interface type with an integer identifier and a string name. | |
bool | registerBCModifier (const aString &name, Parameters::CreateBCModifierFromName createBCMod, bool replace=false) |
Add a bc modifier with an integer identifier and a string name. | |
Parameters (const int &numberOfDimensions0=3) | |
constructor. | |
virtual | ~Parameters () |
destructor. | |
virtual int | addShowVariable (const aString &name, int component, bool variableIsOn=TRUE) |
Add a show variable name to the list of possible show file variables. | |
int | addTiming (const aString &timeVariableName, const aString &timeLabel) |
Add a new item to be timed. : name of the variable in the dbase : label to be used on output. | |
virtual int | assignParameterValues (const aString &label, RealArray &values, const int &numRead, aString *c, real val[], char *extraName1=0, const int &extraValue1Location=0, char *extraName2=0, const int &extraValue2Location=0, char *extraName3=0, const int &extraValue3Location=0) |
virtual int | assignParameterValues (const aString &label, RealArray &values, const int &numRead, char c[][10], real val[], char *extraName1=0, const int &extraValue1Location=0, char *extraName2=0, const int &extraValue2Location=0, char *extraName3=0, const int &extraValue3Location=0) |
virtual int | bcIsAnInterface (int bc) const |
Return true if the bc value corresponds to an interface boundary condition. | |
virtual int | bcIsTimeDependent (int side, int axis, int grid) const |
Return true if the boundary face has a boundary condition that varies in time. | |
virtual int | bcType (int side, int axis, int grid) const |
Return the boundary condition type, a value from the enum Parameters::BoundaryConditionType. | |
virtual int | bcVariesInSpace (int side, int axis, int grid) const |
Return true if the boundary face has a boundary condition that varies in space. | |
virtual int | bcVariesInSpace (const Index &side=nullIndex, const Index &axis=nullIndex, const Index &grid=nullIndex) const |
Return true if any of a set of boundary faces has a boundary condition that varies in space. | |
virtual int | buildBodyForceRegionsDialog (DialogData &dialog, BodyForceRegionParameters ®ionPar) |
Build the dialog that defines different regions for body forces and boundary data. | |
virtual int | buildErrorEstimator () |
build the AMR error estimator. | |
virtual int | buildForcingProfilesDialog (DialogData &dialog, BodyForceRegionParameters ®ionPar) |
Build the dialog that defines different profiles for the forcing (.e.g. parabolic shape) | |
virtual int | buildMaterialParametersDialog (DialogData &dialog, BodyForceRegionParameters ®ionPar) |
Build the dialog that allows material parameters to be set. | |
virtual int | buildReactions () |
Construction the appropriate Reactions class. | |
virtual int | buildTemperatureBoundaryConditionsDialog (DialogData &dialog, BodyForceRegionParameters ®ionPar) |
Build the dialog that defines different options for the temperature boundary condition on a region. For example, set the right-hand-side or define the coefficients in the temperature BC equation. | |
virtual int | checkForValidBoundaryCondition (const int &bc, bool reportErrors=true) |
virtual int | conservativeToPrimitive (GridFunction &gf, int gridToConvert=-1, int fixupUnsedPoints=false) |
Convert conservative variables to primitive. | |
virtual int | defineBoundaryConditions (CompositeGrid &cg, const IntegerArray &originalBoundaryCondition, const aString &command=nullString, DialogData *interface=NULL) |
virtual int | defineVariableBoundaryValues (int side, int axis, int grid, CompositeGrid &cg) |
Interactively define boundary values that vary along a boundary. This function is called from setBoundaryConditionValues. | |
virtual void | displayPolynomialCoefficients (RealArray &cx, RealArray &ct, aString *componentName, int numberOfComponents, FILE *file) |
Output the form of the polynomial TZ solution . | |
virtual int | get (const GenericDataBase &dir, const aString &name) |
virtual int | getBodyForceRegionsOption (const aString &answer, BodyForceRegionParameters ®ionPar, DialogData &dialog) |
: Look for a response to the BodyForceDialog | |
RealArray & | getBoundaryData (int side, int axis, int grid, MappedGrid &mg) |
Allocate the boundary data for a given side of a grid. | |
BoundaryData::BoundaryDataArray & | getBoundaryData (int grid) |
return the boundary data for a grid | |
virtual int | getForcingProfilesOption (const aString &answer, BodyForceRegionParameters ®ionPar, DialogData &dialog) |
: Look for a response to the ForcingProfiles | |
virtual int | getComponents (IntegerArray &components) |
Get an array of component indices. IS THIS USED ANYMORE? YES, BY THE RAMP BC. | |
virtual int | getDerivedFunction (const aString &name, const realCompositeGridFunction &u, realCompositeGridFunction &v, const int component, const real t, Parameters ¶meters) |
Assign the values of a derived quantity. | |
virtual int | getDerivedFunction (const aString &name, const realMappedGridFunction &u, realMappedGridFunction &v, const int component, const int grid, const real t, Parameters ¶meters) |
Assign the values of a derived quantity. | |
virtual int | getGridIsImplicit (int grid) const |
Return 1 or 2 if the grid is integrated implicitity. | |
virtual realCompositeGridFunction & | getKnownSolution (CompositeGrid &cg, real t) |
Return a known solution. | |
virtual realMappedGridFunction & | getKnownSolution (real t, int grid, const Index &I1, const Index &I2, const Index &I3, bool initialCall=false) |
Return a known solution on a component grid. | |
virtual int | getMaterialParametersOption (const aString &answer, BodyForceRegionParameters ®ionPar, DialogData &dialog) |
: Look for a response to the MaterialParametersDialog | |
virtual int | getNormalForce (realCompositeGridFunction &u, realSerialArray &normalForce, int *ipar, real *rpar) |
Return the normal force on a boundary. | |
const ReferenceFrameEnum | getReferenceFrame () |
return the reference frame for the PDEs in a domain. | |
int | getShowVariable (const aString &name, int &component, bool &variableIsOn) const |
Return the component number of a show variable with a given name. Also return whether the variable is saved in the show file. | |
virtual int | getTemperatureBoundaryConditionsOption (const aString &answer, BodyForceRegionParameters ®ionPar, DialogData &dialog) |
: Look for a response to the ForcingProfiles | |
virtual int | getTimeDependenceBoundaryConditionParameters (int side, int axis, int grid, RealArray &values) const |
Retrieve time dependent boundary values. | |
virtual int | getUserBoundaryConditionParameters (int side, int axis, int grid, RealArray &values) const |
Retrieve user defined boundary values. | |
virtual int | getUserDefinedKnownSolution (real t, CompositeGrid &cg, int grid, realArray &ua, const Index &I1, const Index &I2, const Index &I3) |
virtual bool | gridIsMoving (int grid) const |
return true if this grid is moving. | |
virtual int | howManyBcTypes (const Index &side, const Index &axis, const Index &grid, BoundaryConditionType bc) const |
Return the number of faces where there is a boundary condition of type "bc", from the specified faces. | |
virtual int | inputParameterValues (const aString &answer, const aString &label, RealArray &values) |
Parse an input string "answer" that assigns values to components. | |
virtual bool | isAdaptiveGridProblem () const |
virtual bool | isAxisymmetric () const |
return true if this is an axisymmetric problem on a 2D grid | |
virtual bool | isMixedBC (int bc) |
virtual bool | isMovingGridProblem () const |
return true if this is a moving grid problem. | |
virtual bool | isSteadyStateSolver () const |
return true if this is a steady state problem. | |
virtual int | numberOfGhostPointsNeeded () const |
return the number of ghost points needed by this method. | |
virtual int | numberOfGhostPointsNeededForImplicitMatrix () const |
return the number of ghost points needed by this method for the implicit matrix. | |
virtual int | openLogFiles (const aString &name) |
Open the log files. | |
virtual int | parseValues (const aString &answer, aString *name, real *value, int maxNumber) |
virtual int | primitiveToConservative (GridFunction &gf, int gridToConvert=-1, int fixupUnsedPoints=false) |
Convert primitive variables to conservative. | |
virtual int | put (GenericDataBase &dir, const aString &name) const |
virtual int | readFromAShowFile (ShowFileReader &showFileReader, CompositeGrid &cgRef, CompositeGrid &cg, realCompositeGridFunction &u, int &solutionNumber) |
: interface for reading a solution (e.g. initial condition or known solution) from a show file. | |
virtual bool | saveLinearizedSolution () |
Return true if we should save the linearized solution for implicit methods. | |
virtual int | setBcIsTimeDependent (int side, int axis, int grid, bool trueOrFalse=true) |
Specify whether a boundary face has a boundary condition that varies in time. | |
virtual int | setBcType (int side, int axis, int grid, BoundaryConditionType bc) |
Set the boundary condition type for a particular side. | |
virtual int | setBcModifier (int side, int axis, int grid, int bcm) |
Set the boundary condition midifier id. | |
virtual int | setBcVariesInSpace (int side, int axis, int grid, bool trueOrFalse=true) |
Specify whether a boundary face has a boundary condition that varies in space. | |
virtual int | setBoundaryConditionValues (const aString &answer, const IntegerArray &originalBoundaryCondition, CompositeGrid &cg) |
virtual int | setDefaultDataForABoundaryCondition (const int &side, const int &axis, const int &grid, CompositeGrid &cg) |
virtual int | setGridIsImplicit (int grid=-1, int value=1) |
Specify if this grid should be integrated implicitly when an implicit time stepping method is used. | |
virtual int | setInfoFile (FILE *file) |
specify which file to write informational messages to. | |
int | setShowVariable (const aString &name, const bool variableIsOn) |
Turn on or off the saving of a variable in the show file. saved in the show file. | |
virtual int | setUserDefinedParameters () |
Set user defined parameters. | |
virtual int | setTimeDependenceBoundaryConditionParameters (int side, int axis, int grid, RealArray &values) |
Assign time dependent boundary values. | |
virtual int | setTwilightZoneParameters (CompositeGrid &cg, const aString &command=nullString, DialogData *interface=NULL) |
Prompt for changes to the twilight zone parameters. | |
virtual int | setUserBcType (int side, int axis, int grid, int bc) |
Set the user defined boundary condition type for a particular side. | |
virtual int | thereAreTimeDependentUserBoundaryConditions (const Index &side, const Index &axis, const Index &grid) const |
Return true if there are time dependent user boundary condition. | |
virtual int | setupBodyForcing (CompositeGrid &cg) |
virtual int | setUserBoundaryConditionParameters (int side, int axis, int grid, RealArray &values) |
Assign user defined boundary values. | |
virtual int | updateKnownSolutionToMatchGrid (CompositeGrid &cg) |
Update the known solution to match the grid. | |
virtual int | updatePDEparameters () |
Update the PDE parameters to be consistent after some values have changed. | |
virtual int | updateShowFile (const aString &command=nullString, DialogData *interface=NULL) |
Open or close show files, set variables that appear in the show file. | |
virtual int | updateTurbulenceModels (CompositeGrid &cg) |
Update turbulence models. | |
virtual int | updateUserDefinedEOS (GenericGraphicsInterface &gi) |
virtual int | updateUserDefinedKnownSolution (GenericGraphicsInterface &gi) |
virtual bool | useConservativeVariables (int grid=-1) const |
return true if the PDE solver uses conservative variables. | |
virtual int | userBcType (int side, int axis, int grid) const |
Return the user defined boundary condition type. | |
Static Public Attributes | |
static aString | PDEModelName [numberOfPDEModels+1] |
static aString | PDEVariationName [numberOfPDEVariations+1] |
static aString | bcName [numberOfBCNames] |
Static Public Attributes inherited from Parameters | |
static aString | turbulenceModelName [numberOfTurbulenceModels+1] |
static aString | timeSteppingName [numberOfTimeSteppingMethods+1] |
static real | spalartAllmarasScaleFactor =1. |
static real | spalartAllmarasDistanceScale =1.e-10 |
static int | checkForFloatingPointErrors =0 |
Additional Inherited Members | |
Public Attributes inherited from Parameters | |
DataBase | dbase |
The database holds almost all parameters, see dbase entries. | |
aString | pdeName |
int | numberOfBCNames |
std::map< int, aString > | bcNames |
std::map< int, aString > | icNames |
std::map< int, aString > | bcmNames |
std::map< size_t, BCModifier * > | bcModifiers |
std::map< std::string, CreateBCModifierFromName > | bcModCreators |
SmParameters::SmParameters | ( | const int & | numberOfDimensions0 = 3 | ) |
References abc3, abc4, abc5, abcEM2, abcPML, bcName, conservative, Parameters::dbase, defaultTimeStepping, dirichletBoundaryCondition, displacementBC, godunov, hemp, initializeTimings(), interfaceBoundaryCondition, interpolation, linearElasticity, nonConservative, nonlinearMechanics, numberOfBCNames, numberOfPDEModels, numberOfPDEVariations, PDEModelName, Parameters::pdeName, PDEVariationName, rbcLocal, rbcNonLocal, Parameters::registerBC(), slipWall, symmetry, and tractionBC.
SmParameters::~SmParameters | ( | ) |
References Parameters::dbase.
|
virtual |
Interactively define user specific values for boundary conditions.
This function will be called when interactively choosing boundary conditions and the option userDefinedBoundaryData is used.
You may add a time dependence to an existing boundary condition or you may define a new boundary condition. In this function you should prompt for the boundary condition to be used as well as any parameters that will be needed. Parameters can be saved using the setUserBoundaryConditionParameters function.
side,axis,grid | (input): assign boundary conditions for this face. |
Reimplemented from Parameters.
References assert(), Parameters::dbase, i, n, OV_ABORT(), printF(), Parameters::setBcIsTimeDependent(), Parameters::setUserBcType(), Parameters::setUserBoundaryConditionParameters(), and x.
|
virtual |
Display PDE parameters.
file | (input) : output information to this file. |
Reimplemented from Parameters.
References Parameters::dbase, and Parameters::displayPdeParameters().
|
virtual |
return the name of the time-stepping method
Reimplemented from Parameters.
References adamsBashforth2, adamsBashforthSymmetricThirdOrder, adamsPredictorCorrector2, adamsPredictorCorrector4, Parameters::dbase, defaultTimeStepping, forwardEuler, improvedEuler, modifiedEquationTimeStepping, rungeKuttaFourthOrder, and stoermerTimeStepping.
|
virtual |
Define the items that will be timed (this is a virtual function that may be overloaded by derived classes)
Reimplemented from Parameters.
References Parameters::addTiming(), and Parameters::dbase.
Referenced by SmParameters().
bool SmParameters::isFirstOrderSystem | ( | ) | const |
return true if we are solving a first order system
References Parameters::dbase, godunov, and hemp.
Referenced by setTwilightZoneFunction().
bool SmParameters::isSecondOrderSystem | ( | ) | const |
return true if we are solving a second order system
References conservative, Parameters::dbase, and nonConservative.
|
virtual |
Save PDE specific parameters in the show file.
These parameters can be used for a restart. They can also be used, for example, by the user defined derived functions (when viewing the show file with plotStuff).
Reimplemented from Parameters.
References assert(), Parameters::dbase, lambda, lambdaGrid, mu, muGrid, and Parameters::saveParametersToShowFile().
|
virtual |
initialize the parameters.
numberOfDimensions0 | (input) : number of dimensions. |
reactionName | (input) : optional name of a reaction oe a reaction file that defines the chemical reactions, such as a Chemkin binary file. |
Reimplemented from Parameters.
References Parameters::addShowVariable(), assert(), c, conservative, Parameters::dbase, Parameters::defaultValue, godunov, hemp, m1, m2, nonConservative, printF(), tc, uc, vc, and wc.
|
virtual |
Prompt for changes in the PDE parameters.
cg | (input) : Composite grid to use. |
command | (input) : if non-null, parse this string for a command. |
interface | (input) : use this graphics dialog. |
Reimplemented from Parameters.
References addPrefix(), assert(), axis, Parameters::dbase, godunov, grid, hemp, if(), interfaceBoundaryCondition, lambda, lambdaGrid, m, mg, mu, muGrid, printF(), rho, and side.
|
virtual |
set the twilight-zone function.
choice_ | (input) : the twilight-zone option. |
degreeSpace | (input) : the degree in space for a polynomial function. |
degreeTime | (input) : the degree in time for a polynomial function. |
Reimplemented from Parameters.
References all, amplitude, assert(), assignStress, assignVelocities, cc, conservative, Parameters::dbase, ft, fx, fy, fz, gt, gx, gy, gz, i, isFirstOrderSystem(), m1, m2, m3, n, nc, ndp, nonConservative, omega, OV_ABORT(), Parameters::polynomial, printF(), Parameters::pulse, s11c, s12c, s13c, s21c, s22c, s23c, s31c, s32c, s33c, spatialCoefficientsForTZ, tc, timeCoefficientsForTZ, Parameters::trigonometric, tz, uc, v1c, v2c, v3c, vc, and wc.
|
virtual |
Update the parameters when the grid has changed.
cg | (input) : new CompositeGrid |
sharedBoundaryCondition | (input) : sharedBoundaryCondition(side,axis,grid) : = side2+2*(axis2+3*grid2) : match to (side2,axis2,grid2) |
Reimplemented from Parameters.
References Parameters::dbase, grid, lambda, lambdaGrid, mu, muGrid, and Parameters::updateToMatchGrid().
|
static |
Referenced by Cgsm::setBoundaryCondition(), and SmParameters().
|
static |
Referenced by Cgsm::setupPde(), and SmParameters().
|
static |
Referenced by Cgsm::setupPde(), SmParameters(), and Cgsm::writeParameterSummary().