IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Num.SimJMatProFileManager4_0 Class Reference

File manager for interfacing the JMatPro software version 4.0. More...

+ Inheritance diagram for IG.Num.SimJMatProFileManager4_0:
+ Collaboration diagram for IG.Num.SimJMatProFileManager4_0:

Public Member Functions

 SimJMatProFileManager4_0 (string workingDirectoryPath)
 Construct JMatPro interface's file manager, with specified working directory. More...
 
 SimJMatProFileManager4_0 (string workingDirectoryPath, string settingsFilePath)
 Construct JMatPro interface's file manager, with specified path to the file where settings are stored. More...
 
 SimJMatProFileManager4_0 (string workingDirectoryPath, SimJmatProSettingsDto settings)
 Construct JMatPro interface's file manager, with specified settings object. More...
 
- Public Member Functions inherited from IG.Num.SimJMatProFileManagerBase
 SimJMatProFileManagerBase (string workingDirectoryPath)
 Construct JMatPro interface's file manager, with specified working directory. More...
 
 SimJMatProFileManagerBase (string workingDirectoryPath, string settingsFilePath)
 Construct JMatPro interface's file manager, with specified working directory and path to the file where settings are stored. More...
 
 SimJMatProFileManagerBase (string workingDirectoryPath, SimJmatProSettingsDto settings)
 Construct JMatPro interface's file manager, with specified working directory and settings object. More...
 
bool LockFileMutexCheckAbandoned ()
 Check whether the file system locking mutex (property LockFileMutex) has been abandoned, and returns true if it has been (otherwise, false is returned). More...
 
void Error (string errorMsg)
 Temporary utility for reporting errors in the development stage. More...
 
void ErrorNotImplemented (string errorMsg)
 Temporary utility for reporting errors in the development stage. More...
 
virtual void GetRandomMaterialParameters (ref IVector result)
 Generates a random vector of material parameters whose elements (components) lie within the lower and upper bounds on parameters, and stores it to the specified vector. More...
 
virtual void GetRandomMaterialParameters (IRandomGenerator rand, ref IVector result)
 Generates a random vector of material parameters whose elements (components) lie within the lower and upper bounds on parameters, and stores it to the specified vector. More...
 
virtual void CreateJointParameters (IVector materialParameters, IVector processParameters, ref IVector jointParameters)
 Combines the specified vectors of materaial and process parameters into a joint vector of process parameters and stored it into the specified variable. More...
 
virtual void ExtractMaterialParameters (IVector jointParameters, ref IVector materialParameters)
 Extracts the vector of material parameters from the specified joint vector of problem parameters, and stores it to the specified variable. More...
 
virtual void ExtractProcessParameters (IVector jointParameters, ref IVector processParameters)
 Extracts the vector of process parameters from the specified joint vector of problem parameters, and stores it to the specified variable. More...
 
virtual void ExtractMaterialAndProcessParameters (IVector jointParameters, ref IVector materialParameters, ref IVector processParameters)
 Extracts the vectors of material and process parameters from the specified joint vector of problem parameters, and stores them to the specified variable. More...
 
virtual string GetMaterialDirectoryName (IVector parameters)
 Returns name of the material directory for the specified material parameters. More...
 
virtual bool CreateMaterialDataDirectory ()
 Creates the data directory for the current material (specified by material parameters). More...
 
bool MoveMaterialDirectory (string materialDirectoryPath, string storageDirectoryPath)
 Moves the specified material directory to the specified storage directory. More...
 
int MoveMaterialDirectoryToStorageMaterialCalculated ()
 Moves to the appropeiate storage directory those material directories for which material properties have been successfully calculated. More...
 
int MoveMaterialDirectoryToStorageBusyFlagSet ()
 Moves to the appropeiate storage directory those material directories for which busy flag remained set. More...
 
int MoveMaterialDirectoryToStorageTimedout ()
 Moves to the appropeiate storage directory those material directories for which material properties calculation has timed out. More...
 
int MoveMaterialDirectoryToStorageCalculationFailed ()
 Moves to the appropeiate storage directory those material directories for which material properties calculation failed (regardless of reason). More...
 
int MoveMaterialDirectoryToStorageDataCorrupted ()
 Moves to the appropeiate storage directory those material directories for which material data is corrupted (e.g. material parameters are not written properly). More...
 
int MoveMaterialDirectoriesToStorageAll (bool moveBusy, bool moveMaterialCalculated)
 Moves all material directries to the appropriate storage directories, dependent on the state of calculation in any particular directory. More...
 
bool IsMaterialCalculationBusy ()
 Flag indicating whether material calculation for the current material parameters is in progress. More...
 
virtual void ClearMaterialCalculationBusy ()
 Clears the flag indicating that material calculation is in progress. More...
 
virtual bool SetMaterialCalculationBusy ()
 Sets the flag indicating that material calculation directory is used, and returns true if the flag was successfully set. More...
 
bool IsMaterialCalculationFinished ()
 Flag indicating whether material calculation for the current material parameters is finished. More...
 
virtual void ClearMaterialCalculationFinished ()
 Clears the flag indicating that material calculation is finished. More...
 
virtual void SetMaterialCalculationFinished ()
 Sets the flag indicating that material calculation is finished. More...
 
bool IsMaterialCalculationTimedout ()
 Flag indicating whether material calculation for the current material parameters has timed out. More...
 
virtual void ClearMaterialCalculationTimedout ()
 Clears the flag indicating that material calculation has timed out. More...
 
virtual void SetMaterialCalculationTimedout (double timeOutSeconds)
 Sets the flag indicating that material calculation has timed out. More...
 
bool IsMaterialResultsWrong ()
 Flag indicating whether material results are incorrect. More...
 
virtual void ClearMaterialResultsWrong ()
 Clears the flag indicating that material result file is incorrect. More...
 
virtual void SetMaterialResultsWrong (string errorsString)
 Sets the flag indicating that material result file is incorrect. More...
 
virtual void JMatLaunch ()
 Safely launches the JMatpPro software. More...
 
virtual void JMatOpen ()
 Just starts the JMatPro software. More...
 
