cmo

The cmo command operates on the Mesh Object (MO). There can be many Mesh Objects in the code for a given problem. Only one of these Mesh Objects may by the Current Mesh Object. There is also one Default Mesh Object which is used as the template for generating new Mesh Objects.

Formats

cmo / addatt / mo_name / att_name / type / rank / length / interpolate / persistence / ioflag / value

cmo / compress / mo_name /

cmo / copy / mo_name / master_mo /

cmo / copyatt / cmosink / cmo_src /attnam_sink / attnam_src

cmo / create / mo_name / [npoints / nelements / mesh-type]

cmo / create / mo_name / npoints / nelements / ndimensions_geom. / ndimensions_topo / nodes_per_element / faces_per_element / edges_per_element/

cmo / delatt / mo_name / att_name /

cmo / derive / mo_name / master_mo /

cmo / length / mo_name / att_name /

cmo / list

cmo / memory / mo_name / number_nodes / number_elements /

cmo / modatt / mo_name / att_name / field_name / new_field /

cmo / move / mo_name / master_mo /

cmo / newlen / mo_name /

cmo / printatt / mo_name / attribute_name / [print_opt] / [index_set]

cmo / readatt / mo_name / att_name / [att_name2] / operation / file_name

cmo / release / mo_name /

cmo / select / mo_name /

cmo / setatt / mo_name / att_name / index_set / value

cmo / status / mo_name /

cmo / verify / mo_name /

 

cmo Parameters

Parameters

Type/Value

Description/Default

addatt

addatt

Adds the Attribute, att_name, to Mesh Object, mo_name. See the modatt command for more details on the arguments.

mo_name is required
att_name is required

mo_name

char*32

Mesh Object name

att_name

char*32

Attribute name

type

 

Attribute type options:

 

vdouble

Real*8 vector of rank rank with length vector elements (default).

 

int

Integer vector of rank rank with length vector elements.

 

vint

Single integer variable (length = 1, rank = 1 by definition).

rank

 

Attribute rank options:

 

scalar

One entry per vector element (default).

 

vector

Three entries per vector element.

 

tensor

Nine entries per vector element.

 

char*32

Any previously defined int attribute including user defined attributes may be used as rank.

length

 

Attribute length options:

 

nnodes

(default)

 

nelements

 

 

char*32

Any previously defined int attribute including user defined attributes may be used as length.

interpolation

 

Attribute interpolation options:

 

linear

Linear interpolation (default).

 

constant

Constant value.

 

copy

Copy values.

 

sequence

Set to the node number.

 

log

Logarithmic interpolation.

 

asinh

Asinh interpolation.

 

max

Set to the maximum.

 

min

Set to the minimum.

 

incmax

Set to the maximum plus one (vint attribute only).

 

incmin

Set to the minimum plus one (vint attribute only).

 

user

User provides.

 

and

`and' the bits.

 

or

`or' the bits.

persistence

 

Attribute persistence options:

 

temporary

(default)

 

permanent

 

ioflag

 

agx (default) - options may be run together, with no space seperator.

 

a

avs

 

g

gmv

 

f

fehm

 

s

sgi

 

x

NWGrid

 

no

 

value

real

Default is 0.0

compress

compress

Shortens all memory managed arrays for Mesh Object mo_name to their actual lengths.

Default for mo_name is the Current Mesh Object.

copy

copy

Makes an exact copy of Mesh Object, master_mo, including all data. The output Mesh Object, mo_name, will become the Current Mesh Object. If mo_name is the same as master_mo nothing happens.
If mo_name exists it is over written.

mo_name is required.
Default for master_mo is the Current Mesh Object.

master_mo

char*32

Mesh object name.

copyatt

copyatt

Values are copied from cmosrc and attnam_src and written to cmosink and attnam_sink.

There is currently no provision for indexed sets

cmosink

char*32

Current Mesh Object name to write values to.

cmo_src

char*32

Current Mesh Object name to copy values from.

attnam_sink

char*32

Attribute name to write values to.

attnam_src

char*32

Attribute name to copy values from.

create

create

Creates a new Mesh Object mo_name, which becomes the Current Mesh Object.
If a Mesh is created using the mesh_type format, then values are supplied for the other.

If mo_name exists nothing happens.
mo_name is required.

npoints

integer

Number of points to allocate space for. Default is default mo.

nelements

integer

Number of elements to allocate space for. Default is default mo.

mesh_type

 

If a Mesh is created using the mesh_type format, then values are supplied for the other parameters as follows:

 

 

ndimndimnodes/faces/edges/

geomtopoelementelementelement

 

tet

33446

 

hex

338612

 

pri(sm)

33659

 

pyr(mid)

33558

 

tri(angle)

32333

 

qua(d)

32444

 

