For the built-in application methods loadModel(<location>) and
loadModel(<tag>,<location>) the
<location> argument scan either be the path to an MPH file found on the file system or a model location URI referencing a model version in a Model Manager database.
The model utility methods provide convenient shortcuts to commonly used methods in the ModelUtil class. In addition to these shortcuts, the
ModelUtil class offers functionality for managing client–server operations. This includes methods for connecting to or disconnecting from a COMSOL Multiphysics server or COMSOL Server. For a complete list of available methods, refer to the
Programming Reference Manual.
The code below loads a model using loadModel, presented in the table above. It extracts the
x-,
y-, and
z-coordinates of all
Mesh nodes and stores them in a 2D double array
coords[3][N], where
N is the number of
Mesh nodes. The individual
x-,
y-, and
z- coordinates are available as the length-N 1D arrays
coords[0],
coords[1],
coords[2], respectively. (The node locations can be plotted by using the Cut Point 3D dataset in combination with a 3D Point Trajectories plot.)