Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

RandFieldFormat Class Reference

flexible formats for random coefficients in PDEs. More...

#include <RandFieldFormat.h>

Inheritance diagram for RandFieldFormat::

FieldFormat List of all members.

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_prmrandom_constant
VecSimplest(Handle(ProbDistr_prm)) random_material_values

Detailed Description

flexible formats for random coefficients in PDEs.

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.


Constructor & Destructor Documentation

RandFieldFormat::RandFieldFormat ( )
 

The initialization takes place in the "scan" function (see below).

RandFieldFormat::~RandFieldFormat ( ) [inline]
 


Member Function Documentation

void RandFieldFormat::define ( MenuSystem & menu,
const String & default_answer,
int level )
 

Reimplemented from FieldFormat.

void RandFieldFormat::defineStatic ( MenuSystem & menu,
const String & default_answer,
const String & field_name,
int level = MAIN ) [static]
 

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.

void RandFieldFormat::scan ( MenuSystem & menu )
 

See documentation of one of the overloaded functions.

Reimplemented from FieldFormat.

void RandFieldFormat::scan ( String input )
 

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.

void RandFieldFormat::writeExtendedResults ( MultipleReporter & report,
const char * fieldname,
Field * field = NULL )
 

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.

void RandFieldFormat::writeHeadings ( StringList & headings,
const char * fieldname )
 

writes headings for a summary report (see class "MultipleReporter").

Reimplemented from FieldFormat.

void RandFieldFormat::writeResults ( StringList & results )
 

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.


Member Data Documentation

Handle(ProbDistr_prm) RandFieldFormat::random_constant
 

VecSimplest(Handle(ProbDistr_prm)) RandFieldFormat::random_material_values
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.