FEMSolver commands

The command and its paramters must be written to the data stream. Results must be read from the results stream. You must flush the file data stream before reading from the results stream.

End

This command tells the solver to end.

Write:
[int8] 0

Set connectivity

Connectivity is used to create the sparse matrix of the system.

Write:
[int8] 1
[int32] <nodes_count>
[int32] <elements_count>
[int32] <element_type (2=Triangle, 3=Quadrilateral, 4=Tetrahedra, 5=Hexahedra)>
[int32] <nodes_per_element>
[int32] <degrees_of_freedom>
[int32*elements_count*nodes_per_element] <connectivity>

Fill K

Set a value to all entries of the matrix.

Write:
[int8] 2
[float64] <value>

Set Ke

Send an elemental matrix to be assembled.

Write:
[int8] 3
[int32] <element_id>
[float64*(nodes_per_element*degrees_of_freedom)*(nodes_per_element*degrees_of_freedom)] <Ke>

Set all Ke

Send all elemental matrices to be assembled, starting from element 1.

Write:
[int8] 4
[float64*elements_count*(nodes_per_element*degrees_of_freedom)*(nodes_per_element*degrees_of_freedom)] <All_Ke>

Set row

Send a matrix row.

Write:
[int8] 5
[int32] <row>
[int32] <count>
[float64*count] <values>

Get row indexes

Read the indexes of a matrix row. You must flush the file data stream before reading from the results stream.

Write:
[int8] 6
[int32] <row>
Read:
[int32] <count>
[int32*count] <indexes>

Set u

Send vector with constrain values.

Write:
[int8] 7
[float64*nodes_count*degrees_of_freedom] <values>

Set f

Send vector of independent terms.

Write:
[int8] 8
[float64*nodes_count*degrees_of_freedom] <values>

Set fixed

Send vector that indicates where the constrains are.

Write:
[int8] 9
[int8*nodes_count*degrees_of_freedom] <boolean values>

Solver init

Initialize the solver. You must flush the file data stream after sending this command.

Write:
[int8] 10

Solver run

Runs the solver. You must flush the file data stream before reading from the results stream.

Write:
[int8] 11
Read:
[float64*nodes_count*degrees_of_freedom] <result values>