virtual void JMatRepair ()
 Repairs JMatPro, e.g. if it has been stopped abruptly or if another version is already running somewhere such that we could not start it. More...
 
virtual void JMatClose ()
 Closes JMatPro normally, by simulated user interaction. More...
 
virtual void JMatStartCalculation ()
 Starts JMatPro calculation. More...
 
virtual void JMatSaveResults ()
 Saves results of JMatPro calculation. More...
 
virtual void JMatChangeTemperatureUnit ()
 Changes (toggles once) temperature unit in an open window of JMatPro (software must be running and its main window on the top of window stack) by running the appropriate script. More...
 
virtual void JMatChangeFractionUnit ()
 Changes (toggles once) fraction unit in an open window of JMatPro (software must be running and its main window on the top of window stack) by running the appropriate script. More...
 
virtual bool JMatWaitCalculation ()
 Waits until JMatPro calculation finishes. More...
 
virtual bool JMatWaitResultsSaved ()
 Waits until JMatPro results are saved. More...
 
void PrepareDataDefinitionsFromSuperset ()
 Prepares data definitions from the superset data definition file. More...
 
void PrapareDefaultMaterialParameters ()
 Calculates default material parameters as the middle point of allowed intervals, and saves the parameters. More...
 
void PrepareSettingsTemplate ()
 Saves the current settings to a file used as template for settings file for JMatPro interface' file manager. More...
 
string GetMaterialDirectoryPath (string specifiedMaterialDirectoryPath)
 Returns a valid (existent) material data directory path that is obtaines form the specified path, or throws exception if such a directory could not be obtained. More...
 
virtual string GetMaterialDirectoryPath (string specifiedMaterialDirectoryPath, bool throwExceptions)
 Returns a valid (existent) material data directory path that is obtaines form the specified path, or null if such a directory could not be obtained (or, if throwExceptions is true, exception is thrown in this case). More...
 
virtual void ClearMaterialResultsWrongFlag (string materialDirectoryPath)
 Clears the flag indicating that material result file is incorrect. More...
 
virtual void SetMaterialResultsWrongFlag (string materialDirectoryPath, string dataErrorDescriptions)
 Sets the flag indicating that material result file is incorrect. More...
 
bool ClearBusyFlag (string materialDirectoryPath)
 Clears the busy flag from the specified material directory, and returns a flag indicating whether clearing of a flag has actually occurred. More...
 
virtual void ClearMaterialCalculationFinishedFlag (string materialDirectoryPath)
 Clears the flag indicating that material calculation is successfully finished, from the specified directory. More...
 
bool GetMaterialParameters (string materialDirectoryPath, ref IVector parameters)
 Gets (reads) material parameters from the specified material data directory. More...
 
bool IsMaterialDirectoryCorrupted (string materialDirectoryPath)
 Returns a flag indicated whether the specified material data directory is corrupted in the sense that some material data in it is corrupted (i.e. the vector of material parameters is not properly written). More...
 
void GetMaterialDirectories (ref List< DirectoryInfo > directories)
 Obtains a list of paths of all material directories, and stores them on the specified list. More...
 
void GetMaterialDirectoriesWhereCalculationFailed (ref List< DirectoryInfo > directories)
 Obtains a list of paths of all material directories where material properties calculation has failed. These are characterized as material directories where the busy flag is not set but material data is also not available (which means that material results file does not exist or is too small or the message file for the material calculation finished message does not exist). More...
 
void GetMaterialDirectoriesWhereBusySet (ref List< DirectoryInfo > directories)
 Obtains a list of paths of all material directories where the busy flag is set (which may be a consequence of some failure). More...
 
void GetMaterialDirectoriesWhereTimedout (ref List< DirectoryInfo > directories)
 Obtains a list of all material directories where material calculation has timed out. More...
 
void GetMaterialDirectoriesWhereMaterialCalculated (ref List< DirectoryInfo > directories)
 Obtains a list of paths of all material directories where material properties were successfully calculated. These are characterized as material directories where the busy flag is not set but material data is also available (which means that material results file exists and is large enough and the message file for the material calculation finished message exists). More...
 
void GetMaterialDirectoriesWhereMaterialDataCorrupted (ref List< DirectoryInfo > directories)
 Obtains a list of paths of all material directories where material data is corrupted. The method IsMaterialDirectoryCorrupted is used to test material directories for corruption. More...
 
int WriteMaterialCalculationStatistics (bool printIndividualDirectories, bool includeCorrupted)
 Prints statistics of material properties calculation. More...
 
int WriteMaterialDirectoriesWhereMaterialCalculated ()
 Prints (to console and log file) information about material directories where material properties were successfully calculated. More...
 
bool ReleaseAbandonedMutex ()
 Releases the mutex in the case it has been abandoned, and returns a flag indicating whether the mutex has actually been abandoned. Has no effect if mutex is not abandoned. More...
 
void ClearBusyFlags ()
 Clears the busy flag in all directories where it is still set (possibly because some procedure has hanged). More...
 
void RetryCalculateMaterialProperties (string materialDirectoryPath)
 Retries calculation of More...
 
void RetryCalculateMaterialProperties (string materialDirectoryPath, int whichCalculation, int numCalculations)
 Retries calculation of More...
 
int RetryCalculateMaterialProperties ()
 Retries calculation of material properties in the directories where calculation obviously failed. More...
 
void KillJMatPro ()
 Kills the JMatPro process. More...
 
bool IsJMatProRunning ()
 Returns a flag indicating whether the JMatPro application is currently running. More...
 
bool IsMaterialDataDirectoryPrepared ()
 Whether material data is prepared. More...
 
void CalculateMaterialPropertiesRandomSet (int numParameterSets)
 Calculates material properties by JMatPro for a set of random parameters. More...
 
void CalculateMaterialProperties (string parametersPath)
 Calculates material properties at parameters that are read from a file. More...
 
void CalculateMaterialPropertiesDef (string parametersPath)
 Calculates material properties at parameters that are read from a data definition file as default values. More...
 
void CalculateMaterialProperties (IVector parameters)
 Calculates the material properties at the specified vector of material parameters, and stores results to the appropriate directory. More...
 
