#include <RandFieldFormat.h>
Inheritance diagram for RandFieldFormat::

Public Methods | |
| RandFieldFormat () | |
| ~RandFieldFormat () | |
| void | scan (String input) |
| void | define (MenuSystem &menu, const String &default_answer, int level) |
| void | scan (MenuSystem &menu) |
| void | writeHeadings (StringList &headings, const char *fieldname) |
| void | writeResults (StringList &results) |
| void | writeExtendedResults (MultipleReporter &report, const char *fieldname, Field *field=NULL) |
Static Public Methods | |
| void | defineStatic (MenuSystem &menu, const String &default_answer, const String &field_name, int level=MAIN) |
Public Attributes | |
| Handle(ProbDistr_prm) | random_constant |
| VecSimplest(Handle(ProbDistr_prm)) | random_material_values |
NAME: RandFieldFormat - flexible formats for random coefficients in PDEs
DESCRIPTION:
The class is an extension of class "FieldFormat" to the stochastic case. For example, constant fields are specified by a real number in "FieldFormat", while the specification of constand random field in "RandFieldFormat" is a "ProbDistr_prm" object, containing the name of a distribution and the parameters for that distribution.
Limitation: Random fields with correlation are not yet implemented. The information in that case requires the expectation (function), the standard deviation, the correlation function and the generation method to be gathered from the menu. The "RandFieldGen" hierarchy has all the necessary functionality for performing the associated computations, but a simple and flexible one-line text interface here in class "RandFieldFormat" (for specifying all the statistical properties) is not trivial to develop.
|
|
The initialization takes place in the "scan" function (see below). |
|
|
|
|
|
Reimplemented from FieldFormat. |
|
|
adds an item about a field format on a menu. This function requires the fieldname. The "define" function applies the internal fieldname ("name"). Note that the internal fieldname "name" must be initialized in order to use "define", "scan(MenuSystem)" and "allocateAndInit". The advantage of using this function is that the menu command details are hidden in the application program. Reimplemented from FieldFormat. |
|
|
See documentation of one of the overloaded functions. Reimplemented from FieldFormat. |
|
|
The version that takes a "MenuSystem" object as argument initializes the "FieldFormat" object on basis of a string supplied by the menu. This "scan" function simply extracts a string from the menu and calls "scan(String)". The advantage of using this function is that the menu command details are hidden in the application program. The overloaded version taking a "String" reads a string in a special format (see below) and fills the internal data structures. To print the contents of a "FieldFormat" object one can either simply print the "specification" string (which has the same syntax as the input string to "scan") or one can use the internal data structures and format the output string as desired. Reimplemented from FieldFormat. |
|
|
writes a more detailed text containing the characteristics of the field. If the field is constant, the constant value is reported, if the field is stored in simres format on a file, the filename and the fieldname is written. The user can supply an optional argument "field" that points to the field in question. This argument is used for extracting min and max values for characterizing the field. Of course, this will only affect the "FIELD_ON_FILE" format. For the "MATERIAL_CONSTANTS" format, the output consists of one line of text for every material. More details about the output format can be gained by reading the body of the function. Reimplemented from FieldFormat. |
|
|
writes headings for a summary report (see class "MultipleReporter"). Reimplemented from FieldFormat. |
|
|
writes results for a summary report (see class "MultipleReporter"). The amount of output is similar to "writeExtendedResults", except for the "FIELD_ON_FILE" field format which is reported more compactly by "writeResults". For the "MATERIAL_CONSTANTS" format, both "writeHeadings" and "writeResults" generates an item for each material. For example, if the fieldname is "a" and there are two materials, there will be two summary items: "a_1" and "a_2". Reimplemented from FieldFormat. |
|
|
|
|
|
|