hyb(rid)

33101012

 

lin(e)

31221

ndimensions_geom

integer

Default is default mo

ndimensions_topo

integer

Default is default mo

nodes_per_element

integer

Default is default mo

faces_per_element

integer

Default is default mo

edges_per_element

integer

Default is default mo

delatt

delatt

Deletes the attribute att_name from Mesh Object, mo_name. Will not delete an attribute with a persistence of permanent.
mo_name must be specified.
att_name must be specified.

derive

derive

Uses Mesh Object, master_mo, as the template for deriving Mesh Object, mo_name. Mesh Object, mo_name, will be an image of master_mo but will contain no data. The output Mesh Object, mo_name, will become the Current Mesh Object. If mo_name is the same as master_mo nothing happens. If mo_name exists it is over written.
mo_name is required.
The default for master_mo is the Current Mesh Object.

length

length

Returns the memory length of attribute att_name for Mesh Object, mo_name.

The default for mo_name is -all-
The default for att_name is -all-

list

list

Returns the name of the Current Mesh Object and a list of all defined Mesh Objects.

memory

memory

Allows the user to preset the size of the memory managed arrays for Mesh Object, mo_name.

mo_name is required.
number_nodes is required.
number_elements is required.

number_nodes

integer

Number of nodes.

number_elements

integer

Number of elements.

modatt

modatt

Modifies the field field_name for attribute att_name in Mesh Object mo_name.

mo_name is required.
att_name is required.
field_name is required
new_field is the type of the field, required
Field_names (may be lower or upper case):

field _name

 

Name of attribute field.

 

name

Attribute name.

 

type

Attribute type.

 

rank

Attribute rank.

 

length

Attribute length.

 

interpolation

Attribute interpolation.

 

persistence

Attribute persistence.

 

ioflag

Attribute ioflag.

 

default

Attribute default.

new_field

char*32

Field to be changed to in field_name.

move

move

Changes the name of Mesh Object, master_mo, to mo_name. The output Mesh Object, mo_name, will become the Current Mesh Object.

If mo_name is the same as master_mo nothing happens.

If mo_name exists it is over written.

mo_name is required.
master_mo default is the Current Mesh Object.

printatt

printatt

Print cmo attribute or category of attributes.

attribute_name

char*32

Name of valid cmo attribute.

 

node

All attributes of nnodes length.

 

element

All attributes of nelements length.

 

-all-

All attributes of the cmo.

 

-xyz-

xic, yic, and zic attributes of the cmo.

print_opt

value

Print attribute values (default).

 

list

Print attribute name along with its length.

 

minmax

Print name, min and max of the attribute field, and its l length.

index_set

pset, get, pset_name

For attributes with length = nodes.

 

eset, get, eset_name

For attributes with length = elements.

 

ifirst, ilast, istride

For all other attributes, ifirst,ilast,istride must be integers; if blank then all members of the attribute will be modified.

readatt

readatt

Attribute to be read and added to or replacing existing nodes. Operation is either add which will cause new nodes to be added to the mesh object or ifirst, islast, istride which specifies the nodes whose values will be replaced.
file_name is required.

mo_name is required.
att_nam is required.

att_nam2

char*32

Additional attribute names.

operation

add

New nodes to be added to the Mesh Object.

 

ifirst, islast, istride

Specifies the nodes whose values will be replaced.

file_name

char*32

Specifies ASCII file to be read.

release

release

Deletes the Mesh Object mo_name.

mo_name is required.

select

select

Selects Mesh Object mo_name to be the Current Mesh Object. If mo_name does not exist a new Mesh Object will be created using the Default Mesh Object as the template.
mo_name is required.

setatt

setatt

Sets the value of the specified attribute in the given range to the supplied value.

This command requires that the mesh contains one or more nodes.

mo_name is required.
If att_name is blank, the active mesh object will be used.

value

integer or real

Value type depends on the type of the attribute.

status

status

Prints the status of Mesh Objects. mo_name default is -all-

verify

verify

Verifies that Mesh Object mo_name is consistent. mo_name default is -all-

 
Special Notes

CONVENTION: As a result of any command that generates a new Mesh Object, the newly generated Mesh Object becomes the Current Mesh Object.

RESERVED NAMES: The following names are reserved and may not be used for Mesh Object names:

-cmo- the Current Mesh Object
-default- the Default Mesh Object
-all- all Mesh Objects or Attributes
-notset- Null name for Mesh Object

 

Examples

cmo / addatt / cmo1 / boron1 / vdouble / scalar / nnodes / asinh / permanent

cmo / addatt / -cmo- / boron2 / vdouble / scalar / nnodes / asinh / permanent / gx / 2.0

cmo / addatt / cmo1 / boron3 / vdouble / scalar / nnodes / user / temporary