void CalculateMaterialProperties ()
 Calculates the material properties at the current vector of material parameters, and stores results to the appropriate directory. More...
 
void MaterialCalculationsStatisticsPrint (string introductionString)
 Prints calculation statistics after another material calculation is finished. More...
 
void MaterialCalculationStatisticsReset (int numIntendedCalculations)
 Resets material calculation statistics counters. More...
 
void MaterialCalculationStatisticsStart ()
 Updates material calculaiton statistics counters at the beginning of a new material calculation. More...
 
void MaterialCalculationStatisticsStop (CalculationStatus status)
 Updates material calculation statistics counters after completion of a single calculation. More...
 
virtual void GetMaterialParametersDefault (ref IG.Num.IVector parameters)
 Returns vector containing default values for material parameters. More...
 
virtual List< JMatProElemetDataCalculateJMatInput (IVector materialParameters)
 Calculates and returns input data for JMatPro from the vector of material parameters. More...
 
virtual void PrepareJMatInput (IVector materialParameters, string filePath)
 Prepares input file for JMatPro (composition of steel) according to the specified material parameters. More...
 
override string ToString ()
 
virtual void CopyToSettingsPlain< FmType > (SimJMatProSettingsDto< FmType > settings)
 Copies settings from the current JMatPro file manager to the specified settings object. More...
 
virtual void CopyFromSettingsPlain< FmType > (SimJMatProSettingsDto< FmType > settings)
 Copies settings fom the specified settings object to the current JMatPro file manager. More...
 
void SaveSettings (string filePath)
 Saves (serializes) the settings of the current JMatPro interface' file manager to the specified JSON file. More...
 
void SaveSettings (string filePath, bool append)
 Saves (serializes) the settings of the current JMatPro interface' file manager to the specified JSON file. More...
 
void LoadSettings (string filePath)
 Restores (deserializes) the current JMatPro interface' file manager settings from the specified file in JSON format. More...
 
JMatProElemetData GetElementData (string elementSymbol)
 Returns data about the specified chemical element. More...
 
double GetElementAtomicMass (string elementSymbol)
 Returns atomic mass of the chemical elemen with the specified symbol. More...
 
string GetElementName (string elementSymbol)
 Returns name of the chemical elemen with the specified symbol. More...
 
int GetNumCompositionElements ()
 Returns number of elements that are included in JMatPro input files for steel. More...
 
string GetCompositionElementSymbol (int which)
 Returns the chemical symbol of the specified element. More...
 
string GetSimulatorBaseDirectoryName (int whichSimulator)
 Calculates and returns name of the base simulator directory with the specified index (zero-based). More...
 
string GetSimulatorBaseDirectoryPath (int whichSimulator)
 Calculates and returns path of the root simulator directory with the specified index (zero-based). More...
 
virtual string GetSimulatorCastingRobertDirectoryPath (int whichsimulator)
 Calculates and returns path of the Robert Vertnik's casting simulator's main directory with the specified index (zero-based). More...
 
virtual void InitSimCastingRobert (string rootDirectory, string projectName, string simulationName)
 Initializes the data for casting simulation interface. More...
 
void PrepareSimulatorData (SimCastingRobertFileManager simulator, string materialDirectoryPath)
 Prepares input data for simulator, in particular the material properties, which are obtained from the material data directory whose path is specified. More...
 
virtual void CalculateSimulatedResponse (SimCastingRobertFileManager simulator, string materialDirectory, IVector inputProcessParameters, ref IVector inputJointParameters, ref IVector outputValues)
 Calculates simulator's response at the specified process parameters, for the specified material directory (that specifies material parameters and properties), and stores joint input parameters and output values. More...
 
virtual int CalculateSimulatedResponse (SimCastingRobertFileManager simulator, string materialDirectory, string datasetName, params IVector[] inputProcessParameters)
 Calculates response by the specified simulator, for the specified process parameter vectors and the specified material (specified by the material directory approximate path), and stores calculated data in the appropriate file in the material data directory (defined by the datasetName). More...
 
virtual int CalculateSimulatedResponseDefault (SimCastingRobertFileManager simulator, string materialDirectory, string datasetName)
 Calculates response by the specified simulator, for the specified process parameter vectors and the specified material (specified by the material directory approximate path), and stores calculated data in the appropriate file in the material data directory (defined by the datasetName). More...
 

Properties

override string NameJMatProBase [get, set]
 Name of the JMatPro directory (without root directories) and executable. More...
 
- Properties inherited from IG.Num.SimJMatProFileManagerBase
object Lock [get]
 This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More...
 
object InternalLock [get]
 Used internally for locking access to internal fields. More...
 
string LockFileMutexName [get, protected set]
 Name of the mutex for system-wide locking of files. More...
 
Mutex LockFileMutex [get]
 Mutex for system-wide exclusive locks for file system operations related to the current class. More...
 
int OutputLevel [get, set]
 Level of information that is output to the console by some methods. More...
 
abstract string NameJMatProBase [get, set]
 Name of the JMatPro directory (without root directories) and executable. More...
 
virtual string JMatInstallationPath [get, set]
 Path of the directory where JMAtPro executable is located. Setter takes only pure directory name, without path information. If set to null then directory path is set to null and will be recalculated when getter is called. More...
 
virtual string JMatExecutableFileName [get, set]
 JMatPro executable relative path to installation directory. More...
 
virtual string JMatExecutableFilePath [get, set]
 Path to the JMatPro executable. More...
 
virtual string JMatDataPath [get, set]
 Path to the JMatPro data directory (containing material data, input and output data, etc.) More...
 
virtual string JMatCompositionFilename [get, set]
 Relative path, with respect to JMatPro data directory, of the file containing material composition (input for JMatPro calculation). More...
 
virtual string JMatCompositionFilePath [get, set]
 Path of the file containing material composition (input for JMatPro calculation). More...
 
virtual string JMatResultsFilename [get, set]
 Relative path, with respect to JMatPro data directory, of the file containing material results of JMatPro calculation. More...
 
virtual string JMatResultsFilePath [get, set]
 Path of the file containing results of JMatPro calculation. More...
 
