CG
Version 25
|
#include <MpParameters.h>
Public Member Functions | |
MpParameters (const int &numberOfDimensions0=3) | |
~MpParameters () | |
int | displayInterfaceInfo (FILE *file=stdout) |
Print a summary of information about the interfaces. | |
virtual int | displayPdeParameters (FILE *file=stdout) |
Display PDE parameters. | |
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. | |
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 | chooseUserDefinedBoundaryValues (int side, int axis, int grid, CompositeGrid &cg) |
Interactively define user specific values for boundary conditions. | |
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 aString | getTimeSteppingName () const |
return the name of the time-stepping method | |
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 | initializeTimings () |
Define the items that will be timed (this is a virtual function that may be overloaded by derived classes) | |
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 | setTwilightZoneFunction (const TwilightZoneChoice &choice, const int °reeSpace=2, const int °reeTime=2) |
set the twilight-zone function. | |
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 | updateToMatchGrid (CompositeGrid &cg, IntegerArray &sharedBoundaryCondition=Overture::nullIntArray()) |
Update the parameters when the grid has changed. | |
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. | |
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 |
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 |
MpParameters::MpParameters | ( | const int & | numberOfDimensions0 = 3 | ) |
References Parameters::dbase, defaultMultiDomainAlgorithm, e, and Parameters::initializeTimings().
MpParameters::~MpParameters | ( | ) |
References Parameters::dbase.
int MpParameters::displayInterfaceInfo | ( | FILE * | file = stdout | ) |
Print a summary of information about the interfaces.
References Parameters::dbase, InterfaceDescriptor::estimatedConvergenceRate, InterfaceDescriptor::interfaceOmega, InterfaceDescriptor::interfaceTolerance, InterfaceDescriptor::maximumNumberOfIntefaceIterations, InterfaceDescriptor::numberOfInterfaceSolves, and InterfaceDescriptor::totalNumberOfInterfaceIterations.
Referenced by setPdeParameters().
|
virtual |
Display PDE parameters.
file | (input) : output information to this file. |
Reimplemented from Parameters.
References Parameters::dbase, and Parameters::displayPdeParameters().
|
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, printF(), 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 printF(), and Parameters::setParameters().
|
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(), d, Parameters::dbase, defaultMultiDomainAlgorithm, displayInterfaceInfo(), if(), InterfaceDescriptor::interfaceOmega, InterfaceDescriptor::interfaceTolerance, ok, OV_ABORT(), printF(), stepAllThenMatchMultiDomainAlgorithm, and Parameters::updatePDEparameters().