New Functionality in the Model Manager
Also see the Model Manager Reference Manual for more information.
Study Support for Batch and Cluster
The Batch, Batch Sweep, Cluster Computing, and Cluster Sweep study nodes can now be configured to use models and data stored in a Model Manager database. You enable database storage for a study node by selecting Database in the Model storage and Data storage lists in the Settings window.
Find Models Saved in a Specific COMSOL Version
Support for filtering and sorting models by the COMSOL Multiphysics version that a model was saved in has been added to the Model Manager search tool. The new functionality is available via a Saved in menu option in the Open, Model Manager, Select File, and Select Model windows, as well as via the Model Manager search syntax using @savedIn:6.4, for example.
Model Manager API Improvements
The following new methods and types have been added to the API:
Access Database Objects Using a Location URI
New methods have been added to DatabaseApi for accessing the corresponding database, repository, branch, and latest version given a model or file location URI for a specific model or file version. For example,
DatabaseApi api = DatabaseApiUtil.api();
String modelLocationUri = "dbmodel:///?...";
Branch branch = api.branchByLocationUri(modelLocationUri);
Test for Existence
You can test for the existence of items and item versions in a database via new exists methods added to, for example, ModelItem, ModelItemVersion, and BranchModelItem. This is useful when, for example, you want to test if the version corresponding to a model location URI has been permanently deleted in the database before proceeding with other logic:
ModelItemVersion modelVersion = api
  .modelVersionByLocationUri(modelLocationUri);
 
if (modelVersion.exists()) {
// ...
}
Manipulating Location URI Strings
Some new convenient methods for manipulating model and file location URI strings have been added, including methods for:
String fileLocationUri = "dbfile:///cad_component.prt?...";
FileResourcePath path = FileResourcePath
  .ofFileLocationUri(fileLocationUri);
FileResourcePath path = ...
FileItemVersion fileVersion = ...
String fileLocationUri = fileVersion.fileLocationUri(path);
Branch branch = ...
String title = "Batch Output";
String modelLocationUri = branch.newModelLocationUri(title);
Partial Updates to Filesets
A new input parameter type, TargetFileResourceParam, has been added, enabling you to perform a partial update of file resources belonging to a fileset version of a file item. Two examples of updates you might make and the methods you would use include:
BranchFileItem branchFileItem = ...
 
TargetFileResourceParam targetFileParam = DatabaseApiUtil.param()
  .forTargetFileResource()
  .withSourceFileResourcePath("cad_component.prt")
  .withReplaceExisting();
 
UpdateFileItemParam updateFileParam = DatabaseApiUtil.param()
  .forUpdateFile()
  .withTargetFileResources(targetFileParam);
 
String commitComment =
  "Updated the ‘cad_component.prt’ file in the CAD assembly.";
branchFileItem.update(updateFileParam, commitComment);
TargetFileResourceParam targetFileParam = DatabaseApiUtil.param()
  .forTargetFileResource()
  .withFileResourcePath("cad_component.prt")
  .withDeleteExisting();
 
UpdateFileItemParam updateFileParam = DatabaseApiUtil.param()
  .forUpdateFile()
  .withTargetFileResources(targetFileParam);
 
String commitComment =
  "Removed the ‘cad_component.prt’ file in the CAD assembly.";
branchFileItem.update(updateFileParam, commitComment);
Optionally Ignore Missing Files When Exporting
A new option has been introduced to silently ignore when a file resource is missing from a fileset while exporting.
Use this method to ignore if a CAD assembly has a specific component file or not:
ExportFileItemVersionParam exportParam = DatabaseApiUtil.param()
  .forExportFileVersion()
  .withSourceFileResourcePathSegments("cad_component.prt")
  .withSourceFileResourceOptions(ExportFileItemVersionSourceFileResourceOption.IGNORE_MISSING);
 
fileVersion.export(exportParam);
Without this option, the export would fail with an exception if the component file was not found in the database.
Enum Constant for Saved In
A new SAVED_IN enumeration value for sorting on the COMSOL Multiphysics version that a model was saved in has been added to ItemSortField.
More Lenient Behavior When Saving a Target Item
The target item may now be absent from the database when providing an item key via SaveItemParam.targetItemKey(). Instead, a new item is created as long as necessary source data for field values and item contents is available via other input parameters. The same holds true when invoking BranchModelItem.update(...) when the model item is absent (as well as for file items and tag items).
Deprecated Enum Constants
The COMPUTEDDATA constant in ItemSortField and the INPUTFILE, OUTPUTFILE, and GEOMETRYPART constants in ItemVersionReferenceType have been deprecated. Their replacement constants are found in the same enum types.
Compatibility Between Versions
Local Databases
Local databases can be shared between COMSOL Multiphysics versions 6.0 through 6.4, as the database format is designed for both backward and forward compatibility. Models saved to a database from a specific COMSOL Multiphysics version can, however, only be opened in that and later versions.
Older Versions of Model Manager Server
COMSOL Multiphysics version 6.4 supports connecting to all previous versions of a Model Manager server, although some new Model Manager functionality is disabled in the COMSOL Desktop when connected to an older server version.
Version Conflicts
The version conflict analysis involving branches has been updated. It is no longer considered a conflict to save to a branch that a model did not have any prior versions in. It is also possible to update a model on a parent branch when opened from a child branch without conflicts as long as the model’s latest version on the parent branch is found in the version history (with respect to the child branch) of the model being saved from.
Rank Tie-Breaker
The tie-breaking sort field when sorting by relevance ranking is now always the saved timestamp (in descending order). Previously, the title field was used as the tie-breaker for the special case of an empty search term.