virtual string JMatCompletionDetectionFilename [get, set]
 Relative path, with respect to JMatPro data directory, of the file used to detect whether calculation is still going on. More...
 
virtual string JMatCompletionDetectionFilePath [get, set]
 Path of the file used to detect whether calculation is still going on. More...
 
virtual double JMatCompletionDetectionSleepTimeSeconds [get, set]
 Sleeping time used in detectiong whether JMatPro calculation is still going on. More...
 
virtual int JMatCompletionDetectionSize [get, set]
 Minimal size of calculation detection file above which calculation is considered finished. More...
 
virtual double JMatBeforeSaveSleepTimeSeconds [get, set]
 Waiting time (in seconds) after last increase in file size used before assuming that calculation is finished, to eventually prevent too early detection that calculation was finished. More...
 
bool CheckWorkingDirectoryExistence [get, set]
 Whether existence of working directory is checked when directory is created. Default is true. More...
 
string WorkingDirectory [get, set]
 Working directory where configuration files and other files are located. More...
 
virtual string DataDefinitionSupersetFilename [get, set]
 Name of the file containing definition data for the superset of all input parameters and output values. More...
 
virtual string DataDefinitionSupersetFilePath [get, set]
 Path to the file containing definition data for the superset of all input parameters and output values. More...
 
virtual string DataDefinitionJMatFilename [get, set]
 Name of the file containing data definition for all JMatPro input parameters (i.e. material composition expressed as mass fractions for individual parameters). More...
 
virtual string DataDefinitionJMatFilePath [get, set]
 Path to the file containing data definition for all JMatPro input parameters (i.e. material composition expressed as mass fractions for individual parameters). More...
 
virtual string DataDefinitionProcessFilename [get, set]
 Name of the file containing data definition for all process input and output parameters. More...
 
virtual string DataDefinitionProcessFilePath [get, set]
 Path to the file containing data definition for all process input and output parameters. More...
 
virtual string DataDefinitionJointFilename [get, set]
 Name of the file containing definition data for the superset of all input parameters and output values. More...
 
virtual string DataDefinitionJointFilePath [get, set]
 Path to the file containing definition data for the Joint of all input parameters and output values. More...
 
virtual string DataDefinitionJMatFilenameNoNitrogen [get, set]
 Name of the file containing data definition for all JMatPro input parameters (i.e. material composition expressed as mass fractions for individual parameters). More...
 
virtual string DataDefinitionJMatFilePathNoNitrogen [get, set]
 Path to the file containing data definition for all JMatPro input parameters (i.e. material composition expressed as mass fractions for individual parameters). More...
 
virtual string DataDefinitionJointFilenameNoNitrogen [get, set]
 Name of the file containing definition data for the superset of all input parameters and output values. More...
 
virtual string DataDefinitionJointFilePathNoNitrogen [get, set]
 Path to the file containing definition data for the Joint of all input parameters and output values. More...
 
InputOutputDataDefiniton DataDefinitionSuperset [get, protected set]
 Data definitions for the superset of all input parameters and output values. More...
 
InputOutputDataDefiniton DataDefinitionJMat [get, protected set]
 Data definitions for all JMatPro input parameters (i.e. material composition expressed as mass fractions for individual parameters). More...
 
virtual IBoundingBox MaterialParameterBounds [get, protected set]
 Bounds on neural input parameters. More...
 
InputOutputDataDefiniton DataDefinitionProcess [get, protected set]
 Data definitions for the Process parameters and output values. More...
 
InputOutputDataDefiniton DataDefinitionJoint [get, protected set]
 Data definitions for all input parameters and output values, including material and process parameters. More...
 
int NumMaterialParameters [get]
 Gets the number of material parameters. More...
 
int NumProcessParameters [get]
 Gets the number of process parameters. More...
 
int NumParameters [get]
 Gets the total number of all parameters. More...
 
int NumOutputValues [get]
 Gets the number of output values for the process. More...
 
virtual string WorkingMaterialParametersPath [get, protected set]
 File path of the file in working directory where material parameters for calculation are stored. If set to null then path is set to null and will be recalculated when getter is called. More...
 
virtual string MaterialParametersDefFilename [get, set]
 Name of the file in material data directory where material parameters are stored. More...
 
virtual string WorkingMaterialParametersDefPath [get, protected set]
 File path of the file in working directory where material parameters for calculation are stored as default values in a data definition file. If set to null then path is set to null and will be recalculated when getter is called. More...
 
string RootDataDirectoryName [get, set]
 Name of the root data directory. More...
 
virtual string RootDataDirectoryPath [get, set]
 Path to the root directory that contains directories with calculated material data for different parameters defining chemical compositions. More...
 
virtual string LogFileName [get, set]
 Name of the log file where operations are logged. More...
 
virtual string LogFilePath [get, set]
 Path to the log file where basic operations are logged. More...
 
TextWriter LogFileWriter [get, set]
 Textwriter for log file. More...
 
string MaterialDirectoryName [get, protected set]
 Name of the material directory. More...
 
virtual string MaterialDataDirectoryPath [get, protected set]
 Data directory for the current material parameters. More...
 
virtual string MaterialParametersFilename [get, set]
 Name of the file in material data directory where material parameters are stored. More...
 
virtual string MaterialParametersPath [get, protected set]
 File path of the file where material parameters are stored. If set to null then path is set to null and will be recalculated when getter is called. More...
 
virtual string MaterialCompositionFilename [get, set]
 Name of the file in material data directory where material composition is stored. More...
 
virtual string MaterialCompositionPath [get, protected set]
 File path of the file (normally in the material data directory) where material composition is stored. If set to null then path is set to null and will be recalculated when getter is called. More...
 
virtual string MaterialResultsFilename [get, set]
 Name of the file in material data directory where material results are stored. More...
 
virtual string MaterialResultsPath [get, protected set]
 File path of the file (normally in the material data directory) where material reslts are stored. If set to null then path is set to null and will be recalculated when getter is called. More...
 
virtual int JMatResultsMinimalSize [get, protected set]
 Minimal size of JMatPro results file in order to consider results valid. More...
 
