The Comparison Result window enables you to compare versions of models stored in databases. In this section, you will see four different ways you can encounter comparisons involving such models:
If you select two model versions in the Versions window and click
Compare (
), the
Comparison Result window will open with the older version shown on the left, labeled as
Older Version, and the newer version on the right, labeled as
Newer Version. The versions need not belong to the same model: the older version may, for example, belong to an origin model of the newer version’s model — see
Splitting a Model Version History in Two. Since model versions are immutable in the database, it is not possible to merge or override any shown differences in the opened
Comparison Result window.
If you select two models in The Model Manager Window or
The Databases Window and click
Compare (
), the
Comparison Result window will open with one of the models labeled as
First and the other as
Second. The compared versions depend on the context where the models were selected. Selecting two models when
Searching in Branches will compare the latest versions of each respective model. Selecting when
Searching in Snapshots and Commits will compare the versions that were the latest at the time of the corresponding commit. Similar to when comparing two versions from a model’s history, it is not possible to merge or override any shown differences in the opened
Comparison Result window.
If you select a single model version and click Compare (
), the
Comparison Result window will open with a comparison between the model opened in the COMSOL Desktop, labeled
Opened, and the selected version, labeled
Saved.
Right-click the top node in the Differences tree and select
Merge Changes to Opened (
) to merge all changes marked as
incoming (that is, changes to the model tree made in the selected model version) into the desktop model. All changes marked as
outgoing (that is, changes made to the model tree in the desktop model) are left alone.
Right-click any node in the Differences tree and select
Override Difference in Opened (
) to write all changes in that node to the opened model, regardless if any changes are incoming or outgoing, effectively reverting any changes you have made in the desktop model.
If you encounter a version conflict when trying to save a new version of the model opened in the COMSOL Desktop, you can open the Comparison Result window with a comparison between the desktop model, labeled
Opened, and the latest version of the model being saved, labeled
Latest Version — see also
Save Conflicts. Similar to
Comparing a Version With the Opened Model in the COMSOL Desktop, you can merge changes and override differences into the desktop model to include those changes you want to keep from the latest version.