    

 ## On this page

  

 

 # FreeFormVariationModel&lt; TYPE &gt; Class Template Reference

 Last update: 16.07.2025 

Provides random field models. [More...](class_free_form_variation_model.xhtml#details)

## <a name="pub-types"></a>Public Types

<a id="ae4d13ee9cee1411b69a1ffd9af194792"></a>typedef boost::function&lt; number([TVector3](class_free_form_variation_model.xhtml#ac0d670e6fce88a32ba09b94ee2986486) x, [TVector3](class_free_form_variation_model.xhtml#ac0d670e6fce88a32ba09b94ee2986486) y)&gt; [TCorrelationFunction](class_free_form_variation_model.xhtml#ae4d13ee9cee1411b69a1ffd9af194792) a function which is called to analyze the correlation   
 <a id="a21c6585e88c32a52212d4ac105eb39ff"></a>typedef std::vector&lt; number &gt; [TDoubleVector](class_free_form_variation_model.xhtml#a21c6585e88c32a52212d4ac105eb39ff) a vector of floating point numbers   
 <a id="ac0d670e6fce88a32ba09b94ee2986486"></a>typedef Eigen::Vector3d [TVector3](class_free_form_variation_model.xhtml#ac0d670e6fce88a32ba09b94ee2986486) a 3D vector type   
 ## <a name="pub-methods"></a>Public Member Functions

 [check](class_free_form_variation_model.xhtml#a47c34ec1e578c2ce27cf1c5fcd0d1704) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) checks the settings on plausibility [More...](#a47c34ec1e578c2ce27cf1c5fcd0d1704)  
  [compute](class_free_form_variation_model.xhtml#ab08e112d95fe611e7eb25491c354d115) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) does the action [More...](#ab08e112d95fe611e7eb25491c354d115)  
  [FreeFormVariationModel](class_free_form_variation_model.xhtml#aec126b3dd03818d82d08a1c5e754d066) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), string the\_quantity\_ident, string the\_set\_part\_ident, string the\_set\_ident, [DataObjectPtr](class_data_object_ptr.xhtml) the\_mean, [DataObjectPtr](class_data_object_ptr.xhtml) the\_stddev) default constructor [More...](#aec126b3dd03818d82d08a1c5e754d066)  
 ## <a name="pub-attribs"></a>Public Attributes

<a id="abb9e9eb503998d60ccf0cc0cc126a058"></a>[Matrix](class_matrix.xhtml) [boundary\_indices](class_free_form_variation_model.xhtml#abb9e9eb503998d60ccf0cc0cc126a058) data indices of nodes/elements which define the boundary of the set (this is used as base to automatically place the points)   
 <a id="a6008fdd8bc9379f4a074ccf57abd1cbe"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [bounds\_lower](class_free_form_variation_model.xhtml#a6008fdd8bc9379f4a074ccf57abd1cbe) lower bounds (may be an empty pointer)   
 <a id="ac0b91270e206e0b5236cc4d17a215d56"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [bounds\_upper](class_free_form_variation_model.xhtml#ac0b91270e206e0b5236cc4d17a215d56) upper bounds (may be an empty pointer)   
 <a id="a4747182e290167f628dc2d28252d2b80"></a>bool [compute\_distances](class_free_form_variation_model.xhtml#a4747182e290167f628dc2d28252d2b80) if true then the distance vectors are exported   
 <a id="a6ff9b92e10644b70006b0bb16db05514"></a>bool [compute\_variations](class_free_form_variation_model.xhtml#a6ff9b92e10644b70006b0bb16db05514) true, if the individual variations are to be computed   
 <a id="a0c6e3d3e7e9a9245af75b6f9ef2f5c76"></a>[MultivariateDistributionTypes::enum\_type](class_multivariate_distribution_types.xhtml#af7ca783694e51f78ef01ceb1e00104c5) [distribution\_type](class_free_form_variation_model.xhtml#a0c6e3d3e7e9a9245af75b6f9ef2f5c76) The ident of the probability distribution that is assumed to convert data from original space to Gaussian. If empty (default), then it is automatically chosen.   
 bool [enforce\_zero\_at\_fixed\_boundary](class_free_form_variation_model.xhtml#a8025221d9d946cfd26bdb58445a467e3) if true (default), then a smooth transition is done at the interface between the morphed and fixed boundary. (actually zero displacement at interface) [More...](#a8025221d9d946cfd26bdb58445a467e3)  
 <a id="ae0ad6fb9c609ccb4e5420a4145a760f2"></a>bool [erase\_degenerated\_shapes](class_free_form_variation_model.xhtml#ae0ad6fb9c609ccb4e5420a4145a760f2) if true, then alle shapes being associated with too small correlations lengths will be eliminated from the model. The option 'num\_optimal\_points' is then an upper limit   
 <a id="a071ffc5c9bc6ab830900c5727e1392c1"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [mean](class_free_form_variation_model.xhtml#a071ffc5c9bc6ab830900c5727e1392c1) mean value of the field   
 <a id="abd25a61e43bde861a1884014fcbab45d"></a>bool [normalized](class_free_form_variation_model.xhtml#abd25a61e43bde861a1884014fcbab45d) if true (default), then the shapes are normalized such that they behave as partition of unity.   
 <a id="a858d5fd93f354af40736c0fb5529a99f"></a>number [num\_optimal\_points](class_free_form_variation_model.xhtml#a858d5fd93f354af40736c0fb5529a99f) if &gt;0 then additionally to the support point group (if any) the algorithm tries to find an optimal pattern with the given additional number of points   
 <a id="ade25e60bd85c8b4abd4f5b416cae0eb9"></a>bool [overwrite\_existing](class_free_form_variation_model.xhtml#ade25e60bd85c8b4abd4f5b416cae0eb9) Is true if already existing output data objects will be replaced. In this case, also all depending objects of the already existing one will be deleted.   
 <a id="a0bbf72a5fdb5d02b186d0cf2392939f2"></a>string [quantity\_ident](class_free_form_variation_model.xhtml#a0bbf72a5fdb5d02b186d0cf2392939f2) the ident of the quantity for which the random field is to be generated   
 <a id="a126ea7d9e7d5164e5ed97b2e3f004030"></a>bool [scale\_mean](class_free_form_variation_model.xhtml#a126ea7d9e7d5164e5ed97b2e3f004030) if true, the mean is associated with a scaling parameter and will be the first shape   
 <a id="af24a4523c727241b8dc9d7114f595c30"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [stddev](class_free_form_variation_model.xhtml#af24a4523c727241b8dc9d7114f595c30) standard deviation of the field   
 <a id="a2d58793abae634cf4ecabf6a7135a7fe"></a>string [support\_set\_ident](class_free_form_variation_model.xhtml#a2d58793abae634cf4ecabf6a7135a7fe) the ident of the given set of supports   
 <a id="a53536e46e87404af1bcdd7058b885b78"></a>string [support\_set\_part\_ident](class_free_form_variation_model.xhtml#a53536e46e87404af1bcdd7058b885b78) the part ident of the given set of supports   
 bool [use\_topological\_distance](class_free_form_variation_model.xhtml#a5fd63b096f890c414a2d9c9eee572f57) if true (default) then the topological distance is used, else the spatial distance [More...](#a5fd63b096f890c414a2d9c9eee572f57)  
 <a id="details" name="details"></a>## Detailed Description

### template&lt;dataobject\_types TYPE&gt;  
class FreeFormVariationModel&lt; TYPE &gt;

Provides random field models.

Template Parameters TYPEthe field data typeThis class provides a field parameterization similar to random field correlation models. The basic idea is that one creates "tents" around given support points. The tent is actually given through an autocorrelation function (governed by a correlation length parameter) centered around each support point. The supports are defined through sets.

The correlation models employed here refer to the correlation matrix that is created after transforming the field marginal CDF to standard normal space.



## Constructor &amp; Destructor Documentation

<a id="aec126b3dd03818d82d08a1c5e754d066"></a>## [◆ ](#aec126b3dd03818d82d08a1c5e754d066)FreeFormVariationModel()

 [FreeFormVariationModel](class_free_form_variation_model.xhtml)  ( [Structure](class_structure.xhtml)  *database*,    string  *the\_quantity\_ident*,    string  *the\_set\_part\_ident*,    string  *the\_set\_ident*,    [DataObjectPtr](class_data_object_ptr.xhtml)  *the\_mean*,    [DataObjectPtr](class_data_object_ptr.xhtml)  *the\_stddev*   ) 

default constructor

Parameters databasethe database where all data is stored into the\_quantity\_identsets quantity\_ident the\_set\_part\_identthe part ident of the given set of supports the\_set\_identthe ident of the given set of supports the\_meansets mean the\_stddevsets stddev 



## Member Function Documentation

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

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

checks the settings on plausibility

It throws an exception if there is a problem with the settings. Important: It tries to find out all problems with these settings and then exits the routine.

Parameters databasethe SoS structure 



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

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

does the action

Parameters databasethe database where all data is stored into 



## Member Data Documentation

<a id="a8025221d9d946cfd26bdb58445a467e3"></a>## [◆ ](#a8025221d9d946cfd26bdb58445a467e3)enforce\_zero\_at\_fixed\_boundary

 bool enforce\_zero\_at\_fixed\_boundary

if true (default), then a smooth transition is done at the interface between the morphed and fixed boundary. (actually zero displacement at interface)

NoteThis is only working if a normalized shape is used. 



<a id="a5fd63b096f890c414a2d9c9eee572f57"></a>## [◆ ](#a5fd63b096f890c414a2d9c9eee572f57)use\_topological\_distance

 bool use\_topological\_distance

if true (default) then the topological distance is used, else the spatial distance

NoteIf you use the spatial distance then no edges or regions are supported by manually define support point sets!