It can be useful to compare two versions of the same model or application to get an overview of the differences between the two versions. To do so, click the Compare button (
) in the
Compare section of the
Developer toolbar. A
Select Application window then opens, where you can select the Model MPH-file (the remote file) to which you want to compare the current model in the COMSOL Desktop (the local file). A comparison then starts, and the results, if there are any differences, appear as a tree in the
Comparison Result window. The comparison tool compares all the settings in the entire model, including visible and invisible settings in the Model Builder and the Application Builder.
At the top of the Comparison Result window there is a toolbar with the following buttons:
Under Comparing files, you find the file paths to the local model and the remote model. The local model is typically the model open in the COMSOL Desktop, and it can have been modified after the last save. The left column is called
Local file (Open application) when the local model is the opened model or application. When the local model is a new model that has not yet been saved, the left column is called
Open application.
Under Differences, you can use the
Filter results list to control filtering with the options
No filter,
Exclude all matching labels (the default), and
Include all matching labels. The entries in the
Regular expression field define what node labels to filter; that filtering which also can be made case sensitive by selecting the
Case sensitive check box next to the list. The filter matching is done with regular expressions, and any label that contains a matching text will be either included or excluded. Filtering can be disabled by choosing
No filter from the
Filter results list.
Selecting a node in the tree will update the table under Comparing values below the tree. This table shows the attributes of the selected node, both in the local model (
Local value column) and the remote model (
Remote value column). This table is particularly interesting for the nodes labeled
Attributes differ because they show the values that differ. Parent nodes can also show the same differences but typically with a larger number of attributes that have the same local and remote values. For differences that contain long entries or large arrays, there is an option to show a more detailed difference in a separate window for a selected table. Either double-click the table row or click the
Detailed Comparison of Selected Attribute button (
) below the table to open the
Compare Attribute window.