ansys.mapdl.core.Mapdl.merge#
- Mapdl.merge(name1='', name2='', val1='', val2='', **kwargs)#
Merges two dense matrices or vectors into one.
Mechanical APDL Command: *MERGE
- Parameters:
- name1
str
Name of the matrix or vector to extend.
- name2
str
Name of the matrix or vector to be merged into
Name1
.- val1
str
Row number indicating where the new values are to be inserted into the
Name1
vector.- val2
str
Specifies how the
Name2
matrix or vector is copied into theName1
matrix.COL
- Insert the new values at the column location specified byVal1
(default).ROW
- Insert the new values at the row location specified byVal1
.
- name1
Notes
Warning
This function contains specificities regarding the argument definitions. Please refer to the command documentation for further explanations.
Argument Descriptions
name1 : str
- Name of the matrix or vector to extend.name2 : str
- Name of the matrix or vector to be merged intoName1
.val1, val2 : str
- Additional input. The meaning ofVal1
andVal2
varies depending on the entity type (matrix or vector). See details below.
The following
Val1
andVal2
fields are used ifName1
refers to a dense matrix created by the dmat command:val1 : str
- Column or row number indicating where the new values are to be inserted into theName1
matrix.val2 : str
- Specifies how theName2
matrix or vector is copied into theName1
matrix.COL
- Insert the new values at the column location specified byVal1
(default).ROW
- Insert the new values at the row location specified byVal1
.
The following
Val1
field is used ifName1
refers to a vector created by the vec command:val1 : str
- Row number indicating where the new values are to be inserted into theName1
vector.
merge can be used to add new columns or rows to a dense matrix that was created by the dmat command. In this case,
Name1
must be the name of the dense matrix andName2
must refer to a vector or another dense matrix.The following two examples demonstrate merging columns into a dense matrix.
The following example demonstrates merging rows into a dense matrix.
merge can also be used to add new rows to a vector that was created by the vec command. In this case,
Name1
andName2
must both refer to vectors, as demonstrated in the example below.In all cases, the values of the original matrix or vector are retained, and the matrix or vector is resized to accommodate the additional rows or columns.