Get information from a model object.
b = gf_model_get(model M, 'is_complex')
T = gf_model_get(model M, 'nbdof')
T = gf_model_get(model M, 'tangent_matrix')
gf_model_get(model M, 'rhs')
gf_model_get(model M, 'brick term rhs', int ind_brick[, int ind_term, int sym, int ind_iter])
z = gf_model_get(model M, 'memsize')
gf_model_get(model M, 'listvar')
gf_model_get(model M, 'listbricks')
V = gf_model_get(model M, 'variable', string name[, int niter])
mf = gf_model_get(model M, 'mesh fem of variable', string name)
name = gf_model_get(model M, 'mult varname Dirichlet', int ind_brick)
I = gf_model_get(model M, 'interval of variable', string varname)
V = gf_model_get(model M, 'from variables')
gf_model_get(model M, 'assembly'[, string option])
{nbit, converged} = gf_model_get(model M, 'solve'[, ...])
gf_model_get(model M, 'test tangent matrix'[, scalar EPS[, int NB[, scalar scale]]])
V = gf_model_get(model M, 'compute isotropic linearized Von Mises or Tresca', string varname, string dataname_lambda, string dataname_mu, mesh_fem mf_vm[, string version])
V = gf_model_get(model M, 'compute Von Mises or Tresca', string varname, string lawname, string dataname, mesh_fem mf_vm[, string version])
V = gf_model_get(model M, 'compute second Piola Kirchhoff tensor', string varname, string lawname, string dataname, mesh_fem mf_sigma)
V = gf_model_get(model M, 'compute plasticity Von Mises or Tresca', string datasigma, mesh_fem mf_vm[, string version])
gf_model_get(model M, 'compute plasticity constraints', mesh_im mim, string varname, string projname, string datalambda, string datamu, string datathreshold, string datasigma)
V = gf_model_get(model M, 'compute plastic part', mesh_im mim, mesh_fem mf_pl, string varname, string projname, string datalambda, string datamu, string datathreshold, string datasigma)
M = gf_model_get(model M, 'matrix term', int ind_brick, int ind_term)
s = gf_model_get(model M, 'char')
gf_model_get(model M, 'display')
Get information from a model object.
b = gf_model_get(model M, 'is_complex')
Return 0 is the model is real, 1 if it is complex.
T = gf_model_get(model M, 'nbdof')
Return the total number of degrees of freedom of the model.
T = gf_model_get(model M, 'tangent_matrix')
Return the tangent matrix stored in the model .
gf_model_get(model M, 'rhs')
Return the right hand side of the tangent problem.
gf_model_get(model M, 'brick term rhs', int ind_brick[, int ind_term, int sym, int ind_iter])
Gives the access to the part of the right hand side of a term
of a particular nonlinear brick. Does not account of the eventual
time dispatcher. An assembly of the rhs has to be done first.
ind_brick
is the brick index. ind_term
is the index of the
term inside the brick (default value : 1).
sym
is to access to the second right hand side of for symmetric
terms acting on two different variables (default is 0).
ind_iter
is the iteration number when time dispatchers are
used (default is 1).
z = gf_model_get(model M, 'memsize')
Return a rough approximation of the amount of memory (in bytes) used by the model.
gf_model_get(model M, 'listvar')
print to the output the list of variables and constants of the model.
gf_model_get(model M, 'listbricks')
print to the output the list of bricks of the model.
V = gf_model_get(model M, 'variable', string name[, int niter])
Gives the value of a variable or data.
mf = gf_model_get(model M, 'mesh fem of variable', string name)
Gives access to the mesh_fem
of a variable or data.
name = gf_model_get(model M, 'mult varname Dirichlet', int ind_brick)
Gives the name of the multiplier variable for a Dirichlet brick. If the brick is not a Dirichlet condition with multiplier brick, this function has an undefined behavior
I = gf_model_get(model M, 'interval of variable', string varname)
Gives the interval of the variable varname
in the linear system of
the model.
V = gf_model_get(model M, 'from variables')
Return the vector of all the degrees of freedom of the model consisting of the concatenation of the variables of the model (useful to solve your problem with you own solver).
gf_model_get(model M, 'assembly'[, string option])
Assembly of the tangent system taking into account the terms
from all bricks. option
, if specified, should be 'build_all',
'build_rhs', 'build_matrix' or 'pseudo_potential' (in that case,
the pseudo_potential is returned).
The default is to build the whole
tangent linear system (matrix and rhs). This function is useful
to solve your problem with you own solver.
{nbit, converged} = gf_model_get(model M, 'solve'[, ...])
Run the standard getfem solver. Note that you should be able to use your own solver if you want (it is possible to obtain the tangent matrix and its right hand side with the gf_model_get(model M, 'tangent matrix') etc.). Various options can be specified: - 'noisy' or 'very_noisy' the solver will display some information showing the progress (residual values etc.). - 'max_iter', int NIT set the maximum iterations numbers. - 'max_res', @float RES set the target residual value. - 'diverged_res', @float RES set the threshold value of the residual beyond which the iterative method is considered to diverge (default is 1e200). - 'lsolver', string SOLVER_NAME select explicitely the solver used for the linear systems (the default value is 'auto', which lets getfem choose itself). Possible values are 'superlu', 'mumps' (if supported), 'cg/ildlt', 'gmres/ilu' and 'gmres/ilut'. - 'lsearch', string LINE_SEARCH_NAME select explicitely the line search method used for the linear systems (the default value is 'default'). Possible values are 'simplest', 'systematic', 'quadratic' or 'basic'. - 'with pseudo potential' for nonlinear problems, the criterion of the line search will be a pseudo potential instead of the residual. Still experimental since not all bricks define a pseudo potential. Return the number of iterations, if a iterative method is used. Note that it is possible to disable some variables (see gf_model_set(model M, 'disable variable') ) in order to solve the problem only with respect to a subset of variables (the disabled variables are the considered as data) for instance to replace the global Newton strategy with a fixed point one.
gf_model_get(model M, 'test tangent matrix'[, scalar EPS[, int NB[, scalar scale]]])
Test the consistency of the tangent matrix in some random positions
and random directions (useful to test newly created bricks).
EPS
is the value of the small parameter for the finite difference
computation of the derivative is the random direction (default is 1E-6).
NN
is the number of tests (default is 100). scale
is a parameter
for the random position (default is 1). Each dof od the random
position is chosen in the range [-scale, scale].
V = gf_model_get(model M, 'compute isotropic linearized Von Mises or Tresca', string varname, string dataname_lambda, string dataname_mu, mesh_fem mf_vm[, string version])
Compute the Von-Mises stress or the Tresca stress of a field (only
valid for isotropic linearized elasticity in 3D). version
should
be 'Von_Mises' or 'Tresca' ('Von_Mises' is the default).
V = gf_model_get(model M, 'compute Von Mises or Tresca', string varname, string lawname, string dataname, mesh_fem mf_vm[, string version])
Compute on mf_vm
the Von-Mises stress or the Tresca stress of a field
for nonlinear elasticity in 3D. lawname
is the constitutive law which
could be 'SaintVenant Kirchhoff', 'Mooney Rivlin', 'neo Hookean' or 'Ciarlet Geymonat'.
dataname
is a vector of parameters for the constitutive law. Its length
depends on the law. It could be a short vector of constant values or a
vector field described on a finite element method for variable coefficients.
version
should be 'Von_Mises' or 'Tresca' ('Von_Mises' is the default).
V = gf_model_get(model M, 'compute second Piola Kirchhoff tensor', string varname, string lawname, string dataname, mesh_fem mf_sigma)
Compute on mf_sigma
the second Piola Kirchhoff stress tensor of a field
for nonlinear elasticity in 3D. lawname
is the constitutive law which
could be 'SaintVenant Kirchhoff', 'Mooney Rivlin', 'neo Hookean' or 'Ciarlet Geymonat'.
dataname
is a vector of parameters for the constitutive law. Its length
depends on the law. It could be a short vector of constant values or a
vector field described on a finite element method for variable
coefficients.
V = gf_model_get(model M, 'compute plasticity Von Mises or Tresca', string datasigma, mesh_fem mf_vm[, string version])
Compute on mf_vm
the Von-Mises or the Tresca stress of a field for plasticity and return it into the vector V.
datasigma
is a vector which contains the stress constraints values supported by the mesh.
version
should be 'Von_Mises' or 'Tresca' ('Von_Mises' is the default).
gf_model_get(model M, 'compute plasticity constraints', mesh_im mim, string varname, string projname, string datalambda, string datamu, string datathreshold, string datasigma)
Compute and save the stress constraints sigma for other hypothetical iterations. 'mim' is the integration method to use for the computation. 'varname' is the main variable of the problem. 'projname' is the type of projection to use. For the moment it could only be 'Von Mises' or 'VM'. 'datalambda' and 'datamu' are the Lame coefficients of the material. 'datasigma' is a vector which will contains the new stress constraints values.
V = gf_model_get(model M, 'compute plastic part', mesh_im mim, mesh_fem mf_pl, string varname, string projname, string datalambda, string datamu, string datathreshold, string datasigma)
Compute on mf_pl
the plastic part and return it into the vector V.
datasigma
is a vector which contains the stress constraints values supported by the mesh.
M = gf_model_get(model M, 'matrix term', int ind_brick, int ind_term)
Gives the matrix term ind_term of the brick ind_brick if it exists
s = gf_model_get(model M, 'char')
Output a (unique) string representation of the model. This can be used to perform comparisons between two different model objects. This function is to be completed.
gf_model_get(model M, 'display')
displays a short summary for a model object.
Y. Collette