The COMSOL File Formats > Serializable Types > Solution

Solution
Supported Versions
1
Subtype of
Serializable
Fields
The class is defined by the following fields:
The first section of solution object specific data contains the following parts and in the following order:
The second section of solution specific data stores information about the type of each DOF and the values of any static DOFs. The data is stored in the following order:
One DOF index data structure and one static DOFs values data structure is needed for each data type. The DOF indices and static vectors sections are therefore repeated nU times.
The third section of solution specific data stores information about the dynamic part of the solution. In total this section contains as many subsections as the size of the parameter list. Each subsection contains the following information and in the following order:
Within each subsection dynamic DOF value data are stored for one data type at a time.
Example of text file output of a simple stationary solution object. The underlying setup is a simple one-dimensional geometry containing a single second order Lagrange element with two uncoupled unknown variables. Both variables are solved for:
# Created by COMSOL Multiphysics Tue Jun 30 13:08:00 2009
 
 
# Major & minor version
0 1
1 # number of tags
# Tags
4 sol1
1 # number of types
# Types
3 obj
 
# --------- Object 0 ----------
 
0 0 1
8 Solution # class
 
5 # solution object version
0 # solution type
0 # interpolation between solnums is ok
1 0 # parameter names
6 # number of DOFs
0 # mesh case number
1 # size of parameter list
 
5 # solution object version
6 # number of data types
# number of solutions
1 1 0 0 0 0
# solution data identifier
NAN NAN NAN NAN
# DOF indices
6 0 1 2 3 4 5
0
0
# static vectors
1 6 1 1 1.375 1.0625 1 1
# DOF indices
4 0 1 4 5
0
0
# static vectors
1 4 -1.5 -0.500 -1.500 -0.500
# DOF indices
0
0
0
# static vectors
# DOF indices
0
0
0
# static vectors
# DOF indices
0
0
0
# static vectors
# DOF indices
0
0
0
# static vectors
 
5 # solution object version
6 # number of data types
1 1 0 # parameter values
# DOFs without time derivatives
1 0
# DOFs with time derivatives
1 0
# time derivatives
1 0
# DOFs without time derivatives
1 0
# DOFs with time derivatives
1 0
# time derivatives
1 0
The object only contains static solution data and that the only data types that are present are ordinary solution data and reaction forces data. The reaction forces data vector contains four entries since the setup has two unknown variables and both have been solved for in the example.
A second example uses the same setup as the previous one with the difference that a parametric solve with the parameters p1 and p2 has been performed. The parameter list was selected as 0 0 0.1 0.2 and only one of the two variables is solved for:
# Created by COMSOL Multiphysics Tue Jun 30 13:08:29 2009
 
 
# Major & minor version
0 1
1 # number of tags
# Tags
4 sol1
1 # number of types
# Types
3 obj
 
# --------- Object 0 ----------
 
0 0 1
8 Solution # class
 
5 # solution object version
1 # solution type
0 # interpolation between solnums is ok
2 2 p1 2 p2 # parameter names
6 # number of DOFs
0 # mesh case number
2 # size of parameter list
 
5 # solution object version
6 # number of data types
# number of solutions
1 1 0 0 0 0
# solution data identifier
NAN NAN NAN NAN
# DOF indices
3 1 3 5
3 0 2 4
0
# static vectors
1 3 0 0 0
# DOF indices
0
2 0 4
0
# static vectors
1 0
# DOF indices
0
0
0
# static vectors
# DOF indices
0
0
0
# static vectors
# DOF indices
0
0
0
# static vectors
# DOF indices
0
0
0
# static vectors
 
5 # solution object version
6 # number of data types
1 2 0 0 # parameter values
# DOFs without time derivatives
1 3 1 1.375 1
# DOFs with time derivatives
1 0
# time derivatives
1 0
# DOFs without time derivatives
1 2 -1.5 -1.500
# DOFs with time derivatives
1 0
# time derivatives
1 0
 
5 # solution object version
6 # number of data types
1 2 0.100 0.200 # parameter values
# DOFs without time derivatives
1 3 1 1.375 1
# DOFs with time derivatives
1 0
# time derivatives
1 0
# DOFs without time derivatives
1 2 -1.5 -1.500
# DOFs with time derivatives
1 0
# time derivatives
1 0
Half the DOFs end up in the static part and half in the dynamic part since only one variable is being solved for. This also has the consequence that the only appearing reaction force data in the stored solution object is in the dynamic part and that these vectors only have two components.