virtual int JMatResultsGoodSize [get, protected set]
 Size of the materials result file that is considered a good size - the file is expected to be at least of this size if calculation was performed without errors. More...
 
virtual string MsgMaterialCalculationBusyPath [get, protected set]
 File path of the material calculation in progress flag file. Setter takes only pure file name, without path information. If set to null then path is set to null and will be recalculated when getter is called. More...
 
virtual string MsgMaterialCalculationFinishedPath [get, protected set]
 File path of the "material calculation finished" flag file. Setter takes only pure file name, without path information. If set to null then path is set to null and will be recalculated when getter is called. More...
 
virtual string MsgMaterialCalculationTimedoutPath [get, protected set]
 File path of the "material calculation timeout occurred" flag file. Setter takes only pure file name, without path information. If set to null then path is set to null and will be recalculated when getter is called. More...
 
virtual string MsgMaterialResultsWrongPath [get, protected set]
 File path of the "material results wrong" flag file. Setter takes only pure file name, without path information. If set to null then path is set to null and will be recalculated when getter is called. More...
 
virtual string StorageMaterialCalculatedDirectoryname [get, set]
 Name of the storage directory for material directories for which material properties have been successfully calculated. More...
 
virtual string StorageMaterialCalculatedDirectoryPath [get, protected set]
 Path to the storage directory for material directories for which material properties have been successfully calculated. More...
 
virtual string StorageBusyFlagSetDirectoryname [get, set]
 Name of the storage directory for material directories for which busy flag remained set. More...
 
virtual string StorageBusyFlagSetDirectoryPath [get, protected set]
 Path to the storage directory for material directories for which busy flag remained set. More...
 
virtual string StorageTimedoutDirectoryname [get, set]
 Name of the storage directory for material directories for which material properties calculation has timed out. More...
 
virtual string StorageTimedoutDirectoryPath [get, protected set]
 Path to the storage directory for material directories for which material properties calculation has timed out. More...
 
virtual string StorageMaterialCalculationFailedDirectoryname [get, set]
 Path to the storage directory for material directories for which calculation of material properties has failed. More...
 
virtual string StorageMaterialCalculationFailedDirectoryPath [get, protected set]
 Path to the storage directory for material directories for which calculation of material properties has failed. More...
 
virtual string StorageMaterialMaterialDataCorruptedDirectoryname [get, set]
 Path to the storage directory for material directories for which calculation of material properties has failed. More...
 
virtual string StorageMaterialMaterialDataCorruptedDirectoryPath [get, protected set]
 Path to the storage directory for material directories for which calculation of material properties has failed. More...
 
virtual string UserInteractionCommand [get, set]
 Command for playback of recorded user interaction (i.e. emulation of keyboard and mouse events) for various actions. More...
 
virtual string UserInteractionRecordDir [get, set]
 Dierctory containing recorded user interactions for different actions. More...
 
virtual string UserInteractionRecordExtension [get, set]
 Extension of files with recorded user interaction. More...
 
virtual string UserInteractionRecordNameStartJMat [get, set]
 Name of the user interaction record for starting JMatPro software via system GUI. More...
 
virtual string UserInteractionRecordPathStartJMat [get, set]
 Name of the user interaction record for closing JMatPro software via system GUI. More...
 
virtual string UserInteractionRecordNameCloseJMat [get, set]
 Name of the user interaction record for closing JMatPro software normally via GUI. More...
 
virtual string UserInteractionRecordPathCloseJMat [get, set]
 Name of the user interaction record for closing JMatPro software normally via GUI. More...
 
virtual string UserInteractionRecordNameRepairJMat [get, set]
 Name of the file containing records of user interaction necessary repair JMatPro in case it is damaged or another unwanted copy is running. More...
 
virtual string UserInteractionRecordPathRepairJMat [get, set]
 Path of the file containing records of user interaction necessary repair JMatPro in case it is damaged or another unwanted copy is running. More...
 
virtual string UserInteractionRecordNameStartCalculation [get, set]
 Name of the file containing recors of user interaction necessary to start JMatPro. More...
 
virtual string UserInteractionRecordPathStartCalculation [get, set]
 Name of the file containing recors of user interaction necessary to start JMatPro. More...
 
virtual string UserInteractionRecordNameSaveResults [get, set]
 Name of the file containing records of user interaction necessary to save results of JMatPro calculation. More...
 
virtual string UserInteractionRecordPathSaveResults [get, set]
 Path to the file containing recors of user interaction necessary to save results of JMatPro calculation. More...
 
virtual string UserInteractionRecordNameChangeTemperatureUnit [get, set]
 Name of the file containing records of user interaction necessary to change temperature uits in JMatPro that is already launched. More...
 
virtual string UserInteractionRecordPathChangeTemperatureUnit [get, set]
 Path to the file containing recors of user interaction necessary to change temperature uits in JMatPro that is already launched. More...
 
virtual string UserInteractionRecordNameChangeFractionUnit [get, set]
 Name of the file containing records of user interaction necessary to change fraction uits in JMatPro that is already launched. More...
 
virtual string UserInteractionRecordPathChangeFractionUnit [get, set]
 Path to the file containing recors of user interaction necessary to change fraction uits in JMatPro that is already launched. More...
 
double JMatTimeoutWaitCalculationSeconds [get, protected set]
 Timeout for waiting completion of calculation, in seconds. More...
 
virtual double JMatTimeoutWaitResultsSavedSeconds [get, protected set]
 Timeout for waiting until results are completely saved, in seconds. More...
 
virtual int JMatResultsSavedDetectionSize [get, set]
 Minimal size of result file file, above which saving results can be considered finished. More...
 
virtual double JMatBeforeResultsSavedSleepTimeSeconds [get, set]
 Waiting time (in seconds) after last increase in file size used before assuming that saving result is finished, to eventually prevent too early detection that calculation was finished. More...
 
string ProcessNameSubstringJava [get, protected set]
 Substring of java virtual machine process name, used to kill the process or check whether it is running. More...
 
string ProcessNameSubstringJMatMain [get, protected set]
 Substring of JMatPro main process name, used to kill the process or check whether it is running. More...
 
