Saving Models to Databases
From the Save window, you can save a new version of the model opened in the COMSOL Desktop to one of your configured databases. Choose the database that you want to save a model to in the list of options on the left. Choose Add Database () if you want to add a new database.
The Save Window in the COMSOL Multiphysics Reference Manual.
The Save window can appear with four different headers depending on the model’s presence in the selected database:
Save new: The opened model has never before been saved to the database. A new model will be created in the database with an associated first version.
Save version: The database contains previously saved versions of the opened model. A new version of an existing model will be saved to the database.
Save version from draft: The opened model is a draft version. A new version of the regular model that the draft was originally created from will be saved to the database.
Save new from draft: The opened model is a draft version, but the regular model that the draft was originally created from does not exist in the database. This may happen if you, or another user, permanently deletes the regular model in the database while the draft is open in the COMSOL Desktop, or if you decide to save the draft to another database. As for Save new, a new model will be created in the database with an associated first version.
To save a new model version:
1
This title is kept in sync with the corresponding field in the Presentation section in the root node’s Settings window. The title cannot be left empty.
2
You can later read and update this save comment in The Versions Window or the The Commits Window.
3
The Location link button is hidden if the database only contains a single branch, which is the default for a new database.
4
Click the Save button () to save a new version of the model.
If you want to force the creation of a new model instead, click the expand button next to the Save button () and select Save as New () — see Splitting a Model Version History in Two.
Only changing the title of a model already saved in a database does not mean that you will create a new model. While providing a descriptive title helps you with later finding it in the database, it has no bearing on the database identity of the model.
The Information Section
The Information section in the Save window displays additional information concerning the save. When saving a new version of an existing model in the database, this includes both when, and by whom, various versions were saved:
Latest version: The most recent version of the model being saved. The latest version depends on the target branch set in the Location field.
Current version: The version that the current model in the COMSOL Desktop was opened from. Only shown for Save version if the current version is not the same as the latest version — see Save Conflicts.
Current draft version: The version that the current draft in the COMSOL Desktop was opened from. Only shown for Save new from draft.
The panel can also contain information messages () that may be of interest, as well as warning messages () signaling, for example, that the opened model is in conflict with the latest version.
Save Conflicts
When the Save window is shown, Model Manager will make a preemptive check that the model to be saved is not in conflict with the latest, already saved, version in the database. Such a conflict can arise, for example, if:
Clicking the Save button () while there are save conflicts opens a dialog box asking if you want to save anyway. Click Save to ignore all conflicts, or Cancel for closing the dialog box without saving. You can also click Compare with Latest () to open the Comparison Result window to compare the opened COMSOL Desktop model with the latest version in the database. See Comparing the Opened Model in the COMSOL Desktop With the Latest Version for further details.
The Description Section
The Description section in the Save window shows the current description of the model. As for the Title field, changes to the description are kept in sync with the corresponding field in the Presentation section in the root node’s Settings window.
Use the Description field for information that should carry over between different versions of the model. Use the Comments field for information that only applies to the specific model version being saved.
The Tags Section
The Tags section shows the tags assigned to the model as a collection of tag pills. You can assign tags already present in the database, as well as create new tags that should be assigned. You can assign as many tags as you like. Click a tag pill and select Remove () to remove a tag assignment.
Any changes made to the assigned tags in the Tags section are saved to the database first when you save the model.
See Tagging Models and Files to learn how tags may help you in organizing your models and data files in a Model Manager database.
Click the Add Tag button () to find an existing tag to assign to the model. Write the title of the tag in the text field to filter the popup list of available tags. The matching tags are shown with their title followed by the titles of their parent tags, if any, within parentheses. Either double-click a tag in the list or select a tag and press Enter to assign it to the model.
Click the Set Tags button () to open the Set Tags dialog box. The dialog box contains a tag tree of all available tags. Select a check box for a tag in order to assign the tag to the model. Clear a selected check box to remove a tag assignment. Click Clear Tags () to clear all selections. You can filter the tree of available tags by writing a tag title in the text field above the tree. Click OK to finish the tag assignment.
If the tag you want to assign is not present in the database, you can create a new tag from the Tags section. Click the New Tag button () to open the New Tag dialog box.
1
In the Title field on the General tab, write the title for the new tag.
2
Select the tags that the new tag itself should be assigned — in other words, its parent tags — in the tag tree on the Parent tags tab. You can filter the tree of available parent tags by writing a tag title in the text field above the tree.
3
4
Click OK to create the tag in the database.
Unlike the other tag operations in the Tags section, the new tag is immediately saved to the database when you click OK in the New Tag dialog box. The assignment of the new tag to the model is, however, first saved when the model is saved.
The Auxiliary Data Section
The Auxiliary Data section is shown in the Save window if the model references any auxiliary data files that are version-controlled in a Model Manager database and those data files currently have unsaved changes in the current COMSOL Multiphysics program session. Saving the model gives you the opportunity of simultaneously saving these data files to the same target branch that the model is saved to.
The section contains a table with the following columns:
The Save column — a check box that, if selected, specifies that a new version of the data file should be saved when the model is saved.
The Title column — the title of the data file. You can change the title by editing directly in the table cell.
The Files column — the number of files to be saved. May be more than one in the case of a fileset — see Files.
An icon column — shows an information icon when a previous version of the data file is not already present in the target branch, or a warning icon if there are version conflicts for the data file. The icon’s tooltip gives further details.
Select a row in the table and click Details () to see further details on an auxiliary data file.
Permission Check
When saving to a server database via a Model Manager server, the Model Manager server will check that you fulfill the permission requirements to save a new version of the model. This involves checking that you are permitted to:
Only the first two requirements apply when creating a new model in the database. If there is any auxiliary data that will be saved with the model, a permission check will also be made for saving versions of these items.
A preemptive permission check is performed when the Save window is opened. If the check fails, a link button () that opens a dialog box explaining why it failed is shown next to the Save button () — see The Permission Requirements Dialog Box.