The cmo/addatt command is used to add and initialize a new mesh object attribute. There are two variations on the command syntax. The general form is used to add a new attribute to a mesh object. The second syntax uses keywords to create and/or fill a valid attribute with calculated values. This syntax can also derive a vector attribute from three attributes or derive three scalar attributes from a vector attribute.
For the general form ,the first two parameters, mo_name/att_name are required. All other parameters will resort to default settings if not included on the command line. See the modattcommand for details on these parameters.
The keyword syntax uses the fourth token on the command line to define the type of attribute to create. The syntax for each keyword is unique. If the named attribute already exists, values will be overwritten with values as indicated by the keyword.
cmo/addatt / mo_name / att_name / [ type / rank / length / interpolate / persistence / ioflag / value ]
cmo/addatt / mo_name / area_normal / normal_type / att_v_name
cmo/addatt / mo_name / unit_area_normal / normal_type / att_v_name
cmo/addatt / mo_name / volume / att_name
cmo/addatt / mo_name / vector / att_v_snk / att_1src, att_2src, att_3src
cmo/addatt / mo_name / scalar / att_1snk, att_2snk, att_3snk / att_v_src
area_normal: creates vector attribute att_v_name and fills with the x,y,z components of area normals for each face. The new attribute is nelements in length, type is VDOUBLE, and rank is vector. normal_type choices include xyz, rtz, and rtp. The area normal is a vector perpendicular to the triangle face with length equal to the area of the triangle. Currently implemented for xyz on triangles only.
unit_area_normal: is a vector perpendicular to the triangle face with length equal to one. This command has the same format as area_normal.
volume or area: creates an attribute nelements in length and type VDOUBLE. For volume keyword the att_name attribute is filled with volume(if 3D), area(if 2D) or length(if lines). Currently implemented for triangle areas.
vector: creates att_v_snk of rank vector from three existing attributes att_1src, att_2src, and att_3src
scalar: creates three attributes att_1snk, att_2snk, and att_3snk from an attribute att_v_src of rank vector.
cmo /addatt/cmo1/boron1/VDOUBLE /scalar /nnodes /asinh /permanent Create node attribute named boron1 with interpolate method of asinh. cmo/addatt/-cmo-/boron2 /VDOUBLE/scalar/nnodes/asinh/permanent/gl/2.0 Create node attribute named boron2 and fill with value 2.0, write to gmv and lagrit dumps. cmo/addatt/cmo1/boron3 /VDOUBLE/scalar/nnodes/user/temporary Create temporary node attribute named boron3. cmo/addatt/-default-/boron3 Create attribute named boron3 with default mesh object settings. cmo/addatt/ cmotri / area_normal / anorm Create and fill element vector named anorm with the x,y,z components for area normals of each triangle. cmo/addatt/ cmotri / unit_area_normal / n_face Create and fill element vector named n_face with the x,y,z components for unit area normals of each triangle. cmo/addatt/cmo1/ scalar / xnorm, ynorm, znorm / anorm Create attributes xnorm, ynorm, znorm from the three components of the vector attribute anorm. cmo/addatt/cmo1/ vector / vnorm /xnorm, ynorm, znorm Create vector attribute vnorm from the three attributes xnorm, ynorm, znorm. cmo/addatt/ cmotri / area / darea Create and fill attribute named darea with area of each triangle.