string ProcessNameSubstringJMatSolver [get, protected set]
 Substring of JMatPro solver process name, used to kill the process or check whether it is running. More...
 
CalculationStatus MaterialCalculationStatus [get, protected set]
 Status of the last material calculation. More...
 
StopWatch1 MaterialCalculationTimer [get]
 Timer for measuring total calculation time in methods that perform multiple material calculations. More...
 
double LongestMaterialCalculationTime [get, protected set]
 Longest material calculation time by now, reset at the beginning of every top level calculation function. More...
 
double MaterialCalculationTime [get, set]
 
int NumMaterialCalculationsIntended [get, protected set]
 Total number of intended material calculations attempted by now.k More...
 
int NumMaterialCalculationsPerformed [get, protected set]
 Number of (completed) material calculations attempted by now. More...
 
int NumMaterialCalculationsSuccessful [get, protected set]
 Number of material calculations by now that have successfully completed. More...
 
int NumMaterialCalculationsTimedout [get, protected set]
 Number of material calculations by now where timeout occurred. More...
 
int NumMaterialCalculationsUnsuccessful [get, protected set]
 Number of material calculations by now where calculation has failed. More...
 
int NumconsecutiveMaterialCalculationsUnsuccessful [get, set]
 Number fo consecutive events where material calculation was not successfule. More...
 
int NumconsecutiveMaterialCalculationTimedout [get, set]
 Number fo consecutive events where timeout occurred during material calculation. More...
 
int NumconsecutiveMaterialCalculationsSuccessful [get, set]
 Number fo consecutive events where material calculation was not successful. More...
 
IVector MaterialParameters [get, set]
 Parameters that define chemical composition of steel for which material properties are calculated. More...
 
virtual IRandomGenerator Random [get, protected set]
 Random generator used by the current object. More...
 
List< JMatProElemetDataElements [get, set]
 List of element data to be used in JMatPro. More...
 
string[] CompositionElementSymbols [get, set]
 Array of element symbols sorted as required gor the JMatPro input file. More...
 
virtual string SymbolIron [get]
 
virtual string ProjectName [get, protected set]
 Name of the current project, used in some simulation and other interfaces. More...
 
virtual string SimulationName [get, protected set]
 Name of the current simulation, used in some simulation and other interfaces. More...
 
string RootSimulationDirectoryName [get, set]
 Name of the root simulation directory. More...
 
virtual string RootSimulationDirectoryPath [get, set]
 Path to the root simulator directory that contains directories with simulators' data (there may be more than one such directory in the case of parallel simulators. More...
 
string SimulatorBaseTemplateDirectoryname [get, set]
 Name of the simulator template directory. This is the root simulator directory that contains all simuator related data and must be copied in order to produce a new active simulator. More...
 
virtual string SimulatorBaseTemplateDirectoryPath [get, protected set]
 Path to the simulator template directory. This is the root simulator directory that contains all simuator related data and must be copied in order to produce a new active simulator. More...
 
string SimulatorCastingRobertDirectoryname [get, set]
 Name of the main directory of the Robert Vertnik's casting simulator. More...
 
virtual string SimCastingRobertProjectName [get, set]
 Project name for interfacing Robert Vertnik's casting simulator. More...
 
virtual string SimCastingRobertSimulationName [get, set]
 Simulation name for interfacing Robert Vertnik's casting simulator. More...
 
int WhichSimulator [get, protected set]
 Specifies which simulator is in use by the current file manager (this is 0 if simulators are not run in parallel and there is a single simulator). More...
 
virtual string SimulatorBaseDirectoryPath [get, protected set]
 Path to the base directory of the current simulator in use. This directory is directly contained in the More...
 
virtual string SimCastingRobertRootDirectoryPath [get, protected set]
 Path of the main directory of the Robert Vertnik's casting simulator that is currently in use. More...
 
virtual SimCastingRobertFileManager SimCastingRobertFM [get, set]
 File manager for interfacing Robert Vertnik's casting simulator. Lazy evaluation: The object is created when first accessed, if possible. For this, ProjectName, SimulationName and SimCastingRobertRootDirectoryPath must be defined. More...
 
- Properties inherited from IG.Lib.ILockable
object Lock [get]
 

Additional Inherited Members

- Public Types inherited from IG.Num.SimJMatProFileManagerBase
enum  CalculationStatus {
  CalculationStatus.None = 0, CalculationStatus.Successful = 1 << 0, CalculationStatus.Incomplete = 1 << 1, CalculationStatus.Corrupted = 1 << 2,
  CalculationStatus.Timedout = 1 << 3, CalculationStatus.Failed = 1 << 4, CalculationStatus.Unsuccessful = Corrupted | Timedout | Failed | Incomplete
}
 
- Static Public Member Functions inherited from IG.Num.SimJMatProFileManagerBase
static void SaveSettings (SimJmatProSettingsDto settings, string filePath)
 Saves (serializes) the specified settings of the JMatPro interface' file manager to the specified JSON file. More...
 
static void SaveSettings (SimJmatProSettingsDto settings, string filePath, bool append)
 Saves (serializes) the specified settings for JMatPro interface' file manager to the specified JSON file. More...
 
static void LoadSettings (string filePath, ref SimJmatProSettingsDto settings)
 Restores (deserializes) JMatPro interface' settings from the specified file in JSON format. More...
 
static JMatProElemetData FindElementData (List< JMatProElemetData > elements, string elementSymbol)
 Finds data for the specified element on the specified list of element data, and returns the data (or null if the data is not be found). More...
 
- Public Attributes inherited from IG.Num.SimJMatProFileManagerBase
string _userInteractionCommand = SimJMatProConst.UserInteractionCommand
 
string _userInteractionRecordDir = SimJMatProConst.DefaultUserInteractionRecordDir
 
string _userInteractionRecordExtension = SimJMatProConst.UserInteractionRecordExtension
 
string _userInteractionRecordNameStartJMat = SimJMatProConst.UserInteractionRecordNameStartJMat
 
string _userInteractionRecordPathStartJMat
 
