The COMSOL Client–Server Connection
LiveLink™ for MATLAB® provides an interface between COMSOL Multiphysics and MATLAB based on the COMSOL client–server architecture. A COMSOL thin client is running inside MATLAB and has access to the COMSOL API through the MATLAB Java interface. Model information is stored in a model object available on the COMSOL Multiphysics server. The thin client communicates with the COMSOL Multiphysics server, enabling you to generate, modify, and solve COMSOL model objects at the MATLAB prompt.
When starting COMSOL with MATLAB, you open both a COMSOL Multiphysics server and the MATLAB user interface. The first time you start a COMSOL Multiphysics server, you are asked to supply a new username and password that will be associated with the client–server mode of operation. These credentials are stored in the user preferences and reused for future connections. Once this information is entered, the client–server communication is established.
Normally, both the COMSOL Multiphysics server and the MATLAB user interface run on the same computer. For computations requiring more memory, you can connect to a remote COMSOL Multiphysics server, but this configuration requires a floating network license.
Note that the COMSOL Desktop is not necessary when running COMSOL Multiphysics with MATLAB. However, you can connect a COMSOL Desktop to the COMSOL Multiphysics server and import the model available in the latter. This way the model is updated simultaneously at the MATLAB prompt and in the COMSOL Desktop.