gf_mesh_fem_get
Synopsis
int N = gf_mesh_fem_get(MF, 'nbdof') ivec DOF = gf_mesh_fem_get(MF, 'dof from cv', ivec CVLST) ivec [DOF,CV2DOF] = gf_mesh_fem_get(MF, 'dof from cv', [ivec CVLST]) ivec DOF = gf_mesh_fem_get(MF, 'non conformal dof' [, ivec CVLST]) fem FEMLST[, ivec CV2F] = gf_mesh_fem_get(MF, 'fem' [, ivec CVLST]) ivec CVLST = gf_mesh_fem_get(MF, 'convex_index') int N = gf_mesh_fem_get(MF, 'qdim') ivec I = gf_mesh_fem_get(MF, {'is_lagrangian' | 'is_equivalent' | 'is_polynomial'} [, ivec CVLST]) ivec DOFLST = gf_mesh_fem_get(MF, 'dof on region', ivec rlist) mat DOF_XY = gf_mesh_fem_get(MF, 'dof nodes'[, ivec DOFLST]) ivec DOFP = gf_mesh_fem_get(MF, 'dof partition') vec U = gf_mesh_fem_get(MF, 'interpolate convex data', vec Ucv) gf_mesh_fem_get(MF, 'save', string filename, ['with mesh']) gf_mesh_fem_get(MF,'export_to_vtk', filename, ... ['ascii'], U, 'name'...) gf_mesh_fem_get(MF,'export_to_dx', filename, ... ['as', mesh_name][,'edges']['serie',serie_name][,'ascii'][,'append'], U, 'name'...) string S=gf_mesh_fem_get(M, 'char' [,'with mesh']) mesh M=gf_mesh_fem_get(MF, 'linked mesh') vec U=gf_mesh_fem_get(MF, 'eval', expr [,ivec DOFLST]) M=gf_mesh_fem_get(MF, 'memsize')
Description
gf_mesh_fem_get(MF, 'nbdof') : return the number of degree of freedom of the mesh_fem MF.
gf_mesh_fem_get(MF, 'dof from cv', CVLST) : return the dof IDs attached to the convexes listed in CVLST. WARNING: the Degree of Freedom might be returned in ANY order, do not use this function in your assembly routines. Use 'dof from cvid' instead.
gf_mesh_fem_get(MF, 'dof from cvid' [, CVLST]) : return the degrees of freedom attached to each convex of the mesh, allowing to map a convex number to the list of its associated degrees of freedom. It is similar to gfmesh _get(M, 'pid from cvid').
gf_mesh_fem_get(MF, 'non conformal dof' [, CVLST]) : return the list of DoF which are located on the border of a convex and which belong to only one convex, except those who lie on the border of the mesh. For example, if the convex a and b share a common face, a has a P1 FEM, and b has a P2 FEM, then the dof on the middle of the common face will be returned by this function (this can be useful when searching the interfaces between classical fems and hierarchical fem).
gf_mesh_fem_get(MF, 'Qdim') : return the dimension Q of the fields interpolated by the mesh_fem (1 for scalar fields, 2 for 2D vector fields etc..)..
FEMLST[, CV2F] = gf_mesh_fem_get(MF, 'fem' [, ivec CVLST]) : return a list of fem objects: FEMLST is an array of all fem objects found in the convexes given in CVLST. If CV2F was supplied as an output argument, it contains, for each convex listed in CVLST, the index of its corresponding fem in FEMLST.
Convexes which are not part of the mesh, or convexes which do not have any FEM have their correspounding entry in CV2F set to -1.gf_mesh_fem_get(MF, 'convex_index') : return the list of convexes who have a FEM.
gf_mesh_fem_get(MF, {'is_lagrangian' | 'is_equivalent' | 'is_polynomial'},[, CVLST]) : test the properties of the FEM of the convexes listed in CVLST. If CVLST is omitted, it returns 1 if all convexes in the mesh which are lagrangian (resp. equivalents, resp. polynomials), or 0. If CVLST is present, returns the convex numbers (with respect to CVLST) which are lagrangian (resp. etc..)
gf_mesh_fem_get(MF, 'dof on region', rlist) : return the list of dof whose support is non-null on one of the regions whose ids are listed in rlist (note that for boundary regions, some dof nodes may not lie exactly on the boundary, for example the dof of FEM_PK(n,0) lies on the center of the convex, but the base function in not null on the convex border).
gf_mesh_fem_get(MF, 'dof nodes'[, DOFLST]) : return the list of interpolation points for the specified dof IDs in DOFLST (if DOFLST is omitted, all dof are considered).
gf_mesh_fem_get(MF, 'dof partition') : return the array which associates an integer (the partition number) to each convex of the mesh_fem. By default, it is an all-zero array. The degrees of freedom of each convex are connected only to the dof of neighbouring convexes which have the same partition number, hence it is possible to create partially discontinuous mesh_fem very easily.
gf_mesh_fem_get(MF, 'interpolate convex data', Ucv) is a convenient function to interpolate quickly some data that is given on the mesh convexes (for example the output of gf_mesh_get(m, 'quality')) on MF (a similar function also exists for slices). Note that it works better if MF is a discontinuous mesh_fem (for example 'FEM_PK(N,0)'), or the result will be "smoothed".
gf_mesh_fem_get(MF, 'save', filename [,'with mesh']) : save the mesh_fem in a text file (which can be loaded later with gf_mesh_fem(m, 'load', filename). Please note that the associated mesh is not saved, except if you use the 'with mesh' option! gf_mesh_fem_get(M, 'char' [,'with mesh']) is similar, but saves the content of the mesh_fem in a string.
gf_mesh_fem_get(MF, 'char') : get a string description of the mesh_fem.
gf_mesh_fem_get(MF,'export_to_vtk', filename, ... ['ascii'], U, 'name'...) : export a mesh_fem and some fields to a VTK file. The FEM and geometric transformations will be mapped to order 1 or 2 isoparametric PK (or QK) FEMs (as VTK does not handle higher order elements). If you need to represent high- order FEMs or high-order geometric transformations, you should consider gf_slice_get(sl,'export_to_vtk').
gf_mesh_fem_get(MF,'export_to_dx', filename, ... ['as', mesh_name][,'edges']['serie',serie_name][,'ascii'][,'append'], U, 'name'...) : export a mesh_fem and some fields to an OpenDX file. This function will fail if the mesh_fem mixes different convex types (i.e. quads and triangles), or if OpenDX does not handle a specific element type (i.e. prism connections are not known by OpenDX). The FEM will be mapped to order 1 PK (or QK) FEMs. If you need to represent high-order FEMs or high-order geometric transformations, you should consider gf_slice_get(sl,'export_to_dx').
gf_mesh_fem_get(MF, 'linked mesh') return an handle to the mesh object linked to MF.
gf_mesh_fem_get(MF, 'eval', expr [,DOFLST]) : call gf_mesh_fem_get_eval. This function interpolates an expression on a lagrangian mesh_fem (for all dof except if DOFLST is specified). The expression can be a numeric constant, or a cell array containing numeric constants, string expressions or function handles. For example:
U1=gf_mesh_fem_get(mf,'eval',1) U2=gf_mesh_fem_get(mf,'eval',[1;0]) % output has two rows U3=gf_mesh_fem_get(mf,'eval',[1 0]) % output has one row, only valid if qdim(mf)==2 U4=gf_mesh_fem_get(mf,'eval',{'x';'y.*z';4;@myfunctionofxyz})
gf_mesh_fem_get(M, 'memsize') : return the amount of memory (in bytes) used by the mesh_fem object (the linked mesh is not counted).