string _userInteractionRecordNameCloseJMat = SimJMatProConst.UserInteractionRecordNameCloseJMat
 
string _userInteractionRecordPathCloseJMat
 
string _userInteractionRecordNameRepairJMat = SimJMatProConst.UserInteractionRecordNameRepairJMat
 
string _userInteractionRecordPathRepairJMat
 
string _userInteractionRecordNameStartCalculation = SimJMatProConst.UserInteractionRecordNameStartCalculation
 
string _userInteractionRecordPathStartCalculation
 
double _jMatTimeoutWaitCalculationSeconds = SimJMatProConst.JMatTimeoutWaitCalculationSeconds
 
double _jMatTimeoutWaitResultsSavedSeconds = SimJMatProConst.JMatTimeoutWaitResultsSavedSeconds
 
- Protected Member Functions inherited from IG.Num.SimJMatProFileManagerBase
bool IsMaterialDirectory (DirectoryInfo dir)
 Returns a flag indicating whether teh specified directory is considered a material directory or not. This method is usually used to extract all material directoried from the root data directory (which may for some reason contain other directories, too). More...
 
bool IsMaterialCalculated (string materialDirectoryPath)
 For the specified material data directory, returns a flag that indicates whether material properties have been calculated for the corresponding material or not. This is obtained by checking the corresponding message file as well as existence and size of the material results file. More...
 
bool IsTimedoutFlagSet (string materialDirectoryPath)
 For the specified material data directory, returns a flag that indicates whether material calculation has not finished because of timeout. This is obtained by checking the corresponding message file. More...
 
bool IsMaterialResultsWrongFlagSet (string materialDirectoryPath)
 For the specified material data directory, returns a flag that indicates whether material result file contents are incorrect. This is obtained by checking the corresponding message file. More...
 
bool IsBusyFlagSet (string materialDirectoryPath)
 For the specified material data directory, returns a flag that indicates whether the busy flag is set. More...
 
string ReplacePathSeparator (string path)
 Returns a string obtained by replacing the '\' path separator by the more standard '/' in the specified path string, or null if the string is null. More...
 
void AddElements< ElType > (List< ElType > l, params ElType[] elements)
 Adds the specified elements to the specified list. More...
 
void InitElements ()
 Creates a list of chemical element data. More...
 
virtual SimCastingRobertFileManager GetSimCastingRobert (int whichSimulator)
 Returns a newly created Robert Vertnik's casting simulator with the specified index (zero-based) More...
 
virtual int CalculateSimulatedResponse (SimCastingRobertFileManager simulator, string materialDirectory, ref SampledDataSet sampledData, params IVector[] inputProcessParameters)
 Calculates response by the specified simulator, for the specified process parameter vectors and the specified material (specified by the material directory approximate path), and stores calculated data in the specified sampled data set (object of type SampledDataSet). More...
 
- Protected Attributes inherited from IG.Num.SimJMatProFileManagerBase
string _lockFileMutexName = SimJMatProConst.LockFileMutexName
 
Mutex _lockFileMutex
 
string _nameJMatProBase
 
string _jmatInstallationPath
 
string _executableFileName
 
string _executableFilePath
 
string _jmatDataPath
 
string _jmatCompositionFilename = SimJMatProConst.JmatCompositionRelativepath
 
string _jmatCompositionFilePath
 
string _jmatResultsFilename = SimJMatProConst.JMatResultsRelativePath
 
string _jmatResultsFilePath
 
string _jmatCompletionDetectionFilename = SimJMatProConst.JMatCompletionDetectionRelativePath
 
string _jmatCompletionDetectionFilePath
 
double _jmatCompletionDetectionSleepTimeSeconds = SimJMatProConst.JMatCompletionDetectionSleepTimeSeconds
 
int _jmatCompletionDetectionSize = SimJMatProConst.JmatCompletionDetectionSize
 
double _jmatBeforeSaveSleepTimeSeconds = SimJMatProConst.JMatBeforeSaveSleepTimeSeconds
 
bool _checkWorkingDirectoryExistence = true
 
string _workingDirectory = null
 
string _dataDefinitionSupersetFilename = SimJMatProConst.DataDefinitionSupersetFilename
 
string _dataDefinitionSupersetFilePath
 
string _dataDefinitionJMatFilename = SimJMatProConst.DataDefinitionJMatFilename
 
string _dataDefinitionJMatFilePath
 
string _dataDefinitionProcessFilename = SimJMatProConst.DataDefinitionProcessFilename
 
string _dataDefinitionProcessFilePath
 
string _dataDefinitionJointFilename = SimJMatProConst.DataDefinitionJointFilename
 
string _dataDefinitionJointFilePath
 
string _dataDefinitionJMatFilenameNoNitrogen = SimJMatProConst.DataDefinitionJMatFilenameNoNitrogen
 
string _dataDefinitionJMatFilePathNoNitrogen
 
string _dataDefinitionJointFilenameNoNitrogen = SimJMatProConst.DataDefinitionJointFilenameNoNitrogen
 
string _dataDefinitionJointFilePathNoNitrogen
 
InputOutputDataDefiniton _dataDefinitionSuperset
 
InputOutputDataDefiniton _dataDefinitionJMat
 
IBoundingBox _materialParameterBounds
 
InputOutputDataDefiniton _dataDefinitionProcess
 
InputOutputDataDefiniton _dataDefinitionJoint
 
string _workingmaterialParametersPath
 
string _materialParametersDefFilename = SimJMatProConst.MaterialParametersDefFilename
 
string _workingmaterialParametersDefPath
 
string _rootDataDirectoryname = SimJMatProConst.RootDataDirectoryName
 
string _rootDataDirectoryPath
 
string _logFileName = SimJMatProConst.LogfileName
 
string _logFilePath
 
TextWriter _logFileWriter
 
string _materialDirectoryName
 
string _materialDataDirectoryPath
 
string _materialParametersFilename = SimJMatProConst.MaterialParametersFilename
 
string _materialParametersPath
 
string _materialCompositionFilename = SimJMatProConst.JMatCompositionFilename
 
string _materialCompositionPath
 
