The Data Display (

) is a form object that represents a display of some property as numerical data.
By default, the data display uses Unicode rendering. If the data display does not look as expected or the expression to display contains LaTeX syntax, consider using LaTeX rendering instead by selecting the LaTeX markup check box. Then the data display does not rely on the selected font. It can also be a matter of preference. The look and alignment of the data display changes slightly depending on whether this check box is selected or not.
In the Tooltip field, enter text that will appear as a tooltip when the user hovers the pointer over the data display.
In addition, the Settings window contains the following sections.
In this section, you specify the source for the data to display. The section contains a tree with a filtered view of the trees in the Application Builder and
Model Builder windows. The nodes either represent some sort of data or have children that do. For a data display, the data source can be variables in the COMSOL Multiphysics model, scalar strings, array and matrix settings from model data such as material properties, and numerical (double and integer) variables and arrays or matrices that you define under
Declarations. The data display can show arrays or matrices with LaTeX syntax. You can extend the list of available data nodes by clicking the
Switch to Model Builder and Activate Data Access button (

) in the
Source section header, which takes you to the Model Builder, and then selecting a node in the
Model Builder branch whose data you want to access. With this button active, the
Settings window of the selected node displays a
Select Data Source check box (a green square) next to the settings that you can include. Click to select the check box to include that data as an available source node for data display objects.
•
|
The Expected Computation Time node (  ) under Model>Information (  ): The expected computation time is a value that the application developer can enter in the Expected field in the Root node’s Settings window.
|
•
|
The Last Computation Time node (  ) under Model>Information: This node shows the last measured computation time for the last computed study.
|
•
|
The Last Computation Time node (  ) under each Model>Study>Information: This node shows the last measured computation time for the study.
|
When you select a node that represents data, the Use as Source toolbar button (

) below the tree becomes enabled. You can click it or, alternatively, press Enter, double-click, or right-click the node and choose
Use as Source to add it as the selected source. You can also click the
Create New Declaration and Use It as Source button (

) or the
Create New Form Declaration and Use It as Source button (

) in the
Source section header to create a new global or local (in the form) variable declaration for the data display and use it as the source. A
Create and Use Variable dialog box opens, so that you can select the data type of the source (if applicable), its name, and its initial value (if applicable). The name cannot be in conflict with any existing variable declaration. Click the
Edit Node toolbar button (

) below the tree to move to the corresponding node. If necessary, the program switches to the Model Builder.
In the Precision field, enter the number of significant digits to display in the output (default: 4). Choose the notation to use for the data from the
Notation list. The options are
Automatic (the default),
Scientific, and
Decimal. If you use
Automatic, the program switches to scientific notation when the output is about 3 orders of magnitude larger than or smaller than 1. For the
Automatic and
Scientific options, you can also choose the format of the exponent for scientific notation from the
Exponent list. The choices are
Power of 10 (the default) and
E-notation. Select the
Display all significant digits check box (available for the Scientific and Decimal options) to always add trailing zeros to match the specified precision. Clear the
Append unit to number check box if you do not want a unit appended after the number representing the data displayed. Select a unit from the
Unit list if desired. The default setting is
Default, which determines the unit from the expression used as the source for the data display.
•
|
From the Horizontal alignment list, choose Left, Center, Right, or Fill, which automatically expands the form object to fill the cell in the horizontal or vertical direction (where applicable).
|
•
|
From the Vertical alignment list, choose Middle, Top, Bottom, or Fill, which automatically expands the form object to fill the cell in the horizontal or vertical direction (where applicable).
|
The need to specify the alignment is most obvious when working in the grid mode, as it controls how the form object is aligned in its grid cell. Aligning the form object can be useful in the sketch mode too, and you can then use the alignment tools on the Arrange menu in the
Form toolbar’s
Sketch section. When running the application in any client other than the Windows client, the form objects may not be positioned exactly as seen in the Application Builder. This is because the form objects may have a different size in other clients, giving them a slightly different positioning. Specifying the alignment ensures that the form objects are aligned as you want them to be in all clients.
The Width and
Height fields are unavailable because the dimensions of the numerical data display are determined by the software.
Additionally, in the sketch mode, you can specify the absolute position of the data display using the Position x and
Position y fields. In the grid mode, you can position the object in the grid and see the grid position as the
Row,
Column,
Row span, and
Column span values.
Under Cell margin (in grid mode only), you can control the margins around the form object. By default, the margins are taken from the parent form. From the
Cell margin list, choose:
•
|
None, for no margin around the form object. This setting can be useful when displaying dynamical data inside a sentence to avoid excessive whitespace margins.
|
•
|
Custom, to specify the margins for the form object in the Horizontal and Vertical text fields.
|
From the Text color list, select a color to use for the text in the data display:
Inherit (the default; the form object then uses the setting from the Form it is located in), any of the predefined basic colors, or
Custom, which makes it possible to select a custom color from a color palette.
From the Background color list, select a color to use as the background in the data display:
Transparent (the default), any of the predefined basic colors, or
Custom, which makes it possible to select a custom color from a color palette.
The font and the font size for the text use the font settings from the Forms node by default. Select a font from the
Font list:
Default font or any of the available fonts. If needed, choose or enter a font size (in points) in the
Font size combo box. The default is to use the
Default size for the font.
You can also select the Bold check box to use a boldface font or the
Italic check box to use italics (an italic font).
Under State, you can control the initial state of the data display when users run the application. By default, the data display is visible and enabled. Clear the
Visible or
Enabled check box if you want to make the initial state so that the data display is hidden or unavailable. You can then make it visible or enable it using a method. In the Form Editor, the state of the form object is indicated by a change in its appearance. Objects that are hidden become visible when selected in the Form Editor.