cmo / addatt / -default- / b

cmo / addatt / -default- / boron3

 

cmo / compress / mo_tet2

cmo / compress / -cmo-

cmo / compress

cmo / compress / -all-

 

cmo / copy / mo_tet2 / mo_tet1

cmo / copy / -cmo- / mo_tet1

cmo / copy / mo_tet2

cmo / copy / mo_tet2 / -cmo-

 

cmo / copyatt / cmosnk / cmosrc / itetclr / itetclr

cmo / copyatt / cmosnk / cmosrc / itetclr
(both versions will copy itetclr field from cmosrc to cmosnk)

cmo / copyatt / cmosnk / cmosrc / elevation

cmo / copyatt /copyatt / cmosnk / cmosrc / elevation / zic /
(will copy the zic field of cmosrc to the elevation field of cmosnk)

cmo / create / mo_tet2

cmo / create / mo_tet2 / 0 / 0 / hex

 

cmo / delatt / mo_tet2 / boron

cmo / delatt / -cmo- / boron

cmo / delatt / -default- / boron

cmo / delatt / -cmo- / -all- (this will delete all attributes with persistence of temporary)

 

cmo / derive / mo_tet2 / mo_tet1

cmo / derive / -cmo- / mo_tet1

cmo / derive / mo_tet2

cmo / derive / mo_tet2 / -cmo-

cmo / derive / -default- / -cmo-

cmo / derive / mo_tet2 / -default-

cmo / derive /-default- / mo_tet1

 

cmo / length / mo_tet2 / boron

cmo / length / -cmo- / boron

cmo / length / -default- / boron

cmo / length / -cmo- / -all-

cmo / length / mo_tet2 / -all-

cmo / length

cmo / length / -all- / -all-

cmo / length / -all- / boron

 

cmo / list

 

cmo / memory / mo_tet2 / 1000 / 10000

cmo / memory / -cmo- / 1000 / 10000

 

cmo / modatt / mo_tet2 / boron / length

cmo / modatt / -cmo- / boron / length / nnodes

cmo / modatt / -cmo- / boron / default / 10.0

cmo / modat / -def- / boron / default / 10.0

 

cmo / move / mo_tet2 / mo_tet1

cmo / move / -cmo- / mo_tet1

cmo / move / mo_tet2

cmo / move / mo_tet2 / -cmo-

 

cmo / newlen / mo_tet2

cmo / newlen / -cmo-

cmo / newlen

 

print field values:

cmo / printatt / cmo1 / zic / 3, 8, 0

cmo / printatt / cmo1 / itetclr / eset, get, eset1

 

print attribute names:

cmo / printatt / cmo1 / -all- / list

cmo / printatt / cmo1 / node / list

 

print min and max of attribute fields:

cmo / printatt / cmo1 / -all- / minmax

cmo / printatt / cmo1 / -xyz- / minmax

cmo / printatt / cmo1 / xic / minmax / 7, 10, 0

cmo / printatt / cmo1 / itp1 / minmax / pset, get, psetr1

 

attribute itp1 has length nnodes hence the pset syntax is valid

cmo / printatt / cmo1 / itetclr / minmax / eset, get, smallets

 

attribute itetclr has length nelements hence the eset syntax is valid

cmo / readatt / mo_tet2 / xic, yic, zic / add / / / myfile
new nodes will be added to mo_tet2, and their coordinates will be supplied from the file. The value of nnodes will be updated.
Contents of myfile:

0.017 12.65 7.25
1.1 10.2 3.4

will cause 2 nodes to be added to the mesh.

 

cmo / readatt / mo_tet2 / itp1 / newattr / pset, set, p1 / myfile
The values of itp1 will be replaced. If newattr does not exist it will be created as a vdouble node based attribute. If psetp1 contains the nodes 12, 27 and myfile has the contents:

0 100.2

2 99.6
then itp1(12) will be set to 0, itp1(27) will be 2; newattr(12) will be set to 100.2 and newattr(27) will be set to 99.6.

 

cmo / release / mo_tet2

cmo / release / -cmo-

 

cmo / select / mo_tet2

 

cmo / setatt / cmo / itp1 / 1, 0, 0 / 0

cmo / setatt / 3dmesh / itetclr / eset, get, blue / 3
Will set all elements in the element set 'blue' to have the value of itetclr to 3.

cmo / setatt / / ndimensions_geom / / / / 2
Will reset the ndimensions geometry attribute of the active mesh object to 2.

 

cmo / status / mo_tet2

cmo / status / -cmo-

cmo / status

cmo / status / -all-

cmo / status / -default-

 

cmo / verify / mo_tet2

cmo / verify / -cmo-

cmo / verify

cmo / verify / -all-

cmo / verify / -default-