string _materialResultsFilename = SimJMatProConst.JMatResultsFilename
 
string _materialResultsPath
 
int _jMatResultsMinimalSize = SimJMatProConst.JMatResultsMinimalSize
 
int _jMatResultsGoodSize = SimJMatProConst.JMatResultsGoodSize
 
string _msgMaterialCalculationBusyFilename = SimJMatProConst.MsgMaterialCalculationBusyFilename
 
string _msgMaterialCalculationBusyPath
 
string _msgMaterialCalculationFinishedFilename = SimJMatProConst.MsgMaterialCalculationFinishedFilename
 
string _msgMaterialCalculationFinishedPath
 
string _msgMaterialCalculationTimedoutFilename = SimJMatProConst.MsgMaterialCalculationTimedoutFilename
 
string _msgMaterialCalculationTimedoutPath
 
string _msgMaterialResultsWrongFilename = SimJMatProConst.MsgMaterialResultsWrongFilename
 
string _msgMaterialResultsWrongPath
 
string _storageMaterialCalculatedDirectoryname = SimJMatProConst.StorageMaterialCalculatedDirectoryname
 
string _storageMaterialCalculatedDirectoryPath
 
string _storageBusyFlagSetDirectoryname = SimJMatProConst.StorageBusyFlagSetDirectoryname
 
string _storageBusyFlagSetDirectoryPath
 
string _storageTimedoutDirectoryname = SimJMatProConst.StorageTimedoutDirectoryname
 
string _storageTimedoutDirectoryPath
 
string _storageMaterialCalculationFailedDirectoryname = SimJMatProConst.StorageMaterialCalculationFailedDirectoryname
 
string _storageMaterialCalculationFailedDirectoryPath
 
string _storageMaterialMaterialDataCorruptedDirectoryname = SimJMatProConst.StorageMaterialDataCorruptedDirectoryname
 
string _storageMaterialMaterialDataCorruptedDirectoryPath
 
double _waitSleepTimeSeconds = SimJMatProConst.WaitSleepTime
 
string _userInteractionRecordNameSaveResults = SimJMatProConst.UserInteractionRecordNameSaveResults
 
string _userInteractionRecordPathSaveResults
 
string _userInteractionRecordNameChangeTemperatureUnit = SimJMatProConst.UserInteractionRecordNameChangeTemperatureUnit
 
string _userInteractionRecordPathChangeTemperatureUnit
 
string _userInteractionRecordNameChangeFractionUnit = SimJMatProConst.UserInteractionRecordNameChangeFractionUnit
 
string _userInteractionRecordPathChangeFractionUnit
 
int _jMatResultsSavedDetectionSize = SimJMatProConst.JMatResultsSavedDetectionSize
 
double _jMatBeforeResultsSavedSleepTimeSeconds = SimJMatProConst.JMatBeforeResultsSavedSleepTimeSeconds
 
string _processNameSubstringJava = SimJMatProConst.ProcessNameSubstringJava
 
string _processNameSubstringJMatMain = SimJMatProConst.ProcessNameSubstringJMatMain
 
string _processNameSubstringJMatSolver = SimJMatProConst.ProcessNameSubstringJMatSolver
 
CalculationStatus _materialCalculationStatus = CalculationStatus.None
 
StopWatch1 _materialCalculationTimer
 
double _longestMaterialCalculationTime
 
double _materialCalculationTime
 
int _numMaterialCalculationsIndended
 
int _numMaterialCalculationsPerformed
 
int _numMaterialCalculationsSuccessful
 
int _numMaterialCalculationsTimedout
 
int _numMaterialCalculationsUnsuccessful
 
int _numConsecutiveMaterialcalculationUnsuccessful
 
int _numConsecutiveMaterialcalculationTimedout
 
int _numConsecutiveMaterialcalculationSuccessful
 
IVector _materialParameters
 
List< JMatProElemetData_compositionData
 Storage of composition data. More...
 
volatile List< JMatProElemetData_elementData
 
string[] _compositionElementSymbols
 
string _projectName
 
string _simulationName
 
string _rootSimulationDirectoryname = SimJMatProConst.RootSimulationDirectoryName
 
string _rootSimulationDirectoryPath
 
string _simulatorBaseTemplateDirectoryname
 
string _simulatorBaseTemplateDirectoryPath
 
string _simulatorCastingRobertDirectoryname = SimJMatProConst.SimulatorCastingRobertDirectoryname
 
int _whichSimulation = 0
 
string _simulatorBaseDirectoryPath
 
string _simCastingRobertRootDirectoryPath
 
SimCastingRobertFileManager _simCastingRobertFM
 
- Static Protected Attributes inherited from IG.Num.SimJMatProFileManagerBase
static bool _elementsInitialized = false
 

Detailed Description

File manager for interfacing the JMatPro software version 4.0.

See also
SimJMatProFileManagerBase

$A Igor Sep12 nov12;

Constructor & Destructor Documentation

IG.Num.SimJMatProFileManager4_0.SimJMatProFileManager4_0 ( string  workingDirectoryPath)
inline

Construct JMatPro interface's file manager, with specified working directory.

Parameters
workingDirectoryPathPath of the working directory.
IG.Num.SimJMatProFileManager4_0.SimJMatProFileManager4_0 ( string  workingDirectoryPath,
string  settingsFilePath 
)
inline

Construct JMatPro interface's file manager, with specified path to the file where settings are stored.

Parameters
workingDirectoryPathPath of the working directory.
settingsFilePathPath to the file containing settings.

It can be specified as absolute path or relative to the current directory or relative to the working directory. If null or empty string then default path is taken.

IG.Num.SimJMatProFileManager4_0.SimJMatProFileManager4_0 ( string  workingDirectoryPath,
SimJmatProSettingsDto  settings 
)
inline

Construct JMatPro interface's file manager, with specified settings object.

Parameters
workingDirectoryPathPath of the working directory.
settingsObject containing settings for hte JMatpro file manager.

Property Documentation

override string IG.Num.SimJMatProFileManager4_0.NameJMatProBase
getset

Name of the JMatPro directory (without root directories) and executable.


The documentation for this class was generated from the following file: