    

 ## On this page

  

 

 # GenerateRandomFields Class Reference

 Last update: 16.07.2025 

an algorithm that computes new field samples from amplitudes and scatter shapes The algorithm is essentially the same is the class FieldDesignsFromAmplitudes, but it is based on the data structures stored in class [RandomFieldContainer](class_random_field_container.xhtml "a container storing all random field decompositions "). [More...](class_generate_random_fields.xhtml#details)

## <a name="pub-methods"></a>Public Member Functions

 [check](class_generate_random_fields.xhtml#a47c34ec1e578c2ce27cf1c5fcd0d1704) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) checks the settings [More...](#a47c34ec1e578c2ce27cf1c5fcd0d1704)  
  [compute](class_generate_random_fields.xhtml#ab08e112d95fe611e7eb25491c354d115) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) computes the new objects [More...](#ab08e112d95fe611e7eb25491c354d115)  
  [GenerateRandomFields](class_generate_random_fields.xhtml#a9b4d942be5d786f7d0e764a62a3ffa94) ([DataObjectContainer](class_data_object_container.xhtml) selected\_scalars, bool enforce\_equal\_idents=false) constructor [More...](#a9b4d942be5d786f7d0e764a62a3ffa94)  
 ## <a name="pub-attribs"></a>Public Attributes

<a id="a591952882aeaa67ab84a56aa4d053268"></a>bool [accept\_partial\_subspace](class_generate_random_fields.xhtml#a591952882aeaa67ab84a56aa4d053268) if true, then one accepts that the set of random field amplitudes is incomplete. E.g. if no amplitude is selected, then one simly assumes a value of "zero"   
 <a id="ade25e60bd85c8b4abd4f5b416cae0eb9"></a>bool [overwrite\_existing](class_generate_random_fields.xhtml#ade25e60bd85c8b4abd4f5b416cae0eb9) if true, existing outut objects will be replaced, otherwise: error if it already exists   
 <a id="details" name="details"></a>## Detailed Description

an algorithm that computes new field samples from amplitudes and scatter shapes The algorithm is essentially the same is the class FieldDesignsFromAmplitudes, but it is based on the data structures stored in class [RandomFieldContainer](class_random_field_container.xhtml "a container storing all random field decompositions ").

**[Deprecated:](deprecated.xhtml#_deprecated000014)**This class is deprecated with SoS 3.3. It should be removed with SoS 3.4 

## Constructor &amp; Destructor Documentation

<a id="a9b4d942be5d786f7d0e764a62a3ffa94"></a>## [◆ ](#a9b4d942be5d786f7d0e764a62a3ffa94)GenerateRandomFields()

 [GenerateRandomFields](class_generate_random_fields.xhtml)  ( [DataObjectContainer](class_data_object_container.xhtml)  *selected\_scalars*,    bool  *enforce\_equal\_idents* = `false`   ) 

constructor

Parameters selected\_scalarsthe selected scalar quantities that are ALL amplitudes to be used enforce\_equal\_identsif true, then the same quantity idents are used as the input idents (is only used in optiSLang's simulation flow. Usually objects with that quantity ident already exist!) 



## Member Function Documentation

<a id="a47c34ec1e578c2ce27cf1c5fcd0d1704"></a>## [◆ ](#a47c34ec1e578c2ce27cf1c5fcd0d1704)check()

 check  ( [Structure](class_structure.xhtml)  *database*) 

checks the settings

Parameters databasethe database we refer to Exceptions anexception in case of an error 



<a id="ab08e112d95fe611e7eb25491c354d115"></a>## [◆ ](#ab08e112d95fe611e7eb25491c354d115)compute()

 compute  ( [Structure](class_structure.xhtml)  *database*) 

computes the new objects

Parameters databasethe database we refer to