Package com.comsol.model
Interface SolverFeature
-
- All Superinterfaces:
ModelEntity
,PrimitiveModelEntity
,PropFeature
,SelectionContainer
,SelectionEntity
- All Known Subinterfaces:
SolverProblemFeature
public interface SolverFeature extends PropFeature
Solver feature.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addSparseMatrixVal(java.lang.String mName, int[] row, int[] col, double[] val)
Set real part of sparse matrix.void
addSparseMatrixValImag(java.lang.String mName, int[] row, int[] col, double[] val)
Set imaginary part of sparse matrix.SolverFeature
clearXmesh()
Clears the data created by xmeshInfo.SolverFeature
create(java.lang.String tag, java.lang.String oper)
Create a solver feature.void
createSparseMatrix(java.lang.String mName, int M, int N, int Nnz, boolean isReal)
Create a matrix.void
createVector(java.lang.String mName, int M, boolean isReal)
Create a vector.void
enableContinue()
Enables to run continueRun on the study.SolverFeatureList
feature()
Returns all solver features.SolverFeature
feature(java.lang.String tag)
Returns solver feature.int
getM(java.lang.String mName)
Returns number of rows in matrix.int
getN(java.lang.String mName)
Returns number of columns in matrix.int
getNnz(java.lang.String mName)
Get number of non-zeros in sparse matrix.int[]
getSparseMatrixCol(java.lang.String mName)
Returns column indices of matrix values.int[]
getSparseMatrixColBlock(java.lang.String mName, int start, int stop)
A blocked version of getSparseMatrixCol.int[]
getSparseMatrixRow(java.lang.String mName)
Returns row indices of matrix values.int[]
getSparseMatrixRowBlock(java.lang.String mName, int start, int stop)
A blocked version of getSparseMatrixRow.double[]
getSparseMatrixVal(java.lang.String mName)
Returns matrix values.double[]
getSparseMatrixValBlock(java.lang.String mName, int start, int stop)
A blocked version of getSparseMatrixVal.double[]
getSparseMatrixValImag(java.lang.String mName)
Returns imaginary matrix values.double[]
getSparseMatrixValImagBlock(java.lang.String mName, int start, int stop)
A blocked version of getVectorImag.double[]
getVector(java.lang.String mName)
Returns the real vector associated with the matrix type.double[]
getVectorBlock(java.lang.String mName, int start, int stop)
A blocked version of getVector.double[]
getVectorImag(java.lang.String mName)
Get the imaginary part of the vector associated with the matrix type.double[]
getVectorImagBlock(java.lang.String mName, int start, int stop)
A blocked version of getSparseMatrixValImag.boolean
hasError()
Check for error in solver feature.boolean
hasProblem()
Check for problem in solver feature.boolean
hasWarning()
Check for warnings in solver feature.boolean
isReal(java.lang.String mName)
Check if matrix is real.SolverProblemFeatureList
problem()
Returns solver problem feature list.SolverProblemFeature
problem(java.lang.String fname)
Returns solver problem feature.void
setVector(java.lang.String mName, double[] val)
Set real part of vector.void
setVectorBlock(java.lang.String mName, double[] val, int start)
Set real part of block in vector.void
setVectorImag(java.lang.String mName, double[] val)
Set imaginary part of vector.void
setVectorImagBlock(java.lang.String mName, double[] val, int start)
Set imaginary part of block in vector.void
updateVariables()
Updates the dependent variable list.XmeshInfo
xmeshInfo()
Returns extended mesh information.XmeshInfo
xmeshInfo(java.lang.String meshCase)
Returns extended mesh information for a mesh case.-
Methods inherited from interface com.comsol.model.ModelEntity
active, author, author, comments, comments, dateCreated, dateModified, docMarker, docMarker, help, help, icon, isactive, isActive, label, label, lastModifiedBy, model, model, name, name, resetAuthor, scope, tag, tag, timeCreated, timeModified, version, version
-
Methods inherited from interface com.comsol.model.PrimitiveModelEntity
getContainer, getDisplayString, resolveModelPath
-
Methods inherited from interface com.comsol.model.PropFeature
getAllowedPropertyValues, getBoolean, getBoolean, getBoolean, getBooleanArray, getBooleanMatrix, getDouble, getDouble, getDouble, getDoubleArray, getDoubleMatrix, getEntryKeyIndex, getEntryKeys, getInt, getInt, getInt, getIntArray, getIntMatrix, getReferenceArray, getString, getString, getString, getString, getStringArray, getStringMatrix, getType, getValueType, hasProperty, hasSelection, move, move, properties, remove, remove, selection, set, set, set, set, set, set, set, set, set, set, set, set, setEntry, setEntry, setEntry, setEntry, setIndex, setIndex, setIndex, setIndex, setIndex, setIndex, setIndex, setIndex, setIndex, setIndex, setIndex, setIndex
-
Methods inherited from interface com.comsol.model.SelectionEntity
selection
-
-
-
-
Method Detail
-
addSparseMatrixVal
void addSparseMatrixVal(java.lang.String mName, int[] row, int[] col, double[] val)
Set real part of sparse matrix. Vectors are of length Nnz.- Parameters:
mName
- Matrix name.row
- Row index vector.col
- Column index vector.val
- Matrix values.
-
addSparseMatrixValImag
void addSparseMatrixValImag(java.lang.String mName, int[] row, int[] col, double[] val)
Set imaginary part of sparse matrix. Vectors are of length Nnz.- Parameters:
mName
- Matrix name.row
- Row index vector.col
- Column index vector.val
- Matrix values.
-
clearXmesh
SolverFeature clearXmesh()
Clears the data created by xmeshInfo. Call to release memory after the required extended mesh information has been obtained.- Returns:
- Solver feature.
-
create
SolverFeature create(java.lang.String tag, java.lang.String oper)
Create a solver feature.- Parameters:
tag
- Feature tag.oper
- Type of feature.- Returns:
- Created solver feature.
-
createSparseMatrix
void createSparseMatrix(java.lang.String mName, int M, int N, int Nnz, boolean isReal)
Create a matrix.- Parameters:
mName
- Matrix name.M
- Number of rows.N
- Number of columns.Nnz
- Number of non zeros.isReal
-true
for real matrix.
-
createVector
void createVector(java.lang.String mName, int M, boolean isReal)
Create a vector.- Parameters:
mName
- Vector name.M
- Vector length.isReal
-true
for real vector -false
for complex vector.
-
enableContinue
void enableContinue()
Enables to run continueRun on the study.
-
feature
SolverFeatureList feature()
Returns all solver features.- Returns:
- List of solver features.
-
feature
SolverFeature feature(java.lang.String tag)
Returns solver feature.- Parameters:
tag
- Solver feature tag.- Returns:
- Solver feature.
-
getM
int getM(java.lang.String mName)
Returns number of rows in matrix.- Parameters:
mName
- Matrix name.- Returns:
- Number of rows.
-
getN
int getN(java.lang.String mName)
Returns number of columns in matrix.- Parameters:
mName
- Matrix name.- Returns:
- Number of columns.
-
getNnz
int getNnz(java.lang.String mName)
Get number of non-zeros in sparse matrix.- Parameters:
mName
- Matrix name.- Returns:
- Number of non-zeros.
-
getSparseMatrixCol
int[] getSparseMatrixCol(java.lang.String mName)
Returns column indices of matrix values.- Parameters:
mName
- Matrix name.- Returns:
- Column indices.
-
getSparseMatrixColBlock
int[] getSparseMatrixColBlock(java.lang.String mName, int start, int stop)
A blocked version of getSparseMatrixCol. Returns column indices of matrix values.- Parameters:
mName
- Matrix name.start
- Start index.stop
- Stop index.- Returns:
- Column indices.
-
getSparseMatrixRow
int[] getSparseMatrixRow(java.lang.String mName)
Returns row indices of matrix values.- Parameters:
mName
- Matrix name.- Returns:
- Row indices.
-
getSparseMatrixRowBlock
int[] getSparseMatrixRowBlock(java.lang.String mName, int start, int stop)
A blocked version of getSparseMatrixRow. Returns row indices of matrix values.- Parameters:
mName
- Matrix name.start
- Start index.stop
- Stop index.- Returns:
- Row indices.
-
getSparseMatrixVal
double[] getSparseMatrixVal(java.lang.String mName)
Returns matrix values.- Parameters:
mName
- Matrix name.- Returns:
- Matrix values.
-
getSparseMatrixValBlock
double[] getSparseMatrixValBlock(java.lang.String mName, int start, int stop)
A blocked version of getSparseMatrixVal. Returns matrix values.- Parameters:
mName
- Matrix name.start
- Start index.stop
- Stop index.- Returns:
- Matrix values representing real part.
-
getSparseMatrixValImag
double[] getSparseMatrixValImag(java.lang.String mName)
Returns imaginary matrix values.- Parameters:
mName
- Matrix name.- Returns:
- Matrix values representing imaginary part.
-
getSparseMatrixValImagBlock
double[] getSparseMatrixValImagBlock(java.lang.String mName, int start, int stop)
A blocked version of getVectorImag. Returns the imaginary part of the vector associated with the matrix type.- Parameters:
mName
- Matrix name.start
- Start index.stop
- Stop index.- Returns:
- Vector representing imaginary part.
-
getVector
double[] getVector(java.lang.String mName)
Returns the real vector associated with the matrix type.- Parameters:
mName
- Matrix name.- Returns:
- Vector representing real part.
-
getVectorBlock
double[] getVectorBlock(java.lang.String mName, int start, int stop)
A blocked version of getVector. Returns the real vector associated with the matrix type.- Parameters:
mName
- Matrix name.start
- Start index.stop
- Stop index.- Returns:
- Vector representing real part.
-
getVectorImag
double[] getVectorImag(java.lang.String mName)
Get the imaginary part of the vector associated with the matrix type.- Parameters:
mName
- Matrix name.- Returns:
- Vector representing imaginary part.
-
getVectorImagBlock
double[] getVectorImagBlock(java.lang.String mName, int start, int stop)
A blocked version of getSparseMatrixValImag. Returns imaginary matrix values.- Parameters:
mName
- Matrix name.start
- Start index.stop
- Stop index.- Returns:
- Matrix values representing imaginary part.
-
hasError
boolean hasError()
Check for error in solver feature.- Returns:
true
if error.
-
hasProblem
boolean hasProblem()
Check for problem in solver feature.- Returns:
true
if problem.
-
hasWarning
boolean hasWarning()
Check for warnings in solver feature.- Returns:
true
if warning.
-
isReal
boolean isReal(java.lang.String mName)
Check if matrix is real.- Parameters:
mName
- Matrix name.- Returns:
true
if matrix is real.
-
problem
SolverProblemFeatureList problem()
Returns solver problem feature list.- Returns:
- List of solver problems.
-
problem
SolverProblemFeature problem(java.lang.String fname)
Returns solver problem feature.- Parameters:
fname
- Solver problem feature tag.- Returns:
- Solver problem feature.
-
setVector
void setVector(java.lang.String mName, double[] val)
Set real part of vector. Vectors are of length M.- Parameters:
mName
- Vector name.val
- Vector values.
-
setVectorBlock
void setVectorBlock(java.lang.String mName, double[] val, int start)
Set real part of block in vector.- Parameters:
mName
- Vector name.val
- Vector values.start
- Start index.
-
setVectorImag
void setVectorImag(java.lang.String mName, double[] val)
Set imaginary part of vector. Vectors are of length M.- Parameters:
mName
- Vector name.val
- Vector values.
-
setVectorImagBlock
void setVectorImagBlock(java.lang.String mName, double[] val, int start)
Set imaginary part of block in vector.- Parameters:
mName
- Vector name.val
- Vector values.start
- Start index.
-
updateVariables
void updateVariables()
Updates the dependent variable list.
-
xmeshInfo
XmeshInfo xmeshInfo()
Returns extended mesh information.- Returns:
- Extended mesh information.
-
xmeshInfo
XmeshInfo xmeshInfo(java.lang.String meshCase)
Returns extended mesh information for a mesh case.- Parameters:
meshCase
- Mesh case.- Returns:
- Extended mesh information.
-
-