\gdef\putwordsee{see}
\input gid_base.tex
\input psfig.sty
\pssilent %\psnoisy
\hoffset=1.52cm
\input texinfo @c -*-texinfo-*-

@c  \global\hsize = 6.5in
@c  \global\vsize=10.0in

@tex

\def\verysmallbook{
  \global\chapheadingskip = 15pt plus 4pt minus 2pt
  \global\secheadingskip = 12pt plus 3pt minus 2pt
  \global\subsecheadingskip = 9pt plus 2pt minus 2pt
  %
  \global\lispnarrowing = 0.3in
  \setleading{12pt}
  \advance\topskip by -1cm
  \global\parskip 2pt plus 1pt
  \global\hsize = 5.5in
  \global\vsize=6in
  \global\tolerance=700
  \global\hfuzz=1pt
  \global\contentsrightmargin=0pt
  \global\deftypemargin=0pt
  \global\defbodyindent=.5cm
  %
  \global\pagewidth=\hsize
  \global\pageheight=\vsize
  %
  \global\let\smalllisp=\smalllispx
  \global\let\smallexample=\smalllispx
  \global\def\Esmallexample{\Esmalllisp}
  \global\hoffset=1.75cm
}

\verysmallbook

@end tex

@c  $Id: gid.texinfo,v 1.195 2004/06/09 17:57:07 escolano Exp $

@c To update all in emacs use: C-u C-c C-u m
@c to get a gid.info file without running makeinfo try: C-c C-e C-b


@c %**start of header
@setfilename gid.info
@settitle GiD Reference Manual
@paragraphindent 3
@iftex
@c @smallbook
@c @afourpaper
@c @finalout   ---to avoid black squares in hboxes (long lines)---
@finalout
@end iftex
@c %**end of header gid.texinfo

@setchapternewpage odd

@set photo


@set Version  $Revision: 1.195 $

@set Date April 2003


@c @defindex cm


@ifinfo
This is the GiD manual

Copyright 1997-2003 CIMNE
@end ifinfo

@titlepage
@title GiD reference manual
@subtitle Pre and post processing system for F.E.M. calculations.
@author International Center For
@author Numerical Methods In Engineering (CIMNE)
@c The following two commands start the copyright page.
@page
@vskip 0pt plus 1filll
@tex
Developers:

Ramon Rib\'o  @email{ramsan@@cimne.upc.es}

Miguel A. Pasenau de Riera @email{miguel@@cimne.upc.es}

Enrique Escolano @email{escolano@@cimne.upc.es}

Jorge Suit P\'erez Ronda @email(ronda@@cimne.upc.es)

Llu\'is Font Gonz\'alez @email(font@@cimne.upc.es)

Edgar G\¨ueto de la Rosa @email(egueto@@cimne.upc.es)

@end tex
Copyright @copyright{} 1997-2003 CIMNE

@url{http://www.gidhome.com}

CN @value{Version} @value{Date}
@end titlepage

@iftex 
@headings off 
@end iftex 

@node Top, Introduction, (dir), (dir)
@comment node-name, next, previous, up

@ifinfo 

TO USE THIS HELP:

@example
-Pick with left mouse button on colored item to go into it.
-Use letters @code{p, n, u, l} as shortcuts for previous, next, up, last.
-Use arrows @samp{up} and @samp{down} to go up and down in the page.
-Use @code{Control-s} to make an incremental search.
@end example
@end ifinfo

@menu
* Introduction::                        
* GiD basics::                          
* Invoking GiD::                        
* User interface::                      
* User basics::                         
* Files::                               Pre-processing
* View::                                
* Geometry::                            
* Utilities::                           
* Data::                                
* Meshing::                             
* Calculate::                           Solving

* POSTPROCESS OPTIONS::                 
* postprocessing results::              
* Customization::                       Customization

* POSTPROCESS DATA FILES::              
* TCL-TK extension::                    Tcl-TK

* INDEX::                               

@detailmenu
 --- The Detailed Node Listing ---

INTRODUCTION

* Using this manual::                   

USER INTERFACE

* Mouse operations::                    
* Command line::                        

USER BASICS

* Point definition::                    
* Entities selection::                  
* Quit::                                
* Escape::                              

Point definition

* Picking in the graphical window::     
* Entering points by coordinates::      
* Selecting an existing point::         
* Button Base::                         
* Option point in line::                
* Option point in surface::             
* Option tangent in line::              
* Option normal in surface::            
* Option Arc center::                   

Entering points by coordinates

* Local/global coordinates::            
* Cylindrical coordinates::             
* Spherical coordinates::               

FILES 

* New::                                 
* Open::                                
* Save::                                
* Save as::                             
* Import::                              
* Export::                              
* Print to file::                       
* About::                               

Import

* IGES read::                           
* DXF read ::                           
* Parasolid read::                      
* ACIS read::                           
* VDA read::                            
* Shapefile read::                      
* NASTRAN read::                        
* STL mesh read::                       
* Mesh read::                           
* Read surface mesh::                   
* Batch file::                          
* Insert geometry::                     

Export

* IGES write::                          
* DXF write::                           
* GiD mesh::                            
* Text data report::                    
* Save ASCII project::                  
* Save ON layers::                      
* Calculation file::                    
* Using template::                      

VIEW

* Zoom::                                
* Rotate::                              
* Pan::                                 
* Redraw::                              
* Render::                              
* Label::                               
* Entities::                            
* Layers::                              
* Save/Read View::                      
* Background image::                    
* Multiple windows::                    

Rotate

* Rotate screen axes::                  
* Rotate object axes::                  
* Rotate trackball::                    
* Rotate angle::                        
* Rotate points::                       
* Rotate center::                       
* Rotate original view::                

GEOMETRY

* View geometry::                       
* Create::                              
* Delete::                              
* Edit::                                

Create

* Point creation::                      
* Line creation::                       
* Arc creation::                        
* Arc tangents::                        
* NURBS line creation::                 
* Polyline creation::                   
* Parametric line::                     
* Planar surface creation::             
* 4-sided surface creation::            
* 4-sided surface automatic creation::  
* NURBS surface creation::              
* Volume creation::                     
* Contact creation::                    
* Intersection::                        
* Volume boolean operations::           
* Surface boolean operations::          
* Object::                              

Volume creation

* Automatic 6-sided volumes::           

Intersection

* Intersection line-line::              
* Intersection multiple lines::         
* Intersection Surface 2 points::       
* Intersection Surface lines::          
* Intersection Surface surface::        
* Intersection Multiple surfaces::      

Edit

* Move point::                          
* Explode polyline::                    
* Edit polyline::                       
* Edit NURBS line::                     
* Edit NURBS surface::                  
* Hole NURBS surface::                  
* Divide::                              
* Join lines end points::               
* Swap arcs::                           
* Edit SurfMesh::                       
* Convert to NURBS::                    
* Simplify NURBS::                      

UTILITIES

* Preferences::                         
* Renumber::                            
* Calculator::                          
* Id::                                  
* Signal::                              
* List::                                
* Status::                              
* Distance::                            
* Draw line normals::                   
* Draw surface normals::                
* Copy::                                
* Move::                                
* Repair::                              
* Collapse::                            
* Uncollapse::                          
* Undo::                                
* Comments::                            
* Graphical::                           
* Coordinates window::                  
* Read batch window::                   
* Clip planes::                         
* Save configuration file::             
* Perspective::                         
* Change Light Vector::                 
* Macros window::                       
* Selection window::                    
* Animate controls::                    
* Dimensions::                          

DATA

* Problem type::                        
* Transform problem type::              
* Internet Retrieve::                   
* Conditions::                          
* Materials::                           
* Problem data::                        
* Intervals::                           
* Interval data::                       
* Local axes::                          

Conditions

* Assign condition::                    
* Draw condition::                      
* Unassign condition::                  

Materials

* Assign material::                     
* Draw material::                       
* Unassign material::                   
* New material::                        
* Import/Export material::              

MESHING

* Generate::                            
* Mesh view::                           
* View boundaries::                     
* Assign unstruct sizes::               
* Draw Sizes ::                         
* Structured mesh::                     
* Structured concentrate::              
* Mesh criteria::                       
* Element type::                        
* Quadratic::                           
* Reset mesh data::                     
* Cancel mesh::                         
* Mesh quality::                        
* Edit mesh::                           

Edit mesh

* Move node::                           
* Delete elements::                     
* Delete lonely nodes::                 

POSTPROCESS OPTIONS

* introduction - postprocess::          
* files - postprocess::                 
* utilities - postprocess::             
* Point and Line options::              
* Display Style::                       
* Textures::                            
* Cover mesh::                          

POSTPROCESSING RESULTS

* Contour Fill::                        
* Smooth Contour Fill::                 
* Contour Ranges::                      
* Contour Lines::                       
* Show Minimum and Maximum::            
* Display vectors::                     
* Iso Surface::                         
* Stream Lines::                        
* Line Diagrams::                       
* Legends::                             
* Graphs::                              
* Result surface::                      
* Deform Mesh::                         
* Do Cuts::                             
* Animation::                           
* Automatic comments::                  
* Several results::                     

POSTPROCESSING RESULTS

* Contour Fill::                        
* Contour Lines::                       
* Show Minimum and Maximum::            
* Display vectors::                     
* Iso Surface::                         
* Stream Lines::                        
* Line Diagrams::                       
* Legends::                             

Graphs

* Graph Lines Description::             
* Graph Lines Options::                 
* Graph Lines File Format::             

CUSTOMIZATION

* Introduction - ProblemType::          
* Configuration Files::                 
* Template File::                       
* Executing an external program::       

Configuration Files

* Conditions file::                     
* Materials file::                      
* Problem and intervals data file::     
* Conditions symbols file ::            
* Unit System file::                    
* Special fields::                      

Conditions file (.cnd)

* Example Conditions File creation ::   

Materials file (.mat)

* Example Materials File creation ::    

Problem and intervals data file (.prb)

* Example Problem and intervals data file creation::  

Conditions symbols file (.sim)

* Example Symbols File creation ::      

Template File

* General description::                 
* Commands used in the .bas file::      
* Detailed example::                    

Commands used in the .bas file

* Single value return commands::        
* Multiple values return commands::     
* Specific commands::                   

Executing an external program

* Commands accepted by the GiD command.exe::  
* showing feedback when runing the solver::  
* Managing errors ::                    
* Shell script examples::               

POSTPROCESS DATA FILES

* File ProjectName.post.msh - ProjectName.flavia.msh::  
* File ProjectName.post.res - ProjectName.flavia.res::  
* old results format::                  
* old mesh format::                     

New postprocess mesh format: ProjectName.post.msh, ProjectName.flavia.msh

* Mesh example::                        

New postprocess results format: ProjectName.post.res, ProjectName.flavia.res

* Gauss Points::                        
* Result Range Table::                  
* Result Block::                        
* Result Group::                        
* Results example::                     

Old postprocess results format

* Gauss Points - Old format::           

Old postprocess mesh format

* File ProjectName.flavia.msh old::     
* File ProjectName.flavia.bon old::     
* File ProjectName.flavia.dat old::     

Old format - File ProjectName.flavia.bon


TCL-TK EXTENSION

* Event procedures::                    
* Control functions::                   
* Managing menus::                      
* HTML support::                        
* GiD version::                         
* Using EXEC in GiD::                   
* Detailed example - TCL-TK extension creation::  

Event procedures

* Control functions::                   
* Managing menus::                      
* HTML support::                        
* GiD version::                         
* Using EXEC in GiD::                   
* Detailed example - TCL-TK extension creation::  

Control functions

* process function::                    
* info function::                       
* special functions::                   

HTML support

* HelpWindow::                          
* GiDCustomHelp::                       

@end detailmenu
@end menu

@ifinfo
CN @value{Version} @value{Date}
@end ifinfo


@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml


@iftex
@c @unnumbered 
@titlepage
@title Preface
@comment @sp 10


GiD is an interactive graphical user interface that provides pre-processing and 
post-processing tools for the numerical simulation of industrial and academic 
problems. GiD has been developed by the International Center for Numerical
Methods in Engineering (CIMNE) in Barcelona, Spain.

This manual describes how to define the geometry and
prepare the data to run a numerical simulation,
to run the process and to visualize the results from the analysis.

GiD may also be customized to allow the integration of different analysis modules;
this is also detailed here. 

The document is divided into five parts:

@itemize @bullet
@item General aspects
@item Pre-processing
@item Analysis                 
@item Post-processing                 
@item Customization
@end itemize

@ifhtml
More information about GiD:

<P>&nbsp;&nbsp;&nbsp; Developers:
<BR>&nbsp;
<UL>
<LI>
Ramon Rib&oacute;&nbsp; 
<A HREF="mailto: ramsan@cimne.upc.es">ramsan@cimne.upc.es</A></LI>

<LI>
Miguel A. Pasenau de Riera&nbsp; 
<A HREF="mailto: miguel@cimne.upc.es">miguel@cimne.upc.es</A></LI>

<LI>
Enrique Escolano&nbsp; 
<A HREF="mailto: escolano@cimne.upc.es">escolano@cimne.upc.es</A></LI>
</UL>
<A HREF="http://www.gidhome.com">http://www.gidhome.com</A>

@end ifhtml

@end titlepage

@headings off

@c @unnumbered 
@titlepage
@title General aspects
@comment @sp 10

@comment @end titlepage 
@comment @node General aspects, Introduction, Top, Top
@cindex General aspects

This part describes the program's basics.
It is composed of five chapters:
@itemize @bullet
@item Introduction (What is GiD?).
@item GiD basics (Principal hints about the system).
@item Invoking GiD (How to start the program).
@item User interface (How to interact with the program).
@item User basics (How to enter the fundamental data).
@end itemize

@end titlepage 

@headings off
@evenheading @thispage @| @| General aspects
@oddheading General aspects @| @| @thispage
@end iftex

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Introduction, GiD basics, Top, Top
@chapter INTRODUCTION
@cindex CAD differences
 
@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

GiD is an interactive graphical user interface used for the definition,
preparation and visualization of all the data related to a numerical
simulation. This data includes the definition of the geometry, materials,
conditions, solution information and other parameters. The program can also
generate a mesh for finite element, finite volume or finite difference analysis
and write the information for a numerical
simulation program in its desired format. It is also
possible to run the numerical simulation from within GiD and
to visualize the results of the analysis.

GiD can be customized and configured by users so that the data
required for their own solver modules may be generated.These solver modules
may then be included within the GiD software system.

The program works, when defining the geometry, similar to a CAD 
(Computer Aided Design)
system but with some differences. The most important one is that the geometry
is constructed in a hierarchical mode. This means that an entity of higher
level (dimension) is constructed over entities of lower level; two adjacent
entities will then share the same lower level entity.

All materials, conditions and solution parameters can also be defined on the
geometry without the user having any knowledge of the mesh: the meshing is done
once the problem has been fully defined. The advantages of doing this are that, using
associative data structures, modifications can be made to the geometry and all
other information will automatically be updated and ready for the analysis run.

Full graphic visualization of the geometry, mesh and conditions is available
for comprehensive checking of the model before the analysis run is started.
More comprehensive graphic visualization features are provided to evaluate the
solution results after the analysis run. This post-processing user interface
is also customizable depending on the analysis type and the results provided.

@menu
* Using this manual::                   
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Using this manual,  , Introduction, Introduction
@section Using this manual
@cindex Using this manual

This manual has been split into five clearly differentiated parts.

It consists of a first part, @b{General aspects}, where the user can find the 
program from basics.
This helps gain confidence on how to get the maximum from the interactive
actions between users and the system.

The second part, @b{Pre-processing}, describes the pre-processing functionality. 
The users will learn
how to configure a project, define all its parts, geometry, data and mesh.

The third part, @b{Analysis}, is related to the calculation process. 
Although it will be performed by an independent solver, it forms part of the 
integrated GiD system in the sense that the analysis can be run from inside
GiD.

The fourth part, @b{Post-processing}, emphasizes aspects related to the visualization
of the results.

The fifth part, @b{Customization}, explains how to customize the users own files to be 
able to introduce and run different solver modules according to their own requirements.

Different kinds of fonts are used to help the users
follow all the possibilities offered by the code:
@enumerate
@item @code{font} is used for the options found in the menus and windows.
@item @samp{font} is used for the windows names used in the post-processing.
@item @b{font} is used for special references in some parts.
@end enumerate



@node GiD basics, Invoking GiD, Introduction, Top
@chapter GiD BASICS
@cindex GiD basics
@cindex Basics

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

GiD is a geometrical system in the sense that, having defined the geometry, all
the attributes and conditions (i.e., material assignments, loading,
conditions, etc.) are applied to the geometry without any reference or
knowledge of a mesh. Only when everything is defined, the meshing of the
geometrical domain is carried out. This methodology facilitates alterations to
the geometry while maintaining the attributes and conditions definitions.
Alterations to the attributes or conditions can simultaneously be made
without the need of reassigning to the geometry. New meshes can also be
generated if necessary and all the information will be automatically assigned
correctly.

GiD also provides the option of defining attributes and conditions directly on
the mesh once this has been generated. However, if the mesh is regenerated, it
is not possible to maintain these definitions and therefore all attributes and
conditions must be then redefined.

In general, the complete solution process can be defined as:

@enumerate
@item
define geometry - points, lines, surfaces, volumes.
@itemize @bullet
@item use other facilities.
@item import geometry from CAD.
@end itemize
@item 
define attributes and conditions.
@item 
generate mesh.
@item 
carry out simulation.
@item 
view results.
@end enumerate

Depending upon the results in step (5) it may be necessary to return to one of
the steps (1), (2) or (3) to make alterations and rerun the simulations.

Building a @b{geometrical domain} in GiD is based on the following four
 geometrical levels of
entities: points, lines, surfaces and volumes. Entities of higher level are
constructed over entities of lower level; two adjacent entities can therefore
share the same level entity. A few examples are given:

@itemize @bullet
@item @b{example 1:}
One line has two lower level entities (points), each of them at an
extreme of the line. If two lines are sharing one extreme, they are really sharing
the same point, which is a unique entity.

@item @b{example 2:}
When creating a new line, what is being really created is a line plus two
points or a line with existing points created previously.

@item @b{example 3:}
When creating a volume, this is created over a set of existing surfaces which 
are joined to each other by common lines. The lines are, in turn, joined to each 
other by common points.
@end itemize

All domains are considered in
3-dimensional space but if there is no variation in the third coordinate (into
the screen) the geometry is assumed to be 2-dimensional for analysis and
results visualization purposes. Thus, to build a geometry with GiD, the users
must first define points, join these together to form lines, create closed
surfaces from the lines and define closed volumes for the surfaces. Many other
facilities are provided for creating the geometrical domain; these include:
copying, moving points, automatic surface creation, etc.

The geometrical domain can be created in a series of layers where each one is a
separate part of the geometry. Any geometrical entity (points, lines,
surfaces or volumes) can belong to a particular layer. It is then possible to
view and manipulate some layers and not others. The main purpose of the use of
layers is to offer a visualization and selection tool, but they are not used
in the analysis. An example of the use of layers might be a chair where the
four legs, seat, backrest and side arms are the different layers.

GiD has the option of importing a geometry or a mesh that has been created 
by a external CAD program. At present, this can be done via a DXF, 
IGES, Parasolid, ACIS, VDA, Shapefile, STL or NASTRAN interfaces available inside GiD.

@b{Attributes and conditions} are applied to the geometrical entities (points,
lines, surfaces and volumes) using the data input dialog box. These menus are
specific to the particular solver that will be utilized for the simulation and,
therefore, the solver needs to be defined before attributes are defined. The
form of these menus can also be configured for the user's own solver module, as
explained below and later in this manual.

Once the geometry and attributes have been defined, the mesh can be generated
using the @b{mesh generation tools} supplied within the system. Structured and
unstructured meshes containing triangular and quadrilateral surface meshes or
tetrahedral and hexahedral volume meshes may be generated. The automatic mesh
generation facility utilizes a background mesh concept for which the users are
required to supply a minimum number of parameters.

@b{Simulations} are carried out from within GiD by using the @b{calculate} menu.
Indeed, specific solvers require specific data that must have been prepared
previously. A number of solvers may be incorporated together with the correct
pre-processing interfaces.

The final stage of @b{graphic visualization} is flexible in order to allow the users
to critically evaluate the results quickly and easily. The menu items are
generally determined by the results supplied by the solver module. This not
only reduces the amount of information stored but also allows a certain degree
of user customization.

One of the major strengths of GiD is the ability for the users to @b{define and
configure their own graphic user interface within GiD}. This is done by creating some configuration files which define new windows, where the final user will enter data, such as materials or conditions. The format that GiD uses to write a file containing the necessary data in order to run the numerical simulation
program must also be defined in a similar way. This pre-processor or data
input interface will thus be tailored specifically for the users simulation
program, but using the facilities and functionality of the GiD system.

The user's simulation program can then be included within GiD so that it may be
run utilizing the calculate menu option.

The third step consists of writing an interface program that provides the
results information in the format required by the GiD graphic visualizer,
thereby configuring the post-processing menus. This post analysis interface may
be included fully into the GiD system so that it runs automatically once the
simulation run has terminated.

Details on this configuration can be found in Chapters 16 and 17.


@node Invoking GiD, User interface, GiD basics, Top
@chapter INVOKING GiD
@cindex Invoking GiD
@cindex Calling GiD
@cindex Command line arguments
@cindex visualization troubles

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

When starting the GiD program from a shell or script it is possible to supply
some options in the same command line. 

With 
@example @*
@b{gid -help}
@end example
the program will list the possible command line options.

Command line sintaxis:
@example @*
@b{gid [-b[@{+/-@}g][@{+/-@}i][@{+/-@}w] batch_file] [filename] [-h] [-p problem] [-e anything] [-n] [-n2] [-c]} 
@end example

@sp 1 
All options and @code{filename} are optional.
@code{filename} is the name of a problem to be opened (extension @code{.gid} is
optional)

Options are:

@itemize @bullet

@item @b{-b batchfile} executes @code{batch_file} as a script file (@pxref{Batch file}).
@itemize ·
@item @b{+/- g} Enable/Disable Graphics (if -g, GiD doesn't redraw until the batch file has finished.)
@item @b{+/- i} Enable/Disable GraphInput (enable or disable peripherals while the batch file is being executed: mouse, keyboard, ...)
@item @b{+/- w} Enable/Disable Windows (GiD displays, or not, windows which require interaction with the user)
@end itemize

@item @b{-h} shows GiD's command line arguments.
@item @b{-p problem} loads @code{problem} as the type of the problem to be used for a new project.

@item @b{-e anything} 

can continue until the end of the line. Execute @code{anything}
as if it were a group of commands entered into GiD.
@item @b{-n} 
runs the program without any window. It is most useful when used with the option
@code{batchfile}.

@item @b{-n2} 
runs the program without any window but the@b{Tk} library is loaded. This option is useful if you use TCL commands in a batch file.  

@item @b{-c conffile}

Takes window configuration from @code{conffile}. This file can be generated with
option @xref{Save configuration file}.

@item @b{-openglconfig} 

( @b{Only for Windows}): this allows the user to choose between the 
accelerated OpenGL, if present, or the generic implementation, if the user
experiences troubles using the accelerated libraries of the graphic card.

@end itemize

Other useful options are:

@example @*
@b{gid -compress [ -123456789ad] file_name_in file_name_out}
@end example
to compress (gzip) a file, for instance to compress '@code{.dat}' files or new posprocess formated data files.

and 

@example @*
@b{gid [ -PostBinaryFormat @{ 1.0 / 1.1@}] -PostResultsToBinary file_in file_out}
@end example
to transform Ascii results files into compressed binary ones. You can select wether to use the
binary format 1.0 or 1.1. The default, and recommended, is the 1.1.


@node User interface, User basics, Invoking GiD, Top
@chapter USER INTERFACE
@cindex User interface
@cindex Windows
@cindex Toolkit icons
@cindex Icons

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

The user interface allows the GiD user to interact with the
program. It is composed of buttons, windows, icons, menus, text entries and
graphical output of certain information. The interface can be configured by
the user who may use as many menus and windows as required for its
application.

The initial layout of GiD is composed of a large graphical area, pull down menus at 
the top, 'click on' menus on the right side, a command line at the bottom, 
a message window above it and a icon bar. The project that is being run is written on the 
window title bar. The pull down menus and the 'click on' menus are used to access GiD commands quickly. 
Some of them offer a shortcut for an easier access,
which is activated by clicking at the same time the keys @code{Control} and the letter
that is displayed. 

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/Layout.ps,width=10.16cm,height=5.28cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="Layout.gif"></a>
<img src="images/Layout.gif"> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

The right mouse button pressed over the graphical area, opens an on-screen
menu with some visualization options. To select one of them, use the left or
right button; to quit, select the left button anywhere outside the menu. 

First option in this menu is called @code{Contextual}. It will give different
options related to the current function that is being used.

The pair of icon bars contain some facilities that
also appear on the graphical area of the window or on the menu bar. 
When clicking on the icon with the left mouse button, the corresponding command 
is performed or a icon menu with several options will be shown. Whilst when clicking
the right (or center, when this exists) mouse button, a menu with the options @code{help} and
@code{configure toolbars} will appear allowing the user to get a description of the icon or
to configure the position of the toolbars. The description appears also when the mouse remains
quiet for a couple os seconds inside the icon.

To configure the toolbars position and view, the @b{Toolbars position} window can be called from
@code{Utilities} > @code{Graphical} > @code{Toolbars} or clicking with the right mouse button over a toolbar. 
@*@*
Using the @b{Toolbars position} window it is possible to enable the @b{Right buttons} menu. These buttons should be used only by advanced users.


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/ToolbarsWindow.ps,width=4.08cm,height=4.64cm,angle=0}
}}
\unpie{}
{
Toolbars position window
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<img src="images/toolbar.gif"> 
<p>Toolbars position window</p>
</center>

@end ifhtml
@c@end html
@end ifset
@end ifset






The @b{Standard bar} has common options for both pre and post-processing parts like
open, take a snapshot, print, preferences, help, exit and others.

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/StandardBar.ps,width=9.4cm,height=1.0cm,angle=0}
}}
\unpie{}
{
Standard toolbar
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="StandardBar.gif"></a>
<img src="images/StandardBar.gif"> 
<p>Standard toolbar
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@iftex
The different icons represent, from left to right:
@itemize @minus
@item New
@item Open
@item Save
@item Take a snapshot
@item Print
@item Toggle between preprocess and postprocess
@item Copy
@item Preferences
@item Layers
@item Help search
@item Help
@item Exit
@end itemize
@c @end itemize

The @b{Geometry & view bar} has some common options between pre- and postprocess: the
view facilities like zooming, panning, rotating, etc.. But other icons are specific for
preprocessing and other for postprocessing.

@c @ifset photo
@c @tex
@c \bigskip
@c \centerline{\hbox{
@c \psfig{figure=images/GraphMenu.ps,width=1.0cm,height=4cm,angle=0}
@c }}
@c \unpie{}
@c {
@c Icon tool box menu on Preprocess
@c }
@c \bigskip
@c @end tex
@c 
@c @ifset html
@c @c@html
@c @ifhtml
@c <center>
@c <a name="GraphMenu.gif"></a>
@c <img src="images/GraphMenu.gif"> 
@c <p>Icon tool box menu on Preprocess 
@c </center>
@c <p>
@c @end ifhtml
@c @c@end html
@c @end ifset
@c 
@c @end ifset

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/NewIconBarPre.ps,width=13.0cm,height=1cm,angle=0}
}}
\unpie{}
{
Icon tool box menu on Preprocess
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="NewIconBarPre.gif"></a>
<img src="images/NewIconBarPre.gif"> 
<p>Icon tool box menu on Preprocess 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

@iftex

The different icons represent, from left to right:
@c @itemize @bullet
@c @item @b{First row:}
@itemize @minus
@item Zoom in
@item Zoom out
@item Zoom frame
@item Redraw
@item Rotate trackball
@item Pan dynamic
@item Create line
@item Create arc
@c @end itemize
@c @item @b{Second row:}
@c @itemize @minus
@item Create NURBS line
@item Create polyline
@item Create NURBS surface
@item Create volume
@item Create object ( rectangle, polygon, circle, sphere, cylinder, cone, prism, torus)
@item Delete
@item List entities
@item Toggle between geometry view and mesh view
@end itemize
@c @end itemize

@b{Note:} The position of the icons depend on how the window is positioned.

If the left mouse button is pressed on @code{Delete}, GiD opens another window 
with the different entities to be deleted: @code{Point}, @code{Line}, @code{Surface}, @code{Volume} or @code{All types}. 

If pressing the left mouse button on @code{List entities}, GiD opens another window
with the different entities able to be listed:
@code{Points}, @code{Lines}, @code{Surfaces} or @code{Volumes}.


For the post-processing, only the first six commands are the same on the pre-processing

@end iftex


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/NewIconBarPost.ps,width=13.0cm,height=1cm,angle=0}
}}
\unpie{}
{
Icon tool box menu on Postprocess
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="NewIconBarPost.gif"></a>
<img src="images/NewIconBarPost.gif"> 
<p>Icon tool box menu on Postprocess 
</center>
<p>
@end ifhtml
@end ifset

@end ifset

@iftex
For the post-processing, the first six commands are the same as preprocess:
from @code{Zoom in} to @code{Pan}.

The remaining icons represent, from left to right:

@itemize @minus
@item Change Light Vector: allows the user to change the light direction (@pxref{Change Light Vector}).
@item Display style: when cliking on it, a icon menu appears, each one for every display option:
Boundaries, Hidden Boundaries, All Lines, Hidden Lines, Body, Body Boundaries and
Body Lines.

@item Culling: allows the user to switch on and off the front faces and/or the back faces.
@item Mesh selection
@item Set selection
@item Cut selection
@item Cut meshes/sets
@item Set maximum value
@item Set minimum value
@item Reset maximum and minimum values
@item List nodes and elements information
@end itemize
@end iftex


@strong{Notes:}

If windows are used to enter the data, it is generally necessary to @b{accept}
this data before closing the window. If this is not done, the data will not be changed.

Usually, commands and operations are invoked by using the menus or mouse, but all 
the information can be typed into the command line.

In Windows the secondary windows appear generally in over the main window and
cannot be hidden by it. This behaviour can be changed deselecting the @code{Always on top}
flag in the Window system menu (press second button over the windows bar to achieve it).

@menu
* Mouse operations::                    
* Command line::                        
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Mouse operations, Command line, User interface, User interface
@section Mouse operations
@cindex Mouse

The left mouse button is also used to make selections, selecting entities or
opening a box (@pxref{Entities selection}) and to enter points in the plane
z=0 (@pxref{Point definition}). 

The middle mouse button is equivalent
to @code{escape} (@pxref{Escape}). 

The right mouse button opens an on-screen
menu with some visualization options. To select one of them, use the left or
right button; to quit, select the left button anywhere outside the menu. 

First option in this menu is called @code{Contextual}. It will give different
options related to the current function that is being used.

When the mouse is moved to different windows, depending on the situations,
different cursor shapes and colors will appear on the screen.

In some windows, help is achieved pressing button-2 or button-3 over one icon.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Command line,  , Mouse operations, User interface
@section Command line
@cindex Command line
@cindex Word oriented
@cindex Arrows operations

All commands may be entered via the command line by typing the full name or
only part of it (long enough to avoid confusion); case is not significant.
Any command within the right side menu can be entered by the name given there
or by a part of it. Special commands are also available for viewing (zoom,
rotation and so on) and these can be typed or used at any time when working or
from within another function. A list of these special commands is given in
@code{View} (@pxref{View}).

Commands entered by typing are word oriented. This means that the same
operation is achieved if one writes the entire command and then presses 
@code{enter} or if one writes a part of it, presses @code{enter} and then 
writes the rest.

All these typed commands can be retrieved with the use of the up (to recover)
and down arrows (to come back).


@node User basics, Files, User interface, Top
@chapter USER BASICS
@cindex User basics

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml


The following features are essential to the effective use of the GiD system. They 
are, therefore, described apart from the pre-processing facilities section.

@menu
* Point definition::                    
* Entities selection::                  
* Quit::                                
* Escape::                              
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Point definition, Entities selection, User basics, User basics
@section Point definition
@cindex Points
@cindex Point definition
@cindex Entering points

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Point definition @| @| @thispage
@end iftex

Many functions inside GiD need the definition of a point to be given by the user. 
Points are the
lowest level of geometrical entity and, therefore the most commonly used. It is,
consequently, important that the user has a thorough understanding of their
definition and uses. Sometimes an existing point is required and sometimes a
new or an old point must be defined. 

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/CoordWin.ps,width=5.0cm,height=5.0cm,angle=0}
}}
\unpie{}
{
Entering coordinates window
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="CoordWin.gif"></a>
<img src="images/CoordWin.gif"> 
<p>Entering coordinates window
</center>
<p>
@end ifhtml
@end ifset

@end ifset

All the options explained in this section are available through the specific window
of Points Definition (@pxref{Coordinates window}). This window is accessed via the
options @code{Utilities} and @code{Graphical} in the title's bar. In doing so, the user
can choose not only the kind of reference system, cartesian, cylindrical or spherical,
but also the system to be used, global or local and if the origin of coordinates is
fixed or relative (new coordinates are referred to the last entered origin point).

@iftex
In the most general case the user can enter points in the following ways:
@enumerate
@item Picking in the graphical window.
@item Entering points by coordinates.
@item Selecting an existing point.
@item Button @code{Base}.
@end enumerate
@end iftex
 
@menu
* Picking in the graphical window::     
* Entering points by coordinates::      
* Selecting an existing point::         
* Button Base::                         
* Option point in line::                
* Option point in surface::             
* Option tangent in line::              
* Option normal in surface::            
* Option Arc center::                   
@end menu

@node  Picking in the graphical window, Entering points by coordinates, Point definition, Point definition
@unnumberedsubsec Picking in the graphical window

Points are picked in the graphics window in the
plane z=0 according to the coordinates viewed in the window. Depending on the
activated preferences (@pxref{Preferences}), if the user
selects a region located in the vicinity of an existing point, GiD asks whether 
it should create a new point or if
it should use the existing one.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Entering points by coordinates, Selecting an existing point, Picking in the graphical window, Point definition
@unnumberedsubsec Entering points by coordinates
@cindex Coordinates
@cindex Entering points by coordinates

GiD offers a window for entering points in order to easily create geometries,
defining fixed or relative coordinates as well as different reference systems,
cartesian, cylindrical or spherical.

Coordinates of the point can be entered either in the @code{enter points} window
or in the command line by following one of two possible formats:

@enumerate
@item 
In the format: @code{x,y,z}
@item 
In the format: @code{x y z}
@end enumerate
Coordinate z can be omitted in both cases.
 
The following are valid examples of point definitions:

@iftex
@example
	5.2,1.0         5.2,1	
	8 9 2           8 9,2
@end example
@end iftex

@ifinfo
@example
	5.2,1.0 	5.2,1	
	8 9 2 		8 9,2
@end example
@end ifinfo

All the points coordinates can be entered as local or global and through different 
reference systems in addition to the cartesian one.
@iftex
@enumerate
@item Local/global coordinates
@item Cylindrical coordinates
@item Spherical coordinates
@end enumerate
@end iftex

@menu
* Local/global coordinates::            
* Cylindrical coordinates::             
* Spherical coordinates::               
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Local/global coordinates, Cylindrical coordinates, Entering points by coordinates, Entering points by coordinates
@unnumberedsubsubsec Local/global coordinates
@cindex Local/global coordinates
@cindex Entering local coordinates
@cindex Entering global coordinates

Local coordinates are always considered relative to the last point that was used, 
created or selected.
It is possible to use the commands @code{Utilities} and @code{Id} in order to make a 
reference to one point (@pxref{Id}). Then, to define points using local coordinates 
referring to the same point, use @code{Options} and @code{Fixed Relative}
when entering each point. The last point selected or created before using this 
will be the origin of the local coordinate system. It is also possible to enter this 
central point by its coordinates.

The following are valid examples of defining points using local coordinates:

@example
	example (1):
				1,0,0
				@@2,1,0 (actual coordinates 3,1,0)
				@@0,3,0 (actual coordinates 3,4,0)
				2,2,2                            
				@@1,0,3 (actual coordinates 3,2,5)
                                                                 
	example (2):
				1,0,0
				Fixed Relative (when creating the point)
				@@2,1,0 (actual coordinates 3,1,0)
				@@0,3,0 (actual coordinates 1,3,0)
				2,2,2                            
				@@1,0,3 (actual coordinates 2,0,3)
                                                                 
	example (3):
				'local_axes_name'2.3,-4.5,0.0
@end example

The last example shows how to enter a point from a local coordinate system called
@code{'local_axes_name'} (any name inside the quotation marks will fit), previously 
defined via the option @code{define local axes} (@pxref{Local axes}).

All the examples have been presented using a cartesian notation. However,
cylindrical or spherical coordinates can also be used.
@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Cylindrical coordinates, Spherical coordinates, Local/global coordinates, Entering points by coordinates
@unnumberedsubsubsec Cylindrical coordinates
@cindex Cylindrical coordinates
@cindex Entering cylindrical coordinates

Cylindrical coordinates can be entered as: @code{r<angle,z}

The z_coordinate may be omitted and angles are defined in degrees. Cylindrical 
coordinates can be applied to global and local coordinate systems.

The following are valid examples of the same point definitions:

@example
	example (1): 
				1,0,0
				1.931852<15
			
	example (2): 
				1,0,0
				@@1.0<30
@end example

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Spherical coordinates,  , Cylindrical coordinates, Entering points by coordinates
@unnumberedsubsubsec Spherical coordinates
@cindex Spherical coordinates
@cindex Entering spherical coordinates

Spherical coordinates can be entered as @code{r<anglexy<anglez}

@code{Anglez} may be omitted and angles are defined in degrees. Spherical 
coordinates can be applied to global and local coordinate systems.

The following are valid examples of the same point definitions:

@example
	Example (1): 
				1,0,0
				1.73205<18.43495<24.09484
	
	Example (2): 
				1,0,0
				@@1.0<45<45
@end example


@tex
\bigskip
\bigskip
@end tex

@ifhtml
<p><br><br></p>
@end ifhtml

@node Selecting an existing point, Button Base, Entering points by coordinates, Point definition
@unnumberedsubsec Selecting an existing point

@ifset photo
@tex
\hbox{
\psfig{figure=icons/mm-joinca.ps,width=3.25cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="mm-joinca.gif"></a>
<p><img src="icons/mm-joinca.gif"></P>
@end ifhtml
@c@end html
@end ifset
@end ifset

When the user is inside a function that asks for a point, GiD can be in one of the
two modes: entering a new point or selecting and old one. They can be distinguished
by the cursor that will be either a cross or a box. To change from the first mode
to the second one, the user must select button @code{join} from the right
side column commands or its shortcut (Control-a).
This button is then set to @code{No Join}. After this, select an existing
point to get it. (Control-a) switches from @code{Join} to @code{No Join} and
vice versa.

Options @code{Join} and @code{No join} can also be obtained from the
Contextual submenu in the 3rd button menu (@pxref{Mouse operations}). 

Special options @code{FJoin} and @code{FNoJoin} force GiD to change either
to @code{Join} mode or @code{No join} mode independently of the previous mode.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Button Base, Option point in line, Selecting an existing point, Point definition
@unnumberedsubsec Option Base
@cindex Option base in points
@cindex Base option in points

@ifset photo
@tex
\hbox{
\psfig{figure=icons/mm-base.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="mm-base.gif"></a>
<p><img src="icons/mm-base.gif"></P>
@end ifhtml
@c@end html
@end ifset
@end ifset

If button @code{Base} is selected (button is set on @code{No Base}), a point
can be retrieved from any of the other modes. Then, the coordinates of this point,
instead of being used, are written in the command line and can be edited before
entering it.

It is possible to change the default way that GiD works with points via preferences 
(@pxref{Preferences}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Option point in line, Option point in surface, Button Base, Point definition
@unnumberedsubsec Option point in line
@cindex Option point in line
@cindex Point in line option

@ifset photo
@tex
\hbox{
\psfig{figure=icons/mm-pointinline.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="mm-pointinline.gif"></a>
<p><img src="icons/mm-pointinline.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


By using this option, the user can pick over a line in the graphical window.
One point will be created over the line in the position where the user has
picked.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Option point in surface, Option tangent in line, Option point in line, Point definition
@unnumberedsubsec Option point in surface
@cindex Option point in surface
@cindex Point in surface option

@ifset photo
@tex
\hbox{
\psfig{figure=icons/mm-pointinsurface.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="mm-pointinsurface.gif"></a>
<p><img src="icons/mm-pointinsurface.gif"></P>
@end ifhtml
@c@end html
@end ifset
@end ifset

By using this option, the user can pick over a surface in the graphical window.
One point will be created over the surface in the position where the user has
picked.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Option tangent in line, Option normal in surface, Option point in surface, Point definition
@unnumberedsubsec Option tangent in line
@cindex Option tangent in line
@cindex Tangent in line option

@ifset photo
@tex
\hbox{
\psfig{figure=icons/mm-tangentinline.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="mm-tangentinline.gif"></a>
<p><img src="icons/mm-tangentinline.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset



By using this option, the user can pick over a line in the graphical window.
One vector will be returned that is the tangent to the line in the position where 
the user has picked.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Option normal in surface, Option Arc center, Option tangent in line, Point definition
@unnumberedsubsec Option normal in surface
@cindex Option normal in surface
@cindex Normal in surface option

@ifset photo
@tex
\hbox{
\psfig{figure=icons/mm-normalinsurface.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="mm-normalinsurface.gif"></a>
<p><img src="icons/mm-normalinsurface.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset



By using this option, the user can pick over a surface in the graphical window.
One vector will be returned that is the normal to the surface in the position 
where the user has picked.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Option Arc center,  , Option normal in surface, Point definition
@unnumberedsubsec Option Arc center
@cindex Option Arc center
@cindex Arc center 

@ifset photo
@tex
\hbox{
\psfig{figure=icons/mm-arccenter.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="mm-arccenter.gif"></a>
<p><img src="icons/mm-arccenter.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset



By using this option, the user can pick over an arc in the graphical window. One point will be returned in the center of the arc selected.



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Entities selection, Quit, Point definition, User basics
@section Entities selection
@cindex Entities selection
@cindex Dynamic box
@cindex Selecting points
@cindex Filter

Many commands need some entities to be selected before applying them, and the
method of selection is always identical. Before selecting entities, the user
is prompted to decide whether to select points, lines, surfaces or volumes (in
some cases this decision is obvious or it is made within the context of the
option). @*@*

Within one of the generic groups (points, lines, surfaces, volumes, nodes or
elements), it does not matter what type of
entity is selected (for example, an arc or a spline, both line entities are
selected in the same way). After this, if one entity of the desired group is
selected, it is colored red to indicate its selection and the user is
prompted to enter more entities. If the user selects away from any entity, a
dynamic box is opened that can be defined by picking again in another place.
All entities that are either totally or partly within this box are selected.
Next, the user is prompted to enter more entities. The normal selection mode 
is @code{SwapSelection}: If one entity is selected a second time, it becomes 
deselected and its color reverts to normal, It also exist the options @code{AddToSelection} 
and @code{RemoveFromSel} to only add or only remove entities to the selection.@*@*

@b{Note:} Instead of picking twice to begin and end the selection box, it is 
possible to keep leftmouse pressed and move the cursor.
@*@*

Option @code{Clear selection} found in the @b{Contextual} mouse menu, deselects all previously selected entities.
@*@*
It is also possible to select entities by entering their label in the command
line. For instance, to select the entity with number 2, the user has to input 
this number, @code{2}, in the command line. To select the entities 3 to 7,  
the user has to input @code{3:7} in the command line. Option @code{3:} will
select all entities from number 3 to end and option @code{:3} will select all
options from beginning to number 3.
@*@*
If a layer named @code{ll1} exists, it is possible to select all entities belonging
to that layer with command: @code{layer:ll1} . Using command @code{layer:} 
select all entities belonging to no layer.@*

Another way of selecting points or nodes is to write:
@example
    plane:a,b,c,d,r
@end example
   Where a,b,c,d and r are real numbers that define a plane and a tolerance in the
following way: @code{ax+by+cz+d<r}. 
Points close to that plane are chosen.

In some commands, another item is added to the selection group. This item, called @code{AllTypes}, means to select all entities levels (points...volumes) at the same time.@*
In this case, only selection via a dynamic box is possible in the graphical window and all entities (points, lines, surfaces and volumes) in the box are selected.@*

To finish the entities selection, use @code{escape} (@pxref{Escape}).@*

If the option @code{Fast Selection} is used, entities are not 
colored red when selected and choosing an entity twice does not deselect it. Option @code{Fast Selection} is avalaible in the right buttons (@pxref{Graphical}), in @b{Utilities > Variables}.  
@*
@strong{Caution:} Use only @code{Fast Selection} when needing to select a 
large amount of entities, for example in a large mesh. The possibility of 
repeating entities within the selection is dangerous.

Entities belonging to frozen layers (@pxref{Layers}) are not taken into account 
in the selection. Entities belonging to OFF layers cannot be selected directly
in the graphical window, but can be selected by
giving its number or giving a range of numbers. @*@*

It is possible to add filters to the selection that, after selecting some entities, only remains selected the ones that accomplish with the filter criteria. To enter one filter write in the command line the word @code{filter:} and one option. Options are:
@itemize @bullet
@item HigherEntity
@item MinLength
@item MaxLength
@item EntityType
@item BadMinAngle
@item BadMaxAngle
@end itemize

@b{Note:} To apply selection filters you can also use the @b{Selection window} (@pxref{Selection window}). @*
@strong{Note:} MinLength and MaxLength can be used either in the
geometry lines or in elements of the mesh.

Example:
@example
    filter:HigherEntity=1
@end example

Means that only the entities that have higher entity equal to one will be selected.

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/Higherentities.ps,width=10.82cm,height=5.81cm,angle=0}
}}
\unpie{}
{}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<img src="images/Higherentities.gif"> 
</center>
@end ifhtml
@c@end html
@end ifset
@end ifset

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@b{Note:} A typical use of filter is to select only boundary lines (higherentiety=1). @*

@node Quit, Escape, Entities selection, User basics
@section Quit
@cindex Quit
@cindex End session

@ifset photo
@tex
\multitable
\hbox{
\psfig{figure=icons/m-quit.ps,width=1.83cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/mm-quit.ps,width=2cm,height=0.88cm,angle=0}
}
\end multitable
@end tex


@ifset html
@c@html
@ifhtml
<p><img src="icons/m-quit.gif">
<img src="icons/mm-quit.gif"><br><br>
<img src="icons/tb-quit.gif"></p>
@end ifhtml
@c@html
@end ifset
@end ifset


Command @code{Quit} is used to finish the working session. If there were
changes since the last time a session was saved, GiD asks the user to save them.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Escape,  , Quit, User basics
@section Escape
@cindex Escape
@cindex Up menus
@cindex Leaving commands

The command @code{escape} is used for moving up a level within the right side 
column menus, for finishing most commands, or for finishing selections and other
utilities. This command can be applied by:
@enumerate
@item 
Middle button of the mouse.
@item
Key @code{ESC}.
@item
Button @code{escape} in the right side commands menu.
@item
Writing the reserved word @code{escape} in the command line. This is useful in
scripts (@pxref{Batch file}).
@end enumerate

All above options give the same result.

@strong{Caution:} @code{escape} is a reserved word. It cannot be used in any
other context.


@node Files, View, User basics, Top
@chapter FILES 
@cindex Files
@cindex Save
@cindex Read saved project

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/Browser.ps,width=6.0cm,height=4cm,angle=0}
}}
\unpie{}
{
Browser to read and write files and projects.
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="Browser.gif"></a>
<img src="images/Browser.gif"> 
<p>Browser to read and write files and projects.
</center>
<p>
@end ifhtml
@end ifset

@end ifset

GiD includes the usual ways of saving and reading
saved information (@code{Save}, @code{Read}) and other file capabilities, such as 
importing external files, saving in other formats and so on.

@menu
* New::                                 
* Open::                                
* Save::                                
* Save as::                             
* Import::                              
* Export::                              
* Print to file::                       
* About::                               
@end menu

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node New, Open, Files, Files
@section New
@cindex New

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-new.ps,width=2cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-new.ps,width=1.33cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-new.gif"></a>
<a name="tb-new.gif"></a>
<p><img src="icons/m-new.gif"><br><br>
<img src="icons/tb-new.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@code{New} opens a new project with no title assigned.

If this option is chosen from inside a project where some changes have been introduced,
GiD asks to save them before entering the new project.
Next, a new problem without a title begins. 

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Open, Save, New, Files
@section Open
@cindex Open project
@cindex Read project

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-open.ps,width=2cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-open.ps,width=1.33cm,height=1cm,angle=0}
}
@end tex
@ifset html
@c@html
@ifhtml
<a name="m-open.gif"></a>
<a name="tb-open.gif"></a>
<p><img src="icons/m-open.gif"><br><br>
<img src="icons/tb-open.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


With this command, a project previously saved with @code{Save} (@pxref{Save}) or with
@code{Save ASCII project} (@pxref{Save ASCII project}) can be open.

Generally, there is no difference between using a project name with the @code{.gid} 
extension or without it.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Save, Save as, Open, Files
@section Save
@cindex Save project

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-save.ps,width=2cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-save.ps,width=1.37cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-save.gif"></a>
<a name="tb-save.gif"></a>
<p><img src="icons/m-save.gif"><br><br>
<img src="icons/tb-save.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@code{Save} a project is the way of saving all the information relative to the 
project: geometry, conditions, materials, mesh, etc. onto the disk.

To save a project, GiD creates a directory with its name and extension @code{.gid}. 
Some files are written into this directory containing all the information. Some of 
these files are binary and others are ASCII. The user can then 
work with this project directory as if it were a file.

User doesn't need to write the @code{.gid} extension because it will be automatically
added to the directory name. 

@strong{Caution:} Be careful if changing some files manually into the 
@code{@b{Project}.gid} directory. If done in this way, some information may be 
corrupted.

@strong{Advice:} It is advisable to save often to prevent losing information.
It is possible to automatically save a model backup by selecting a user frequence (@pxref{Preferences}). 

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Save as, Import, Save, Files
@section Save as
@cindex Save as

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-saveas.ps,width=2.25cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-saveas.gif"></a>
<p><img src="icons/m-saveas.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this command, GiD allows the user to save the current project with another name.

When it is selected, an auxiliary window appears with all the existing projects
and directories to facilitate the introduction of the project's new name and
directory.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Import, Export, Save as, Files
@section Import
@cindex Import



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@menu
* IGES read::                           
* DXF read ::                           
* Parasolid read::                      
* ACIS read::                           
* VDA read::                            
* Shapefile read::                      
* NASTRAN read::                        
* STL mesh read::                       
* Mesh read::                           
* Read surface mesh::                   
* Batch file::                          
* Insert geometry::                     
@end menu

@node IGES read, DXF read , Import, Import
@subsection IGES
@cindex IGES read
@cindex Read IGES
@cindex import IGES

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-igesread.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-igesread.gif"></a>
<p><img src="icons/m-igesread.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


With this option it is possible to read a file in IGES format, version 5.1.

@comment @iftex
@comment @headings off
@comment @evenheading @thispage @| @| @thischaptername
@comment @oddheading IGES read @| @| @thispage
@comment @end iftex

GiD can read files in IGES version 5.1 format, including most of the entities,
which are:


@example
Entity number and type ( Notes)
100	Circular arc
102	Composite curve
104	Conic arc ( ellipse, hyperbola and parabola)
106	Copious data ( forms 1, 2, 12 and 63)
108	Plane (form1 bounded)
110	Line
112	Parametric spline curve
114     Parametric spline surface	
116     Point
118     Ruled surface
120     Surface of revolution
122     Tabulated cylinder
124     Transformation matrix ( form 0)
126	Rational B-spline curve			
128	Rational B-spline surface	
140     Offset surface entity
141     Bounded entity
142     Curve on a parametric surface
143     Bounded surface
144     Trimmed surface
308     Subfigure definition
402     Associativity instance
408     Singular subfigure instance
@end example

The variable @code{ImportTolerance} (@pxref{Preferences}) controls the creation of 
new points when an IGES file is read.
Points are therefore defined as unique if they lie further away than this tolerance
distance from another already defined point. Curves are also considered identical if 
they have the same points at their extremes and the "mean proportional distance" 
between them is smaller than the tolerance. Surfaces can also be collapsed.

Entities that are read in and transformed are not necessarily identical to the original
entity. For example, surfaces may be transformed into plane,into Coons or into NURBS
surfaces defining their contours and shape.




@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node DXF read , Parasolid read, IGES read, Import
@subsection DXF
@cindex DXF read
@cindex Read DXF
@cindex import DXF

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-dxfread.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-dxfread.gif"></a>
<p><img src="icons/m-dxfread.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option it is possible to read a file in DXF format, version AutoCAD 2002.

@comment @iftex
@comment @headings off
@comment @evenheading @thispage @| @| @thischaptername
@comment @oddheading DXF read @| @| @thispage
@comment @end iftex

Mostly all the geometry in the DXF is read except the solid modeled entities. 



A very important parameter to consider is related to how the points must be joined. 
This means that points that are close to each other must be converted to a single 
point. 
This is done by defining variable ImportTolerance (@pxref{Preferences}). 
Points closer together than @code{ImportTolerance} will be 
considered to be a single point. Straight lines that share both points are also 
converted to a single line.

User can perform one @code{Collapse} (@pxref{Collapse}) to join more entities.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Parasolid read, ACIS read, DXF read , Import
@subsection Parasolid
@cindex Parasolid read
@cindex Read Parasolid
@cindex import Parasolid

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-parasolidread.ps,width=4.75cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-parasolidread.gif"></a>
<p><img src="icons/m-parasolidread.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option it is possible to read a file in Parasolid format, version 11.

@comment @iftex
@comment @headings off
@comment @evenheading @thispage @| @| @thischaptername
@comment @oddheading IGES read @| @| @thispage
@comment @end iftex

GiD can read files in Parasolid version 11 format (ASCII or binary formats).

The most usual Parasolid file extension is @code{.x_t} for ASCII and @code{.x_b} for binary format.

The variable @code{ImportTolerance} (@pxref{Preferences}) controls the creation of 
new points when a Parasolid file is read.
Points are therefore defined as unique if they lie further away than this tolerance
distance from another already defined point. Curves are also considered identical if 
they have the same points at their extremes and the "mean proportional distance" 
between them is smaller than the tolerance. Surfaces can also be collapsed.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node ACIS read, VDA read, Parasolid read, Import
@subsection ACIS
@cindex ACIS read
@cindex Read ACIS
@cindex import ACIS

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-acisread.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-acisread.gif"></a>
<p><img src="icons/m-acisread.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option it is possible to read a file in ACIS format, version 5.0. 
GiD reads the ASCII version, the SAT Save File Format. ACIS files (in ASCII) have the @code{.sat} extension.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node VDA read, Shapefile read, ACIS read, Import
@subsection VDA
@cindex VDA read
@cindex Read VDA
@cindex import VDA

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-vdaread.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-vdaread.gif"></a>
<p><img src="icons/m-vdaread.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option it is possible to read a file in VDA 2.0 format.

A very important parameter to consider is related to how the points must be joined. 
This means that points that are close to each other must be converted to a single 
point. 
This is done by defining variable @code{ImportTolerance} (@pxref{Preferences}. 
Points closer together than @code{ImportTolerance} will be 
considered to be a single point. Straight lines that share both points are also 
converted to a single line.

User can perform one @code{Collapse} (@pxref{Collapse}) to join more entities.




@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Shapefile read, NASTRAN read, VDA read, Import
@subsection Shapefile
@cindex Shapefile read
@cindex Read Shapefile
@cindex import Shapefile

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-shapefileread.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-acisread.gif"></a>
<p><img src="icons/m-shapefileread.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option it is possible to read a GIS file written in ESRI Shapefile format, version 1000. 
Shapefiles have the @code{.shp} extension.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node NASTRAN read, STL mesh read, Shapefile read, Import
@subsection NASTRAN mesh
@cindex NASTRAN read
@cindex Read NASTRAN
@cindex import NASTRAN

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-nastranread.ps,width=4.75cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-nastranread.gif"></a>
<p><img src="icons/m-nastranread.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option it is possible to read a file in the NASTRAN format, version 68.

@comment @iftex
@comment @headings off
@comment @evenheading @thispage @| @| @thischaptername
@comment @oddheading NASTRAN read @| @| @thispage
@comment @end iftex

GiD can read files written in NASTRAN version 68 format, accepting most of its entities,
whic are:

@example
Entity name ( Notes)
GRID
CBAR
CBEAM ( translated as 2 node bars)
CELAS2 ( translated as 2 node bars)
CHEXA ( 8 or 20 nodes)
CONM2
CORD1C
CORD1R
CORD1S
CORD2C
CORD2R
CORD2S
CQUAD4
CROD ( translated as 2 node bars)
CTRIA3
CTETRA
@end example

There are two options that can be used when reading a mesh if GiD already contains a mesh:

@itemize @bullet
@item 
a) Erasing the old mesh (@code{Erase})
@item
b) Adding the new mesh to the old without sharing the nodes; the nodes will be
   duplicated although they will occupy the same position in the space 
   (@code{AddNotShare}).
@end itemize

The properties and materials of elements are currently ignored, because of the 
difficulties
in associating the NASTRAN file properties with the requirements of the analysis 
programs.
The user must therefore assign the materials "a posteriori" accordingly. However, 
in order
to make this easier, the elements will be partitioned into different layers each with
the name PIdn, where n is the property identity number associated with the elements 
as defined in the NASTRAN file. Note that CELAS2 elements do not have associated 
property identities so these will be created by default during the reading of the file.



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node STL mesh read, Mesh read, NASTRAN read, Import
@subsection STL mesh
@cindex STL mesh read
@cindex Read STL mesh
@cindex Import STL mesh

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-stlmeshread.ps,width=4.75cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-stlmeshread.gif"></a>
<p><img src="icons/m-stlmeshread.gif"></p>  
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option it is possible to read a mesh in the STL format.
The STL binary format is also supported.

The variable @code{ImportTolerance} (@pxref{Preferences}) controls the creation of 
new points when the file is read.







@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Mesh read, Read surface mesh, STL mesh read, Import
@subsection GiD mesh
@cindex Mesh read
@cindex Import GiD mesh

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-meshread.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-meshread.gif"></a>
<p><img src="icons/m-meshread.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option it is possible to read a GiD ASCII mesh (saved with @code{Export GiD Mesh}) in order to visualize it within GiD. 

It is also possible to read a new mesh and add it to the existing one. In this case,
the user is prompted to keep the former one or join it to the new mesh.

The format of the file (whose name is introduced by means of the command line or
directly by getting it from the auxiliary window) describing the mesh must have the
following structure:

@example
mesh dimension = 3 elemtype tetrahedra nnode = 4
coordinates
1 0 0 0
2 3 0 0
3 6 0 0
4 3 3 0
5 3 1.5 4
6 3 1.5 -4
7 1.5 0 2
end coordinates
elements
1 1 2 4 5 1
2 2 3 4 5 1
3 1 4 2 6 1
4 2 4 3 6 1
5 1 2 5 7 1
end elements
@end example

Code @code{nnode} means the number of nodes per element and
@code{dimension} can be either:

@itemize @bullet
@item @code{2}: 2 dimensions. Nodes have just two coordinates.
@item @code{3}: 3 dimensions. Nodes have three coordinates.
@end itemize

Where @code{elemtype} must be:

@itemize @bullet
@item 
Linear
@item
Triangle
@item
Quadrilateral
@item
Tetrahedra
@item
Hexahedra
@end itemize

Every element may have an optional number after the connectivities
definition.  This number usually defines the material type and it is
useful to divide the mesh into layers to visualize it better. GiD offers
the possibility of dividing the problem into different layers according
to the different materials through the option @code{Material}
(@pxref{Layers}).

@c @strong{Caution:} After and before the sign @code{=} it is necessary to
@c leave a space.

@strong{Note:} The sign @code{=} is optional, but if it is present it is 
necessary to leave a space.

If it is necessary to enter different types of elements, every type must
belong to a different mesh. More than one mesh can be entered by writing
one after the other, all of them in the same file. The only difference
is that all meshes except the first one have nothing between
@code{coordinates} and @code{end coordinates}. They share the first
mesh's points. Example: to enter tetrahedra elements and triangle
elements,

@example
mesh dimension = 3 elemtype tetrahedra nnode = 4
coordinates
1 0 0 0
2 3 0 0
3 6 0 0
4 3 3 0
5 3 1.5 4
6 3 1.5 -4
7 1.5 0 2
end coordinates
elements
1 1 2 4 5 1
2 2 3 4 5 1
3 1 4 2 6 1
4 2 4 3 6 1
5 1 2 5 7 1
end elements
mesh dimension = 3 elemtype triangle nnode = 3
coordinates
end coordinates
elements
1 1 2 4 1
2 2 3 4 1
3 1 4 2 1
4 2 4 3 1
5 1 2 5 1
end elements
@end example



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Read surface mesh, Batch file, Mesh read, Import
@subsection Surface mesh
@cindex Read surface mesh
@cindex Surface mesh read

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-readsurfacemesh.ps,width=5.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-readsurfacemesh.gif"></a>
<p><img src="icons/m-readsurfacemesh.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


With this option, a mesh can be read from a file in GiD or STL format
(@pxref{Mesh read}). Elements of this mesh must be triangles or quadrilaterals.
This mesh is converted by GiD in a set of surfaces, points and lines. 
The geometric 
definition of surfaces is the mesh itself, but GiD treat them as truly geometric 
entities. For example: this surfaces can be used as the 
boundary of a volume, and a new mesh can be generated over them.

User is asked for the value of an angle. An angle between elements bigger than this
value, is considered to be an edge and lines are inserted over them. As a 
consequence, a set of boundary and interior lines are created and attached to the
surfaces to mark their edges.














@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Batch file, Insert geometry, Read surface mesh, Import
@subsection Batch file
@cindex Batch file
@cindex Script file

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-batch.ps,width=3.51cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-batch.gif"></a>
<p><img src="icons/m-batch.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Sometimes, it may be useful not to use GiD interactively. To do so, commands
can be written into a file and GiD will read this file and execute the commands.
These commands are the same that are used in GiD when written in the command line
or using the commands in the right side commands menu.

@b{Example:} Many points have been digitalized and their coordinates saved in 
a file. These points are to be joined with straight lines to create the outline 
of the geometry. To do so, the file would look similar to this:

@example
geometry create line
3.7 4.5 8
2 5 9
4,5,6
 ...
1 7 0.0
escape
@end example

@tex
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

A batch file can also be loaded into GiD by giving its name with option @b{-b} 
when opening GiD. (@pxref{Invoking GiD}) Another way to read batch files to create dynamic presentations is with the @code{Read batch window} (@pxref{Read batch window}). One GiD session can be registered in a batch file. This can be useful to check the batch commands or to repeat one session (@pxref{Preferences}).@*@*@*

@strong{BATCH FILE COMMANDS} @*@*

There are some especial commands to be added  to a batch than
are treated differently than regular GiD commands. Their format is one or
several words after the control string ***** (five stars) and everything in
one line. 

@itemize @bullet

@item @b{Write a log file}@*
@example
*****OUTPUTFILENAME filename
@end example
@code{filename} is substituted with a real file name where all the
session warnings (that which appear in the GiD messages warn line) are
written. This can be useful when running GiD in batch with option @b{-n}
(@pxref{Invoking GiD}) and GiD output is desired.@*@*

@item @b{Execute a TCL command in a batch file}@*
@example
*****TCL tcl_command
@end example

@b{Note:} If this command is used in batch file and GiD is invoked with option @code{-n} it will not work. To make TCL commands execute when GiD is executed without any window, you should use the @code{-n2} option. (@pxref{Invoking GiD}) 

@*@*

@item @b{Insert comments in the code of a batch file}@*

@example
geometry create line
1,2
*****COMMENTS -this is a comment-
2,3
escape
@end example

@item @b{Print messages in the inferior GiD messages line} @*


@example
geometry create line
1,2
*****PRINT  -This is a message which will appear in the messages line-
2,3
escape
@end example

@item @b{Print messages in a window} @*

@example
geometry create line
1,2
*****PRINT1  -This is a message which will appear in a new window-
2,3
escape
@end example
@end itemize



@node  Insert geometry,  , Batch file, Import
@subsection Insert GiD geometry
@cindex Insert geometry
@cindex Insert GiD model

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-insertgeometry.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-insertgeometry.gif"></a>
<p><img src="icons/m-insertgeometry.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


This command permits to insert one previously created GiD model inside another one.
Entities from the old and the new model are not collapsed.

User can perform one @code{Collapse} (@pxref{Collapse}) to join the old and new model.






































































@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Export, Print to file, Import, Files
@section Export
@cindex Export

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@menu
* IGES write::                          
* DXF write::                           
* GiD mesh::                            
* Text data report::                    
* Save ASCII project::                  
* Save ON layers::                      
* Calculation file::                    
* Using template::                      
@end menu

@node IGES write, DXF write, Export, Export
@subsection IGES
@cindex IGES write
@cindex Write IGES
@cindex Export IGES


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-igeswrite.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-igeswrite.gif"></a>
<p><img src="icons/m-igeswrite.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

GiD can export the geometry in IGES format (version 5.1). Points, curves and surfaces
are exported and volumes are ignored.

The IGES entities generated are:

@example
116	Point
110	Line
102	Composite curve
126	Rational B-spline curve
128	Rational B-spline surface
142	Curve on a parametric surface
144	Trimmed surface
@end example


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node DXF write, GiD mesh, IGES write, Export
@subsection DXF
@cindex DXF write
@cindex Write DXF 
@cindex Export DXF

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-dxfwrite.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-dxfwrite.gif"></a>
<p><img src="icons/m-dxfwrite.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

GiD can export the geometry in DXF format (version AutoCAD 2002). Points and curves are exported.
Surfaces are ignored because DXF does not support Trimmed NURBS Surfaces.








@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node GiD mesh, Text data report, DXF write, Export
@subsection GiD mesh
@cindex Mesh write 
@cindex export GiD mesh

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-writemesh.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-writemesh.gif"></a>
<p><img src="icons/m-writemesh.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option a file is written with all the project's mesh or meshes inside.
This file can be read with @code{Import GiD Mesh} @xref{Mesh read}.





@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Text data report, Save ASCII project, GiD mesh, Export
@subsection Text data report
@cindex data report
@cindex text data report
@cindex export data report 


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-writeascii.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-writeascii.gif"></a>
<p><img src="icons/m-writeascii.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option a file is written containing all the information within the
project. It is created in a way that is easily understood when read with
an editor. This is useful for checking the information.

@strong{Note:} This ASCII format is only used to check information. It cannot
be read again by GiD. To write ASCII files that can be read again use the option
@code{SaveAsciiProj} (@pxref{Save ASCII project}).




@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Save ASCII project, Save ON layers, Text data report, Export
@subsection ASCII project
@cindex ASCII write project
@cindex Save ASCII project
@cindex Export ASCII project

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-saveasciipr.ps,width=5.25cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-saveasciipr.gif"></a>
<p><img src="icons/m-saveasciipr.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


This option saves a project in the same way as the regular @code{save}
(@pxref{Save}) but files are written in ASCII. It may be useful to copy
projects between non-binary-compatible machines. GiD also allows this
information to be written in a file (@pxref{Text data report}).

Projects saved in this way may be read with the same @code{open} command
(@pxref{Open}).


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Save ON layers, Calculation file, Save ASCII project, Export
@subsection ON layers
@cindex Save ON layers
@cindex Layers ON save

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-saveonlayers.ps,width=5.25cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-saveonlayers.gif"></a>
<p><img src="icons/m-saveonlayers.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option, only the geometrical entities with its 
layer set to @code{ON} will be saved
in a new project (@pxref{Layers}).

@strong{Note:} Lower entities necessary to define the saved entities will be
also saved into the new project (example: The two points extremes of a line are
also saved if the line is saved).





@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Calculation file, Using template, Save ON layers, Export
@subsection Calculation file
@cindex Write calculation file
@cindex Export calculation file
@cindex Calculation file

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-writecalculationsfile.ps,width=5.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-writecalculationsfile.gif"></a>
<p><img src="icons/m-writecalculationsfile.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


If GiD runs the solver module automatically, this command is not necessary. It
is however useful if the solver program is required to be run outside GiD,
or to check the data input prior to any calculations.

This command writes the data file needed by the solver module. 

The format of this file must be defined in a @b{Template File} (@pxref{Template File}). @b{GiD} uses the template file of the current Problem Type to write the data file; so, to run this command, a problem type must be selected.  

When testing a new problem type definition,
GiD produces messages about errors within the configuration. 
When the error is corrected, 
the command can be used again without quitting the example and without having to reassign any condition or meshing again.








@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Using template,  , Calculation file, Export
@subsection Using template
@cindex Write using template file

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-writeusingBas.ps,width=6.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-writeusingBar.gif"></a>
<p><img src="icons/m-writeusingBas.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This command does the same as @code{Export calculation file} (@pxref{Calculation file}), but it uses a @code{.bas} file provided by the user, instead of using the template file of the current Problem Type. So, it's not necessary to select a Problem Type to run this command. 

When choosing option @code{Others...} from the submenu, GiD asks for a @code{.bas} file (@pxref{Template File}) and, using that file, writes the data file needed by the solver module. There are some @code{.bas} codes available in the submenu which write output files in some formats (DXF, NASTRAN, STL, VRML). These example @code{.bas} files are located in the @code{Templates} directory of the main GiD directory. It's possible to add other @code{.bas} files to that directory so that they appear in the submenu.





@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node  Print to file, About, Export, Files
@section Print to file
@cindex Print to file
@cindex Hardcopy


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-printtofile.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-printtofile.ps,width=2.5cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-printtofile.gif"></a>
<a name="tb-printtofile.gif"></a>
<p><img src="icons/m-printtofile.gif"><br><br>
<img src="icons/tb-printtofile.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This option asks the user for a file name and save an image in the
required format. 

Accepted formats are:

@itemize @bullet
@item @code{TIFF:} Tagged Image File Format.
@item @code{EPS:} Encapsulated postscript. Useful to insert in documents.
@item @code{Postscript screen:} Postscript. Useful to send to a postscript printer.
It is a snapshot of the screen.
@item @code{Postscript vectorial:} Postscript. Useful to send to a postscript printer.
It gives higher quality but it is only usable for small modells. Otherwise, very
large files are created and it takes very long time to print them.
@item @code{VRML:} Writes a VRML model file with the current visualization.
@item Other supported formats are: @code{BMP}, @code{GIF}, @code{JPG}, @code{PNG}, @code{TGA}
@end itemize



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node About,  , Print to file, Files
@section About
@cindex About

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-about.ps,width=2cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-about.gif"></a>
<p><img src="icons/m-about.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This command gives some information about the program, such as the version number 
which is being run, the system or libraries. 







@node View, Geometry, Files, Top
@chapter VIEW
@cindex View
@cindex Visualization

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

Visualization commands change the way to display the information in the
graphical window.  They do not change any definition of the geometry or
any other data.

Generally, they can be used within any other command without leaving
it. When the visualization process finishes, the first command
continues.

They can be accessed either from the top menu @code{View} or form the
right mouse button.

@menu
* Zoom::                                
* Rotate::                              
* Pan::                                 
* Redraw::                              
* Render::                              
* Label::                               
* Entities::                            
* Layers::                              
* Save/Read View::                      
* Background image::                    
* Multiple windows::                    
@end menu

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Rotate screen axes @| @| @thispage
@end iftex

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Zoom, Rotate, View, View
@section Zoom
@cindex Zoom
@cindex Frame
@cindex Extents (zoom)

@ifset photo
@tex
\multitable
\hbox{
\psfig{figure=icons/m-zoom.ps,width=2.16cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/mm-zoom.ps,width=1.74cm,height=0.88cm,angle=0}
}
\end multitable
@end tex

@tex
\multitable
\hbox{
\psfig{figure=icons/tb-zoomin.ps,width=2cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/tb-zoomout.ps,width=2cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/tb-zoomframe.ps,width=2cm,height=0.88cm,angle=0}
}
\end multitable
@end tex
@ifset html
@c@html
@ifhtml
<a name="m-zoom.gif"></a>
<a name="mm-zoom.gif"></a>
<a name="tb-zoomin.gif"></a>
<a name="tb-zoomout.gif"></a>
<a name="tb-zoomframe.gif"></a>
<p><img src="icons/m-zoom.gif">
<img src="icons/mm-zoom.gif"><br><br>
<img src="icons/tb-zoomin.gif">
<img src="icons/tb-zoomout.gif">
<img src="icons/tb-zoomframe.gif"</p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Zoom is used to change the visualized size of the objects without deforming them.
This only enlarges or reduces the objects and changes the orthogonal perspective
of the window.

@itemize @bullet
@item 
@code{Zoom in:} Pick inside the graphical window. A dynamic rectangle is opened. Pick
again and the visualization changes to display only the part within the defined 
rectangle.
@item 
@code{Zoom out:} Pick inside the graphical window. A dynamic rectangle is opened. Pick
again and the visualization changes so that everything in the graphical
window is reduced to the size of the rectangle.
@item
@code{Zoom frame:} Choose a visualization size so as to display everything inside the
window.
@item
@code{Zoom points:} User enters two points (@pxref{Point definition}), and a 
visualization size is chosen so as to display these two points inside the
window.
@item
@code{Zoom dynamic:} Moving mouse horizontally, view is enlarged or shortened.
@item
@code{Zoom previous:} GiD goes to the previous saved zoom.
@item
@code{Zoom next:} If one previous zoom has been made, this option goes to the
one after the current view in the stack list.
@end itemize

@code{Note:} Instead of picking twice to begin and end the rectangle, it is possible
to maintain the leftmouse pressed and move the cursor. 

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Rotate, Pan, Zoom, View
@section Rotate
@cindex Rotate (graphical)

@ifset photo
@tex
\multitable
\hbox{
\psfig{figure=icons/m-rotate.ps,width=2.25cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/mm-rotate.ps,width=2cm,height=0.88cm,angle=0}
}
\end multitable
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-rotate.ps,width=2.5cm,height=1cm,angle=0}
}
@end tex
@ifset html
@c@html
@ifhtml
<a name="m-rotate.gif"></a>
<a name="mm-rotate.gif"></a>
<a name="tb-rotate.gif"></a>
<p><img src="icons/m-rotate.gif">
<img src="icons/mm-rotate.gif"><br><br>
<img src="icons/tb-rotate.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset

There are various ways to make a rotation in order to change the graphical
view of the geometry, without changing it.

@menu
* Rotate screen axes::                  
* Rotate object axes::                  
* Rotate trackball::                    
* Rotate angle::                        
* Rotate points::                       
* Rotate center::                       
* Rotate original view::                
@end menu

@code{Note:} Instead of picking twice to begin and end the rotation, it is possible
to maintain the leftmouse pressed and move the cursor. 

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Rotate screen axes, Rotate object axes, Rotate, Rotate
@unnumberedsubsec Rotate screen axes
@cindex Rotate screen axes
@cindex Screen axes rotation

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Rotate screen axes @| @| @thispage
@end iftex

With this option, a dynamic rotation about the screen axes is made. Screen axes
are defined as:

@itemize @bullet
@item 
@code{X-axis}: A horizontal axis. 
@item 
@code{Y-axis}: A vertical axis. 
@item 
@code{Z-axis}: An axis orthogonal to the screen. 
@end itemize

When entering this command, @code{Z-axis} is set by default and moving the mouse
to the left or to the right will rotate the geometry around this axis. Picking the
left mouse changes the axis. To leave this function, use @code{escape} 
(@pxref{Escape}).

To change the axes is also possible by entering the letters @code{x}, @code{y} or 
@code{z} in the command line.

To move the geometry by a fixed angle, enter the number of degrees, positive or
negative, in the command line.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Rotate object axes, Rotate trackball, Rotate screen axes, Rotate
@unnumberedsubsec Rotate object axes
@cindex Rotate object axes
@cindex Object axes rotation

With this option, a dynamic rotation about the object axes is made. Object axes
are the global axes in the position they are in that particular moment. i.e.
the axes currently drawn in the graphical window.

When entering this command, @code{Z-axis} is set by default and moving the mouse
to the left or to the right will rotate the geometry around this axis. Picking the 
left mouse changes the axes. To leave this function, use @code{escape} 
(@pxref{Escape}).

To change the axes is also possible by entering the letters @code{x}, @code{y} or 
@code{z} in the command line.

To move the geometry by a fixed angle, enter the number of degrees, positive or
negative, in the command line.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Rotate trackball, Rotate angle, Rotate object axes, Rotate
@unnumberedsubsec Rotate trackball
@cindex Rotate trackball
@cindex Trackball rotation

With this option, a dynamic rotation is made, resembling a trackball device. It means 
that when picking over a geometry point with the left mouse and moving the mouse, the 
geometric point tries to follow the mouse pointer. This can be imagined as a ball 
over the graphical window which is moved with the mouse.

The left mouse button can be pressed several times to connect and disconnect the 
movement. To leave this function, use @code{escape} (@pxref{Escape}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Rotate angle, Rotate points, Rotate trackball, Rotate
@unnumberedsubsec Rotate angle
@cindex Rotate angle
@cindex Angle rotation
@cindex Initial view (rotation)

The new position of the geometry after the rotation can be defined as the direction
orthogonal to the screen via a pair of angles: 

@enumerate
@item 
The @b{angle in the plane @code{XY}} starting from the @code{X-axis}.
@item 
The @b{elevation angle} from the @code{XY} plane.
@end enumerate

As an example, the initial view (orthogonal to the Z-axis and with the X-axis 
horizontal) can be obtained with:

@example
rotate angle 270 90
@end example

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Rotate points, Rotate center, Rotate angle, Rotate
@unnumberedsubsec Rotate points 
@cindex Rotate points
@cindex Points rotation

This option appears only in the right side commands menu.

The new position of the geometry after the rotation can be defined as the direction
orthogonal to the screen via a pair of points:

@enumerate
@item 
The @b{target point}, the point to look at.
@item 
The @b{view point}, the point to look from.
@end enumerate

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Rotate center, Rotate original view, Rotate points, Rotate
@unnumberedsubsec Rotate center
@cindex Rotate center
@cindex Center (rotation)

The default center of rotation is defined approximately in the center of
the geometry.

If it is desired to change this center, use this command and enter a point
(@pxref{Point definition}). This new rotation center will be maintained until the
next @code{zoom frame} (@pxref{Zoom}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Rotate original view,  , Rotate center, Rotate
@unnumberedsubsec Rotate original view
@cindex Rotate original view

This option, that appears only in the graphical pop-up menu, changes the view
to the original one: screen orthogonal to the Z-axis with the X-axis lying 
horizontally and pointing to the right.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Pan, Redraw, Rotate, View
@section Pan
@cindex Pan (graphical)
@cindex Dynamic pan
@cindex Graphical displacement

@ifset photo
@tex
\multitable
\hbox{
\psfig{figure=icons/m-pan.ps,width=1.93cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/mm-pan.ps,width=2cm,height=0.88cm,angle=0}
}
\end multitable
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-pan.ps,width=2.5cm,height=1cm,angle=0}
}
@end tex
@ifset html
@c@html
@ifhtml
<a name="m-pan.gif"></a>
<a name="mm-pan.gif"></a>
<a name="tb-pan.gif"></a>
<p><img src="icons/m-pan.gif">
<img src="icons/mm-pan.gif"><br><br>
<img src="icons/tb-pan.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Render @| @| @thispage
@end iftex

@itemize @bullet
@item @code{Two points:}
With this command, the location of the geometry is displaced in the graphical
window. To do this, pick two points in the graphical window.
@item @code{dynamic:}
In this case the displacement is made dynamically, moving the mouse horizontally.
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Redraw, Render, Pan, View
@section Redraw
@cindex Redraw (graphical)
@cindex Draw again


@ifset photo
@tex
\multitable
\hbox{
\psfig{figure=icons/m-redraw.ps,width=2.325cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/mm-redraw.ps,width=2cm,height=0.88cm,angle=0}
}
\end multitable
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-redraw.ps,width=1.5cm,height=1cm,angle=0}
}
@end tex
@ifset html
@c@html
@ifhtml
<a name="m-redraw.gif"></a>
<a name="mm-redraw.gif"></a>
<a name="tb-redraw.gif"></a>
<p><img src="icons/m-redraw.gif">
<img src="icons/mm-redraw.gif"><br><br>
<img src="icons/tb-redraw.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This command redraws the geometrical model in the graphical window. For those machines
that include overlays, all the layers that stay underneath are not affected, so the
redraw goes faster and the underneath drawings remain untouched.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Render, Label, Redraw, View
@section Render
@cindex Render
@cindex Illumination

@ifset photo
@tex
\multitable
\hbox{
\psfig{figure=icons/m-render.ps,width=2.325cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/mm-render.ps,width=2cm,height=0.88cm,angle=0}
}
\end multitable
@end tex
@ifset html
@c@html
@ifhtml
<a name="m-render.gif"></a>
<a name="mm-render.gif"></a>
<p><img src="icons/m-render.gif">
<img src="icons/mm-render.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


By using this option, the way of viewing the model changes. There are four
options:

@itemize @bullet
@item 
@code{Normal:} This is the usual way of visualizing. The geometry and mesh are 
viewed including all definition lines.
@item 
@code{Filled:} Solid model with no illumination and lines.
@item 
@code{Flat lighting:} Solid model with flat illumination and lines.
@item 
@code{Smooth lighting:} Solid model with smooth illumination (better quality).
@end itemize

@strong{Note:} The rendering of a volume mesh requires the
option @code{View boundaries} (@pxref{View boundaries}).

@strong{Note:} Quality of visualization is controlled via preferences
(@pxref{Preferences}).

@strong{Note:} The light vector direction can be changed interactively with the
menu option @code{Change Light Vector} inside the menu @code{Utilities} 
(@pxref{Change Light Vector}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Label, Entities, Render, View
@section Label
@cindex Label
@cindex Entities labels

@ifset photo
@tex
\multitable
\hbox{
\psfig{figure=icons/m-label.ps,width=2.185cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/mm-label.ps,width=2cm,height=0.88cm,angle=0}
}
\end multitable
@end tex
@ifset html
@c@html
@ifhtml
<a name="m-label.gif"></a>
<a name="mm-label.gif"></a>
<p><img src="icons/m-label.gif">
<img src="icons/mm-label.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option, the labels of the entities are drawn or not. It is possible to
select some entities or to apply this option to all entities viewed in the 
graphical window.
To select some entities, choose @code{select} before applying on the
@code{Points}, @code{Lines}, @code{Surfaces} or @code{Volumes}. Then, select entities 
in the usual way (@pxref{Entities selection}). Options are:

@itemize @bullet
@item 
@code{All:} All entities in the graphical window will have their labels drawn.
@item 
@code{points,lines,surfaces} or @code{volumes:} If @code{select} is not set, all the
entities in the graphical window will have their labels drawn.
@item 
@code{Off:} Finish drawing labels for all entities.
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Entities, Layers, Label, View
@section Entities
@cindex Entities visualization
@cindex View entities

With this option, it is possible to choose some of the @code{points, lines, surfaces or volumes} to be drawn. It is useful to make drawing faster or clearer in some instances. 
@*@*
@b{Note:} this option is only available in the right buttons menu. (@pxref{User interface})  

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Layers, Save/Read View, Entities, View
@section Layers
@cindex Layers

@ifset photo
@tex
\multitable
\hbox{
\psfig{figure=icons/m-layers.ps,width=2.5cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/mm-layers.ps,width=2cm,height=0.88cm,angle=0}
}
\end multitable
@end tex
@tex
\hbox{
\psfig{figure=icons/m2-layers.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex
@ifset html
@c@html
@ifhtml
<a name="m-layers.gif"></a>
<a name="mm-layers.gif"></a>
<a name="m2-layers.gif"></a>
<p><img src="icons/m-layers.gif">
<img src="icons/mm-layers.gif"><br><br>
<img src="icons/m2-layers.gif"><br><br>
<img src="icons/tb-layers.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset





Layers are a way to split a complex drawing into separate pieces. The idea
is that any entity can belong to one layer or to none (an entity cannot belong to
more than one layer). Then, it is possible
to view only some layers and not others. It is also useful to easily select 
entities in the graphical window.

@ifset photo
@tex
\inifigura
\centerline{\hbox{
\psfig{figure=images/layers.ps,width=4.41cm,height=7.125cm,angle=0}
}}
\unpie{}
{
Layers window operations
}
\finfigura
@end tex

@ifset html
@ifhtml
<center>
<a name="Layers.gif"></a>
<img src="images/Layers.gif"> 
<p>Layers window operations
</center>
<p>
@end ifhtml
@end ifset

@end ifset

Commands related to layers are:

@itemize @bullet
@item 
@code{New:} Creates a new layer. If name is given the layer is called "@code{Layer#}". The new layer will be used as the default layer until the end of the session or until it is changed.
@item
@code{Layer To use:} Selects a layer to be used as default. All the new entities will be 
created within this layer. All the layers are capable of being selected.@*
Next to the @code{Layer To use} button, there's an arrow facing down. This is a menu which lets you select a point, a line, a surface or a volume; the layer to which it belongs that entity, will be set as the default layer.    
@item 
@code{On:} Entities belonging to this layer will be drawn and can be selected in the graphical window.
@item 
@code{Off:} Entities belonging to this
layer will not be drawn and cannot be selected in the graphical window.
@item 
@code{Lock/Unlock (Freeze/Unfreeze):} Entities belonging to this
layer will be drawn but cannot be selected in any way. When copying entities
(@pxref{Copy}) and sharing old entities, entities belonging to frozen layers are
not taken into account and not even a range of numbers (@pxref{Entities selection}) 
can be selected. The opposite command is @code{Unlock}, where the
entities belonging to this layer can be selected, copied and shared.
@item 
@code{Delete:} Deletes a layer. A layer can only be deleted if it has no entities
in it.
@item 
@code{View:} Gives information about the layer.
@item 
@code{Entities:} Moves entities to a new layer. No new entities are 
created. They are only moved from one layer to another. When choosing, in @b{geometry} 
mode, @code{point}, @code{line}, @code{surface}, @code{volume} or @code{all}, option 
@code{all} can be used only to select entities in the graphical window and change all 
the entities in the dynamic box to the new layer. In @b{mesh} mode, it is possible to 
choose @code{nodes}, @code{elements} or @code{all}.
@*
Especial option @code{Also lower entities} permits to send to the layer also the entities
that are lower entities of the selected ones. 
@*
@b{Example:} If this flag is set and one surface is selected, its lines and its points are also sent to the layer.
@item  
@code{To back:} Sends entities to the back of its layer. When an entity is "at the back" it's not visible and cannot be selected, moved, copied or deleted. To bring again the entities of a layer "to the front", select a layer and choose the @code{Bring to front} option, from the @code{To back} menu. There is another option, @code{Bring ALL to front}, which brings to front all entities of all layers. @*
If the flag @code{Opposite} is set, entities which are @b{not} selected will go to the back.    
@item 
@code{Color:} Change color to layer. This color is used when making a render
(@pxref{Render}).
@c @item 
@c @code{Material:} Move all entities that have a particular material number to the layer.
@c It is useful if reading a mesh with materials from outside GiD (@pxref{Mesh read}). 
@item
@code{Sel...:} In the layer window, there is the option @code{select} that allows the selection of several layers. This can be useful when using a large number of layers. After 
pressing @code{Sel...} a new window appears to allow the input of a pattern that will 
match the layer's name. In this pattern, characters @b{*} and @b{?} are wildcards that 
match any characters or character, respectively, in the layer's name. So, the pattern 
@code{select} will match @code{select}, @code{ selection}, @code{ select-surface} and so 
on.  
@item 
@code{Rename:} Changes the name of a layer.
@item 
@code{Close:} Closes the @b{Layers} window.
@end itemize

@strong{Important:} The mesh generation does not depend on the state of
the layers when the generation is performed (@pxref{Layers}). All layers
are meshed and every node and element will be assigned to the layer
where the original geometrical entity was. The only exception to this
rule is for the case of frozen layer if the option @code{No mesh frozen
layers} is selected.




@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Save/Read View, Background image, Layers, View
@section Save/Read View
@cindex Save View
@cindex Read View

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-savereadview.ps,width=3cm,height=1.54cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-savereadview.gif"></a>
<p><img src="icons/m-savereadview.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


These two options permits to save the actual view configuration into a file. Then, that configuration can be loaded using the @code{Read View} command.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Background image, Multiple windows, Save/Read View, View
@section Background Image
@cindex Background Image

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-readimage.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-readimage.gif"></a>
<p><img src="icons/m-readimage.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

An image can be used as background of GiD for visualization purposes (supported image formats are @code{.bmp} and @code{.ppm}). There are the following options:
@itemize @bullet
@item
@b{Fit screen}: an image will be fitted into GiD's background window.
@item
@b{Real size:} the image will not be deformed; the image is placed in a plane. Three points must be entered: two of them to define the line where the bottom line of the image lies, and a stand-up point, which defines the upper direction of the image.
@item
@b{Default}: use this option to use the default background.

@end itemize



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Multiple windows,  , Background image, View
@section Multiple windows
@cindex Multiple windows
@cindex Multiple views
@cindex Views, several

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-multiplewindows.ps,width=3.51cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-multiplewindows.gif"></a>
<p><img src="icons/m-multiplewindows.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Command @code{Multiple windows} permits to have several views of the
same project. Different views can be displayed inside the program main window or in supplementary windows.




@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Geometry, Utilities, View, Top
@chapter GEOMETRY
@cindex Geometry

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

All available geometrical operations, generating or deleting entities and
performing particular options are included in this chapter.
@menu
* View geometry::                       
* Create::                              
* Delete::                              
* Edit::                                
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node View geometry, Create, Geometry, Geometry
@section View geometry
@cindex View geometry
@cindex Geometry view

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-viewgeometry.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-viewgeometry.ps,width=4cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-viewgeometry.gif"></a>
<a name="tb-viewgeometry.gif"></a>
<p><img src="icons/m-viewgeometry.gif"><br><br>
<img src="icons/tb-viewgeometry.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This command changes from mesh visualization to geometry visualization. If mesh doesn't exist, the user is asked to generate it.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Create, Delete, View geometry, Geometry
@section Create
@cindex Create entities

Generation of all the different possible geometrical entities. Usually, the new entities are created
inside the current layer (@pxref{Layers}). 
@menu
* Point creation::                      
* Line creation::                       
* Arc creation::                        
* Arc tangents::                        
* NURBS line creation::                 
* Polyline creation::                   
* Parametric line::                     
* Planar surface creation::             
* 4-sided surface creation::            
* 4-sided surface automatic creation::  
* NURBS surface creation::              
* Volume creation::                     
* Contact creation::                    
* Intersection::                        
* Volume boolean operations::           
* Surface boolean operations::          
* Object::                              
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Point creation, Line creation, Create, Create
@unnumberedsubsec Point creation
@cindex Point creation
@cindex Create point

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createpoint.ps,width=3.51cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-createpoint.gif"></a>
<p><img src="icons/m-createpoint.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Individual points are created by entering each point in the usual way
(@pxref{Point definition}). The point can later be used to join lines to it.

@strong{Caution:} It is impossible to create new points joining 
old ones.

Option @code{Number} Lets the user choose the label that will be
assigned to the next created point. If a point with this number already
exists, the old point changes its number.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Line creation, Arc creation, Point creation, Create
@unnumberedsubsec Line creation
@cindex Line creation
@cindex Line (straight) creation
@cindex Create line
@cindex Create line (straight)

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createline.ps,width=3.51cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-createline.ps,width=2cm,height=1cm,angle=0}
}
@end tex


@ifset html
@c@html
@ifhtml
<a name="m-createline.gif"></a>
<a name="tb-createline.gif"></a>
<p><img src="icons/m-createline.gif"><br><br>
<img src="icons/tb-createline.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


To create a straight line it is only necessary to enter two points 
(@pxref{Point definition}) and continue entering points in order to create more 
lines from the first one. Every part of the total line created is an independent 
line.

It is important to note that when creating lines, new points are also being
created (if not using existing ones).

Option @code{Close} joins the first point and the last point created with a 
straight line and finishes.

Option @code{Undo} undoes the creation of the last point (if new) and the last 
line. It is possible to continue undoing back until the first point.

Option @code{Number} Lets the user choose the label that will be
assigned to the next created line. If a line with this number already
exists, the old line changes its number.

If @code{Join} is chosen, it is maintained for all points until @code{No join} 
is selected.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Arc creation, Arc tangents, Line creation, Create
@unnumberedsubsec Arc creation
@cindex Arc creation
@cindex Create arc 


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createarc.ps,width=3.51cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-createarc.ps,width=2cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-createarc.gif"></a>
<a name="tb-createarc.gif"></a>
<p><img src="icons/m-createarc.gif"><br><br>
<img src="icons/tb-createarc.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset

To create an arc it is necessary to enter 3 points (@pxref{Point definition}) or 
enter a radius and the two tangent lines at the arc ends.

It is important to note that when creating an arc, new points are also being
created (if not using existing ones).

An arc that begins and ends on one of the first or third points defined
is always created. The arc will always contain the second point. This
one is only used as a reference and, if non-existent, it is
automatically erased when the arc is created.

Option @code{Undo} undoes the creation of the last point (if new). It is possible 
to continue undoing back until the first point.

Option @code{By tangents} lets the user input a radius and select two lines
that share one common point. An arc will be then created and the two lines will
be modified to be tangent and continuous with this new arc. This
function is the same than the one defined in (@pxref{Arc tangents}). 

To convert one arc to another one with the same center and in the same plane
but with complementary angle, command @code{Swap arcs} can be used
(@pxref{Swap arcs}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Arc tangents, NURBS line creation, Arc creation, Create
@unnumberedsubsec Arc tangents
@cindex Arc tangents
@cindex Rounded arc 
@cindex Fillet

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createarctangents.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-createarctangets.gif"></a>
<p><img src="icons/m-createarctangents.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


This option lets the user input a radius and select two lines
that share one common point. An arc will be then created and the two
lines will be modified to be tangent and continuous with this new arc.

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Arc creation @| @| @thispage
@end iftex

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node NURBS line creation, Polyline creation, Arc tangents, Create
@unnumberedsubsec NURBS line creation
@cindex NURBS line creation
@cindex Create NURBS line 

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createnurbsline.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-createnurbsline.ps,width=3cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-createnurbsline.gif"></a>
<a name="tb-createnurbsline.gif"></a>
<p><img src="icons/m-createnurbsline.gif"><br><br>
<img src="icons/tb-createnurbsline.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset

NURBS are non-uniform rational B-splines. They are a type of curves
that can interpolate a set of points. NURBS can also be defined by their 
control polygon, another set of points that the curve approximates smoothly.

This command can be used to create a NURBS line in the following two ways.

To create a NURBS, user enters either some interpolated points or
enters the points that form the control polygon (@pxref{Point definition}).

Option @code{Undo} undoes the creation of the last point. It is possible to 
continue undoing back until the first point.

By default, NURBS will be a cubic polynomial passing through all the points. 
However, this option can be changed by calling @code{ByControlPts}, which 
defines NURBS by their control polygon. This polygon is a set of points 
where the first and the last points match the first and last points of the curve. 
The rest of the points do not lie on the curve. It can be assumed that the 
curve approximates the points of the polygon in a smooth way. In this case,
user chooses the degree of the curve that will be the degree of the connected
polynomials that define the NURBS.

When defining interpolating curves, user can choose to define the tangents to 
one or both ends (option @code{Tangents}). These tangents are customizable, 
in the sense that they can either be defined by picking their direction on the 
screen or by considering an existing line as a tangent to the NURBS if it follows 
a previous curve (option @code{ByLine}). The option @code{Next} allows only 
one tangent to be defined.

In this way, it is possible to create a closed NURBS by selecting the initial 
point as the end one, choosing option 'tangent', 'next', and 'ByLine'.

When a NURBS has been created, all the interior points (except the first and last)
are not really entity points unless they previously existed.

Option @code{Number} Lets the user choose the label that will be
assigned to the next created line. If a line with this number already
exists, the old line changes its number.

To enter rational weights to the curve, command @xref{Edit NURBS line}, can
be used.

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Polyline creation, Parametric line, NURBS line creation, Create
@unnumberedsubsec Polyline creation
@cindex Polyline creation
@cindex Create polyline

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createpolyline.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-createpolyline.ps,width=2.5cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-createpolyline.gif"></a>
<a name="tb-createpolyline.gif"></a>
<p><img src="icons/m-createpolyline.gif"><br><br>
<img src="icons/tb-createpolyline.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Polylines are a set of other lines (two, at least) of any type (including polylines 
themselves). 
Every line must share one or two of its endpoints with the endpoints of other lines.

There are two possible ways to create a polyline, either by selecting one line and 
searching the rest until a corner or end is reached or by selecting several lines
(@pxref{Entities selection}). In the case of the latter, the order of selection is not important but all of them must join each other by sharing common points.

Polylines are drawn in green to show the difference between the other lines
which are drawn in blue.

Polylines are widely used when creating 4-sided surfaces 
(@pxref{4-sided surface creation}) and automatic 4-sided surfaces
(@pxref{4-sided surface automatic creation}).

When deleting a polyline, all its lines are also deleted. When exploding 
(@pxref{Explode polyline}), the polyline will disappear and its individual lines 
will appear.

It is not possible to create third level polylines: one former polyline can be 
included inside another, but not the new one.

Option @code{Number} Lets the user choose the label that will be
assigned to the next created line. If a line with this number already
exists, the old line changes its number.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Parametric line, Planar surface creation, Polyline creation, Create
@unnumberedsubsec Parametric line 
@cindex Parametric line


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-parametricline.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<p><img src="icons/m-parametricline.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/parametricline.ps,width=4.42cm,height=4.45cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<img src="images/parametricline.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset


The required input datas are the mathematical formulas of the coordinates X(t), Y(t), Z(t), where 't' is the parameter of the curve, and its value belongs at the interval [ t0-t1 ] 
The curve is created by approximation. That curve is a NURB (Non Uniform Rational B-Spline) which is created with N points. In GiD these kind of curves are created with degree 3 (cubical). 
@*
@*
@b{EXAMPLE} 
@*

We fill the formulas with the expression of a conic helix. That helix starts with radius R0=4 and finishes with radius R1=1, performing N=3 turns from t=0.0 to t=1.0, the height also changes from 0 to H=5.
@*@*

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/exampleparametric.ps,width=7.16cm,height=4.4cm,angle=0}
}}
\unpie{}
{
Example of conic helix with a unique curve or with only points
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<img src="images/exampleparametric.gif"> 
<p>Example of conic helix with a unique curve or with only points</P>
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@tex
\bigskip 
\bigskip 
@end tex 
@ifhtml 
<p><br><br></p> 
@end ifhtml 

@node Planar surface creation, 4-sided surface creation, Parametric line, Create
@unnumberedsubsec Planar surface creation
@cindex Planar surface creation
@cindex Create planar surface
@cindex Surface (planar)

@strong{Note:} Entity planar surface has been substituted by entity
NURBS surface (@pxref{NURBS surface creation}). This entity
automatically detects if boundary lines lie in a plane and create a
planar NURBS.

@strong{Note:} It is possible to access to this deprecated function with
the Right buttons (@pxref{Graphical}).

Planar surface is an entity formed by a closed set of lines, all of them lying
on the same plane. Lines must share endpoints between them.

To create a planar surface, some lines must be selected (@pxref{Entities selection}).
The order of selection is not important but all of them must join each other by 
sharing common points and must form a closed contour. If all lines are not
in the same plane the surface is not created.

It is possible to add holes to a planar surface. To do so, it is first necessary to
create the outside planar surface. After this, press  @code{Hole} button and select 
the created surface. Then, select lines that form every hole, one by one. Finish
with @code{escape} (@pxref{Escape}).
It is also possible to define the surface and holes at the same time, selecting all the curves.

If the surfaces lie on the plane @code{z=0}, the orientation of the surfaces will be 
anti-clockwise in this plane (the normal vector points towards @code{z} positive). 
Otherwise, 
orientation will be arbitrary. This can be checked with the DrawNormals command 
(@pxref{Draw surface normals}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node 4-sided surface creation, 4-sided surface automatic creation, Planar surface creation, Create
@unnumberedsubsec 4-sided surface creation
@cindex Four-sided surface creation
@cindex Create 4-sided surface
@cindex Surface (4-sided)
@cindex Coon's surface
@cindex Three-sided surface creation

@strong{Note:} Entity 4-sided surface has been substituted by entity
NURBS surface (@pxref{NURBS surface creation}). This new entity
has all the functionality of the old one.

@strong{Note:} It is possible to access to this deprecated function with
the Right buttons (@pxref{Graphical}).


A 4-sided surface is an entity formed by a closed set of four lines in the space.
Its mathematical definition is a bilinear Coon's surface. The surface is totally
defined by the shape of the lines, with no information about the interior.
This means that, sometimes, it will be necessary to use more surfaces to obtain a 
good shape definition.

To create a 4-sided surface defined by three lines, it is necessary to divide one
of the lines in two pieces (@pxref{Divide}). Then, the creation of a 4-sided surface is
possible.

To create a 4-sided surface, several lines must be selected (@pxref{Entities selection}). 
The order of selection is not important, but all of them must join each other by 
sharing common points and they must form a closed contour. If the creation is not 
possible, information about the endpoints is displayed in one window.

In order to make one or more lines form parts of a polyline 
(@pxref{Polyline creation}), select the entire polyline as one of the lines 
and GiD will automatically select the piece or pieces of the polyline that are required. 
Using this facility, non-conforming surfaces can be created. This means creating a 
surface by using the entire line on one side of the polyline, and creating more than one 
4-sided surface by using parts of it on the other side.

When selecting more than four lines, GiD will automatically search for all the 
possible 4-sided surfaces that can be created with these lines. This 
allows the creation of many surfaces at the same time.

The button @code{Automatic} is equivalent to @code{4-sided surface automatic creation}
(@pxref{4-sided surface automatic creation}).

If the surfaces lie on the @code{z=0} plane, the orientation of the surfaces will be 
anti-clockwise in this plane (normal vector points towards @code{z} positive). 
Otherwise, the
orientation will be arbitrary. This can be checked with the DrawNormals command
(@pxref{Draw surface normals}).

Option @code{Number} Lets the user choose the label that will be
assigned to the next created surface. If a surface with this number already
exists, the old surface changes its number.

@strong{Caution:} When creating some surfaces at the same time, it is possible
that some undesired surfaces may also be created. It is necessary to check the
surfaces after creation and erase the undesired ones.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node 4-sided surface automatic creation, NURBS surface creation, 4-sided surface creation, Create
@unnumberedsubsec 4-sided surface automatic creation
@cindex Four-sided surface automatic creation
@cindex Create 4-sided surface automatically

Inside this option, GiD creates as many 4-sided surfaces as it can find. Every new
surface will be created either in the current layer.

@strong{Caution:} When creating some surfaces at the same time, it is possible
that some undesired surfaces may also be created. It is necessary to check the
surfaces after creation and erase the undesired ones.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node  NURBS surface creation, Volume creation, 4-sided surface automatic creation, Create
@unnumberedsubsec NURBS surface creation
@cindex NURBS surface creation
@cindex Create NURBS surface
@cindex Automatic NURBS surface
@cindex Parallel lines. NURBS surface
@cindex Trimmed NURBS surface

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createnurbssurface.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-createnurbssurface.ps,width=3.5cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-createnurbssurface.gif"></a>
<a name="tb-createnurbssurface.gif"></a>
<p><img src="icons/m-createnurbssurface.gif"><br><br>
<img src="icons/tb-createnurbssurface.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


NURBS are non-uniform rational B-splines. They are a type of surfaces
defined by their control polygon (one set of points that the surface approximates 
smoothly); one set of knots for the two senses u and v (a non-decreasing list of 
real numbers between 0 and 1) and, optionally, one set of rational weights.

To draw the isoparametric lines in u,v=0.5, check @code{Surface drawing type}
(@pxref{Preferences}).

@itemize @bullet
@item
@code{By contour:} creates a NURBS by their contour lines. GiD calculates 
automatically the interior information of the surface so as to interpolate the
boundaries smoothly.@*@*
To create a NURBS surface, some lines must be selected (@pxref{Entities
selection}). The order of selection is not important but all of them
must join each other by sharing common points and must form a closed
contour. Number of lines must be equal or bigger than one and shape must
be topologically similar to a triangle or a quadrilateral in the space,
for the algorithm to work correctly. This last argument is not necessary
if all the lines lie in one plane. In this case, the surface is created
as a trimmed one and problems about the shape are avoided.

It is possible to select the boundary lines and the boundary lines of
interior holes at the same time, if all the lines belong to a plane.
@*@*
@b{Note:} Option @code{No try planar} (this option is found in the @b{Contextal} mouse menu) avoid the creation of a trimmed NURBS surface when lines are coplanar.
@*
@b{Note:} To enter rational weights to the surface, use command @code{Edit NURBS surface}
(@pxref{Edit NURBS surface}).
@*@*
@item
@code{Automatic:} creates automatically all possible surfaces with
a number of sides given by the user. Every new surface will be created in the current layer.
@*@*
@strong{Caution:} When creating some surfaces at the same time, it is possible
that some undesired surfaces may also be created. It is necessary to check the
surfaces after creation and erase the undesired ones.
@*@*
@c Option @code{Number} Lets the user choose the label that will be
@c assigned to the next created surface. If a surface with this number already
@c exists, the old surface changes its number.

@item
@code{Trimmed:} this option let the user select one existing NURBS surface and
a set of closed lines that are inside the surface. Some of this lines
may belong already to the contour of the existing surface. Some other
lines may be created with an intersection with another surface. Another
new surface will be created without changing the old one. 

It is possible to select the boundary lines and the boundary lines of interior holes at
the same time, if all the lines belong to the surface:

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/trimmed_create.ps,width=8.07cm,height=2.55cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<a name="trimmed_creade.gif"></a>
<img src="images/trimmed_create.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Option @code{Untrimm} (inside the @b{Contextual} mouse menu after selecting a Nurbs surface), constructs one new surface with the selected surface as base and
as contours, the natural contours of the NURBS surface. The resulting surface
is not trimmed.

@*@*
@item
@code{Parallel lines:} permit to create one surface given a set of parallel
lines in the space. The new surface will interpolate all the selected lines.
@*@*
@item
@code{Search:} lets the user select one line and creates one surface that contains this line.

@item
@code{By points/By line points:} these two options are avalaible in the @b{Contextual} mouse menu after the NURBS surface creation tool is selected. @code{By points} creates a NURBS surface from a cloud of points, and @code{By line points} creates a NURBS surface from level curves. This two functions are very useful to create reliefs and terrains. In the image below, a NURBS surface created from level curves: 

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/terrain.ps,width=8.18cm,height=4.33cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<a name="terrain.gif"></a>
<img src="images/terrain.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@b{Note:} This surface only is an  approximation to the selected points/lines, but there's no interpolation.

@end itemize



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Volume creation, Contact creation, NURBS surface creation, Create
@unnumberedsubsec Volume creation
@cindex Volume creation
@cindex Create volume
@cindex Search volume
@cindex Hole volume

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createvolume.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-createvolume.ps,width=2.5cm,height=1cm,angle=0}
}
@end tex


@ifset html
@c@html
@ifhtml
<a name="m-createvolume.gif"></a>
<a name="tb-createvolume.gif"></a>
<p><img src="icons/m-createvolume.gif"><br><br>
<img src="icons/tb-createvolume.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


A volume is an entity formed by a closed set of surfaces that share their lines
between them.

To create a volume, some surfaces must be selected (@pxref{Entities selection}).
The order of selection is not important but all of them must join each other by 
sharing common lines and they must form a closed contour. 

If there is an error and the volume is not created, helpful information is
displayed in one window.

It is possible to add holes to a volume. To do so, it is first necessary
to create the outside and the interior volumes as independent
volumes. After this, push @code{Hole} button and select the outside
volume. Then, select the interior volumes that form every hole, one by
one. Finish with @code{escape} (@pxref{Escape}).

Orientation of volumes and their surfaces is automatically set to facilitate a correct 
meshing.

An additional feature allows the selection of surfaces that form the
outer part of the volume as well as the ones that form the holes at the
same time. In this case, GiD automatically recognizes the holes.

Option @code{Search} lets the user select one surface and create one of
the volumes that contains this surface.


@menu
* Automatic 6-sided volumes::           
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Automatic 6-sided volumes,  , Volume creation, Volume creation
@unnumberedsubsubsec Automatic 6-sided volumes
@cindex Automatic volume
@cindex Volume automatic

This option creates all possible volumes that have 6 sides. It can be applied
several times over the geometry and volumes are not repeated.

It can be useful for structured meshing (@pxref{Structured mesh}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Contact creation, Intersection, Volume creation, Create
@unnumberedsubsec Contact creation
@cindex Contact creation
@cindex Create contact

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createcontact.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-createcontact.gif"></a>
<p><img src="icons/m-createcontact.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


Contact surfaces or contact volumes are defined between two lines or two surfaces that 
are physically in the same place but with different entities as surfaces, lines 
and points. From a contact surface, it is possible to generate contact elements 
or algorithms that define special contact between two bodies.

Those surfaces that have been generated from another one, although not 
physically in contact, or simply, identical surfaces separated by a movement,
can obtain equal meshes from this option, ensuring a one-to-one relationship
between nodes.

It is necessary to choose @code{contact surface} or @code{contact volume} to create 
contact surfaces. The first one is between lines and the second one is between surfaces. 
After this, it is necessary to choose lines in the first case and surfaces in the second.
GiD automatically searches possible contacts combining selected surfaces in pairs.

Contact elements are, by default, 4-node planar quadrilaterals for surfaces and 
8-node hexahedra or 6-node prisms (depending on the geometry) for contact volumes.

However, the user can select 2-node lines for all cases (@pxref{Element type}).

The 4-node planar quadrilaterals can be converted to the 8-node or
9-node for the quadratic case.

The user can also select @code{no mesh} for the contact entity. This makes it possible to have 
exactly the same mesh in both lines or both surfaces but without  any additional element.

When creating the contact volumes, GiD internally checks what surfaces
occupy the same location in the space and creates the contact, therefore there is no
need to specify what surfaces have to be in contact. For this reason, several
surfaces can be selected at once and GiD performs the contact automatically,
indicating the number of contact volumes that have been generated.

For contact surfaces, however, the two lines in contact have to be specified. 

A feature in GiD is the option of creating @code{contact separated volumes} for
surfaces that are not physically in contact.

For these separated volumes, GiD internally checks whether there exists a unique solid-rigid 
movement between two surfaces and creates the contact between both. There is the 
possibility of the existence of more than one solid-rigid movement between two of them. 
In this situation, GiD asks for the point image of a particular original point to define 
the movement and, consequently, applies the right contact.

The same considerations about element type for @code{contact volumes} are used.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node  Intersection, Volume boolean operations, Contact creation, Create
@unnumberedsubsec Intersection
@cindex Intersection

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createintersection.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-createintersection.gif"></a>
<p><img src="icons/m-createintersection.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@menu
* Intersection line-line::              
* Intersection multiple lines::         
* Intersection Surface 2 points::       
* Intersection Surface lines::          
* Intersection Surface surface::        
* Intersection Multiple surfaces::      
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node  Intersection line-line, Intersection multiple lines, Intersection, Intersection
@unnumberedsubsubsec Intersection line-line
@cindex Intersection line-line
@cindex Line-line intersection

With command @code{Intersect lines}, two lines must be selected.  GiD
searches the closest points between the two lines. If the lines do not
intersect, GiD determines the distance between the two closest points,
draws both points and asks for confirmation. Otherwise, the new point
will be the intersection point. If confirmed, the two lines are
converted into four and the second point is moved to the one in the
first line and converted into a unique point (if interior points of one
or two of the lines coincide with endpoints, only two or three new lines
are created). Polylines cannot accept this option.

Option @code{No divide lines} creates the intersection point but do not modify
the lines.

@code{Note:} This option can be used to extend one line until reaching the other
line.

@strong{Caution:} Second selected line can have higher entities  only if
it is not necessary the extension of this line.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node  Intersection multiple lines, Intersection Surface 2 points, Intersection line-line, Intersection
@unnumberedsubsubsec Intersection multiple lines
@cindex Intersection multiple lines
@cindex Multiple lines intersection
@cindex Lines intersection (Multiple)

This option lets the user select several lines. Then, it tries to find as many
intersection points between them as possible. Lines are divided when applicable.

Option @code{No divide lines} creates the intersection point but do not modify
the lines.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Intersection Surface 2 points, Intersection Surface lines, Intersection multiple lines, Intersection
@unnumberedsubsubsec Intersection Surface 2 points

User must select one surface and two points that lie approximately
over the surface. GiD calculates the line intersection between the surface
and a plane defined by the two given points and the average normal to the 
surface in these points.

@code{Note:} Planar surfaces can not be used with this option.

@code{Note:} @xref{Option point in line}, or @xref{Option point in surface}, can be used 
to define the points.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Intersection Surface lines, Intersection Surface surface, Intersection Surface 2 points, Intersection
@unnumberedsubsubsec Intersection Surface lines
@cindex Intersection surface lines
@cindex Surface-lines intersection
@cindex Lines-surface intersection

User must select one NURBS surface and several lines. GiD calculates the 
intersection between the surface and the lines. Lines will be divided in the
intersection point.

Option @code{No divide lines} creates the intersection point but do not modify
the lines.

Option @code{Extend} Divide lines and also extends lines until they reach the
surface.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Intersection Surface surface, Intersection Multiple surfaces, Intersection Surface lines, Intersection
@unnumberedsubsubsec Intersection Surface surface
@cindex Intersection Surface surface
@cindex Surface surface intersection

This command creates the intersection lines between two surfaces. If these lines
intersect surfaces contour lines, these are divided.

Option @code{No divide lines} creates the intersection point but do not modify
the contour lines.

Option @code{No divide surface}. By default the surfaces are divided, unless this option is selected.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Intersection Multiple surfaces,  , Intersection Surface surface, Intersection
@unnumberedsubsubsec Intersection Multiple surfaces
@cindex Intersection Multiple surfaces
@cindex Multiple surfaces intersection

This command creates the intersection lines between surfaces. 


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Volume boolean operations, Surface boolean operations, Intersection, Create
@unnumberedsubsec Volume boolean operations 
@cindex Volume boolean operations
@cindex Boolean volume operations
@cindex volume intersection
@cindex intersection volume volume

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createboolean.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-createboolean.gif"></a>
<p><img src="icons/m-createboolean.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


The GiD Volume Boolean Modeler has been designed to accomplish geometric feats
as physically punching a hole trough a volume, combining two volumes
into one and creating a new volume from the intersecting points of two
separate volumes.

The valid volume boolean operations are: 
@example
@end example
@itemize @bullet
@item @code{union}: fuses two volumes wherever they intersect to create a single, more complex volume.
@item @code{intersection}: creates a volume based on the intersecting points of two separate volumes.
@item @code{substraction}: negates a specific portion of a volume to create a hole or indentation.
@end itemize

User must select the two volumes (order is important in substraction).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Surface boolean operations, Object, Volume boolean operations, Create
@unnumberedsubsec Surface boolean operations 
@cindex Surface boolean operations
@cindex Boolean surface operations
@cindex surface intersection

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createsurfboolean.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-createsurfboolean.gif"></a>
<p><img src="icons/m-createsurfboolean.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

User must select the two 2D surfaces located in the XY plane (order is important in substraction).

The valid surface boolean operations are: 
@example
@end example
@itemize @bullet
@item @code{union}: fuses two surfaces wherever they intersect to create a single, more complex volume.
@item @code{intersection}: creates a surface based on the intersecting points of two separate volumes.
@item @code{substraction}: negates a specific portion of a surface to create a hole or indentation.
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Object,  , Surface boolean operations, Create
@unnumberedsubsec Object
@cindex Circle
@cindex polygon
@cindex sphere
@cindex cilynder
@cindex cone
@cindex prism

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-createobject.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-createobject.ps,width=2.5cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml


<a name="m-createobject.gif"></a>
<a name="tb-createobject.gif"></a>
<p><img src="icons/m-createobject.gif">
<img src="icons/tb-createobject.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


With this command it is possible to create several objects which are:

@itemize @bullet 
@item Rectangle
@item Circle 
@item polygon 
@item sphere 
@item cilynder 
@item cone 
@item prism 
@item thorus
@end itemize 

 
When creating an object, GiD asks for a center and a normal. To enter the coordinates of the center you can click on the screen or select an existing point (@pxref{Point definition}). To enter the normal, GiD displays a window where you can choose one of the three axes or enter the coordinates of a point.   

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/enter_normal.ps,width=3.64cm,height=3.4cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<a name="enter_normal.gif"></a>
<img src="images/enter_normal.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

@c Most of this commands ask for a normal to define the base plane to
@c create the object. This can be obtained with  @xref{Option tangent in
@c line}, or @xref{Option normal in surface}, among other possibilities.

The button @b{In screen} of the @code{Enter normal} window, lets you manually enter the coordinates of the point which defines the normal: you can directly click on the screen or pick an existing point using the option @b{Join C-a} of the @b{Contextual} mouse menu. 

When using the commands @code{sphere}, @code{cilynder}, @code{cone}, 
@code{prism} or @code{torus} the volume of the object is also created.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Delete, Edit, Create, Geometry
@section Delete
@cindex Delete entities
@cindex Erase entities

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-delete.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/tb-delete.ps,width=1.5cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-delete.gif"></a>
<a name="tb-delete.gif"></a>
<p><img src="icons/m-delete.gif"><br><br>
<img src="icons/tb-delete.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset



@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Delete @| @| @thispage
@end iftex

The deletion of entities can be done in two ways: at one level (@code{point}, 
@code{line}, @code{surface} or @code{volume}) or erasing all entities at once. A 
selection is made (@pxref{Entities selection}) in both cases. After pressing 
@code{escape} (@pxref{Escape}), the entities are erased.

To avoid erasing the selected entities, press @code{Clear selection}.

Entities which depend on higher entities, cannot be erased. For example, if a 
surface is created
over some lines, it is necessary to erase the surface before erasing the lines.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Edit,  , Delete, Geometry
@section Edit
@cindex Edit entities

There are some particular editing options for geometrical entities:

@iftex
@itemize @bullet
@item Move point                  
@item Explode polyline            
@item Edit polyline  
@item Edit NURBS line
@item Edit NURBS surface
@item Hole NURBS surface
@item Divide                      
@item Join lines end points                 
@item Swap arcs 
@item Edit SurfMesh        
@item Convert to NURBS line       
@item Convert to NURBS surface            
@end itemize
@end iftex

@menu
* Move point::                          
* Explode polyline::                    
* Edit polyline::                       
* Edit NURBS line::                     
* Edit NURBS surface::                  
* Hole NURBS surface::                  
* Divide::                              
* Join lines end points::               
* Swap arcs::                           
* Edit SurfMesh::                       
* Convert to NURBS::                    
* Simplify NURBS::                      
@end menu

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Move point, Explode polyline, Edit, Edit
@unnumberedsubsec Move point
@cindex Move point

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-movepoint.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-movepoint.gif"></a>
<p><img src="icons/m-movepoint.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


By using this command, an existing point is selected and moved. The new position is 
entered in the usual way (@pxref{Point definition}). If the new position is an
existing point (when using @code{join}), GiD will determine the distance between the
points and ask if they should be joined. If answered @code{yes}, both points are 
converted into one. Lines and surfaces joined to the point are also moved and 
deformed to maintain their links.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Explode polyline, Edit polyline, Move point, Edit
@unnumberedsubsec Explode polyline
@cindex Explode polyline

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-explodepolyline.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-explodepolyline.gif"></a>
<p><img src="icons/m-explodepolyline.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This command lets the user select lines. Lines that are not polylines or have 
higher entities or conditions are rejected. After confirmation, 
the polylines are exploded and converted into their original lines. Polylines
then disappear (@pxref{Polyline creation}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Edit polyline, Edit NURBS line, Explode polyline, Edit
@unnumberedsubsec Edit polyline
@cindex Edit polyline

The command @code{Edit Polyline} allows the user select lines. Lines that are not 
polylines are rejected. It is possible to choose several options for the polylines:

@itemize @bullet
@item @b{Use points:}
When meshing this polyline, there will be at least one node at every point location 
that defines the polyline. These will be the endpoints of interior lines.
@item @b{Not use points:}
When meshing this polyline, the mesh generator ignores the points and therefore, the
nodes will be placed anywhere. This is the default option. Nodes will only be put in 
the position of a point if there is a 4-sided surface over a part of a polyline
(@pxref{4-sided surface automatic creation}).
@item @b{Only points:}
When meshing this polyline, the nodes will only be placed where the geometry points are.
@end itemize

@code{Note:} If one condition is assigned to one interior point of a
polyline (@pxref{Conditions}), one node of the mesh will be placed over
that point.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Edit NURBS line, Edit NURBS surface, Edit polyline, Edit
@unnumberedsubsec Edit NURBS line
@cindex Edit NURBS line
@cindex NURBS line edition

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-editnurbsline.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-editnurbsline.gif"></a>
<p><img src="icons/m-editnurbsline.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/editNurbsLineWin.ps,width=4.27cm,height=4.88cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<a name="editNurbsLineWin.gif"></a>
<img src="images/editNurbsLineWin.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset





Once a NURBS line is selected (use the @b{Pick} button of the @code{Edit NURBS Line} window), it is possible to interactively edit 
its control points (@pxref{NURBS line creation}). Select the control points 
as if they were regular points and enter their new positions in the usual way
(@pxref{Point definition}).

The @code{Influence factor} affects the movement propagation of the neighboring control points.

Options:

@itemize @bullet
@item @b{Fix boundary}
Check olption @code{fix boundary}, if you don't want to move the boundary control points of the untrimmed surface.
@item @b{Insert knot:}
User is asked by a knot value between 0.0 and 1.0 and this is inserted. Program
checks that knot multiplicity is not bigger than order (order=degree+1). As the
number of knots increase, the number of control points also increase. So,
this option can be used to have more points defining the same curve.
@item @b{Degree elevate:}
With this option degree of the curve is elevated by one. The new curve will have
the same shape but with more control points and knots.
@item @b{Change Weight:}
A new positive weight can be introduced for any control point, except the
end points.
@item @b{Cancel weights:}
All weights of the NURBS are converted to 1.0 and the curve is no more
rational.
@item @b{Reparametrize:} 
With the same control points a new curve is calculated to get a better curve with a more uniform parametrization. 

@item @b{Simplify:}
This option converts the curve to a simplified curve, which is an approximation of the original one.  
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Edit NURBS surface, Hole NURBS surface, Edit NURBS line, Edit
@unnumberedsubsec Edit NURBS surface
@cindex Edit NURBS surface
@cindex NURBS surface edition

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-editnurbssurface.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-editnurbssurface.gif"></a>
<p><img src="icons/m-editnurbssurface.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/editNurbsWin.ps,width=4.37cm,height=5.47cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<a name="editNurbsWin.gif"></a>
<img src="images/editNurbsWin.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset




Once one NURBS surface is selected (use the @b{Pick} button of the @code{Edit NURBS Surface} window), it is possible to interactively edit 
its control points (@pxref{NURBS surface creation}). Select the control points 
as if they were regular points and enter their new positions in the usual way
(@pxref{Point definition}).

Options:

@itemize @bullet
@item @b{Insert knot:}
User is asked by a knot value between 0.0 and 1.0 and it is inserted. Program
checks that knot multiplicity is not bigger than order. This option can be
used to have more points defining the same surface.
@item @b{Degree elevate:}
With this option degree of the surface is elevated by one. The new surface will have
the same shape but with more control points and knots.
@item @b{Change Weight:}
A new positive weight can be introduced for any control point, except the
extremes.
@item @b{Cancel weights:}
Converts the weights of all the control points to 1.0
@item @b{Simplify:} Simplifies the surface (if possible) removing the less significant knots.
@item @b{Reparametrize:} Reparametrizes the surface obtaining an optimized surface. When a Nurbs surface is not well parametrized, the mesh has a worse quality.  

@end itemize


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/editNurbs.ps,width=8.33cm,height=6.84cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<a name="editNurbs.gif"></a>
<img src="images/editNurbs.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

The @b{Movement type} menu of the @code{Edit NURBS Surface} window, determines the kind of movement of the selected knots. This movement can be along an axis (X-Axis, Y-Axis, Z-Axis), describing the Normal of the surface (Normal), following the screen movement of the mouse (Screen) or the new location of the knot can be defined introducing the coordinates of a point (Point). 


@code{Note:} Options @code{Insert knot} and @code{Degree elevate} can be chosen
for the @code{u} or the @code{v} parameters direction.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Hole NURBS surface, Divide, Edit NURBS surface, Edit
@unnumberedsubsec Hole NURBS surface
@cindex Hole NURBS surface
@cindex NURBS surface hole

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-holenurbssurface.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-holenurbssurface.gif"></a>
<p><img src="icons/m-holenurbssurface.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This option let the user select one existing NURBS surface and a set
of closed lines that are inside the surface and that form a hole inside it. 
The lines may be created with an intersection with another surface. 
The hole will be added to the existing surface.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Divide, Join lines end points, Hole NURBS surface, Edit
@unnumberedsubsec Divide
@cindex Divide

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-divide.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-divide.gif"></a>
<p><img src="icons/m-divide.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Command @code{Divide}, can be applied either to lines that are not
polylines or to surfaces (trimmed surfaces included). After selecting
the entity, the division can be given in several ways:

@itemize @bullet 
@item @b{Number of divisions:} line will be converted in equally spaced pieces. 
@item @b{Near point:} With this option one point must be selected near the line.
(@xref{Option point in line}, or @xref{Option point in surface}, can be used). 
The line will be divided into two entities near that point.
@item @b{Parameter:} One factor is given between 0.0 and 1.0 and entity will be
divided where the parametric variable takes that value.
@item @b{Relative length:} One factor is given between 0.0 and 1.0 to divide
the line with relative arc length ratio equal to the selected factor. (same concept as
@code{Parameter} if the curve was arc length parameterized).@*@*

If the line is a polyline, the user must choose an existing interior point. The polyline
will be converted into two lines that may or not be polylines.

Polyline division have an option @code{Angle} that permits to divide the polyline
in all the points where the angle between the sublines before and after is bigger
than the given one.
@*
@strong{Caution:} An interior point must belong to level one of a polyline
(@pxref{Polyline creation}).

@*@*
@item @b{Surfaces} @*
@itemize @minus
@item @b{Num divisions:} surface will be converted in equally spaced pieces.
@item @b{Near point:} With this option one point must be selected near the surface. The surface will be divided into two entities near that point.
@item @b{Parameter:} One factor is given between 0.0 and 1.0 and the surface will be divide into two where the parametric variable takes that value.
@item @b{Split:} surface will be divided following the divide lines. These lines must intersect the surface contour. (command: @code{Geometry Edit SplitSurf})

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/split_surface.ps,width=10.55cm,height=3.048cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<a name="editNurbs.gif"></a>
<img src="images/split_surface.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

@end itemize
In the case of surfaces it is necessary to give the division sense
that can be @code{u} or @code{v}. This sense can be previously checked with the
command Edit NURBS Surface. (@pxref{Edit NURBS surface})

@end itemize 


@b{Note:} After the division, the entity disappears and new entities are created.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Join lines end points, Swap arcs, Divide, Edit
@unnumberedsubsec Join lines end points
@cindex Join lines end points

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-joinlinesendpoints.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-joinlinesendpoints.gif"></a>
<p><img src="icons/m-joinlinesendpoints.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With command @code{Join lines end points}, two lines must be selected. GiD determines the
distance between the two closest endpoints, draws both points and asks 
for confirmation. If one of the lines is a polyline, interior points are 
also considered. If accepted, the  points are converted into one and the lines are 
deformed. The new point will then take the place of the first line's point.

@xref{Move point}, for another method of converting two points into one.

@strong{Caution:} Second selected line cannot have higher entities (second point is 
moved to first).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Swap arcs, Edit SurfMesh, Join lines end points, Edit
@unnumberedsubsec Swap arcs
@cindex Swap arcs
@cindex Arcs (swap)

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-swaparcs.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-swaparcs.gif"></a>
<p><img src="icons/m-swaparcs.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


This command lets the user select and alter arcs. Lines that are not arcs
are rejected. After confirmation, the arc is converted to a new arc with
the same center and in the same plane but opposite the old one. The old
arc disappears and the angle of the new arc will be supplementary to the angle of the old arc.

@strong{Caution:} Arcs with higher entities cannot be swapped.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Edit SurfMesh, Convert to NURBS, Swap arcs, Edit
@unnumberedsubsec Edit SurfMesh
@cindex Edit SurfMesh
@cindex SurfMesh edition

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-editsurfmesh.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-editsurfmesh.gif"></a>
<p><img src="icons/m-editsurfmesh.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


User must select one or several surface meshes (@pxref{Read surface mesh}).
Options are:

@itemize @bullet
@item @b{Draw mesh:}
Surface will be drawn as a mesh.
@item @b{No draw mesh:}
Surface will be drawn as a regular surface. With magenta lines close to the
boundary lines.
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Convert to NURBS, Simplify NURBS, Edit SurfMesh, Edit
@unnumberedsubsec Convert to NURBS line
@cindex Convert to NURBS line
@cindex NURBS line conversion

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-converttonurbs.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-converttonurbs.gif"></a>
<p><img src="icons/m-converttonurbs.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This option converts the selected lines or surfaces to NURBS lines or NURBS surfaces.@*
@b{Note:} Some algorithms only work with NURBS entities.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Simplify NURBS,  , Convert to NURBS, Edit
@unnumberedsubsec Simplify NURBS
@cindex Simplify NURBS

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-simplifynurbs.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-simplifynurbs.gif"></a>
<p><img src="icons/m-simplifynurbs.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This option converts the selected NURBS lines or surfaces to other ones
very similar to the originals but with and easier definition. It can be
useful for imported data that is defined with a too complex control
polygon and displays or is meshed too slow.



@node Utilities, Data, Geometry, Top
@chapter UTILITIES
@cindex Utilities

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

Within @code{Utilities} there are included some commands that provide information or 
allow actions over both the geometry and the mesh. Others can act over the whole project.

@menu
* Preferences::                         
* Renumber::                            
* Calculator::                          
* Id::                                  
* Signal::                              
* List::                                
* Status::                              
* Distance::                            
* Draw line normals::                   
* Draw surface normals::                
* Copy::                                
* Move::                                
* Repair::                              
* Collapse::                            
* Uncollapse::                          
* Undo::                                
* Comments::                            
* Graphical::                           
* Coordinates window::                  
* Read batch window::                   
* Clip planes::                         
* Save configuration file::             
* Perspective::                         
* Change Light Vector::                 
* Macros window::                       
* Selection window::                    
* Animate controls::                    
* Dimensions::                          
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Preferences, Renumber, Utilities, Utilities
@section Preferences
@cindex Variables
@cindex Preferences
@cindex Settings

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-preferences.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@tex
\hbox{
\psfig{figure=icons/tb-preferences.ps,width=2.5cm,height=1cm,angle=0}
}
@end tex



@ifset html
@c@html
@ifhtml
<a name="m-preferences.gif"></a>
<a name="tb-preferences.gif"></a>
<p><img src="icons/m-preferences.gif"><br><br>
<img src="icons/tb-preferences.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@b{Note:}There are some pre-definitions or ways of working that can be set in GiD. They can be 
set in two ways: via the Preferences window or with the @code{Preferences} command. 
In the following description, the different Preferences options are shown, giving 
their associated variables.

The first group of @b{Preferences} (general preferences) is used to set different ways of working with GiD:
@*@*
@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/Preferences_gen.ps,width=4.62cm,height=9.65cm,angle=0}
}}
\unpie{}
{
General preferences
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<img src="images/Preferences_gen.gif"> 
<p>General preferences</p></center><p>
@end ifhtml
@end ifset

@end ifset



@itemize @bullet
@item
@code{Splash window:} If this option is set, when program is open again,
a welcome window is displayed. Variable: @code{SplashWindow}. Values: 
1,0. Default is 1 (@code{Yes}).
@item
@code{Create new point:} It alters the way how the points are entered in GiD
(@pxref{Point definition}). Options are:
@itemize @minus
@item
@code{Always:} If trying to create a new point in the vicinity of an existing one, the
new point is always created.
@item
@code{Ask:} If trying to create a new point in the vicinity of an existing one, GiD asks
the user whether to make use of the existing point or create a new one.
@item
@code{Never:} Only allows to select existing points. It can be changed
interactively  when in creation point mode by setting @code{No join} until all 
points are entered. 
@end itemize 
Variable: @code{CreateAlwaysNewPoint}. Respective values: 1,0,-2. Default is 
0 (@code{Ask}).
@item
@code{Display coordinates:} If set, GiD shows the coordinates in the graphical window. 
Variable: @code{DisplayCoordinates}. Values: 1,0. Default is 1 (@code{Yes}).
@item
@code{Automatic redraw:} If this option is not set, redraws caused by window expositions,
or by internal functions are not performed. This avoids spending a lot of time for
large models. Variable: @code{AutomaticRedraw}. Values: 1,0. Default is 1 (@code{Yes}).
@item
@code{Use more windows:} Depending on the selected field, @code{yes}, @code{no} or
@code{beginner}, some options are asked to the user inside a new window or with a
message in the regular messages window. Variable: @code{UseMorewindows}. Values: 1,0,2. 
Default is 1 (@code{Yes}).
@item
@code{Backup file:} If this option is set and a model name is given, model is saved
automatically into that model name with the frequency given in the next option.

@strong{Note:} Mesh is not saved into the backup to save time.
Variable: @code{BackUpName}. Default name is @code{backup.gid} in current or temporal
directory.

@item
@code{Backup time:} Number of minutes between each backup save. 0 minutes means
not to save backup.
Variable: @code{BackUpMinutes}. Default is 20 minutes.
@item
@code{Write batchfile:} If this option is set, and a filename is given, all 
commands used during the current session are saved into this file. It can be executed 
later by means of a script file
with the predefined commands to be run in GiD (@pxref{Batch file}).
Variable: @code{BatchFileToWrite}.


@c @item
@c @code{Write rotations in batch:} If this option is set, all dynamic rotations and
@c movements are stored in the batch file. This permits to see these movements when
@c reading this batch file with @xref{Read batch window}.
@c Variable: @code{WriteRotationsInBatch}.
@end itemize 
@*@*
The second group of @b{preferences} (graphical) are used to set different ways of visualizing the model.
They do not change the geometry and the model information. These preferences are:
@*@*
@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/Preferences_graph.ps,width=4.62cm,height=9.65cm,angle=0}
}}
\unpie{}
{
Graphical preferences
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<img src="images/Preferences_graph.gif"> 
<p>Graphical preferences</p></center><p>
@end ifhtml
@end ifset

@end ifset



@itemize @bullet
@item 
@code{Smoothed Elements:} If set and when rendering a mesh (@pxref{Render}),
the intersection between elements with a small angle between their normals will be 
illuminated as if it were
a continuous solid. If not, illumination is made considering every element as planar.
Variable: @code{LightSmoothedElems}. Values: 1,0. Default is 1 (@code{Yes}).
The angle (in degrees) is the maximum angle between normals of two elements to allow
smooth lighting between them. If not, one edge is drawn between them.
Variable: @code{CosSmoothedElems}. Saved as the cosinus of this angle. Default is 0.8.
@c @item 
@c @code{Lighting subdivisions:} When rendering the geometry (@pxref{Render}),
@c this number sets the quality of the illumination. More divisions implies more quality
@c but slower drawing. Variable: @code{NumOfLightingSubdivisions}. Default is 8.
@item  
@code{Surface drawing type:} Lets the user choose how to draw the surfaces when
in wireframe (normal) mode. Options are:
@itemize @minus
@item @code{None:} Surfaces are not drawn.
@item @code{Boundary lines:} One magenta line is drawn for every contour line. This
set of lines have a small offset towards the interior of the surface.
@item @code{Isoparametric lines:} Two yellow lines are drawn for every NURBS surface.
The one for @code{u=0.5} and the one for @code{v=0.5}.
@item @code{Both:} Draws both modes.
@end itemize
@item
@code{Change color:} It is possible to change the default color of
several things in the program with this option. One possibility is to
change the background color of the GiD graphical window. Other
possibilities are the color of the entities in normal mode (no
render). Variable: @code{BackgroundColor}. Value: hexadecimal RGB
char. And others.
@item 
@code{Curve precision:} This option gives the precision used to draw
curves. The internal definition of curves does not change. In the
preferences window, it is possible to dynamically change the drawing of
a curve to test the precision.  Variable:
@code{CurvePrecision}. Values: 1.0 to 0.0 from best to worst.  Default
is 0.8 
@item @code{Surface precision:} This option gives the precision used to
draw surfaces in render mode. The internal definition of surfaces does not
change. Variable:
@code{SurfacePrecision}. Values: 1.0 to 0.0 from best to worst.
Default is 0.6
@item 
@code{Fast rotation:} If set, some options are able to be chosen. These options
will apply only when rotating. Options are:
@itemize @minus
@item 
@code{points,lines,surfaces,volumes:} To draw or not to draw this type of entity
when rotating. Variables: the same. Values: 0,1. Default is 0 (@code{No}).
@item 
@code{Always Geometry:} If set, when viewing the mesh and rotating, the geometry is 
drawn instead. Variable: @code{UseAlwaysGeom}. Values: 0,1. Default is 0 (@code{No}).
@item 
@code{Draw graphic objects:} If not set, when rotating the geometry, some graphical and
temporal objects like normals or materials or conditions symbols are not drawn. 
Variable: @code{DrawGraphicObjects}. Values: 0,1. Default is 1 (@code{Yes}).
@item 
@code{Curve precision:} The same as general item @code{Curve precision}, but applied
only when rotating. Variable: @code{CurvePrecision}. Values: 1.0 to 0.0 from best
to worst. Default is 0.8
@end itemize
Variable: @code{FastRotation}. Value: 0,1. Default is 0 (@code{No}).
@end itemize
@*@*
The third group of @b{preferences} are meshing options:
@*@*
@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/Preferences_mesh.ps,width=4.62cm,height=9.65cm,angle=0}
}}
\unpie{}
{
Meshing preferences
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<img src="images/Preferences_mesh.gif"> 
<p>Meshing preferences</p></center><p>
@end ifhtml
@end ifset

@end ifset



Surface meshers can be:

@itemize @bullet
@item 
@code{Rfast} The most efficient in speed and reliability. With deformed surfaces can
give distorted elements.
@item 
@code{Rsurf} Meshes are generated directly in the space. Quality is better but it is
slower and can fail for distorted surfaces.
@item 
@code{2dumg} Its use is deprecated.
@end itemize

These generators are based on the advancing front generation mesh technique in order 
to improve speed and portability. 

@strong{Note:} GiD can internally try another mesher when one of them fails to generate
the mesh for one surface.

@itemize @bullet
@item 
@code{Mesh until End} If this preference is set, the mesh generator will continue
until end although there are surfaces or volumes that cannot be meshed.
@item 
@code{Automatic correct sizes}  If this preference is set, just when meshing
begins, there is a correction to the meshing sizes assigned to entities so
as to improve meshing.
@end itemize


@itemize @bullet
@item 
@code{Unstructured size transitions:} It controls whether the transitions between different element
sizes are slow or fast.

@item 
@code{Allow automatic structured:} If this preference is set, functions
like @code{Assign sizes by Cordal Error} will define some surfaces as
structured with highly distorted elements over them.
@item
@code{Smoothing:} Options for smoothing to enhance the mesh after the generation. Options are:
@itemize @minus
@item @code{Nomal:} only the standard smooth is performed.
@item @code{HighAngle:} an additional smooth with angle criteria is performed.
@item @code{HighGeom:} an additional smooth with cordal error criteria is performed.
@end itemize
@item
@code{Mesh always by default:} Changes the default meshing criteria. Entities will always be meshed even if they have higuer entities. Example: If surfaces are checked, when meshing a volume, volume elements and surface elements will be obtained.
@end itemize
@*@*
The fourth group of @b{preferences} are the geometry import and collapse options:
@*@*
@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/Preferences_import.ps,width=4.62cm,height=9.65cm,angle=0}
}}
\unpie{}
{
Import preferences
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<img src="images/Preferences_import.gif"> 
<p>Import preferences</p></center><p>
@end ifhtml
@end ifset

@end ifset


@itemize @bullet
@item
@code{Automatic Collapse After Import:} If this option is set, after reading one
IGES file, one global collapse is made. If not, every surface and line will be
independent from each other.
Variable: @code{AutoCollapseAfterImport}. Default is active (1).
@item
@code{Import tolerance:} When importing a file or collapsing, the points closer than this 
distance are considered to be unique (@pxref{IGES read}). Lines and surfaces can
also be collapsed.
Variable: @code{ImportTolerance}. Default is 0.0001.
@item
@code{Collapse}
@itemize @minus 
@item
@code{Ignoring Layers:} entities are collapsed also if they belong
to different layers. 
@item
@code{Each layer separately:} entities in different layers are not collapsed. (Entities belonging to frozen layers are never considered).
Variable: @code{CollapseIgnoringLayers}. Value is 1.
@end itemize
@item 
@code{IGES:Ignore invisible entities:} If this option is set, entities with 'invisible'
flag in an IGES file are ignored. If it is not set, all these entities are sent to a
layer with name: "Invisible".
Variable: @code{IGESIgnoreInvisible}. Value is 1.
@item
@code{IGES: Curve on surface from 3D:} If this option is set, the IGES curves on surface entities are created from the direct 3D space definition (recommended); if the option is not set, IGES curves are created form the surface space parameter definition.
@end itemize 
@*@*
The fifth group of @b{preferences} are the fonts used inside GiD:
@*@*
@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/Preferences_fonts.ps,width=4.62cm,height=9.65cm,angle=0}
}}
\unpie{}
{
Font preferences
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<img src="images/Preferences_fonts.gif"> 
<p>Font preferences</p></center><p>
@end ifhtml
@end ifset

@end ifset





@itemize @bullet
@item 
@code{Normal font:} This is the font normally used inside GiD.
@item
@code{Fixed font:} This font must have the same spacing for every letter. It is used
in places where this property is necessary.
@item
@code{Big font:} Used in some dialog boxes.
@item
@code{Comments font:} Used for comments.
@end itemize


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Renumber, Calculator, Preferences, Utilities
@section Renumber
@cindex Renumber
@cindex Label lists (holes)


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-renumber.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-renumber.gif"></a>
<p><img src="icons/m-renumber.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Renumber @| @| @thispage
@end iftex

When creating new entities, the label of the new entity will be the lowest number
greater than 0 that still does not exist for this entity type. If an
entity is deleted, a gap is left in the label's list. This gap would be filled with new
entities but it is possible to renumber the geometry to change the former entity labels. 
There are no problems with materials and conditions applied to entities.

In @b{geometry} mode, the renumbered entities are the geometrical ones.
In @b{mesh} mode, the renumbered entities are the meshed ones. In this case,
renumbering not only fills the gaps in the labels list but also changes the
node numbers so as to minimize the difference of node numbers within each element.
This can be useful when the calculating module uses band or skyline storage methods. 

@strong{Note:} It is usually not necessary to use this command because it is 
automatically applied when generating the mesh.



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node  Calculator, Id, Renumber, Utilities
@section Calculator
@cindex Calculator

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-calculator.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-calculator.gif"></a>
<p><img src="icons/m-calculator.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/Calculator.ps,width=6.0cm,height=4cm,angle=0}
}}
\unpie{}
{
Vectorial calculator
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<a name="Calculator.gif"></a>
<img src="images/Calculator.gif"> 
<p>Vectorial calculator
</center>
<p>
@end ifhtml
@end ifset

@end ifset

This option opens a scalar and vectorial calculator. It has its own help. Try
button 2 or 3 over one button.

It's possible to transfer scalar and vector and points and distances from and to
the calculator and the main graphical display.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Id, Signal, Calculator, Utilities
@section Id
@cindex Id
@cindex Identity
@cindex Point (show)

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-id.ps,width=2cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-id.gif"></a>
<p><img src="icons/m-id.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


This command gives the label and coordinates of an existing or new point.

Options are:
@itemize @bullet
@item 
@code{Line parameter:} Selecting a line and given the line parameter (t) from
0.0 to 1.0, the point belonging to that line and t is returned. 
@item
@code{Surface parameter:} Selecting a surface and given the surface parameters
(u,v) from 0.0 to 1.0, the point belonging to that surface and u,v is returned. 
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node  Signal, List, Id, Utilities
@section Signal
@cindex Signal entities
@cindex Search entities
@cindex Find entities

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-signal.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-signal.gif"></a>
<p><img src="icons/m-signal.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option, the user can select one entity (point,line surface or volume), 
and a pair of crossed lines in the graphical window signal the center of the entity.

They must be existing entities, except the especial case of point or nodes, where
they can be existing or defined with any of the usual methods.

Option @code{Superpose Lines} is useful when in render mode. Depending
whether it is set or not, lines will be always in front or the object or
they can be partially hidden by the model.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node List, Status, Signal, Utilities
@section List
@cindex List
@cindex Entities informations
@cindex Info entities
@cindex Problem information
@cindex Info problem

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-list.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-list.gif"></a>
<p><img src="icons/m-list.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/List.ps,width=4.0cm,height=6cm,angle=0}
}}
\unpie{}
{
List entities window
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<a name="List.gif"></a>
<img src="images/List.gif"> 
<p>List entities window
</center>
<p>
@end ifhtml
@end ifset

@end ifset

Command @code{List} gives information about the selected entities. This
information is read only.  

If option @code{Mass} is checked, information about physical properties
is given: length of lines, center of masses, area of surfaces, volume of
solids. It works either for the geometry or for the mesh.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Status, Distance, List, Utilities
@section Status
@cindex Status

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-status.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-status.gif"></a>
<p><img src="icons/m-status.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/Status.ps,width=4.0cm,height=6cm,angle=0}
}}
\unpie{}
{
Project status window
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<a name="Status.gif"></a>
<img src="images/Status.gif"> 
<p>Project status window
</center>
<p>
@end ifhtml
@end ifset

@end ifset

Option @code{Status} gives information about useful general data of the project.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Distance, Draw line normals, Status, Utilities
@section Distance
@cindex Distance

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Distance @| @| @thispage
@end iftex

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-distance.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex



@ifset html
@c@html
@ifhtml
<a name="m-distance.gif"></a>
<p><img src="icons/m-distance.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Command @code{Distance} gives the distance between two existing or new points.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Draw line normals, Draw surface normals, Distance, Utilities
@section Draw line normals
@cindex Draw line normals
@cindex Lines sense swap
@cindex Lines normals

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-drawnormalslines.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-drawnormalslines.gif"></a>
<p><img src="icons/m-drawnormalslines.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Command @code{DrawNormals. Lines} draws the sense of the selected lines.

If the line lies on the plane @code{z=0}, apart from the sense, GiD displays
the normal of the line in 2D.

Viewing commands (zoom, rotation, etc.) can be applied and the normals remain on the 
screen.

It is possible to swap the sense of the lines using the options
@code{All swaped} or @code{Swap some}.

Options are:

@itemize @bullet
@item @code{Swap some} changes the sense of the selected lines.
@item @code{All swaped} changes the sense of all lines asking confirmation for the 
change.
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Draw surface normals, Copy, Draw line normals, Utilities
@section Draw surface normals
@cindex Draw surface normals
@cindex Surfaces normals sense swap
@cindex Surfaces normals

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-drawnormalssurfaces.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-drawnormalssurfaces.gif"></a>
<p><img src="icons/m-drawnormalssurfaces.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Command @code{DrawNormals. Surfaces} draws the normals of the selected surfaces.

Surfaces belonging to the plane @code{z=0} will have, by default, its normal
oriented towards the z positive. Then, they are defined as anti-clockwise surfaces in 2D.

It is possible to swap the sense of the normals when the corresponding surfaces
do not belong to higher entities.

Options are:

@itemize @bullet
@item @code{Swap some:} changes the sense of the normals of the surfaces after
selecting them again.
@item @code{All swaped:} changes the sense of all selected surfaces, asking for
confirmation for the change.
@item @code{Swap group:} changes normals of all selected surfaces or elements 
so as all of them have its normal to the same sense that adjacent entities. 
This sense is arbitrary but common to all adjacent entities.
@item @code{Sel by normal:} user is prompt to enter a vector and selection is reduced
to entities that have their normal in the same sense (dot product positive) as the
given normal. 
@item @code{Color:} With this option set, all surfaces are draw with filled color.
Their front side will be drawn with their regular color, and their back face with
yellow.
@end itemize

@strong{Note:} Volumes are correctly oriented by GiD, regardless of their 
surface orientation.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Copy, Move, Draw surface normals, Utilities
@section Copy
@cindex Copy
@cindex Rotation
@cindex Translation
@cindex Mirror
@cindex Scale
@cindex Offset
@cindex Extrude
@cindex Mcopy
@cindex Contact copy
@cindex Entities share

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-copy.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@tex
\hbox{
\psfig{figure=icons/tb-copy.ps,width=3cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-copy.gif"></a>
<a name="tb-copy.gif"></a>
<p><img src="icons/m-copy.gif"><br><br>
<img src="icons/tb-copy.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset



@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/Copy.ps,width=3.3cm,height=7cm,angle=0}
}}
\unpie{}
{
Copy window
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="Copy.gif"></a>
<img src="images/Copy.gif"> 
<p>Copy window
</center>
<p>
@end ifhtml
@end ifset

@end ifset

@code{Copy} is a general function that allows the user select a group of entities
and copy them with a movement that can be @code{translation}, @code{rotation}, 
@code{mirror},@code{scale} or @code{offset}. The process is:

Select the type of entities to copy: @code{point}, @code{line}, @code{surface} 
or @code{volume}, when being in @b{geometry} mode, or option @code{nodes} or 
@code{elements}, when being in @b{mesh} mode. All the lower entities that
belong to the selected ones will be automatically computed.
the type of movement needs to be chosen and 
the parameters for the movement are defined. Options are:

@itemize @bullet
@item
@b{rotation:} It is necessary to either enter two points in 3D or one point in 2D. 
These two points define the rotation axis and its orientation. In 2D, the axis goes 
from the defined point towards z positive. Enter the angle of rotation in degrees. It 
can be positive or negative. The sense is defined by the right hand rule. In 2D, the 
sense is counter-clockwise.
@item 
@b{translation:} It is defined by two points. Relative movements can be obtained
defining the first point as 0,0,0 and considering the second point as the translation
vector (@pxref{Point definition}).
@item 
@b{mirror:} It is defined by three points that cannot be aligned. These points form a 
plane that is the mirror plane. In 2D, the mirror line is defined by two points.
@item 
@b{scale:} It is defined by a center and a point. Every coordinate of the point
is the scale factor for every @code{x,y,z} axis. Scale factor greater than one,
increases size, while less than one decreases the size. It may also be negative,
changing the sign of the corresponding coordinates.
@item 
@b{offset:} It is defined by one positive or negative scalar
magnitude. It will move each entity in the sense of its normal, the
magnitude given. In 2D, normal is considered to lie in the @code{z=0}
plane. This option works either for lines, surfaces or for mesh elements.
@*
@*
@item 
@b{sweep:} This is an option for copying figures along a line (path line). You can just copy the figures (and then specify a number of copies) or extrude them. Both methods have basically the same options.


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/sweep_path.ps,width=3.3cm,height=7cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<img src="images/sweep_path.gif"></center> 
@end ifhtml
@end ifset

@end ifset


The extrusion (and the copy) starts always on the start point of the path line.
If you select 'twist mode' to be on, then the relative position of the figure to copy respect to the start of the path line is conserved along the line.


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/sweep2.ps,width=3.3cm,height=7cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<img src="images/sweep2.gif"></center> 
@end ifhtml
@end ifset

@end ifset

In a non-planar curve, there is not only curvature, but also torsion. This may cause some unexpected behavior, because the figure has also a rotation along tangent direction of path:

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/sweep3.ps,width=3.3cm,height=7cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<img src="images/sweep3.gif"></center> 
@end ifhtml
@end ifset

@end ifset





Next it's used 'XY plane' option, that makes certain initial vector to remain in this plane during extrusion. (In this example, axis is Z).


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/sweep4.ps,width=3.3cm,height=7cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<img src="images/sweep4.gif"></center> 
@end ifhtml
@end ifset

@end ifset

Option 'ByDer2' uses the second derivate of the path line as a normal to the plane in which that initial vector have to remain.

A rotation along the path line can be forced using 'Angle' parameter (degrees):

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/sweep5.ps,width=3.3cm,height=7cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<img src="images/sweep5.gif"></center> 
@end ifhtml
@end ifset

@end ifset

Finally, if path line is a polyline, then the extrusion will be divided in several parts:


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/sweep6.ps,width=3.3cm,height=7cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<img src="images/sweep6.gif"></center> 
@end ifhtml
@end ifset

@end ifset





@end itemize

Other available options are:
@itemize @bullet
@item 
@b{extrude:} This option can be set to either lines or surfaces or
volumes. When a movement is selected, the copy is made and lines
connecting the old and the new points are created.  These lines will be
either straight lines or arcs depending on the movement type.  If
extrude surface is chosen, NURBS surfaces connecting old and new lines
will also be created. If @code{Volumes} is chosen, the volume contained between old and
new surfaces is also created. This option is not allowed when copying volumes.
@item 
@b{mcopy:} Selecting this option and giving the number of repetitions, the operation
selected is performed this number of times. This option is not available for 
@code{mirror}.
@item 
@b{create contacts:} Creates separated contact volumes (@pxref{Contact creation})
for every copied surface. This option is only available when copying surfaces.
@item 
@b{Duplicate entities:} If this option is not set, when an entity after the @code{copy}
operation occupies the same position than an existing one that does not belong to
a frozen layer, both entities are converted into one.
@end itemize
@b{Mantain layers:} If this option is not set the new entities created will be placed in the layer to use; otherwise, the new entities are copied to the same layers as their originals.
 


@strong{Note:} Entities belonging to a frozen layer (@pxref{Layers}), are not checked
when sharing old entities.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Move, Repair, Copy, Utilities
@section Move
@cindex Move

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-move.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-move.gif"></a>
<p><img src="icons/m-move.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Move @| @| @thispage
@end iftex

This command works like the command @code{Copy} but moves the entities instead of 
copying  them. The program checks automatically if some of the entities must be copied
instead of moved (for this reason, these entities belong also to non-selected
entities of higher level) and performs the corresponding operation.

Options like @code{Extrude}, @code{Multiple copy} and @code{Create contacts} are
disabled for movements.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Repair, Collapse, Move, Utilities
@section Repair
@cindex Repair

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-repair.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-repair.gif"></a>
<p><img src="icons/m-repair.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

This option checks the coherence of the database information. Only use it if 
there are problems. When used, a window notifies repaired items and may give
some warnings about incorrect entities.



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Collapse, Uncollapse, Repair, Utilities
@section Collapse
@cindex Collapse

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-collapse.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-collapse.gif"></a>
<p><img src="icons/m-collapse.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

The function  @code{Collapse} convert coincident entities or entities that are 
close each other into one.

The variable @code{ImportTolerance} (@pxref{Preferences}), controls the maximum
distance between two adjacents points to be converted into one. With lines
and surfaces, a maximum distance between both entities is calculated and
when it is less than @code{ImportTolerance}, they are converted into one.

Select the type of entities: @code{point}, @code{line}, @code{surface} 
or @code{volume}, when being in @b{geometry} mode. All the lower entities that
belong to the selected ones will be automatically computed. After pressing 
@code{escape}, collapse is performed.

Option @code{Model} performs the operation over all the entities of the model.

@*
@*
@b{COLLAPSING MESH:}

When a mesh is created the collapse menu changes and it's possible to collapse edges, nodes, elements or the entire mesh. 
@itemize @bullet
@item @b{Collapse edges} joins nodes which are connected by edges shorter than the Import Tolerance value. 
@item @b{Collapse nodes} asks you to select some nodes. The nodes which are closer than the Import Tolerance value, are collapsed.
@item @b{Collapse elements} asks you to select some elements. Then, the nodes of these elements which are closer than the Import Tolerance value, are collapsed.
@item @b{Collapse mesh} collapses all the nodes of the mesh.  
@end itemize

@strong{Note:} Entities belonging to a frozen layer (@pxref{Layers}), are not checked
when collapsing. 

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Uncollapse, Undo, Collapse, Utilities
@section Uncollapse
@cindex Uncollapse

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-uncollapse.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-uncollapse.gif"></a>
<p><img src="icons/m-uncollapse.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Function uncollapse permits the user to select either lines or surfaces
and duplicate boundary entities.

Typically, if two surfaces share one line as an edge, after applying this
function to both surfaces, that line will be duplicated and every line will
belong to a different surface.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Undo, Comments, Uncollapse, Utilities
@section Undo
@cindex Undo

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-undo.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-undo.gif"></a>
<p><img src="icons/m-undo.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/Undo.ps,width=3.2cm,height=6cm,angle=0}
}}
\unpie{}
{
Undo window
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<a name="Undo.gif"></a>
<img src="images/Undo.gif"> 
<p>Undo window
</center>
<p>
@end ifhtml
@end ifset
@end ifset

This command allows the user undo any previous commands executed since the last time 
the project was saved or read. To do this, the user must select in the undo window 
the set of commands that have to be undone.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Comments, Graphical, Undo, Utilities
@section Comments
@cindex Comments

This facility is included to add comments to the pictures obtained through GiD
(@pxref{Print to file}). Three lines are allowed and with the @code{Comments} button
the user can impose their printing on the screen to foresee mistakes or perform 
changes before printing.

All the comment lines have their corresponding input button and the literal
text, written into the command line between double-quotes, will be the output.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Graphical, Coordinates window, Comments, Utilities
@section Graphical
@cindex windows state

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-graphical.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-graphical.gif"></a>
<p><img src="icons/m-graphical.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

In this menu there are some options to change the windows appearance. They can be
inside another window or independent or disappear. Windows are:

@itemize @bullet
@item 
@b{Toolbars:} Selecting this option the following window appears:
@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/ToolbarsWindow.ps,width=3.0cm,height=4.0cm,angle=0}
}}
\unpie{}
{
Toolbars view and position configuration window
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<a name="ToolbarsWindow.gif"></a>
<img src="images/ToolbarsWindow.gif"> 
<p>Toolbars view and position configuration window
</center>
<p>
@end ifhtml
@end ifset
@end ifset

With this window the position: inside, outside, top left, bottom right, etc. 
of following item can be configured, or siwtched on and off.

@itemize @minus

@item 
@b{Geometry & View bar} and @b{Standard bar}: icon toolbars used to perform 
certain operations. Use middle or right button over an icon to get help.
@item 
@b{Right buttons:} These are the buttons that appear usually in the right side
of the windows. They can perform most of the actions of the program.
@item 
@b{Command line:} Inferior line where it is possible to write commands.
@item 
@b{Up menu:} Menus located over the graphical window.
@end itemize

@strong{Note:} To make the @code{Up menu} appear again, shortcut @code{Control-U} or
@code{Control-Shift-u} can be used.


@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Coordinates window, Read batch window, Graphical, Utilities
@section Coordinates window
@cindex Coordinates window
@cindex Point enter window

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-coordinateswindow.ps,width=5.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-coordinateswindow.gif"></a>
<p><img src="icons/m-coordinateswindow.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This option opens a window used to enter points (@pxref{Point definition}).
It can be used in any place where it is possible to enter one point.

To accept one point in this window, press @code{Accept} or press the @code{Return}
key.

Option @code{Coordinate system} allows the user select between:

@itemize @bullet
@item 
@b{Cartesian:} Cartesian coordinate system.
@item 
@b{Cylindrical:} User enters the radius in XY plane, the anti-clockwise angle 
in plane XY from x axe(theta), and the z coordinate.
@item 
@b{Spherical:} User enters the radius, the anti-clockwise angle 
in plane XY from x axe(theta), and the angle with z axe(phi).
@end itemize

Option @code{Local axes} allows the user choose:

@itemize @bullet
@item 
@b{Global:} Global axes.
@item 
@b{Relative center:} User defines a center of coordinates. All new points
created with this window will be related to this center. In the window where
the relative center is entered, user can select with button @code{Pick} a
point from graphical window.
@item 
@b{Relative last:} Last point entered is the relative center of coordinates.
@item 
@b{Define new...:} It allows the user define a new local axes. Once defined, user can 
select it.
@item 
@b{Any local axes:} All local axes defined with @xref{Local axes}, will be
listed here. Points entered will be related to this axes. 
@end itemize

@code{New point} shows the current way of entering points. Button @code{Change}
opens the preferences window (@pxref{Preferences}) where it can be changed.

Button @code{Pick} allows the user select a point from the window and it is inserted in
the point fields. Then it can be edited and used.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node  Read batch window, Clip planes, Coordinates window, Utilities
@section Read batch window
@cindex Read batch window
@cindex batch window

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-readbatchwindow.ps,width=5.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-readbatchwindow.gif"></a>
<p><img src="icons/m-readbatchwindow.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

A batch file can be read to execute some functions (@pxref{Batch file}) or
to create an animated view of these operations. This latter case can be performed
with the @code{Read batch window}.

@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/ReadBatch.ps,width=4.6cm,height=6.0cm,angle=0}
}}
\unpie{}
{
Read batch window
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<a name="ReadBatch.gif"></a>
<img src="images/ReadBatch.gif"> 
<p>Read batch window
</center>
<p>
@end ifhtml
@end ifset

@end ifset

Once selected a file, it is possible to execute it interactively and make it stop
in some interesting parts. To allow all the movements (rotations and so on) be
executed in the same way that originally, option @code{Write rotations in batch:}
must be set in preferences (@pxref{Preferences}), when creating the batch.

There are several ways to stop the running batch. One of them is to include stops in
the show file section with the @code{Mark break} button, and selecting 
@code{Internal stop}. This marks can be saved in the batch file with button
@code{Write...}.

Option @code{Show info} lets the program write all the usual messages in the GiD
messages window.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node  Clip planes, Save configuration file, Read batch window, Utilities
@section Clip planes
@cindex Clip planes
@cindex Hide drawing regions

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-clipplanes.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-clipplanes.gif"></a>
<p><img src="icons/m-clipplanes.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset



@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/ClipPlanes.ps,width=4.0cm,height=7cm,angle=0}
}}
\unpie{}
{
This window allows to hide the front or the back of the view.
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="ClipPlanes.gif"></a>
<img src="images/ClipPlanes.gif"> 
<p>This window allows to hide the front or the back of the view.
</center>
<p>
@end ifhtml
@end ifset

@end ifset

Clip planes is a way not to draw the geometry or mesh that is very close or
very far to the viewer.

Moving @code{Near plane}, hides the geometry that is closer to the viewer.
Moving @code{Far plane}, hides the geometry that is further to the viewer.

To see the changes dynamically, select @code{Dynamic update}.
Option @code{Fixed distance}, allows a constant distance between both planes.

A new rotation center can be chosen or selected from the window.

Option @code{Increase boundaries}, increments the ends in the bars of Far
plane and Near plane.

@strong{Note:} All this information is reset when performing a 
@code{zoom frame}.
(@pxref{Zoom}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node  Save configuration file, Perspective, Clip planes, Utilities
@section Save configuration file
@cindex Save configuration file
@cindex Configuration file
@cindex Window Configuration file

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-savewindowconf.ps,width=5.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-savewindowconf.gif"></a>
<p><img src="icons/m-savewindowconf.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

It is possible to save a window configuration into a file.
Then if GiD is open again with option -c (@pxref{Invoking GiD}) and this file,
the windows are open in the same place and size.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node  Perspective, Change Light Vector, Save configuration file, Utilities
@section Perspective
@cindex Perspective
@cindex Perspective projection
@cindex Normal projection 

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-perspective.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-perspective.gif"></a>
<p><img src="icons/m-perspective.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@ifset photo
@tex
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/Perspective.ps,width=4.5cm,height=4cm,angle=0}
}}
\unpie{}
{
Perspective window
}
\finfigurafija
@end tex

@ifset html
@ifhtml
<center>
<a name="Perspective.gif"></a>
<img src="images/Perspective.gif"> 
<p>Perspective window
</center>
<p>
@end ifhtml
@end ifset

@end ifset

By default, a model is viewed inside GiD using orthogonal projection.

With this option, it is possible to change to a perspective projection. 
In this mode, the user can choose a distortion factor for the perspective. This can be updated dynamically.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Change Light Vector, Macros window, Perspective, Utilities
@section Change Light Vector
@cindex change light vector
@cindex light

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-changelightvector.ps,width=5.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-changelightvector.gif"></a>
<p><img src="icons/m-changelightvector.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option the user can change the @strong{VECTOR} of the light direction
interactively or just entering the @strong{VECTOR} components on the 
@b{command line}.

Options are:

@itemize @bullet

@item @code{Default Vector:} with this option the ligth direction 
vector changes to its default value.
@item @code{Change Z Sign:} here the user tells the program if the 
light comes from the front of the object, or from behind the object. 
The mouse cursor are changed arcondingly.
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Macros window, Selection window, Change Light Vector, Utilities
@section Macros window
@cindex Macros window
@cindex Sequence of commands
@cindex Keyboard shortcut
@cindex Shortcut, keyboard

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-macros.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-macros.gif"></a>
<p><img src="icons/m-macros.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/MacrosWindow.ps,width=6.00cm,height=5.0cm,angle=0}
}}
\unpie{}
{
Window that allows the creation and recording of macros
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="MacrosWindow.gif"></a>
<img src="images/MacrosWindow.gif"> 
<p>Window that allows the creation and recording of macros
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Window 'Macros' permits to create sequences of commands and give a name
to them. This group of commands can also be recorded from one execution
set inside the program.

It is possible to assign a keyboard shortcut to a given macro.

@strong{Note:} Macros are considered as a user preference and not
related to the active model. So, to transfer a set of macros from one
user to another it is necessary to check the files: @code{gid.ini} or
@code{.gidDefaults}.

@tex 
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Selection window, Animate controls, Macros window, Utilities
@section Selection window
@cindex selection window
@cindex selection filter
@cindex filter window

@ifset photo
@tex
\multitable
\hbox{
\psfig{figure=icons/m-filter.ps,width=5cm,height=0.88cm,angle=0}
}
\tab
\tab
\tab
\tab
\tab
\tab
\hbox{
\psfig{figure=icons/mm-filter.ps,width=4cm,height=0.88cm,angle=0}
}
\end multitable
@end tex
@ifset html
@c@html
@ifhtml
<a name="m-filter.gif"></a>
<a name="mm-filter.gif"></a>
<p><img src="icons/m-filter.gif">
<img src="icons/mm-filter.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


In these functions where the user has to select some entities (creation of
a surface or a volume, copy of entities ...) it is possible to use the selection window. The selection window lets you take control of the selection process.


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/selectionwindow.ps,width=4.05cm,height=4.28cm,angle=0}
}}
\unpie{}
{
Selection window
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="selectionwindow.gif"></a>
<img src="images/selectionwindow.gif"> 
<p>Selection window
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@b{Note:} the option @code{Sel window} is only avalaible in the mouse menu during the selection process.   
@*@*
The selection window has the following options:

@itemize @bullet
@item @code{Select all}: if this option is chosen all entities are selected. If a filter is selected, the filter is applied to all entities.
@item @code{From, To}: this option lets the user select a range of entities. If a filter is selected, the filter is applied only to that range of entities. To see the id numbers of entities, use the @code{Label} command (@pxref{Label}).
@item @code{Mode}: there are three selection modes: 
@itemize @minus 
@item @b{Swap}: if you select an entity which is already selected, the entity deselects, and viceversa.
@item @b{Add}: in this mode it's impossible to deselect an entity. Only new entities are added to the current selection.
@item @b{Rem}: in this mode it's impossible to select an entity. This mode is used to remove entities of the current selection. 
@end itemize  
@item @code{Filter}: if a filter is selected, only the entities that accomplish with the filter criteria will be selected. This menu changes depending on what type of entity is being selected: @*
@itemize @minus
@*
@b{POINTS} @*
@item Higher entities: given a point, number of lines to which it belongs.
@*@*
@b{LINES} @*
@item Higher entities: given a line, number of surfaces to which it belongs.
@item Min. length: selects only the lines which its length is smaller than the given length.
@item Max. length: selects only the lines which its length is biger than the given length.
@item Entity type: type of line
@*@*
@b{SURFACES}@*
@item Higher entities: given a surface, number of volumes to which it belongs.
@item Entity type: type of surface.
@*@*
@b{VOLUMES}@*
@item Entity type: type of volume. 
@*@*
@b{ELEMENTS}@*
@item Bad Min Angle: number of minimum degrees accepted (@pxref{Mesh quality}).
@item Bad Max Angle: number of maximum degrees accepted (@pxref{Mesh quality}).
@item Element type: type of element. (@pxref{Element type}) 
@end itemize 
@*@*
@item @code{Clear}: Clears the current selection.
@end itemize


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Animate controls, Dimensions, Selection window, Utilities
@section Animate Controls
@cindex animate controls

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-animationcontrols.ps,width=5.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-animationcontrols.gif"></a>
<p><img src="icons/m-animationcontrols.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset



@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/AnimateControls.ps,width=3.07cm,height=4.0cm,angle=0}
}}
\unpie{}
{
Animate controls window
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="AnimateControls.gif"></a>
<img src="images/AnimateControls.gif"> 
<p>Animate controls window
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This windows allows the creation of animations while using GiD.
Any of these format can be selected: MPEG, AVI True Color, AVI 15bpp (reduced number of
colors: 32768) and GIF. AVI with MJPEG compression is also supported.
After giving a name and a delay time between frames (for
20 frames per second, a delay of 1/20 = 50 ms. should be entered) the process can start
just clicking on the start button ( @code{film roll and arrow} button), the green
led will change to red.

The user can add frame by frame the pictures he wants into the animation file
just clicking on the @code{film roll and arrow} button.
The option @b{Save redraws} tells GiD to save every redraw automatically into the 
animation file, so no user intervention is needed to store frames.

The animation can be finished at any time just pressing the @code{closed film roll} button,
the red led will change to green.

@strong{Note:} To avoid problems when trying to view an @b{MPEG} format animation in @b{Microsoft Windows},
it is strongly recommended to use the @b{Default} menu to select a 
'standard' size and press the @b{Resize} button. The graphical window will change to this 'standard' size.
After finishing the animation, just selecting @b{Default} on the menu and pressing the @b{Resize} button,
the previous size will be restored.

@strong{Note:} The AVI files with MJPEG compression, can be viewed with @code{xanim} on
Linux and unix machines, and with DirectX 8.x installed in Microsoft Windows machines. 


@node Dimensions,  , Animate controls, Utilities
@section Dimensions
@cindex distance
@cindex angle
@cindex radius

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-dimension.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-dimension.gif"></a>
<p><img src="icons/m-dimension.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With the @code{dimensions} option it's possible to add textual information to your model. That information can be changed of layer or deleted. 

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/dimensions-create.ps,width=9.41cm,height=7.45cm,angle=0}
}}
\unpie{}
{}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="dimensions_create.gif"></a>
<img src="images/dimensions_create.gif"> 
</center>

@end ifhtml
@c@end html
@end ifset
@end ifset

There are the following options: 

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-dimensioncreate.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-dimensionscreate.gif"></a>
<p><img src="icons/m-dimensioncreate.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@itemize @bullet
@item
@b{vertex}: shows the coordinates of a vertex. Click over an existing point and then click where you want the dimension to be written. 
@item
@b{distance}: shows the distance between two points. You'll have to select two points and then click where you want the dimension to be written.
@item
@b{angle}: shows the degrees of an angle. You'll have to select three points and then click where you want the dimension to be written.
@item
@b{radius}: shows the center and radius of an arc. You'll have to select an existing arc and then click where you want the dimension to be written. 
@item
@b{text}: shows a text string defined by the user. Enter the text and click where you want the text to be written. 
@end itemize 
@*@*
@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-dimensiondelete.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-dimensiondelete.gif"></a>
<p><img src="icons/m-dimensiondelete.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Deletes a "dimension". Select the dimension you want to delete and press @b{ESC}. 


@*@*
@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-dimensionedit.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-dimensionedit.gif"></a>
<p><img src="icons/m-dimensionedit.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Select the dimension you want to edit, change the text, and click @b{OK}. 

@*@*
@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-dimensionshowbox.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-dimentionshowbox.gif"></a>
<p><img src="icons/m-dimensionshowbox.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This option lets you change the appearence of a "dimension"; a "dimension" can be drawn with or without a box. Choose @code{ShowBox} @b{on} or @b{off}, select a "dimension" and press @b{ESC}. 










@node Data, Meshing, Utilities, Top
@chapter DATA
@cindex Data

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

All the data that defines the problem and that is managed in the data menus,
depends on the problem type and will change for every different problem
type. The following help will describe the common interfaces to all the
possible data.

Data for a problem is defined by the following parameters: conditions 
(@pxref{Conditions}), materials
properties (@pxref{Materials}), problem data (@pxref{Problem data}) and
intervals data (@pxref{Interval data}) that define the problem. The conditions and
materials have to be assigned to geometrical entities. It is also possible to
define new reference systems (@pxref{Local axes}).

@menu
* Problem type::                        
* Transform problem type::              
* Internet Retrieve::                   
* Conditions::                          
* Materials::                           
* Problem data::                        
* Intervals::                           
* Interval data::                       
* Local axes::                          
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Problem type, Transform problem type, Data, Data
@section Problem type
@cindex Problem type

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-problemtype.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-problemtype.gif"></a>
<p><img src="icons/m-problemtype.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This option permits to select between all installed problem types. When selecting
a new problem type, all information about materials, conditions and other data
parameters that were already selected or defined is lost.

Option @code{Others...} permits to enter one installed problem type or one
that is in the current directory. This last possibility is useful when creating
a new problem type and it cannot be installed until finished.

@strong{Note:} When defining a new problem type, as this is not installed, it must
be selected by other means. One possibility is to use the 'Others...' possibility
in the 'problem types' menu. Another possibility is to use  the following commands
in the right buttons menu or written in the command line: 
@code{data defaults problemtype}.

One problem type is considered to be installed when it is copied to the
GiD executable directory or inside the subdirectory @code{problemtypes} or inside
another subdirectory inside this last.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Transform problem type, Internet Retrieve, Problem type, Data
@section Transform problem type
@cindex Transform problem type
@cindex Actualize problem type

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-transformproblemtype.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-transformproblemtype.gif"></a>
<p><img src="icons/m-transformproblemtype.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This option can be found inside @code{Problem type} menu and is useful
to actualize one model from an old problem type to a newer one that is
similar to the first.

When converting, it tries to maintain all the conditions and materials
assigned to the geometry or mesh. Also, it tries to maintain the rest of
the data.

It will be typically used when a problem type has been updated and is
necessary to use again a model defined with the old version.



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Internet Retrieve, Conditions, Transform problem type, Data
@section Internet Retrieve
@cindex Internet Retrieve
@cindex Update problem type

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-internetretrieve.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<p><img src="icons/m-internetretrieve.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option it's possible to download new problem type's or update existing ones.

@b{Note:} it's necessary to be connected to the internet to use this option.

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/internet_retr.ps,width=9.41cm,height=7.45cm,angle=0}
}}
\unpie{}
{}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<img src="images/internet_retr.gif"> 
</center>

@end ifhtml
@c@end html
@end ifset
@end ifset


Use button @b{Retrieve list} to get the list of available Problem Type's. Then, click on the items of the list and use buttons @b{Module info} and @b{Module news} to get information about them. 

Use button @b{Retrieve module} to download the selected Problem Type. 





@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Conditions, Materials, Internet Retrieve, Data
@section Conditions
@cindex Conditions

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-conditions.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-conditions.gif"></a>
<p><img src="icons/m-conditions.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Assign condition @| @| @thispage
@end iftex

Conditions are all the properties of a problem (except materials), that can be
assigned to an entity.

One example would be the boundary forces and displacement constraints in a solid
mechanic analysis or initial velocities in a CFD analysis. Information about contact
between master-slave nodes can also be considered as @code{conditions}.

@strong{Caution:} If a mesh has already been generated, any change
in the condition assignments, requires to mesh again
to transfer these new conditions to the mesh. If this new generation has not been
made, user will be warned when the data for the analysis is being written.

@menu
* Assign condition::                    
* Draw condition::                      
* Unassign condition::                  
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Assign condition, Draw condition, Conditions, Conditions
@unnumberedsubsec Assign condition
@cindex Assign condition

The condition is assigned to the geometric entities or layers with the given field values.

If assigning from the command @code{Assign Cond}, the option @code{Change} 
allows the definition of the field values. Do not forget to change these values 
before assigning. Option @code{Delete all} erases all the assigned entities of 
this particular condition.

Conditions can be assigned both on the geometry and on the mesh but it is advisable
to assign them on the geometry and the conditions will then be automatically 
transferred to the mesh. If assigned on the mesh, when remeshing, conditions 
are lost.

Conditions that are to be attached to the boundary of the elements, are assigned
to the elements and GiD searches the boundaries of the elements that are boundaries
of the total mesh.

Option @code{Unassign} inside @code{AssignCond}, permits to unassign this
condition. It is also possible to unassign from only certain entities.

@strong{Caution:} If a mesh has already been generated, for any change
in the condition assignments, it is necessary to mesh again.

Some conditions may have a behavior that depends on the type of the chosen axes.
The user can choose whether to use global axes or any of the local axes previously
described with the command @code{Local axes} (@pxref{Local axes}), or, alternatively,
another option of automatic local axes calculations. In this latter case, 
different axes are created
according to the adopted criteria of tangency and orthogonality with the geometry.

The user can apply all graphical functions (@code{zoom}, @code{rotate}, ...) and all
the condition symbols are maintained in active mode in the graphical window until
the user selects @code{escape} or presses @code{Finish} in the conditions window. 

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Draw condition, Unassign condition, Assign condition, Conditions
@unnumberedsubsec Draw condition
@cindex Draw condition

Option @code{Draw all} draws all the conditions assigned to all the entities.
This means to draw a graphical symbol or condition name over
every entity that has this condition.

If one particular condition is selected, it is possible to choose @code{Draw} only
some field. @code{Draw} is like @code{Draw all} but only for one particular
condition. If one field is chosen, the value of this field is written over
all the entities that have this condition assigned.

When the condition has any field referred to the type of axes, the latter can be
visualized by means of @code{Draw local axes}.

Option @code{Draw colors} Draws groups of entities with different colors depending
on the values assigned to them for this condition.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Unassign condition,  , Draw condition, Conditions
@unnumberedsubsec Unassign condition
@cindex Unassign condition

In window mode, command @code{UnAssign} lets the user choose between three 
possibilities:

@itemize @bullet
@item Unassign one condition from some selected entities.
@item Unassign one condition from all the entities that may have
this assigned.
@item Unassign all conditions from all the entities that may have
them assigned.
@end itemize

In command mode @code{UnAssing}, do it for all the conditions. To unassign only 
one condition, use command @code{Delete All} (@pxref{Assign condition}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Materials, Problem data, Conditions, Data
@section Materials
@cindex Materials

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-materials.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-materials.gif"></a>
<p><img src="icons/m-materials.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

For any problem that needs definition of materials, there is a database of 
existing materials
that can be assigned to entities. The user can also create new materials
derived from existing ones and assign them as well.

@strong{Caution:} If a mesh has already been generated, for any change
in the assigned materials, it is necessary to mesh again or assign
the materials directly to the mesh.

@menu
* Assign material::                     
* Draw material::                       
* Unassign material::                   
* New material::                        
* Import/Export material::              
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Assign material, Draw material, Materials, Materials
@unnumberedsubsec Assign material
@cindex Assign material

The material is assigned to the selected entities.

If assigning from a window, every time the assigned material changes, button 
@code{Assign} must be pressed again. 

The user must select the entity where to assign the materials over: @code{line, 
surface or volume} when working in @b{geometry} mode or directly over the 
@code{elements} when working in @b{mesh} mode.

If assigning from the command line, option @code{UnAssignMat} erases all the assignments
of this particular material.

@strong{Caution:} Although a mesh had been already generated, for any change
in the assigned materials, it is necessary to mesh again or assign
the materials directly to the mesh.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Draw material, Unassign material, Assign material, Materials
@unnumberedsubsec Draw material
@cindex Draw material

This option draws a color indicating the selected material for all the entities 
that have the required material assigned. It is possible to draw just one 
material type or alternatively, draw 
all materials. To select some of them use @code{a:b} and all material numbers 
that lie between @code{a} and @code{b} will be drawn.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Unassign material, New material, Draw material, Materials
@unnumberedsubsec Unassign material
@cindex Unassign material

Command @code{Unassign} unassigns all the materials from all the entities. For
only one material, use @code{UnAssignMat} (@pxref{Assign material}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node New material, Import/Export material, Unassign material, Materials
@unnumberedsubsec New material
@cindex New material
@cindex Material (new)

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Problem data @| @| @thispage
@end iftex

When using command @code{NewMaterial}, a new material is created taking an existing
one as a base material. Base material means that the new material will have
the same fields as the base one. Then, all the new values for the fields can be
entered in the command line.

It is possible to redefine an existing material.

To create a new material or redefine an old one in the materials window, write
a new name or the same one and change some of the properties. Then, push 
@code{Accept}.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Import/Export material,  , New material, Materials
@unnumberedsubsec Import/Export material
@cindex Import/Export material

It is possible to import and export materials from the model database to
one external database. Typically, one centralized database of materials
is mantained and every new model gets its properties from there.

@strong{Note:} If it is desired to interchange materials with the
@code{Problem type} database, it is necessary to check that the current
user has enough permissions to read/write in that directory.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Problem data, Intervals, Materials, Data
@section Problem data
@cindex Problem data
@cindex General data

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-problemdata.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-problemdata.gif"></a>
<p><img src="icons/m-problemdata.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Problem data refers to all the data that is general to the problem. 
This means that it is
not related to a geometrical entity and it does not change in every interval
of the analysis.

It can be entered with the command @code{ProblemData} or in the problem data
window.

If entered in a window, the data is not accepted until the  button @code{Accept} is pressed.

This data can be entered before or after meshing.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Intervals, Interval data, Problem data, Data
@section Intervals
@cindex Intervals
@cindex Intervals

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-interval.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-interval.gif"></a>
<p><img src="icons/m-interval.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Intervals are a way to separate some information into several groups. The 
information that can be duplicated for every group
can also be duplicated, if desired. When a new interval is 
defined, it is possible to copy all the new information about conditions, 
assigned to entities or not. 

Therefore, the correct way to work is to define all the conditions first and
afterwards create the new intervals.

Options are:

@itemize @bullet
@item @b{New:}
It is allowed to define as many intervals as desired with this command.
When creating a new one, user can choose whether copy the assigned conditions
or not. To copy them, conditions must already be assigned (@pxref{Conditions}).
@item @b{Current:}
Chooses the current interval to use. Next assigned conditions or interval
data (@pxref{Interval data}), will be considered inside this interval.
@item @b{Delete:}
Deletes one existing interval and all its related data.
@end itemize

These groups called intervals can be used to change some conditions or 
information like increment factor in an incremental analysis.
It may also be useful to define some load states for the same geometry.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Interval data, Local axes, Intervals, Data
@section Interval data
@cindex Interval data

This is the amount of information that is maintained different for every
interval (@pxref{Intervals}).

It can be entered with the command @code{IntervalData} or in the intervals data
window.

If entered in a window, the  data is not accepted until button @code{Accept} is pressed.

This data can be entered before or after meshing.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Local axes,  , Interval data, Data
@section Local axes
@cindex Local axes

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-localaxes.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-localaxes.gif"></a>
<p><img src="icons/m-localaxes.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

With this option, GiD allows to define new different coordinates reference systems.
It is possible to write them, not only as cartesian reference systems, but also
referring to as Euler angles. All user defined systems are automatically 
calculated and can be visualized one by one or all together.

There are several ways to define new local axes:

@itemize @bullet
@item @code{3 Points XZ} User enter three points that corresponds to the origin, 
the X-direction and the Z-direction. The origin and the last introduced
point define the Z-axis, whereas the second point indicates the side of
the @code{x-z} plane where the point lies.
@item @code{X and angle} User enter 2 points and one angle. The first one is the
center, the second one indicates the X-axe and the angle indicates the position
of the Y and Z axes. In the graphical window, it is possible to set dynamically
this angle by moving the mouse. It also indicates where the origin of the angle
is. The angle can be either enter by pressing the mouse or by entering the exact
value in degrees.
@end itemize



When defining local axes, the definition mode is done through three points
@code{3PointsXZ},
what 

Local axes can later be used when creating a point (@pxref{Point creation}) or
in some conditions that have a field related to these axes (@pxref{Conditions}).


@node Meshing, Calculate, Data, Top
@chapter MESHING
@cindex Mesh
@cindex Meshing

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

Generating a mesh is the process where a finite element mesh is calculated from the 
geometry definition. This mesh will be used for the FEM analysis in a later step. 
Conditions 
(@pxref{Conditions}) and materials (@pxref{Materials}) assigned to 
geometric entities will be transferred to the nodes and elements of the new mesh. 

What is meshed and how, is controlled by some default options which can be changed with
the commands described later.

The generation does not depend on the state ON/OFF of the layers at the moment of the 
generation (@pxref{Layers}), but frozen layers are not meshed if the preference 
@code{NoMeshFrozenLayer} is selected (@pxref{Preferences}).
Every node and element will be assigned to the layer in which the original geometrical entity was defined.

Defaults are:

@itemize @bullet
@item 
An entity is meshed if does not belong to a higher level entity.
@item
A line mesh is made of two-noded elements and a surface mesh is made of non-structured 
triangular elements. The default for structured meshes are quadrilateral elements. 
Volume meshes are composed by non-structured tetrahedral elements.
Structured volume meshes are composed by hexahedra.
@end itemize

All these default elements use linear interpolations for the unknown variables.

@menu
* Generate::                            
* Mesh view::                           
* View boundaries::                     
* Assign unstruct sizes::               
* Draw Sizes ::                         
* Structured mesh::                     
* Structured concentrate::              
* Mesh criteria::                       
* Element type::                        
* Quadratic::                           
* Reset mesh data::                     
* Cancel mesh::                         
* Mesh quality::                        
* Edit mesh::                           
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Generate, Mesh view, Meshing, Meshing
@section Generate
@cindex Generate mesh
@cindex Mesh generation

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-generate.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-generate.gif"></a>
<p><img src="icons/m-generate.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Mesh view @| @| @thispage
@end iftex

When everything is ready for mesh generation, select this command. 
If there is a previously generated
mesh, GiD asks if this should be deleted, i.e., make it disappear from memory, not 
from disk until the next save (@pxref{Save}). 

The mesher or mesher combination, can be chosen in  (@pxref{Preferences}).

Next, GiD asks for a general element size which will be applied to all lines, 
surfaces and volumes that do not have a previously defined one (@pxref{Assign unstruct sizes}).
GiD offers to the user to default possibilities:
@itemize @bullet
@item 
One default size automatically calculated by the program to define a coarse mesh.
@item
Last size given by the user in previus meshings.
@end itemize

User can choose one of these or enter a new one.

Size is given by the average side of the corresponding triangle or
quadrilateral.

Progress in meshing is shown by one progress bar that indicates number
of generated surfaces or volumes related to total number of surfaces or
volumes.

Meshing can be stopped at any time by pressing button
@code{Stop}. Sometimes it is necessary to press this button for some
time to get the action done.



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Mesh view, View boundaries, Generate, Meshing
@section Mesh view
@cindex Mesh view
@cindex View mesh

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-meshview.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-meshview.gif"></a>
<p><img src="icons/m-meshview.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

When a mesh has already been generated, this option changes the
visualization to mesh viewing. The reverse, the return to geometry, is
automatically performed either by the same command or when selecting
option @code{View geometry} (@pxref{View geometry}) or any command
related to geometry.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node View boundaries, Assign unstruct sizes, Mesh view, Meshing
@section View boundaries
@cindex Boundaries

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-boundaries.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-boundaries.gif"></a>
<p><img src="icons/m-boundaries.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This option draws the boundaries of the mesh on the screen when chosen.

Boundaries for triangular or quadrilateral meshes are line-elements.
Boundaries for tetrahedra or bricks meshes are triangles or quadrilaterals.
This option can be useful to render a volume mesh (@pxref{Render}).

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Assign unstruct sizes, Draw Sizes , View boundaries, Meshing
@section Assign unstruct sizes
@cindex Assign unstruct sizes
@cindex Spacing
@cindex Size of mesh
@cindex By geometry
@cindex By cordal error
@cindex Cordal error
@cindex Correct sizes
@cindex background mesh

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-assignunstructsizes.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-assignunstrctsizes.gif"></a>
<p><img src="icons/m-assignunstructsizes.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Size is given by the average side (edge) of the corresponding triangle
or quadrilateral.
@*
@*
@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml
@b{Assign sizes to points, lines, surfaces or volumes:}@*@*
It is possible to assign different sizes to different entities of the
mesh.  This means that in the vicinity of these entities, the generated
elements will be approximately of that size. All the entities that have
not an assigned size when meshing, take the default size. Points do not
take any size if none is given to them.

To assign a size of 0.0 to an entity is the same as setting the default size.
The transition between different sizes is controlled by a parameter in 
preferences (@pxref{Preferences}). 
@*
@*
@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml
@b{Assign sizes by cordal error:}@*@*
Option @code{By cordal error} asks the user for a minimum and a maximum
size and a cordal error (the maximum distance between the generated
element and the real geometry). GiD assigns the corresponding sizes to
all the entities to accomplish this condition. It will only change the
current sizes if the new one is smaller than the previously defined. In
structured surfaces, stretching is permitted. It means that if
necessary, elements can have very different size along both principal
directions.@*@*
@b{Note:} It is assigned to entities a size between the minimum and maximum; however, when generating the mesh, GiD adapts the size of the elements only if necessary, exceeding sometimes the minimum and maximum limits. 

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/CordalError.ps,width=5.21cm,height=4.0cm,angle=0}
}}
\unpie{}
{
Assign sizes by cordal error window
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="CordalError.gif"></a>
<img src="images/CordalError.gif"> 
<p>Assign sizes by cordal error window
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset

In this window the effect of different cordal error values over the number
of elements that will be created over a line can be viewed. Any line of
the geometry can be picked up and be used in this window.
@*
@*
@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml
@b{Correct sizes:} @*@*
When option @code{Correct sizes} is selected, a window appears. In this window it is possible to enter a minimum and a maximum mesh size.


 
@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/CorrectSizes.ps,width=5.61cm,height=3.12cm,angle=0}
}}
\unpie{}
{
Correct meshing sizes window
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="CorrectSizes.gif"></a>
<img src="images/CorrectSizes.gif"> 
<p>Correct meshing sizes window
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset

If option @code{By geometry} is activated, sizes are assigned to all the entities depending on the shape of the geometry. This means that smaller surfaces will have smaller elements. It will only change the existing sizes if the new size is smaller than that previously defined.

If option @code{Correct incompatible sizes} is activated, some sizes are reduced in order to control that the transitions between sizes in close entities are not too fast. It will only change the current sizes if the new one is smaller than that previously defined.@*



@b{Note:} Applying last two options with default values is exactly the same than
setting the preference @code{Automatic correct sizes} to on in the
preferences window (@pxref{Preferences}).

@b{Note:} To mesh a difficult volume trying to adjust element sizes to geometry detail, it may be useful to use @code{By geometry} and @code{Correct incompatible sizes} options setting the larger size equal to the default size for meshing, and the
smaller size reflecting the details ( 10 times smaller, for example).
@*
@*
@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml
@b{Background Mesh:}@*@*
With this option it's possible to assign sizes using a background mesh of triangles or tetrahedrons. When the option is selected GiD asks for a file; that file must contain the background mesh. The background mesh must cover all the domain, so usually the background mesh will be a previous mesh of the same model.@*@* 
The format of the file containing the background mesh is the following:
@itemize @bullet
@item First line: @code{BackgroundMesh V 1.0}
@item Description of the mesh. The format of that mesh is described in the @b{Mesh read} section (@pxref{Mesh read}).   
@item Desired sizes in the following format:
@example
DesiredSize (Nodes or Elements)
  number of        size
  node/element
...

@end example

Background mesh file example:
@example
BackgroundMesh V 1.0
MESH dimension       2 ElemType Triangle  Nnode 3
Coordinates
      1          5.61705         4.81504         0.00000
 ...
     51         -5.64191        -1.53335         0.00000
end coordinates
 
Elements
      1         24         16         26 
      2         16         10         14 
...
     76         34         31         28 
end elements

DesiredSize Elements
      1         0.20000
      2         0.20000
...
     75         1.50000
     76         1.50000
End DesiredSize
@end example 
@end itemize
@*@*

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml
@b{CAUTION:} Be careful when assigning big sizes to entities close to
others where a small size has been given. It may be impossible to obtain a mesh.

@b{CAUTION:} When using contact elements (@pxref{Contact creation}), the same 
size must be used for contact and for duplicate entities.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Draw Sizes , Structured mesh, Assign unstruct sizes, Meshing
@section Draw Sizes
@cindex Draw Sizes
@cindex Draw assigned sizes

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-drawsizes.ps,width=6cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-drawsizes.gif"></a>
<p><img src="icons/m-drawsizes.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

When sizes are assigned to points, lines, surfaces or volumes using the @b{Assign Unstruct sizes} option, it is possible to draw in different colors the different assigned sizes. 

@*
@*
@b{EXAMPLE} 

In the following example some different sizes are assigned to surfaces. Sizes of 3, 5 and 6 are assigned depending on the surface.
@*

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/drawsizes1.ps,width=8.93cm,height=4.69cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="drawsizes1.gif"></a>
<img src="images/drawsizes1.gif"> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset


After choosing the @b{Draw Sizes} option, (over surfaces) we get the following result:
@*
@*

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/drawsizes.ps,width=12.35cm,height=6.56cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="drawsizes.gif"></a>
<img src="images/drawsizes.gif"> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset




@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Structured mesh, Structured concentrate, Draw Sizes , Meshing
@section Structured mesh 
@cindex Structured mesh 
@cindex Elements (structured) 

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-structured.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-structured.gif"></a>
<p><img src="icons/m-structured.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

A structured mesh is defined as a mesh where all the nodes have the same number
of elements around it.

The size of the elements is defined in a different way than for a non-structured 
mesh. In this case, the mesh is not defined by the size but by the number of 
elements that are required on every line. This number must be the same for all 
lines that are opposite to each other on each surface. When meshing volumes, this 
definition must be the same for opposite surfaces.

To create a structured mesh, choose @code{structured} and volumes,
surfaces or lines. Surfaces can be 4-sided or NURBS ones. Planar surfaces meshes 
cannot be structured. After choosing @code{escape}, the number of elements per 
line is given. 
Later, lines can be selected and related lines (in option surface or volume), 
are added or deleted from the group. This process can be repeated as many times 
as necessary until all lines have a new value. By default, the generated elements 
will be quadrilateral or hexahedra and the lines with no numbering given will 
have two elements over them. All no selected lines will also have two elements by 
default.

Structured volumes must have 6 contour surfaces. Structured surfaces
must be 4-sided surfaces or NURBS surfaces.

It is possible to mix some entities with structured meshes and others with
unstructured ones.

To convert a structured entity to a non-structured one, select reset
(@pxref{Reset mesh data}) or assign a size to it (@pxref{Assign unstruct sizes}).

To change the default element type @xref{Element type}.

@strong{Note 1:} One NURBS surface can be structured with any number of
contour lines but must have a good shape form. This means that it must
have 4 big angles and the other angles must be small. With this criteria,
the shape will be topologically similar to one quadrilateral.

@strong{Note 2:} When assigning structured divisions to one line or with
difficult topology, GiD may need to reassign some sizes to make the structured
mesh conformal. It will be done automatically. If it is impossible to create
compatibility between surfaces, a message is given.

@strong{Note 3:} It is possible to assign a number of structured divisions to 
the boundary line of a surface or volume, and then create an unstructured mesh for the surface/volume.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Structured concentrate, Mesh criteria, Structured mesh, Meshing
@section Structured concentrate
@cindex structured concentrate

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-structuredconcentrate.ps,width=5.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-structuredconcentrate.gif"></a>
<p><img src="icons/m-structuredconcentrate.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

By default, all partitions in one structured line have the same approximate length.
This command lets the user select one line. Then, in the graphical window the sense
of the line is shown with one arrow. The user will enter a positive or negative weight.
If the weight is positive the size of the elements will be concentrated at the extreme
of the line, if negative, the elements will be repelled.
@*
@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/Concentrate.ps,width=4.74cm,height=3.39cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<img src="images/concentrate.gif"> 
<p></center></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/concentrate_ex.ps,width=5cm,height=2.07cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<img src="images/concentrate_ex.gif"> 
<p></center></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


As the magnitude of the weight increases, the diference between element sizes will
be bigger.










@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Mesh criteria, Element type, Structured concentrate, Meshing
@section Mesh criteria
@cindex Mesh criteria
@cindex Force mesh
@cindex Force no mesh

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-meshcriteria.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-meshcriteria.gif"></a>
<p><img src="icons/m-meshcriteria.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

GiD provides three different criteria to generate the mesh. The @code{Default} 
option skips meshing the boundaries, that is, lines for surface meshes and 
surfaces for volume meshes. The @code{Mesh} option allows the user to choose 
the entities to be meshed, whilst the @code{No Mesh} option does the opposite.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Element type, Quadratic, Mesh criteria, Meshing
@section Element type
@cindex Element type
@cindex Type of element

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-elementtype.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-elementtype.gif"></a>
<p><img src="icons/m-elementtype.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this command, the type of element desired is selected. It is only
necessary to do this when the element type is different from the default 
(@pxref{Meshing}).

Types are:

@itemize @bullet 
@item 
@b{Linear:} for lines.
@item 
@b{Triangle and Quadrilateral:} for surfaces.
@item 
@b{Tetrahedra and Hexahedra:} for volumes.
@item 
@b{Only points:} Just for volumes. Point elements are generated.
@item
@b{Linear and  Quadrilateral:} for contact surfaces.
@item
@b{Linear, Prism and Hexaedra}: for contact volumes. 
@end itemize

By default, the elements are of minimum order: 3-noded triangle,
4-noded quadrilateral and so on. To increase the degree, use command 
@code{Quadratic} (@pxref{Quadratic}). Option @code{Quadratic}
applies to all the elements of the problem.



@itemize ·

@item @code{Point}: 1 node,

@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .45
% me salto la primera columna
\tab
Point connectivity:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/punto1.ps,width=0.5cm,height=0.5cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<table>
<tr>
<td width=20></td>
<td valign=top>
Point connectivity:
</td>
<td>
<a name="punto1.gif"></a>
<img src="images/punto1.gif"> 
</td></tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@item @code{Linear}: 2 or 3 nodes,

@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .15 .3
\tab
Line connectivities:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/linea2.ps,width=1cm,height=0.5cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/linea3.ps,width=1cm,height=0.5cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<TABLE>
<tr>
<td width=20></td>
<td valign=top>
Line connectivities:
</td>
<td>
<a name="linea2.gif"></a>
<img src="images/linea2.gif">
</td>
<td> 
<a name="linea3.gif"></a>
<img src="images/linea3.gif">
</td>
</tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@item @code{Triangle}: 3 or 6 nodes,

@ifset photo
@tex
\multitable \columnfractions  .02 .37 .15 .15 .3
\tab
Triangle connectivities:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/triang3.ps,width=1cm,height=1cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/triang6.ps,width=1cm,height=1cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<TABLE>
<tr>
<td width=20></td>
<td valign=top> 
Triangle connectivities:
</td>
<td>
<a name="triang3.gif"></a>
<img src="images/triang3.gif">
</td>
<td align> 
<a name="triang6.gif"></a>
<img src="images/triang6.gif">
</td>
</tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@item @code{Quadrilateral}: 4, 8 or 9 nodes,

@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .15 .15 .15
\tab
Quadrilateral connectivities:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/cuad4.ps,width=1cm,height=1cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/cuad8.ps,width=1cm,height=1cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/cuad9.ps,width=1cm,height=1cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<TABLE>
<td width=20></td>
<td valign=top> 
Quadrilateral connectivities:
</td>
<td>
<a name="cuad4.gif"></a>
<img src="images/cuad4.gif">
</td>
<td> 
<a name="cuad8.gif"></a>
<img src="images/cuad8.gif">
</td>
<td> 
<a name="cuad9.gif"></a>
<img src="images/cuad9.gif">
</td>
</tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@item @code{Tetrahedra}: 4 or 10 nodes,

@ifset photo

@tex
\multitable \columnfractions .02 .37 .15 .15 .3
\tab
Tetrahedral connectivites:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/tetra4.ps,width=1.5cm,height=1.5cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/tetra10.ps,width=1.5cm,height=1.5cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<TABLE>
<td width=20></td>
<td valign=top> 
Tetrahedral connectivities:
</td>
<td>
<a name="tetra4.gif"></a>
<img src="images/tetra4.gif">
</td>
<td> 
<a name="tetra10.gif"></a>
<img src="images/tetra10.gif">
</td>
</tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@item @code{Hexahedra}: 8, 20 or 27 nodes.

@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .15 .15 .15
\tab
Hexahedral connectivities:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/hexa8.ps,width=2cm,height=2cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/hexa20.ps,width=2cm,height=2cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/hexa27.ps,width=2cm,height=2cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<TABLE>
<td width=20></td>
<td valign=top> 
Hexahedral connectivities:
</td>
<td>
<a name="hexa8.gif"></a>
<img src="images/hexa8.gif">
</td>
<td align=center> 
<a name="hexa20.gif"></a>
<img src="images/hexa20.gif">
</td>
<td align=center> 
<a name="hexa27.gif"></a>
<img src="images/hexa27.gif">
</td>
</tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@end itemize


The @code{Linear} option assures, not only the meshing of lines, but also the
creation of 2-node contact lines between surfaces or volumes, if desired.

At contact surfaces, GiD elements are:
@itemize @bullet
@item
@b{Linear:} 2 nodes.
@item
@b{Triangle:} 3 nodes.
@item
@b{Quadrilateral:} 4 nodes.
@end itemize

At contact volumes (and separated contacts), elements are:
@itemize @bullet
@item
@b{Linear:} 2 nodes.
@item
@b{Prisma:} 6 nodes.
@item
@b{Hexahedra:} 8 nodes.
@end itemize

To decide what parts of the geometry should be meshed use command: 
@xref{Mesh criteria}.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Quadratic, Reset mesh data, Element type, Meshing
@section Quadratic
@cindex Quadratic
@cindex Quadratic9

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-quadraticelements.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-quadraticelements.gif"></a>
<p><img src="icons/m-quadraticelements.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Option @code{Quadratic} applies to all the elements of the problem. If chosen, 
elements will be:

@itemize @bullet 
@item 
@b{Linear:} 3 nodes.
@item 
@b{Triangle:} 6 nodes.
@item 
@b{Quadrilateral:} 8 nodes.
@item 
@b{Tetrahedra:} 10 nodes.
@item 
@b{Hexahedra:} 20 nodes.
@end itemize

Option @code{Quadratic9} is similar to option @code{Quadratic}, but will
generate 9-noded Quadrilaterals and 27-noded Hexahedra.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Reset mesh data, Cancel mesh, Quadratic, Meshing
@section Reset mesh data
@cindex Reset mesh data
@cindex Meshing data reset

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-resetmeshdata.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-resetmeshdata.gif"></a>
<p><img src="icons/m-resetmeshdata.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This command resets, all the sizes assigned to entities. This means that all
of them will be unassigned.

To unassign only some entities, assign size 0.0 (@pxref{Assign unstruct sizes}) to the 
entities where the default size is required.

The information about element types, mesh criteria and quadratic parameters
is also reset.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Cancel mesh, Mesh quality, Reset mesh data, Meshing
@section Cancel mesh
@cindex Cancel mesh
@cindex Mesh cancel

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-cancelmesh.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-cancelmesh.gif"></a>
<p><img src="icons/m-cancelmesh.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

If a mesh has been previously generated, this option erases the mesh and makes it 
disappear.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Mesh quality, Edit mesh, Cancel mesh, Meshing
@comment  node-name,  next,  previous,  up
@section Mesh quality
@cindex Mesh quality
@cindex Quality of the mesh

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-meshquality.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-meshquality.gif"></a>
<p><img src="icons/m-meshquality.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This option opens a window that shows graphics about the quality of the mesh elements.

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/MeshQuality.ps,width=6.76cm,height=7.55cm,angle=0}
}}
\unpie{}
{
Mesh Quality window
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="MeshQuality.gif"></a>
<img src="images/MeshQuality.gif"> 
<p>Mesh Quality window
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset



There are four criteria in order to measure the quality of the elements:
@enumerate
@item @b{Minimum angle:} The quality criteria is the minimum angle in
surface elements and the minimum dihedral angle for volume
elements. This means that elements with a small angle are considered of
a worse quality than the ones with bigger angles.
@item @b{Maximum angle:} It gives the maximum angle for every
element. Elements with bigger angles are considered worse.
@*
@*
Typically, the @b{Minimum angle} criteria is good to qualify triangles
or tetrahedra and the @b{Maximum angle} criteria is good for
quadrilaterals and hexahedra
@*
@*
@item @b{Element vol:} The quality criteria is the size of elements (distance for lines, area for surfaces and volume for volumes). Elements with little "volume" are considered worse.
@item @b{Minimum edge:} The quality criteria is the size of the edges of elements. Elements with smaller edges are considered worse.
@end enumerate
@*
There are two visualization modes:
@enumerate
@item @b{Normal:} the graph shows the number of elements that have an angle with a certain degree.
@item @b{Accumulated:} the graph shows the number of elements which have an angle with a given degree or smaller. 
@end enumerate


In the @code{MeshQuality} window, if you double click on a value, the elements below this value are selected in red. These selected elements can be sent to a layer using the @code{Send To Layer} button of the @code{Mesh Quality} window. 

@*
@*
@*
@b{EXAMPLE}

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/MeshQuality2.ps,width=7.23cm,height=7.13cm,angle=0}
}}
\unpie{}
{
Example of an study of mesh quality
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="MeshQuality2.gif"></a>
<img src="images/MeshQuality2.gif"> 
<p>Example of an study of mesh quality
</center>
<p>
@end ifhtml
@c@end html
@end ifset
@end ifset

In this example we are studying the mesh using the minimum angle criteria. We can see that @b{140} elements of our mesh have an angle of smaller than @b{45,7} degrees. If we double click with the mouse on the graphic, the 140 elements which have an angle smaller than 140 degrees, will be selected. 



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node  Edit mesh,  , Mesh quality, Meshing
@comment  node-name,  next,  previous,  up
@section Edit mesh
@cindex Edit mesh
@cindex Mesh edit

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-editmesh.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-editmesh.gif"></a>
<p><img src="icons/m-editmesh.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

These option let the user modify one mesh. All modification will be lost when the
mesh is generated again.

@menu
* Move node::                           
* Delete elements::                     
* Delete lonely nodes::                 
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Move node, Delete elements, Edit mesh, Edit mesh
@unnumberedsubsec Move node
@cindex Move node

By using this command, an existing node is selected and moved. The new position is 
entered in the usual way (@pxref{Point definition}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Delete elements, Delete lonely nodes, Move node, Edit mesh
@unnumberedsubsec Delete elements
@cindex Delete elements
@cindex Remove elements
@cindex Erase elements

To delete elements a selection is made (@pxref{Entities selection}). After pressing 
@code{escape} (@pxref{Escape}), the elements are erased.

The deletion of entities can be done in two ways: at one level (@code{point}, 
@code{line}, @code{surface} or @code{volume}) or erasing all entities at once. A 
selection is made (@pxref{Entities selection}) in both cases. After pressing 
@code{escape} (@pxref{Escape}), the elements are erased.

Nodes that do not belong to any element after the operation are also erased.

To avoid erasing the selected elements, press @code{break}.@*@*
@b{Note:} It is possible to filter the selection, for example, selecting only triangles but not 
quadrilaterals (@pxref{Selection window}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Delete lonely nodes,  , Delete elements, Edit mesh
@unnumberedsubsec Delete lonely nodes
@cindex Delete lonely nodes
@cindex Remove lonely nodes

After confirmation, all the nodes of the mesh that do not belong to any element
are erased.

@strong{Note:} This command is only necessary for meshes imported from outside
because internally generated or edited meshes, have this problem implicitly
corrected. 










@node Calculate, POSTPROCESS OPTIONS, Meshing, Top
@chapter CALCULATE
@cindex Calculate
@cindex Solver

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-calculate.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-calculate.gif"></a>
<p><img src="icons/m-calculate.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

Inside this window, the user can begin and manage the analysis of the problem. Word
@code{process} will be used to refer the running analysis code. This word is used
to show the possibility that several analysis or processes can be run at the same
time.

Options for this window are:

@itemize @bullet
@item @code{Start:} Begins the process module. Once it is pressed, user can continue
working with GiD as usual.
@item @code{Kill:} After selecting a running process, this button stop its execution.
@item @code{Output view:} After selecting a running process, this button opens a window
that shows process related information such as iterations, convergence, etc.
@item @code{Close:} Closes the window but does not stop the running processes.
@end itemize

A list of all the running processes is shown, with some useful information like name,
starting time, etc.

The various windows will differ in accordance to the specifications of the
problem (thermoelastic, impact, metal-forming, etc.), the different types
of elements (2D or 3D, beams, shells, plates, etc.) and also the different
requirements and specifications of the particular solver.

All the commands and facilities that are explained in this manual are
generally available for the different solvers. However, there may be some commands and 
facilities that are only available to some of them and therefore some displays can
look slightly different from those explained on these pages.
@ignore
@unnumbered Post-processing

@titlepage
@title Post-processing
@headings off
@evenheading @thispage @| @| Post-processing
@oddheading Post-processing @| @| @thispage
@end titlepage
@end ignore

@node POSTPROCESS OPTIONS, postprocessing results, Calculate, Top
@chapter POSTPROCESS OPTIONS
@cindex Postprocess introduction

@menu
* introduction - postprocess::          
* files - postprocess::                 
* utilities - postprocess::             
* Point and Line options::              
* Display Style::                       
* Textures::                            
* Cover mesh::                          
@end menu

@node introduction - postprocess, files - postprocess, POSTPROCESS OPTIONS, POSTPROCESS OPTIONS
@section Introduction

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

@iftex 
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Postprocess introduction  @| @| @thispage
@end iftex


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-postprocess.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@tex
\hbox{
\psfig{figure=icons/tb-prepost.ps,width=3.5cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-postprocess.gif"></a>
<a name="tb-prepost.gif"></a>
<p><img src="icons/m-postprocess.gif"><br><br>
<img src="icons/tb-prepost.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset







This chapter describes some relevant aspects of the Postprocessing step and the way to 
load results from a numerical analysis into GiD.

In the GiD postprocess you can study the results obtained from a solver program. The GiD postprocess receives mesh and results information from the solver module. If the solver module doesn't create any new mesh, the preprocess mesh is used. 

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/post-intro.ps,width=12.7cm,height=5.6cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<a name="post-intro.gif"></a>
<img src="images/post-intro.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

The communication between the solver and the GiD Postprocess is made using files. 

The solver program has to write the results in a file that must have the extension @code{.post.res}, or the old @code{.flavia.res}, and its name must be the project name. 
If the solver writes a mesh, the file must have the extension @code{.post.msh}, or the old @code{.flavia.msh}. ( @pxref{POSTPROCESS DATA FILES} )

The extensions @code{.msh} and @code{.res} are also allowed, but 
only the files with the extensions @code{.post.msh}, @code{.post.res} and
 the old ones @code{.flavia.msh} and @code{.flavia.res} 
will be automatically read by GiD when postprocessing the GiD project.

There are two ways to postprocess inside GiD:

@itemize @bullet
@item @b{Postprocess inside a GiD project:} Starting GiD and open the GiD project (@code{ProjectName.gid}) you want to postprocess, and then 
select the @code{postprocess} option from the @code{files} menu or click on the @code{pre/post} toolbar button. This way
the @code{ProjectName.flavia.res}, or the old @code{ProjectName.flavia.res}, will automatically be read by GiD, 
and the @code{ProjectName.post.msh}, or the old @code{ProjectName.flavia.msh}, if present.
@item @b{Postprocess other files:} Starting GiD and, directly, select the @code{postprocess} option from the @code{files} 
menu or click on the @code{pre/post} toolbar button. Now open the pair files @code{OtherModel.msh} and @code{OtherModel.res}.
@end itemize

Once inside the postprocessing section of GiD, all the visualization features and management options of the preprocess section are available: 
Zoom, Rotate (Rotate screen/object axes, Rotate trackball,etc.), Pan, Redraw, Render, 
Label, Clip Planes, Perspective, etc.


@strong{Note:} There is no need to load a project into GiD to use its Postprocessing; you can open directly the mesh and results information directly from the GiD postprocess. ( @pxref{files - postprocess} )


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node files - postprocess, utilities - postprocess, introduction - postprocess, POSTPROCESS OPTIONS
@section Files menu
@cindex reading post-process files
@cindex saving post-process files
@cindex saving graphs
@cindex saving cuts
@cindex saving in binary format
@cindex saving binary results
@cindex saving boundaries
@cindex TECPLOT
@cindex FEMAP

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-files.ps,width=1cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-files.gif"></a>
<p><img src="icons/m-files.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


Several useful options has been added inside the @code{Files} menu:

@itemize @bullet
@item @b{New}:
Clears all postprocess information present in GiD.

@item @b{Open}:
Read postprocess information into GiD.

@item @b{Merge (ASCII)}:
Reads mesh and results information from an ASCII file and add them to the current ones.  
@item @b{Import}:
@itemize @minus
@item Cuts: to read cut planes, cut wires, iso-surface cuts into GiD so the same cuts 
can be used among several postprocess meshes.
@item Graphs: to add graphs to the already, or not, created ones inside GiD.
@c @item image: insert an image into GiD as in the preprocess part (@pxref{Read image})
@item FEMAP / TECPLOT file: reads FEMAP Neutral ASCII files and TECPLOT ASCII files.
@end itemize

@item @b{Export}:
@itemize @minus
@item As ASCII files: saves meshes, sets and results into ascii files ( one for mesh
information ".msh", and one for the results ".res") using the new PostProcess format 
@pxref{File ProjectName.post.res - ProjectName.flavia.res}, 
@pxref{File ProjectName.post.msh - ProjectName.flavia.msh}.
@item As one binary File: saves meshes, sets and results into one binary file.
@item Binary results: saves only results information, so the pass between pre and
postprocess will be quicker.
@item ASCII boundaries: saves the boundaries of the meshes and sets, with its
nodal results, into ascii files ( one for mesh information ".msh", and one for 
the results ".res"). The boundary of an hexaedra/tetrahedra mesh is a
cuadrilateral/triangle mesh. The boundary of a cuadrilateral/triangle
mesh is a line mesh. There is no boundary of a line/point mesh.
@item Cut: save cut planes, cut wires, iso-surface mesh cuts so the same cuts can be 
used among several postprocess meshes.
@item Graph: saves graphs in ascii ( gnuplot) format. If the
option @code{All} is choosen, the user will be asked for a @code{prefix}. Then, GiD will create
a file for each Graph with the names @code{prefix}@b{-1.cur}, @code{prefix}@b{-2.cur},
@code{prefix}@b{-3.cur} and so on . . .
@item Cover Mesh: after visualizing the cover mesh of the points/nodes, this mesh can be
saved for other uses.
@end itemize

@item @b{Preprocess}: allows the user, after confirmation, to return to the
pre-processing section of GiD.

@end itemize

The rest of the options are the same on the preprocess part.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node utilities - postprocess, Point and Line options, files - postprocess, POSTPROCESS OPTIONS
@section Utilities
@cindex postprocess utilities


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-utilities.ps,width=1.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-utilities.gif"></a>
<p><img src="icons/m-utilities.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


Inside the @code{Utilities} menu, the options @code{Id}, @code{Signal}, @code{Distance} and @code{Calculator} have the 
same funcionality as in the Preprocess (@pxref{Utilities}). Other options of the @code{Utilities} menu are slightly different:

@itemize @bullet
@item @code{Status}: a window appears showing the general postprocess status:
number of meshes, elements, etc.
@item @code{List}
@itemize @minus
@item Nodes: a window appears showing information about selected nodes: its coordinates,
the current visualized result, and all other nodal results defined over the selected nodes.
@item Elemets: a window appears showing information about selected elements: its connectivity,
the gauss points defined on the selected elements, the current visualized result, and all
other results defined over the gauss points of the selected elements.
@end itemize
@item @code{Colapse}: to colapse nodes that are together in a set.
@item @code{Join}: to join several sets into one.
@item @code{Delete}: to delete meshes, sets and cuts.
@item @code{Texture}: to add textures to sets @pxref{Textures}.
@end itemize


@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .15 .15 .15
\tab
Status window and list nodes and elements windows:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/UtilitiesStatus.ps,width=3.5cm,height=6cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/UtilitiesListNodes.ps,width=3.5cm,height=6cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/UtilitiesListElements.ps,width=3.1cm,height=6cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<center>
<a name="UtilitiesStatus.gif"></a>
<img src="images/UtilitiesStatus.gif">
<p>status window</p>
<a name="UtilitiesListNodes.gif"></a>
<img src="images/UtilitiesListNodes.gif">
<p>list nodes window</p>
<a name="UtilitiesListElements.gif"></a>
<img src="images/UtilitiesListElements.gif">
<p>list elements windows</p>
</center>
<p>
@end ifhtml
@end ifset
@end ifset


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


The @b{Copy} utility introduces some changes:


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-copy.ps,width=2.5cm,height=0.88cm,angle=0}
}
@end tex

@tex
\hbox{
\psfig{figure=icons/tb-copy.ps,width=3cm,height=1cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="n-copy.gif"></a>
<a name="tb-copy.gif"></a>
<p><img src="icons/m-copy.gif"><br><br>
<img src="icons/tb-copy.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


When choosing the @b{Copy} utility the @code{Transformations} window appears. This window allows the user to repeat the the visualization using translation, rotation and mirror transformations, so that GiD can draw a whole model when only a part of it was analyzed:

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/PostTransformations.ps,width=2.9cm,height=7.5cm,angle=0}
}}
\unpie{}
{
Transformations Window
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="PostTransformations.gif"></a>
<img src="images/PostTransformations.gif"> 
<p>Transformations Window
</center>
<p>
@end ifhtml
@end ifset

@end ifset

Transformations types are:

@itemize @bullet
@item @b{Translation:} It is defined by two points. Relative movements can be obtained
defining the first point as 0,0,0 and considering the second point as the translation
vector (@pxref{Point definition}).
@item @b{Rotation:} It is necessary to either enter two points in 3D or one point in 2D. 
These two points define the rotation axis and its orientation. In 2D, the axis goes 
from the defined point towards z positive. Enter the angle of rotation in degrees. It 
can be positive or negative. The sense is defined by the right hand rule. In 2D, the 
sense is counter-clockwise.
@item @b{Mirror:} It is defined by three points that cannot be aligned. These points form a 
plane that is the mirror plane. In 2D, the mirror line is defined by two points.
@end itemize

Available options are:
@itemize @bullet
@item @b{Copies:} Giving the number of repetitions, the operation selected is performed this number of times.
@item @b{View:} The trasformation is only for viewing porposes. @code{Show/Hide}, @code{Undo} and @code{Clear}
options are enabled.
@item @b{Create:} All the Post information (meshes & results) will be duplicated when doing the transformation.
The options @code{Show/Hide}, @code{Undo} and @code{Clear} are disabled.
@item @b{Show/Hide Transform.:} allows the user wether to see the original model, or the one with
the transformations active.
@item @b{Undo:} Deletes last transformation done. It can be used repeadly to clear all
the transformations done.
@item @b{Clear:} Clear all the transformations at once.
@c @item @b{ReCopy:} Redo de last transformation with the new @b{Multiple copies:} value. 
@end itemize 

Button @b{DoIt} tells the program to do the transformation selected.



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Point and Line options, Display Style, utilities - postprocess, POSTPROCESS OPTIONS
@section Point and Line options
@cindex point options
@cindex line options

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-pointoptions.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex

@tex
\hbox{
\psfig{figure=icons/m-linesize.ps,width=4.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-pointoptions.gif"></a>
<a name="m-linesize.gif"></a>
<p><img src="icons/m-pointoptions.gif"><br><br>
<img src="icons/m-linesize.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset



As @b{points} and @b{lines} can be viewed, there are several interesting options
for each of them.

@itemize @bullet
@item Point options:


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/PointOptions.ps,width=7.6cm,height=3.0cm,angle=0}
}}
\unpie{}
{
Point options window
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="PointOptions.gif"></a>
<img src="images/PointOptions.gif"> 
<p>Point options window
</center>
<p>
@end ifhtml
@end ifset
@end ifset

Here the user can select whether to draw the points @code{Quick}, @code{Nice} or with the center of a @code{Texture} glued to the point. @*
@code{Quick}: points will be drawn as big dots.@*
@code{Nice}: points will be drawn as little spheres (quadrilateral meshes).@*
For every draw style, the @code{Point Size} can be changed, but ranges varies between @code{Quick}, which depends on the graphics library, and @code{Nice} and @code{Texture}.@*
When the @code{Nice} style is selected, the @code{Nice detail} level can be adjusted. The number represents the number of vertical and horizontal subdivision of a sphere.@*
@*

@strong{Note:} The changes affect all the points representation: point elements and the arrow head of vectors when using the @code{Point} detail level @pxref{Display vectors}.@*

@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@itemize @bullet
@item Line options:


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/LineOptions.ps,width=8.0cm,height=3.0cm,angle=0}
}}
\unpie{}
{
Line options window
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="LineOptions.gif"></a>
<img src="images/LineOptions.gif"> 
<p>Line options window
</center>
<p>
@end ifhtml
@end ifset
@end ifset



Here the user can select whether to draw the lines with a @code{Quick} style or a @code{Nice} one.@*
Selecting a @code{Line Size} of 0.0 in the @code{Nice} style, will cause the lines to be not drawn.@*
@code{Quick}: lines are drawn as 3-point thick lines. The line size is fixed.@*
@code{Nice}: lines are drawn as long 4-sided or 8-sided prismas. The size, width, of the lines can be changed.@*
When the lines are drawn nicely, the number of @code{sides of the prisma} used to draw them can be changed between 4 and 8 sides.@*
@*
@strong{Note:} Line options no longer affect the stream lines as before, but only the line elements.
For stream lines otions @pxref{Stream Lines}.
@end itemize


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Display Style, Textures, Point and Line options, POSTPROCESS OPTIONS
@section Display Style
@cindex display style
@cindex Post-processing select meshes/sets/cuts
@cindex select meshes/sets/cuts
@cindex Boundaries
@cindex hidden boundaries
@cindex Lines
@cindex Hidden lines
@cindex body
@cindex body with boundaries
@cindex body with lines
@cindex Post-processing transparent
@cindex Post-processing opaque
@cindex Post-processing render
@cindex Post-processing culling
@cindex Post-processing change light vector
@cindex Post-processing Fast-rotation
@cindex color selection
@cindex changing mesh color
@cindex changing set color
@cindex changing cut color

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-viewstyle.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-viewstyle.gif"></a>
<p><img src="icons/m-viewstyle.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


There is a @code{View Style} window, where almost all the interesing visualization
options can be adjusted which only deals with meshes, sets or cuts, and not with results.

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/PostDisplayStyle.ps,width=6.4cm,height=9.78cm,angle=0}
}}
\unpie{}
{
Display Style Window
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="PostDisplayStyle.gif"></a>
<img src="images/PostDisplayStyle.gif"> 
<p>Display Style Window
</center>
<p>
@end ifhtml
@end ifset
@end ifset

@iftex

Selecting Volumes, Surfaces and/or Cuts, the user can switch them @code{On} and @code{Off}, 
@code{Del}ete them, after confirmation, or rename them.

Also, clicking on a Volume, Surface or Cut, and pressing
@code{Color...} the user can change the colour look, or its @code{Ambient}, @code{Diffuse}, @code{Specular}
and @code{Shininess} components, of the selected set, or give it its @code{Default} color
back. The @code{Diffuse} component is used for all the representation, while the rest 
( @code{Ambient}, @code{Specular} and @code{Shininess}) has more sense for @code{Render} 
visualization.

Under the menu @b{Style} the user can choose how volumes, surfaces and cuts should be drawn. These options are:

@itemize @bullet
@item @b{Boundaries:}
All the edges of the boundaries and surface elements will be displayed, in black. 
An edge is the line that only belongs to one surface element, or the one that 
belonging to two surface elements, its faces form an angle less than a
predefined one. This angle can be specified by the user in 
@c(@pxref{Post-processing preferences}) or 
@code{Results Options BorderAngle} 
on the @code{Right Buttons} menu.

@item @b{Hidden Boundaries:}
The same as before, but here the edges that are behind the volumes, surfaces and cuts 
are removed.

@item @b{All Lines:}
All the lines of surface elements are drawn. When drawing volumes, GiD only draws
the surface/boundaries elements of this volume mesh. How GiD can draw these interior elements
is explained below. Each volume, surface and cut is drawn with its own colors.

@item @b{Hidden Lines:}
The same as before, but here the lines that are behind the volumes, surfaces and cuts are removed.

@item @b{Body:}
The elements of volumes, surfaces and cuts, are drawn in filled mode, i.e. they are drawn 
as solid elements.  Each volume, surface and cut is drawn with its own colors. It can be 
very hard to recognize the shape of the meshes if no illumination is actived.

@item @b{Body Boundaries:}
Same as before, but with @code{Hidden Boundaries} drawn too.

@item @b{Body Lines:}
Same as before, but with @code{Hidden Lines} drawn too.

@item @b{Points:}
the nodes of the meshes are drawn.

@end itemize

With the @b{Render} menu the user can select how to see the mesh: 
@itemize @minus 
@item @code{Normal} - no lighting
@item @code{Flat} - lighting with sharpen edges
@item @code{Smooth} - lighting with smoothed edges
@end itemize
Also the light direction can be changed with the @b{lamp} icon button.

Near the @code{Culling} label, the user can choose wether the @code{Front Faces}, 
@code{Back Faces}, @code{Front and Back Faces} are culled, i. e. not drawn, or @code{No Faces}
are culled. This option is useful to llok into volume meshes, etc.

@code{Conditions} can also be drawn if they are present in preprocess, not only geometry conditions
but also mesh conditions.

Following options can be changed for each mesh/set/cut separately:
The @code{Massive} option allows the user to see the elements that are inside a volume mesh,
and to draw all the vectors inside of a volume/surface/cut when a @code{Boundaries} display style 
is used.

With the @code{Transparent} option the volumes/surfaces/cuts will be drawn transparently or opaque,
so that, for instance, iso surfaces inside them can be viewed easily.

@end iftex

@c  @tex
@c  \bigskip
@c  \bigskip
@c  @end tex
@c  @ifhtml
@c  <p><br><br></p>
@c  @end ifhtml

@c  @node preferences - postprocess,  , Display Style, POSTPROCESS OPTIONS
@c  @section Preferences window

@c  @ifset photo
@c  @tex
@c  \hbox{
@c  \psfig{figure=icons/m-preferences.ps,width=3cm,height=0.88cm,angle=0}
@c  }
@c  @end tex

@c  @tex
@c  \hbox{
@c  \psfig{figure=icons/tb-preferences.ps,width=2.5cm,height=1cm,angle=0}
@c  }
@c  @end tex

@c  @ifset html
@c  @c@html
@c  @ifhtml
@c  <p><img src="icons/m-preferences.gif"><br><br><img src="icons/tb-preferences.gif"></p>
@c  @end ifhtml
@c  @c@end html
@c  @end ifset
@c  @end ifset

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Textures, Cover mesh, Display Style, POSTPROCESS OPTIONS
@section Textures
@cindex textures
@cindex texture

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-texture.ps,width=1.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-utilities.gif"></a>
<p><img src="icons/m-texture.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset




In GiD it is also possible to assign a texture to a Set. Inside the menu
Utilities->Texture there are several options:

@itemize @bullet
@item @b{View} No / Fast / Nice: to switch whether to view the textures over the
sets or not. When the texture is small, so that a pixel of the textures 
must be drawn over several pixels on the screen, the @code{Fast} mode just
draws the pixels using the 'nearest neighbor' policy, and the @code{Nice}
tries to interpolate the colours of the pixels from the original.
@item @b{Add} Screen Map / To 4 Sided / BoundImg to BoundSet: to map a texture
to a set. @code{ScreenMap}: by picking four points over the screen, GiD
projects the texture, parallel to the screen, over the underlying sets.
@code{4 sided}: tries to match the 4 sides of the texture to the 
4 sides of the set. The best results are achieved using quadrilateral
sets which are more or less flat, at least in one direction. 
@code{BoundImg to BoundSet}: looks for the border of the texture inside
the image file and tries to glue it to the border of the set, for instance 
a texture circle to a circle set.
@item @b{Change} Flip Horiz. / Vert.: changes the orientation of the texture
once it is applied to the Set.
@end itemize

@b{Note:} When the display style of the visualization is changed,
for instance from @code{Body} to @code{Body Boundaries} the visualization
of the texture is switched off. To view the texture, just select
Utilities->Texture->View->Fast/Nice.

Once the texture is applied to a Set, when the Set is deformed, the texture
is deformed accordingly, so the deformed texture can be visualized.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Cover mesh,  , Textures, POSTPROCESS OPTIONS
@section Cover mesh
@cindex cover mesh


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-covermesh.ps,width=1.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<p><img src="icons/m-covermesh.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset




Another feature in GiD is the calculation of the involving mesh of a set of 
points or nodes. To switch the visualization of this mesh on and off
just select Options->Geometry->Covering mesh.
After saying 'Yes' to the visualization of the covering mesh, 
the user will be asked for a number. This number is the distance
between the covering mesh and the points.

This option is not only available for points, but also for every mesh/set
present in GiD. 

@b{Note:} This covering mesh is recalculated when the mesh is deformed.
So in a particle movement system, the covering mesh will also move along
with the particles.

This mesh can also be saved through Files->Export->Cover mesh. 


@node postprocessing results, Customization, POSTPROCESS OPTIONS, Top
@chapter POSTPROCESSING RESULTS
@cindex Postprocessing results
@cindex View Results window
@cindex results visualization

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

@menu
* Contour Fill::                        
* Smooth Contour Fill::                 
* Contour Ranges::                      
* Contour Lines::                       
* Show Minimum and Maximum::            
* Display vectors::                     
* Iso Surface::                         
* Stream Lines::                        
* Line Diagrams::                       
* Legends::                             
* Graphs::                              
* Result surface::                      
* Deform Mesh::                         
* Do Cuts::                             
* Animation::                           
* Automatic comments::                  
* Several results::                     
@end menu

The possible results to be displayed can be grouped into five major categories:
@itemize @bullet
@item @b{Scalar view results:}
Show Minimum & Maximum, Contour Fill, Contour Text Ranges, Contour Lines, Iso Surface and its configuration options.

@item @b{Vector view results:}
Mesh deformation, Display Vectors, Stream Lines (Particle Tracing)

@item @b{Line diagrams:}
Scalar line diagram and vector diagrams.

@item @b{Graph lines:}
XY plots.

@item @b{Animation:}
animation of the current result visualization.

@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

The @b{View Results} menu and the @b{View Results} window are used to manage the visualization of the different type of results. 

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-menuviewresults.ps,width=2cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-menuviewresults.gif"></a>
<p><img src="icons/m-menuviewresults.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

The @b{View Results menu} lets you select any type of result:

@itemize @minus

@item Contour fill
@item Contour ranges
@item Contour lines
@item Diplay vectors
@item Show min/max
@item Iso surfaces
@item Stream lines
@item Graphs
@item Deformation
@item Line diagrams

@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-viewresults.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-viewresults.gif"></a>
<p><img src="icons/m-viewresults.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

The @b{View Results window} manages the visualization of the following type of results:

@itemize @minus

@item Contour fill
@item Contour ranges ( if @code{Result Range Table}s are present)
@item Contour lines
@item Diplay vectors
@item Show min/max
@item Scalar and Vector line diagram ( if Linear elements are present)
@end itemize


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/PostViewResults.ps,width=4.7cm,height=5.5cm,angle=0}
}}
\unpie{}
{
View Results Window
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="PostViewResults.gif"></a>
<img src="images/PostViewResults.gif"> 
<p>View Results Window
</center>
<p>
@end ifhtml
@end ifset

@end ifset


@cindex analysis selection
As the results are grouped into steps and analysis, GiD must know which analysis and step is
the currently selected for displaying results.
The @code{Analysis} menu of the @b{View Results} window is used to select the current analysis and step to be used for the rest of the results options. If some of the results view requires another analysis or step, the user will be asked for it.

@cindex Postprocessing no results
@strong{Note:} To stop viewing a result, the user can select @code{No Result} in this window or in the @b{View results} menu.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@menu
* Contour Fill::                        
* Contour Lines::                       
* Show Minimum and Maximum::            
* Display vectors::                     
* Iso Surface::                         
* Stream Lines::                        
* Line Diagrams::                       
* Legends::                             
@end menu


@node Contour Fill, Smooth Contour Fill, postprocessing results, postprocessing results
@section Contour Fill
@cindex contour fill
@cindex setting contour fill colors
@cindex Gauss points in contour fill

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-contourfill.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-contourfill.gif"></a>
<p><img src="icons/m-contourfill.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


This option allows the visualization of colored zones, in which a variable, or a
component, varies between two defined values. GiD can use as many colors as allowed 
by the graphical capabilities of the computer. When a high number of colors is used, 
the variation of these colors looks continuous, but the visualization becomes slower
unless the Fast-Rotation option is used. 
A menu of the variables to be represented will be shown, from which the one to 
be displayed will be chosen, by using the default analysis and step selected.

Vectors will be unfolded into X, Y, and Z components and its 
module. Symmetric matrix values will be unfolded into Sxx component, Syy component, 
Szz component, Sxy component, Syz component and Sxz component of the original 
matrix and also into Si component, Sii component and Siii component in 3D problems
or angular variation in 2D problems. Any of these components can be selected to be 
visualized.

When using results defined over gauss points, they are extrapolated to the nodes.
So discontinuities can appear between adjacent elements. If the gauss points
results can not be extrapolated to the nodes, they are drawn as coloured spheres.
The radius and detail level of these spheres can be configured too (@pxref{Point and Line options}).

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

Several configuration options can be accessed via the @b{Options} menu.


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-optionscontour.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-optionscontour.gif"></a>
<p><img src="icons/m-optionscontour.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@itemize @bullet
@item @b{Number Of Colors:}
Here the number of colors of the results color ramp can be specified.

@item @b{Width Intervals:}
fixes the width of each color zone. For instance, if a @code{width interval} of 2 is set, each color will represent a zone where the results differ at the most in two units. 

@item @b{Set Limits:}
this option is used to tell the program which contour limits should use when there 
are no user defined limits: the absolute minimum and maximum of 
all sets or shown sets, for the actual step or for all steps.  
@item @b{Define limits:}
when choosing this option the @code{Contour Limits} window appears (this option is also avalaible in the postprocess toolbar). With this window the user can set the minimum/maximum value that Contour Fill should use. Outliers will be drawn with the color defined in the @code{Out Min Color/Out Max Color} option.


@item @b{Reset Limit Values:}
this option resets the values defined in the  @code{Define limits} option. 

@item @b{Reset All:}
this option sets all Contour Fill options by default.

@item @b{Max/Min Options:}
Inside this group, several options for the minimum or maximum value can be defined:

@itemize @minus

@item @strong{ResetValue:}
here the user can reset the maximum/minimum value, so that the default value is used. 

@item @strong{OutMaxColor / OutMinColor:} 
with this option the user can specify how the outliers values should be drawn: @code{Black},
@code{Max/Min Color}, @code{Transparent} or @code{Material}.

@item @strong{Def. MaxColor / Def. MinColor:} 
this option lets the user define the color for the minimum or maximum value for the color scale to start with. 

@end itemize

@item @b{Color scale:}
Specifies the propertyes of the color scale: 

@itemize @minus

@item @strong{Standard:}
the color scale will be the default: starting from blue (minimum) through green until red (maximum).

@item @strong{Inverse Standard:}
the color scale will just be the inverse of the default: starting from red (minimum) through green until blue (maximum).

@item @strong{Terrain Map:}
a physical-map like color ramp will be used.

@item @strong{Black White:} 
Black for Minimum and White for Maximum, the scale will be a grey ramp.

@item @strong{Scale Ramp:}
this option lets the user specify how should the ramp change from minimum color to the maximum color:  @code{Tangent}, @code{ArcTangent} or @code{Linear}. The default is @code{ArcTangent}. 

@item @strong{Scale Type:} 
tells GiD how the colors between the minimum color and the maximum color should change: @code{RGB} or @code{HSV}.
@end itemize

@item @strong{Color window:} a window is poped up to let the user configure the colour scale
of the contours easily
@end itemize



@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/ContourColoursWin.ps,width=4.2cm,height=4cm,angle=0}
}}
\unpie{}
{
Contour Colours Window
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="ContourColoursWin.gif"></a>
<p><img src="images/ContourColoursWin.gif"> </p>
<p>Contour Colours Window
</center>
<p>
@end ifhtml
@end ifset
@end ifset



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml




@node Smooth Contour Fill, Contour Ranges, Contour Fill, postprocessing results
@section Smooth Contour Fill
@cindex smooth contour fill
@cindex Gauss points in smooth contour fill

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-smoothcontourfill.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-smoothcontourfill.gif"></a>
<p><img src="icons/m-smoothcontourfill.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


This option displays a Contour fill, explained in the previous section, 
of a local smoothing of the results defined over gauss points.

With the @b{@code{Smoothing type}} option inside the menu @code{Options->Contour}
the user can choose between these types of local smoothing:

@itemize @bullet
@item @b{Minimum value:}
as nodal results the minimum of the extrapolated gauss points results of the
adjacent elements are used.
@item @b{Maximum value:}
as nodal results the maximum of the extrapolated gauss points results of the
adjacent elements are used.
@item @b{Mean value:}
as nodal results the mean value of the extrapolated gauss points results of the
adjacent elements are used.
@end itemize


@node Contour Ranges, Contour Lines, Smooth Contour Fill, postprocessing results
@section Contour Ranges
@cindex contour ranges

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-contourranges.ps,width=5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-contourranges.gif"></a>
<p><img src="icons/m-contourranges.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

This is the same as the @code{Contour Fill} visualization type, but the coloured areas are
created following a @code{'Result range table'} specified in the results file, 
@pxref{Result Range Table}, and the name of these areas are also visualized as text labels.


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/CRanges.ps,width=5cm,height=4cm,angle=0}
}}
\unpie{}
{
Contour ranges example
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="CRanges.gif"></a>
<p><img src="images/CRanges.gif"> </p>
<p>Contour ranges example
</center>
<p>
@end ifhtml
@end ifset
@end ifset



@node Contour Lines, Show Minimum and Maximum, Contour Ranges, postprocessing results
@section Contour Lines
@cindex contour lines

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-contourlines.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-contourlines.gif"></a>
<p><img src="icons/m-contourlines.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


This display option is quite similar to contour fill (@pxref{Contour Fill}), but here, 
the isolines of a certain nodal variable are drawn. In this case, each
color ties several points with the same value of the variable chosen.

Here the configurations options are almost the same than the ones for Contour Fill 
(@pxref{Contour Fill}), with the only difference that the number given in the @code{Number of Colors} option will be used as the number of lines for this contour lines representation.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Show Minimum and Maximum, Display vectors, Contour Lines, postprocessing results
@section Show Minimum and Maximum
@cindex show min max

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-showminmax.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-showminmax.gif"></a>
<p><img src="icons/m-showminmax.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option the user can see the minimum and maximum of the chosen result. 


@strong{Note:} This minimum and maximum can be absolute, for all the meshes/sets/cuts, or relative (local) to the shown ones. 
This can be selected from the top menu @code{Options} -> @code{Contour} -> @code{Set Limits}.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Display vectors, Iso Surface, Show Minimum and Maximum, postprocessing results
@section Display vectors
@cindex display vectors


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-displayvectors.ps,width=4cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-displayvectors.gif"></a>
<p><img src="icons/m-displayvectors.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


This option displays a menu with results from vectors and matrices (where the principal 
values are previously evaluated by the program). A menu of variables to be represented 
will be shown, from which the one to be seen should be chosen, using the default analysis 
and step selected. Once a vector is chosen,
the program will display the nodal vectors of the chosen result. The drawn vectors can 
be scaled interactively. The factor can be applied several times and every time it
changes to the new input value. 

The user can modify the colour of the vectors, which, by default, are drawn in green,
so that all the vector are drawn with the same colour, or let the vectors colour vary
according to the result module.

When drawing a matrix result, such as the stress tensor, only a single color representation 
of principal values is available: blue when negatives
(also drawn as >--< representing compressions), and red when positives (also drawn as <-->
representing tensions).

Vectors will be unfolded into X, Y, and Z components and its 
module. So only the X, Y or Z component can be drawn or the whole vector, which is represented
by the module menu option.
Symmetric matrices will be unfolded into Si component, Sii component, Siii component and 'All'
components. Any of these components can be selected to be visualized.
Si, Sii and Siii represent the eigen values & vectors of the matrix results which are calculated
by GiD, and which are ordered according to the eigen value.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


Several configuration options can be accessed via the @b{Options} menu.


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-optionsvectors.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-optionsvectors.gif"></a>
<p><img src="icons/m-optionsvectors.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@b{Color Mode:}
This option lets the user choose if vectors are drawn in one color @code{(Mono Color)} or in several colors @code{(Colour Modules)}.

@b{Number of Colors:}
If the user uses @code{Colour Modules} to draw vectors, it is possible to choose the number of colors.

@b{Offset:}
With this option, the user controls where the vector should be in relation of the node, ranging from 
0, to tie the tail of the arrow to the node, to 1, to tie the tip of the arrow to the node.

@strong{Note:} These options have no effect when viewing a matrix result.

@strong{Colour (mono):} When vectors are drawn in @code{(Mono Color)} @code{Color Mode}, they are drawn
in green. The user can change this green colour selectiong this entry.

@b{Detail:}
The level of detail can be adjusted to draw the vectors quicker or nicer. 
The different options are:
@itemize @minus
@item Point: the arrow head will be drawn as a point. The style used to draw
these point like arrow heads can be modified through the point options window
described before, @pxref{Point and Line options}.
@item Lines: the arrow head will be drawn as four lines.
@item 2 Triangles: the arrow head will be drawn with 2 self intersecting triangles.
@item 4 Triangles: the arrow head will be drawn as cones of 4 triangles.
@item 8 Triangles: the arrow head will be drawn as cones of 8 triangles.
@end itemize

@strong{Note:} This last option affects also matrix and local axes results.


@c  @tex
@c  \bigskip
@c  \bigskip
@c  @end tex
@c  @ifhtml
@c  <p><br><br></p>
@c  @end ifhtml

@c  @node Contour ranges, Iso Surface, Display vectors, postprocessing results
@c  @section Contour ranges
@c  @cindex Contour ranges

@c  @ifset photo
@c  @tex
@c  \hbox{
@c  \psfig{figure=icons/m-contourranges.ps,width=4cm,height=0.88cm,angle=0}
@c  }
@c  @end tex

@c  @ifset html
@c  @c@html
@c  @ifhtml
@c  <p><img src="icons/m-contourranges.gif"></p>
@c  @end ifhtml
@c  @c@end html
@c  @end ifset
@c  @end ifset



@c  Contour ranges start here ... 






@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Iso Surface, Stream Lines, Display vectors, postprocessing results
@section Iso Surfaces
@cindex Iso Surface
@cindex convert to cuts


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-isosurfaces.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-isosurfaces.gif"></a>
<p><img src="icons/m-isosurfaces.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset



Here a surface is drawn that ties a fixed value inside a volume mesh. 
A line is drawn for surface meshes.
To create iso-surfaces there are several options:
@itemize @bullet
@item @b{Exact:}
After choosing a result, or a result component, of the current analysis and step,
the user can input several fixed values and then for each given value a iso-surface is drawn.

@item @b{Automatic:}
Similarly, after choosing a result, or a result component, the user is asked for the number of
iso-surfaces to be created. GiD calculates the values between the Minimum and the Maximum (these
not included).

@item @b{Automatic Width:}
After choosing a result, or result component, the user is asked for a width. This width is
used to create as many iso-surfaces as needed between the Minimum and the Maximum (these included)
values defined.
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


Several configuration options can be accessed via the @b{Options} menu.


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-optionisosurfaces.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-optionsisosurfaces.gif"></a>
<p><img src="icons/m-optionisosurfaces.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@itemize @bullet
@item @b{Display Style:}
For Iso-Surfaces there is also a @code{Display Style} option, like for 
Volumes/Surfaces/Cuts. The options @code{All Lines}, 
@code{Hidden Lines}, @code{Body}, @code{Body Lines} are avalaible. (@pxref{Display Style}) 

@item @b{Render:}
The @code{render} option for Iso-Surfaces renders that surfaces @code{Flat} or @code{Normal}. (@pxref{Display Style})

@item @b{Transparency:}
The Iso-Surfaces can be set to @code{Transparent} or @code{Opaque}. (@pxref{Display Style}) 

@item @b{Convert to cuts:}
Another interesting option is @code{Convert To Cuts}. With this options all the Iso-Surfaces drawn
will be turn into cuts, so that they can be saved, read, and used to drawn results over them.
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Stream Lines, Line Diagrams, Iso Surface, postprocessing results
@section Stream Lines
@cindex stream lines
@cindex particle tracing


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-streamlines.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-streamlines.gif"></a>
<p><img src="icons/m-streamlines.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

With this option the user can display a stream line, or, in fluid dynamics, a particle
tracing, in a vector field.
After choosing a vector result, using the default analysis and step selected, the program asks the user for a point to start with the plotting of the stream line. This point can be given in several ways:
@itemize @minus
@item 
@b{just clicking on the screen:} the point will be the intersection between the line orthogonal
to the screen and the plane parallel to the screen and containing the @code{Rotation center},

@item 
@b{joining a node:} the selected node will be used as a start point,

@item 
@b{select nodes:} here several nodes can be selected to start with,

@item 
@b{along line:} with this option the user can define a segment, along which several start
points will be chosen. The number of points will also be asked for, including 
the ends of the segment. In case of just one point start, this  will be the center of the segment.

@item 
@b{in a quad:} the user can enter here four lines that define a quadrilateral area which
will be used to create a N x M matrix of points. These points will be the start for the stream
lines. When giving N x M, N lies on the first and third line, and M on the second and fourth.
So, points ( 0, 0..N), ( M, 0..N), ( 0..M, 0) and ( 0..M, N) will lie just on the lines. But
in case of N=1 or M=1, this will be the center of the line, and if N = 1 and M = 1, this will
be the center of the Quad.

@item
@b{intersectset}  the point will be the intersection between the line orthogonal
to the screen and the current viewed sets nearest the view point.
@end itemize

When viewing @code{Stream Lines}, labels can be drawn to show the times at start and end points 
of the stream line.

Stream lines can also be deleted, and its, by default, green colour can be changed too.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

Following options can be chosen for @code{Stream Lines}:


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-optionsstreamlines.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-optionsstreamlines.gif"></a>
<p><img src="icons/m-optionsstreamlines.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

@b{Color}: the colour of the stream lines.

@b{Delete}: 
this option lets the user select stream lines to be deleted. 

@b{Label}: 
this option lets the user select the kind of label:
@itemize @minus
@item @code{None}: no labels are drawn. 
@item @code{0_End}: labels are drawn with the following convention: 0 at the start of the stream line and the total time taken for the particle to travel at the end.
@item @code{Ini_End}: labels are drawn with the following convention: 0 at the chosen point, and @code{- time before} at the begin of the stream line and @code{time after} at the end.
@end itemize

@b{Size & detail}:
here the user can adjust the wise, width, and detail of the stream lines using a window ( @pxref{Point and Line options}).


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Line Diagrams, Legends, Stream Lines, postprocessing results
@section Line diagrams
@cindex line diagrams
@cindex beam diagrams
@cindex scalar diagram
@cindex vector diagram

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-linediagrams.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-linediagrams.gif"></a>
<p><img src="icons/m-linediagrams.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset



This result visualization option is only active when line elements are used in the mesh,
and only will be represented over these line elements.
When using this result visualization option, graph-style lines will be drawn over the line elements.

When drawing a @b{Scalar Diagram}s the graph-style lines are drawn on a 
plane paralel to the screen ( with its normal vector pointing to the user) when
this result view is selected.
The positive 'axis' will be the vector resulting of the cross product between
this normal vector and the one that the line defines.

When drawing a @b{Vector Diagram}s the graph-style lines are drawn on a 
plane that withholds the result vector and the one that the line defines.
The graph-style line represent the module of this vector.
The positive 'axis' is also defined by the result vector.
As modules are positive, to allow negative values, the input format for vector results
allows the introduction of a fourth component: the signed vector module 
(@pxref{File ProjectName.post.res - ProjectName.flavia.res}).

There is a @code{Show Elevations} option only accesible through the @code{Right buttons} menu
under '@b{Results} / @b{LineDiagram} / @b{Options}'. Elevations are lines that connect the nodes
and the gauss points of the line element and the graph style line that represents the result.
The options are:

@itemize @bullet
@item @b{None:} to switch the elevations off,
@item @b{Nodes only:} to draw the elevation lines only on the nodes,
@item @b{Whole line:} to draw the elevation lines along the whole line, using nodes and gauss points,
@item @b{Filled line:} to draw orange filled elevations,
@item @b{Contour filled line:} the colours used to draw the filled elevations will be the same as of
a contour fill done along the line.
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Legends, Graphs, Line Diagrams, postprocessing results
@section Legends
@cindex legends

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-legends.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-legends.gif"></a>
<p><img src="icons/m-legends.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset

Legends appear when Contours visualization, iso-surfaces or color vector visualization are used:

@itemize @minus
@item @b{Show}: legends can be switched on and of.
@item @b{Opaque}: legends can be transparent, showing the result visualization behind them, or not.
@item @b{Show title}: with this option the result name of the current visualization appears on the top
of the legend.
@item @b{Outside}: activating this option, the legend is shown on a separate window, thus freeing precious graphical surface on GiD's windows.
@item @b{Automatic comments}: if this option is activated, information about the type of analysis, 
the actual step and the kind of result, is added at the bottom of the screen @pxref{Automatic comments}.


@end itemize



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Graphs, Result surface, Legends, postprocessing results
@section Graphs
@cindex Graph Lines
@cindex Graphs

@ifset photo

@tex
\hbox{
\psfig{figure=icons/m-graphs.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex
@tex
\hbox{
\psfig{figure=icons/m-bordergraph.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex


@ifset html
@c@html
@ifhtml
<a name="m-graphs.gif"></a>
<a name="m-bordergraph.gif"></a>
<p><img src="icons/m-graphs.gif"><br><br>
<img src="icons/m-bordergraph.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@menu
* Graph Lines Description::             
* Graph Lines Options::                 
* Graph Lines File Format::             
@end menu

@node Graph Lines Description, Graph Lines Options, Graphs, Graphs
@unnumberedsubsec Graph Lines description

Here the user can draw graphs in order to have a closer look to the results.
Several graphs types are available: point analysis against time, result 1 vs.
result 2 over points and result along a boundary line.
The user can also save or read a Graph (@pxref{files - postprocess}). The format of the file will be described later. (@pxref{Graph Lines File Format})

Under the @b{Graphs} option of the @b{View Results} menu there are the following options:
@itemize @bullet
@item @code{Show}: here the user can switch between the graphs view and the post-processing view.
@item @code{ClearGraphs}: to reset all the graphs and do a new start.

@item @code{Point Analysis}: this graph shows the evolution of a result on a point along
all the steps in the current analysis.

@item @code{Point Graph}: after choosing a point or points, the user can contrast a result
against another.

@item @code{Border Graph}: after selecting a border, the user can see how the results varies along this boundary. You can also use the @code{Border Graph} window (@code{Windows} menu) to configure this type of graphs.
@end itemize

The user can also view the labels of the points of the graphs, not only the Graph points number, 
but also theirs X and Y values. If some points of the Graphs are labeled, when turning into
the normal results view, the labels also appear on the results view.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Graph Lines Options, Graph Lines File Format, Graph Lines Description, Graphs
@unnumberedsubsec Graph Lines options
@cindex Graph Lines options


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-optionsgraphs.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-optionsgraphs.gif"></a>
<p><img src="icons/m-optionsgraphs.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset



@itemize @bullet

@item @code{Grids}: here the user tells whether to drawn grids or not.

@item @code{Current Style}: the user can choose how the new graphs should look like. The possible styles are @code{Dot}, @code{Line} and @code{Dot-Line}.

@item @code{Change Style Graph}: the user can change the style of the selected graph. 

@item @code{Change Colour Graph}: herewith the colour of the selected graph can be changed.

@item @code{Change Line Width Graph}: the width of the graph lines can be changed too.

@item @code{Change Line Pattern Graph}: this option is useful to switch between different line patters for a b/w printer.

@item @code{Change Point Size Graph}: also the point size can be changed for the @code{Dot} and @code{Dot-Line} styles.

@item @code{Change Style Graph}: the user can change the style of the selected graph. 

@item @code{Change Title Graph}: the user can change the title of the selected graph.


@item @code{Title}: the user can change the title, its position or reset its value. 

@item @code{X_Axis}: here the user can set min and max values and divisions for the X axis, 
reset them, and change its Label.

@item @code{Y_Axis}: here the user can set min and max values and divisions for the Y axis, 
reset them, and change its Label.
@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Graph Lines File Format,  , Graph Lines Options, Graphs
@unnumberedsubsec Graph Lines File Format
@cindex Graph Lines file format

The Graph file that GiD uses is an standard ASCII file. Every line of the file 
is a point of the Graph with X and Y coordinates separated by a space.
Comment lines are also allowed and should begin with a '@code{#}'. The title of the Graph and
the labels for the X and Y axis can also be configured. If a comment line contains
the Keyword '@code{Graf:}' the string between quotes that follows this keyword will be used as
title of the graf. The string  between quotes that follows the Keyword '@code{X:}' will be used as
label for the X axis. The same is also true for the Y axis, but for the Keyword '@code{Y:}'.

Here an example:

@example
        # Graf: "Nodes 26, 27, 28, ... 52 Graf."
        #
        # X: "Szz-Tensiones_Nods." Y: "Sxz-Tensiones_Nods."
        -3055.444 1672.365
        -2837.013 5892.115
        -2371.195 666.9543
        -2030.643 3390.457
        -1588.883 -4042.649
        -1011.5 1236.958
        # End
@end example


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml




@node Result surface, Deform Mesh, Graphs, postprocessing results
@section Result surface
@cindex Result surface

@c @ifset photo
@c @tex
@c \hbox{
@c \psfig{figure=icons/m-smoothcontourfill.ps,width=5cm,height=0.88cm,angle=0}
@c }
@c @end tex
@c 
@c @ifset html
@c @c@html
@c @ifhtml
@c <a name="m-smoothcontourfill.gif"></a>
@c <p><img src="icons/m-smoothcontourfill.gif"></p>
@c @end ifhtml
@c @c@end html
@c @end ifset
@c @end ifset


This option uses a result component, or a scalar value, and draws a 3D surface above the mesh following the normals of this mesh. It can be seen as an extrusion of the mesh along their normals with the result as factor. Like the beam diagrams but with surfaces.

With the @b{@code{Show elevations}} option inside the menu @code{Options->Result Surface}
the user can choose how the elevations ( lines or faces that connect the Result Surface with the underlaying mesh) are drawn:

@itemize @bullet
@item @b{None:}
The mesh and its result surface are drawn separately, without interconnecting lines or faces.
@item @b{Extruded nodes:}
lines are drawn between the original nodes of the mesh and the extruded ones, the ones of the result surface.
@item @b{Extruded edges:}
faces are drawn between the original edges (of the elements) of the mesh and the extruded ones, the ones of the result surface.
@end itemize



@node Deform Mesh, Do Cuts, Result surface, postprocessing results
@section Deform Mesh
@cindex deform mesh


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-deformation.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex


@ifset html
@c@html
@ifhtml
<a name="m-deformation.gif"></a>
<p><img src="icons/m-deformation.gif"</p>
@end ifhtml
@c@end html
@end ifset
@end ifset


Volumes, surfaces and cuts can be deformed according to a nodal vector and a factor. When doing so
all the results are drawn on the deformed volumes, surfaces and cuts. This is called in
GiD: @code{Main Geometry}. Thus, when the @code{Main Geometry} is deformed, results are
also drawn deformed; and when @code{Main geometry} is in its original state, results are
also drawn in its original state. 


In GiD there is a @code{Deform Mesh} window to allow this.

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-deformmesh.ps,width=3.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-deformmesh.gif"></a>
<p><img src="icons/m-deformmesh.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/PostMeshDeformation.ps,width=3.6cm,height=8.0cm,angle=0}
}}
\unpie{}
{
Deformation Window
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="PostMeshDeformation.gif"></a>
<img src="images/PostMeshDeformation.gif"> 
<p>Deformation Window
</center>
<p>
@end ifhtml
@end ifset

@end ifset

On the upper part of this window, the user can choose between the @code{Original} state of the 
@code{Main Geometry} and the @code{Deformed} state, for which a nodal vectorial result, and
an anlysis and step, must be selected and a factor entered.

There is also a so-called @code{Reference Geometry} option. This allows to visualize volumes, surfaces or cuts like @code{Main Geometry} but NO results can be displayed over these volumes, surfaces or cuts.
It is merely provided as a reference, to contrast several deformation or changes of the original
geometry. Remember that the current Mesh @code{Display Style} will be used for the 
@code{Reference Geometry} and it can be only changed when redoing it.

On the lower part of the @code{Deform Mesh} window, this @code{Reference Geometry}
can be configured. The user can choose between:

@code{Off}, so this reference visualization is not displayed.

@code{ Original}, if @code{Main Geometry} is deformed and the user wants to compare it
with its original state without loosing a results representation.

@code{Deformation}, where,
after providing an analysis, step, result and factor, the user can use it
to contrast two deformation states, or a deformed state and an original geometry.

@code{Color}, the colour of the @code{reference mesh}es can be the same as the original meshes,
or can be specified here.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Do Cuts, Animation, Deform Mesh, postprocessing results
@section Do Cuts
@cindex Post-processing Do Cuts
@cindex Post-processing divide
@cindex Post-processing Make a cut
@cindex Post-processing cuts
@cindex Post-processing cut planes
@cindex convert cuts to sets

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-docuts.ps,width=1.5cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-dotcuts.gif"></a>
<p><img src="icons/m-docuts.gif"></p>
@end ifhtml
@c@end html
@end ifset
@end ifset



Here the user can cut and divide volumes, surfaces and cuts. A cut of a volume mesh results into
a cut plane. The cut is done for all the meshes, despite that some of them are switched off.
When cutting surfaces, a line set will be created. Here only those surfaces that are switched on are cut.

Another feature is that a cut can be deformed, if meshes are also told to do so 
(@pxref{Deform Mesh}). A cut of a deformed mesh, when changing to the original shape,
will be deformed accordingly. 

When dividing volumes/surfaces only those elements of the volumes/surfaces switched on that lie 
on one side of a specified plane will be used to create another volume/surface.

@itemize @bullet
@item @b{Cut Plane:}
the user specifies a plane which cuts the volumes/surfaces. Several options can be used to enter
this plane. With @code{Two Points} ( the default), the plane is defined by the corresponding line and 
the orthogonal direction to 
the screen. With @code{Three Points}, the plane is defined by this three points. When choosing the 
points, the nodes of the mesh can also be used. All the volume meshes are cut, whether they are 
drawn or not.

@item @b{Divide Volume Sets:}
the user specifies a plane which is used to divide the meshes. Several options can be used to enter
this plane. With @code{Two Points} ( the default), the plane is defined by the corresponding line and 
the orthogonal direction to 
the screen. With @code{Three Points}, the plane is defined by these three points. When choosing the 
points, the nodes of the mesh can also be used. After defining the plane, the user should choose which 
section of the mesh should be saved by select the side of the plane to use. Only those elements that lie
entirely on this side are selected. Only those volume meshes that are shown are divided.

@item @b{Divide Surface Sets:}
the user specifies a plane which is used to divide the sets. Several options can be used to enter
this plane. With @code{Two Points} (the default), the plane is defined by the corresponding line and 
the orthogonal direction to 
the screen. With @code{Three Points}, the plane is defined by these three points. When choosing the 
points, the nodes of the mesh can also be used. After defining the plane, the user should choose which 
section of the mesh should be saved by select the side of the plane to use. Only those elements that lie
entirely on this side are selected. Only those surface meshes that are shown are divided.

When doing a division, clicking with the right button mouse, inside the @b{Contextual} menu,
there are several useful options:
@itemize @minus
@item exact: to do a exact division, i.e. elements are cut to create the division.
@item parallel planes: the remaining elements will be ones between two paralel planes,
a @code{distance} can also be entered, after choosing this option from the same @b{contextual} menu
@end itemize

@item @b{Divide lines:}
the user specifies a plane which is used to get the lines at one side of this plane

@item @b{Succession:}
This option is an enhancement of @code{Cut Plane}. Here the user specifies an axis that 
will be used to create cut planes orthogonal to this axis. The number of planes is also asked for.

@item @b{Cut Wire:}
Here the user can define a 'wire' tied to the edges of the elements of the volumes/surfaces. So when the
volumes/surfaces are deformed, the wire is deformed too. And viceversa, if a wire is defined while the 
volumes/surfaces are deformed, when turning them into its original shape, the cut-wire is "undeformed" with
them.

@item @b{Convert cuts to surface sets:}
With this options cuts can be converted to surface sets so they can be saved, or cut again.
@end itemize

Cuts can also be read and write from/to a file. The information stored into the file from a 'Cut Plane'
is the plane equation that defines the plane ( Ax + By + Cz + D = 0), so it can be used with several models.
The information stored into the file from a 'Cut Wire' is the points list of the cut-wire, i.e. the 
interseccion between the wire and the edges of the meshes/sets.
These files are standard ASCII files. A line of a 'Cut Plane' archive contains the four coeficients
of the cut defining plane separated by spaces. A line of a 'Cut Wire' archive contains the three 
coordinates of a point of the wire. Comment lines are allowed and should begin with a '@code{#}'.

An example of a 'Cut Plane' archive where three planes were written:

@example
        # planes created of a 'cut succesion'
        -10.82439 0.5740206 0 51.62557
        -10.82439 0.5740206 0 12.45994
        -10.82439 0.5740206 0 -26.70569
@end example

An example of a 'Cut Wire' archive:

@example
        -2.444425 3.883427 2.487002
        2.130787 2.762815 3.885021
        0.8411534 4.458836 3.215301
        4.270067 3.795048 2.037187
        5.66561 3.414776 0.8219391
        2.945865 3.600701 3.29012
        0.4487007 3.764661 3.574121
@end example


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Animation, Automatic comments, Do Cuts, postprocessing results
@section Animation
@cindex Animation
@cindex Animation Window
@cindex TIFF sequence
@cindex GIF sequence
@cindex AVI files
@cindex MPEG files

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-animate.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-animate.gif"></a>
<p><img src="icons/m-animate.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


With this window a little bit of automatization has been done to create animations inside GiD.
Nowadays, almost all the results visualization are animated. Only stream-lines are not 
automatized along all the steps of the current analysis. 

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/PostAnimate.ps,width=3.9cm,height=6cm,angle=0}
}}
\unpie{}
{
Animation Window
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="PostAnimate.gif"></a>
<img src="images/PostAnimate.gif"> 
<p>Animation Window
</center>
<p>
@end ifhtml
@end ifset

@end ifset

This window lets the user create an animation of the current @code{Results View}, where
the limits can be fixed along the animation with @code{Automatic Limits}, and/or of
the @code{Deformation} of the meshes.@*
On the right of the @code{Step:} label, the step value is shown. On the slide bar, the step 
number is shown.

The four buttons under the slide bar are autoexplicative, they should 'Rewind', 'Stop', 'Play'
and 'Step' the animation. Also clicking on the slide bar the animation can be stepped down or up. The green led will change to red when an animation is beign stored on a file, after pressing the 'Play'
button. This led wil change back to green when the animation is finished, or the 'Stop' button is pressed.


Options are:

@itemize @bullet
@item @code{Automatic Limits}: here GiD searches for the minimum and maximum values of the results
along all the steps of the analysis and uses them to draw the results view through all the steps.
@item @code{Endless}: to do the animation forever.
@item @code{Delay}: here the user can specify a delay time between steps in miliseconds.
@item @code{Save TIFF/GIFs on}: with this option the user can save snapshots, in TIFF or GIF format, 
of each step, when the '@code{Play}' button is pushed. Here the filename given will be 
used as a prefix to create 
the TIFF/GIFs, for instance, if the user writes @code{MyAnimation}, TIFF/GIF files will be created 
with names @code{MyAnimation-01.tif}/@code{MyAnimation-01.gif}, 
@code{MyAnimation-02.tif}/@code{MyAnimation-02.gif}, and so on.
@item @code{Save MPEG/AVI True Color/AVI 15bpp/GIF on}: 
giving here a filename, a MPEG/AVI/GIF file will be created when 'Play' button 
is pushed. 
@*
@strong{Note:} To avoid problems when trying to view an @b{MPEG} format animation in @b{Microsoft Windows},
it is strongly recommended to use the @b{Default} menu to select a 
'standard' size and press the @b{Resize} button. The graphical window will change to this 'standard' size.
After finishing the animation, just selecting @b{Default} on the menu and pressing the @b{Resize} button,
the previous size will be restored.

@item @code{Static analysis animation profile}: if the project has only one step, it's possible to simulate an animation by generating intermediate steps. Use this option to automatically generate several frames, following a lineal, cosine, triangular or sinusoidal interpolation between the normal state and the deformed state. 



@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/PostAnimate2.ps,width=3.9cm,height=6cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@ifhtml
<p>
<center>
<img src="images/PostAnimate2.gif"> 
<p></center><p>
@end ifhtml
@end ifset

@end ifset


@end itemize



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Automatic comments, Several results, Animation, postprocessing results
@section Automatic comments
@cindex automatic comments
@cindex Comments patterns
@cindex automatic comments patterns


@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-comments.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<a name="m-animate.gif"></a>
<p><img src="icons/m-comments.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset


While displaying results, comments can be automatically generated by switching on
the @code{Automatic} checkbox in the Comments window, which appears selecting
@code{Utilities->Graphical->Comments}.


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/comments.ps,width=3.9cm,height=6cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@ifhtml
<p>
<center>
<img src="images/comments.gif"> 
<p></center><p>
@end ifhtml
@end ifset

@end ifset




If this option is selected and the comment lines are empty, the program will
create its own automatic comments, like these ones:

@example @*

@b{Load Analysis}, step @b{3}
@b{Display Vectors} of @b{Desplacements}, @b{|Desplacements|} factor @b{68095.4}.
@b{Deformation} ( x@b{127.348}): @b{Desplacements} of @b{Load Analysis 2}, step @b{8}.

@end example

in bold, the fields which will change when the visualization changes.

The user can also create its own automatic comments, just filling the comment lines.
To tell the program where the result name, analysis name, etc., should be placed,
following fields can be used:

@itemize @bullet
@item %an: for analysis name of the current visualized result
@item %sv: for step value of the current visualized result
@item %vt: for result visualization type of the current visualized result
@item %vf: for vectors factor used in the current visualized result ( if any)
@item %rn: for result name of the current visualized result
@item %cn: for component name of the current visualized result
@item %da: for analysis name of the current deformation ( if any)
@item %ds: for step value of the current deformation ( if any)
@item %dr: for result name of the current deformation ( if any)
@item %df: for factor of the current deformation ( if any)
@end itemize

GiD will substitute the fields by the values of the current visualization.
Fields which can not be fulfilled will be empty.



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Several results,  , Automatic comments, postprocessing results
@section Several results 
@cindex several results 

@ifset photo
@tex
\hbox{
\psfig{figure=icons/m-several.ps,width=3cm,height=0.88cm,angle=0}
}
@end tex

@ifset html
@c@html
@ifhtml
<p><img src="icons/m-several.gif"> </p>
@end ifhtml
@c@end html
@end ifset
@end ifset




With this window, which appears under @code{Windows->Several Results}, the user can select
whether to view the results one by one, as usual, or to view some results visualization types
at once, for instace a contour fill of preassure and velocity vectors at the same time.
From this window the user can also delete not desired results visualization.
After selecting the desired behaviour, the user should press the @code{@b{Apply}} button


@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .15 .3
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/VariosResultadosWin.ps,width=4.4cm,height=2.5cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/VariosResultados.ps,width=8cm,height=7cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{
Several results window and example showing contour fill, vectors and the minimum and maximum visualization types
}
@end tex

@ifset html
@ifhtml
<center>
<a name="VariosResultadosWin.gif"></a>
<img src="images/VariosResultadosWin.gif">
<p>Several results window</p>
<a name="VariosResultados.gif"></a>
<img src="images/VariosResultados.gif">
<p>Example showing contour fill, vectors and the minimum and maximum visualization types</p>
</center>
<p>
@end ifhtml
@end ifset
@end ifset







































@node Customization, POSTPROCESS DATA FILES, postprocessing results, Top
@chapter CUSTOMIZATION
@cindex Customization 
@cindex Problem Type

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Basic customization ideas @| @| @thispage
@end iftex


@menu
* Introduction - ProblemType::          
* Configuration Files::                 
* Template File::                       
* Executing an external program::       
@end menu

@node Introduction - ProblemType, Configuration Files, Customization, Customization
@section Introduction


@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading Basic customization ideas @| @| @thispage
@end iftex

When GiD is to be used for a particular type of analysis, it is necessary to
predefine all the information required from the user and to define the way
the final information is given to the solver module. To do so, some files
are used to describe conditions, materials, general data, units systems, symbols and the format of the
input file for the solver. We call @b{Problem Type} to this this collection of files used to configure GiD for a particular type of analysis. 

@strong{Note:} You can also learn how to configure GiD for a particular type of analysis, following the @b{Problem Type Tutorial}; this tutorial is included with the GiD package you've bought. You can also download it from the GiD web page. (http://www.gidhome.com/support)


Due to the vocation of GiD as  general purpose pre and post processor, the configuration 
for the different analysis must be performed according to the particular specifications
of every solver. This implies the necessity of creating specific data input files
for every solver. However, GiD allows to perform this configuration process inside 
itself without any change in the solver and without having to program any independent utility.


@ifset photo
@tex
\inifigura
\centerline{\hbox{
\psfig{figure=images/customization.ps,width=13.78cm,height=8.96cm,angle=0}
}}
\unpie{}
{
}
\finfigura
@end tex

@ifset html
@ifhtml
<P><BR></P>
<center>
<a name="customization.gif"></a>
<img src="images/customization.gif"> 

</center>
<p>
@end ifhtml
@end ifset

@end ifset




To configure these files means to define the data that must be input by the user, as well as the materials to be implemented and other geometrical and time-dependent
conditions. It is also possible to add some symbols or drawings to represent
the defined conditions. GiD gives the oportunity of working whith units when defining the properties of the mentioned data, but there must be a configuration file where it could be found the definition of the units systems.It must be also defined the way that all this data must be
written inside a file that will be the input file to be read by the corresponding solver. 


The creation of a @b{Problem Type} implies the creation of a 
directory with the Problem's Type name and the extension @code{.gid}. This directory can be 
located in the current working directory or in the main GiD executable directory. 
The first case, the creation inside the current working directory,  
can be useful during the development of the project. Once it is finished, 
it can be advisable to move the directory to the one where GiD is stored; like this, your Problem Type will be added to those included in the system and it will appear in the GiD menu (@pxref{Problem type}). In both
cases, the series of files must be inside the problem type directory. The name for 
most of them will be composed by the same problem type's name and an extension referring to 
their function. Considering @code{problem_type_name} to be the name of the Problem Type and @code{project_name} the name of the project, the diagram of the 
file configuration is the following:












@ifset photo
@tex
\inifigura
\centerline{\hbox{
\psfig{figure=images/use_of_filesNF.ps,width=12.67cm,height=16cm,angle=0}
}}
\unpie{}
{
}
\finfigura
@end tex

@ifset html
@ifhtml
<P><BR></P>
<center>
<a name="use_of_filesNF.gif"></a>
<img src="images/use_of_filesNF.gif"> 

</center>
<p>
@end ifhtml
@end ifset

@end ifset




@example
@end example

@itemize @bullet

@item @b{directory name}: @code{problem_type_name.gid} 

@example
@end example

@item @b{directory location}: @code{c:\a\b\c\GiD_directory\problemtypes}

@example
@end example 
@b{Note:} In versions previous to 6.0 the @code{problemtypes} directory does not exist, so your problem type must reside in the @code{GiD_directory}. In versions later to 6.0 it's recommended to put your problem type inside the @code{problemtypes} directory.

@example
@end example


@item  @b{Configuration files}
@itemize @minus
@item @code{problem_type_name.@b{cnd}  Conditions definitions}
@item @code{problem_type_name.@b{mat}  Materials properties }
@item @code{problem_type_name.@b{prb}  Problem and intervals data} 
@item @code{problem_type_name.@b{uni}  Units Systems}   
@item @code{problem_type_name.@b{sim}  Conditions symbols }
@item @code{                   ***.@b{geo}  Symbols geometrical definitions}
@item @code{                   ***.@b{geo}  Symbols geometrical definitions} ...
@end itemize

@example
@end example

@item @b{Template files}
@itemize @minus
@item @code{problem_type_name.@b{bas}  Information for the data input file}
@item @code{                  ***.@b{bas}  Information for additional files}
@item @code{                  ***.@b{bas}  Information for additional files} ... 

@end itemize


@example
@end example

@item @b{TCL extension files}
@itemize @minus
@item @code{problem_type_name.@b{tcl}  Extensions to GiD written in the TCL-TK programming language}
@end itemize

@example
@end example


@item @b{Command execution files}
@itemize @minus
@item @code{problem_type_name.@b{bat}  Operating system shell that executes the analysis process}
@end itemize
@end itemize


Files @code{problem_type_name.sim}, @code{***.geo} and @code{***.bas} are not mandatory and can
be added to facilitate the visualization (files @code{problem_type_name.sim} and @code{***.geo})
or to prepare the data input for the restart in additional files (files @code{***.bas}).


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Configuration Files, Template File, Introduction - ProblemType, Customization
@section Configuration Files
@cindex Problem Type Files

@iftex
@headings off
@evenheading @thispage @| @| @thischaptername
@oddheading @thissection @| @| @thispage
@end iftex

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

These files generate the conditions and material properties, as well as the
proper general problem and intervals data to be transferred to the mesh, giving at the
same time the chance to define geometrical drawings or symbols to represent some 
conditions on the screen.

@menu
* Conditions file::                     
* Materials file::                      
* Problem and intervals data file::     
* Conditions symbols file ::            
* Unit System file::                    
* Special fields::                      
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Conditions file, Materials file, Configuration Files, Configuration Files
@unnumberedsubsec Conditions file (.cnd)
@cindex Conditions definitions
@cindex File NAME.cnd

  
The file with extension's name @code{.cnd} contains all the information about the
conditions that can be applied to different entities. The condition can adopt different field
values for every entity. This type of information includes, for instance, all the 
displacement constraints and applied loads in a structural problem or all the
prescribed and initial temperatures in a thermical analysis.

An important characteristic of the @code{conditions} is that they must define over what kind 
of entity are going to be applied, i.e., over points, lines, surfaces, volumes or layers and
over what kind of entity will be transferred, i.e., over nodes, over face elements or over body elements.

@itemize @bullet
@item @b{over nodes} means that the condition will be transferred to the
nodes contained in the geometrical entity where condition is assigned.
@item @b{over face elements} If this condition is applied to a line that
is the boundary of a surface or to a surface that is the boundary of a
volume, this condition is transferred to the higher elements, marking
the affected face.
@item @b{over body elements} If this condition is applied to lines, it
will be transferred to line elements. If it is assigned to surfaces, it
will be transferred to surface elements. If in volumes, to volume
elements.
@end itemize

@strong{Note:} For backwards compatibility, it is accepted the
possibility @code{over elements}, that will transfer either to elements
or to faces of higher level elements.

Another important feature is that all the conditions can be applied to different 
entities with different values for all the defined intervals of the problem.

Therefore, a condition can be considered as a group of fields containing the name of 
the referred condition, the geometric entity over which it is applied, the mesh entity
over which it will be transferred, its corresponding properties and their values. 

The format of the file is as follows:

@example
NUMBER: condition_number CONDITION: condition_name
CONDTYPE: 'over' ('points', 'lines', 'surfaces', 'volumes', 'layer')
CONDMESHTYPE: 'over' ('nodes', 'face elems', 'body elements')
QUESTION: field_name['#CB#'(...,optional_value_i,...)]
VALUE: default_field_value
  ...
QUESTION: field_name['#CB#'(...,optional_value_i,...)]
VALUE: default_field_value
END CONDITION
NUMBER: condition_number CONDITION: condition_name
  ...
END CONDITION
@end example

@b{Note:} @code{#CB#} means Combo Box.

Note that this file format does not permit to put blank lines between
the last line of a condition definition, @code{END CONDITION}, and the
first one of the next condition definition.

@ifhtml
</P>
<P>
@end ifhtml
@*
@*
@b{Local Axes}

@example
QUESTION: field_name['#LA#'('global', 'automatic', 'automatic alternative')]
VALUE: default_field_value
@end example

This type of field makes reference to the @b{local axes} system to be
used. The position of the values indicates the kind of @b{local axes}.



If it only has a single default value, this will be the name of
the global axes. If two values are given, the second one will
reference a system that will be automatically computed for every node
and that will depend on the geometric constraints, like tangencies,
orthogonalities, etc.  If a third value is given, it will be the name of the automatic alternative axes, which are the automatic axes rotated 90 degrees.

All the different user defined systems will be
added automatically to these default possibilities.

To enter only a specific kind of local axes it's possible to use the modifiers @code{#G#},@code{#A#},@code{#L#}. 
@itemize @minus
@item
@code{#G#}: global axes
@item
@code{#A#}: automatic axes
@item
@code{#L#}: automatic alternative axes
@end itemize

When using these modifiers the position of the values doesn't indicate the kind of local axes.

@b{Example}
@example
QUESTION: Local_Axes#LA#(Option automatic#A#,Option automatic_alt#L#)
VALUE: -Automatic-
@end example
@*
@*
@b{Note:} All the fields must be fulfilled with words, considering as a word a character string without any blank space amongst them. The strings
signaled between quotes are literal and the ones inside brackets are
optional. The interface is case-sensitive, so the uppercase letters must
be maintained. @code{Default_field_value} and different
@code{optional_value_i} can be alphanumeric, integers or reals. GiD
treats them as alphanumeric until the moment that are written to the
solver input files.

@b{Note:} The numbers of the conditions must be consecutive, beginning with
number 1.  There is no need to point out the overall number of
conditions or the respective number of fields for each one. This last
one can be variable for each condition.

One optional flag to add to a condition is:

@example
CANREPEAT: yes
@end example

It is written after CONDMESHTYPE and means that user can assign one condition several
times to the same entity.

Another type of field that can be included inside a condition is:

@example
QUESTION: Surface_number#FUNC#(NumEntity)
VALUE: 0
@end example
Where the key @code{#FUNC#}, means that the value of this field will be
calculated just when the mesh is generated. It can be considered a
function that evaluates when meshing. In the example above,
@code{NumEntity} is one of the possible variables of the function. It
will be substituted by the label of the geometry entity from where the
node or element is generated.

@example
QUESTION: X_preass#FUNC#(Cond(3,REAL)*(x-Cond(1,REAL))/(Cond(2,REAL)-Cond(1,REAL)))
VALUE: 0
@end example
In this second example, @code{x} variable is used, which means the
x-coordinate of the node or of the center of the element. Others fields
of the condition can also be used in the function. Variables @code{y}
and @code{z} give the y ans z-coordinate of this point.

@b{Note:} There are other available options to expand the capabilities of the conditions window. (@pxref{Special fields})  



@menu
* Example Conditions File creation ::   
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Example Conditions File creation ,  , Conditions file, Conditions file
@unnumberedsubsubsec Example: Creating the conditions file
@cindex Conditions file example
  

Next is an example of a condition file creation, explained step by step:
@enumerate

@item First, you have to create the folder or directory where all the problem type
files are located, @code{problem_type_name.gid/} on this case.
@ifhtml
</P>
<P>
@end ifhtml

@item Then create and edit the file (@code{problem_type_name.cnd} on this example) inside
the recently created directory (where all your problem type files are located).
As you can see, except for the extension, the name of the file and the directory are
the same. 
@ifhtml
</P>
<P>
@end ifhtml
@item Create the first condition, which starts with the line

@example
NUMBER: 1 CONDITION: Point-Constraints 
@end example

where the first number is used to index the condition. Each condition will be refered
 with one unique number (two conditions can not share the same number). The second 
parameter is the name of the condition. Again, a unique condition name into this
 condition file is required.
@ifhtml
</P>
<P>
@end ifhtml

@item This first line is followed by the next pair:  

@example
CONDTYPE: over points
CONDMESHTYPE: over nodes
@end example

which declare over what entity is going to be applied the condition. The first
 line, @code{CONDTYPE:...} refers to the geometry, and may take as parameters 
the sentences "over points", "over lines", "over surfaces" or "over volumes".
@ifhtml
</P>
<P>
@end ifhtml

The second line refers to the type of condition applied to the mesh, once generated. 
GiD does not force to provide this second parameter, but if it is present, the treatment
 and evaluation of the problem will be more acurate.
The available parameters for this statement are "over nodes" and "over elements".
@ifhtml
</P>
<P>
@end ifhtml

@item Then, you'll have to declare a set of questions and values applied to this condition. 

@example
QUESTION: Local-Axes#LA#(-GLOBAL-)
VALUE: -GLOBAL-
QUESTION: X-Force
VALUE: 0.0
QUESTION: X-Constraint:#CB#(1,0)
VALUE: 1
QUESTION: X_axis:#CB#(DEFORMATION_XX,DEFORMATION_XY,DEFORMATION_XZ)
VALUE: DEFORMATION_XX

END CONDITION
@end example

After the QUESTION: word you have the choice of put:
@itemize @bullet
@item An alphanumeric field name followed by the #LA# statement, and then the single or double parameter.
@item An alphanumeric field name.
@item An alphanumeric field name followed by the #CB# statement, and then the optional values 
between parenthesis.
@end itemize

@ifhtml
</P>
<P>
@end ifhtml

The VALUE: word must be followed by one of the optional values, if you
 have declared them in the previous QUESTION: line. If you don't follow this statement, the program may not work correctly.
@ifhtml
</P>
<P>
@end ifhtml
In the previous example, the @code{X-Force} QUESTION takes the value 0.0. Also in
the example, the @code{X-Constraint} QUESTION includes a combo box statement (@code{#CB#}),
followed by the declaration of the choices 1 and 0. In the next line, the value
takes the parameter 1. The @code{X_axis} QUESTION declares three items for the combo
box @code{DEFORMATION_XX,DEFORMATION_XY,DEFORMATION_XZ}, with the value @code{DEFORMATION_XX}
choosen.
@ifhtml
</P>
<P>
@end ifhtml
Beware of leaving blank spaces between parameters. If in the first question, you put
 the optional values @code{(-GLOBAL, -AUTO-)}, (note the blank space after the comma),
 there will be an error when reading the file. Take this precaution specially in
 the Combo Box question parameters, to avoid  inpredictable parameters.

@ifhtml
</P>
<P>
@end ifhtml 

@item The management of the conditions defined in the @code{.cnd} file, is done in the Conditions window (found in the @b{Data} menu), in the preprocess of GiD. 


@end enumerate

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/Conditions.ps,width=5.22cm,height=5cm,angle=0}
}}
\unpie{}
{
Conditions edition window on Preprocess, showing an unfolded combo box
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="Conditions.gif"></a>
<img src="images/Conditions.gif"> 
<p>Conditions edition window on Preprocess, showing an unfolded combo box
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Materials file, Problem and intervals data file, Conditions file, Configuration Files
@unnumberedsubsec Materials file (.mat)
@cindex Materials properties
@cindex File NAME.mat

This file @code{NAME.mat} include originally the definition of different materials 
through their properties. These are base materials as they can be used as templates 
during the pre-processing step for the creation of newer ones.

The user can define as many materials as desired and with a variable number of fields. 
All the unused materials will not be taken in consideration when writing the
data input files for the solver. Alternatively, they can be useful to generate a materials
library. 

Conversely to the case of conditions, the same material can be assigned to 
different geometrical entities levels (lines, surfaces or volumes) and even can be assigned 
directly to the mesh elements.

In a similar way as a condition was defined, a material can be considered as a group of 
fields containing its name, its corresponding properties and their values.

The format of the file is as follows:

@example
NUMBER: material_number MATERIAL: material_name
QUESTION: field_name['#CB#'(...,optional_value_i,...)]
VALUE: default_field_value
  ...
QUESTION: field_name['#CB#'(...,optional_value_i,...)]
VALUE: default_field_value
END MATERIAL
NUMBER: material_number MATERIAL: material_name
  ...
END MATERIAL
@end example

If a property of a material change depending on something (one example would be
one property depending on the temperature and defined with several values for
several temperatures), a table of changing values
may be declared for this property. When the solver evaluates the problem, it reads
the values and apply the suitable property value.

The declaration of the table requires a pair of lines:

First, a QUESTION line with a list of alphanumeric values between parenthesis.
@example
QUESTION: field_name:(...,optional_value_i,...)
@end example
This values are the name of each of the columns in the table, and the number of 
values declared are the number of columns.

This first line is followed by the actual data declaration: a line started with the words
@code{VALUE: #N#} is followed by a number that indicates the quantity of elements 
in the matrix  and, finally, the list of values.  
@example
VALUE: #N# number_of_values ... value_number_i ...
@end example

The number of values declared for the matrix, obviously, has to be the multiplication of
the number of columns by the number of rows to be declared.

The usual case of aplication of this declaration is on the thermo-mechanical simulations, where
the problem is exposed to a temperature variation, and the properties of
the materials change for each temperature value. 

All the fields must be filled with words, considering a word as a character string
without any blank space amongst them. The strings signaled between quotes are literal
and the ones within brackets are optional. The interface is case-sensitive, so the
uppercase letters must be maintained. @code{Default_field_value} and different 
@code{optional_value_i} can be alphanumeric, integers or reals, depending on the type.

The numbers of the materials have to be consecutive, beginning with number 1.
There is no need to point out the overall number of materials or the
respective number of fields for each one. This last one can be variable for each
material. 

Note that in this file it's not permitted the inclusion of blank lines between material
definitions neither between questions and values.

@b{Note:} There are other available options to expand the capabilities of the materials window. (@pxref{Special fields})





@menu
* Example Materials File creation ::    
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Example Materials File creation ,  , Materials file, Materials file
@unnumberedsubsubsec Example: Creating the materials file
@cindex Materials file example




Next is an example of a materials file creation, explained step by step:
@enumerate

@item Create and edit the file (@code{problem_type_name.mat} on this example) inside
the @code{problem_type_name} directory (where all your problem type files are located).
As you can see, except for the extension, the name of the file and the directory are
the same. 
@ifhtml
</P>
<P>
@end ifhtml
@item Create the first material, which starts with these lines:

@example
NUMBER: 1 
MATERIAL: Air 
@end example 
The first number is used to index the material. Each material will be refered
 with one unique number (two materials can not share the same number). The second 
parameter is the name of the material. Again, a unique material name into this
 material file is required (do not use blank spaces in the name of the material.)
@ifhtml
</P>
<P>
@end ifhtml

@item The next two lines define a property of the material and its default value:  

@example
QUESTION: Density
VALUE: 1.0
@end example

You can add as many properties as you want. To end the material definition, add the following line:

@example
END MATERIAL
@end example

@ifhtml
</P>
<P>
@end ifhtml 

@item In this example we have introduced some materials; the @code{.mat} file would be as follows: 
@example 
NUMBER: 1 MATERIAL: Air
QUESTION: Density
VALUE: 1.01
END MATERIAL
NUMBER: 2 MATERIAL: Steel
QUESTION: Density
VALUE: 7850
END MATERIAL
NUMBER: 3 MATERIAL: Aluminium
QUESTION: Density
VALUE: 2650
END MATERIAL
NUMBER: 4 MATERIAL: Concrete
QUESTION: Density
VALUE: 2350
END MATERIAL
NUMBER: 5 MATERIAL: Water
QUESTION: Density
VALUE: 997
END MATERIAL
NUMBER: 6 MATERIAL: Sand
QUESTION: Density
VALUE: 1370
END MATERIAL
@end example


@item The management of the materials defined in the @code{.mat} file, is done in the Materials window (found in the @b{Data} menu), in the preprocess of GiD. 

@ifhtml
</P>
<P>
@end ifhtml

@end enumerate

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/Materials.ps,width=5.00cm,height=3.1cm,angle=0}
}}
\unpie{}
{
Materials edition window on the GiD Preprocess
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="Materials.gif"></a>
<img src="images/Materials.gif"> 
<p> Materials edition window on the GiD Preprocess
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Problem and intervals data file, Conditions symbols file , Materials file, Configuration Files
@unnumberedsubsec Problem and intervals data file (.prb)
@cindex Problem and intervals data
@cindex File NAME.prb

The file @code{NAME.prb} contains all the information about the general problem 
and intervals data.
The general problem data is all the information required for performing the
analysis and it does not concern any particular geometrical entity. This differs from
the previous definitions of conditions and materials properties, which are
assigned to different entities. Example of general problem data can be the type of solution 
algorithm used by the solver, the value of the various time steps,
convergence conditions and so on.

Within this data, the user may consider the definition of specific problem data (for the 
whole process) and intervals data (variable values along the different solution intervals). An 
interval would be the subdivision of a general problem that contains its own particular 
data. Typically, one can define a different load case for every interval or, in dynamic 
problems, not only variable loads, but also changing the various time steps, 
convergence conditions and so on.

The format of the file is as follows:

@example
PROBLEM DATA
QUESTION: field_name['#CB#'(...,optional_value_i,...)]
VALUE: default_field_value
  ...
QUESTION: field_name['#CB#'(...,optional_value_i,...)]
VALUE: default_field_value
END PROBLEM DATA


INTERVAL DATA
QUESTION: field_name['#CB#'(...,optional_value_i,...)]
VALUE: default_field_value
  ...
QUESTION: field_name['#CB#'(...,optional_value_i,...)]
VALUE: default_field_value
END INTERVAL DATA
@end example

All the fields must be filled with words, considering a word as a character string
without any blank space amongst them. The strings signaled between quotes are literal
and the ones inside brackets are optional. The interface is case-sensitive, so the
uppercase letters must be maintained. @code{Default_field_value} and different 
@code{optional_value_i} can be alphanumeric, integers or reals, depending on the type.

@b{Note:} There are other available options to expand the capabilities of the Problem Data window. (@pxref{Special fields})

@menu
* Example Problem and intervals data file creation::  
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Example Problem and intervals data file creation,  , Problem and intervals data file, Problem and intervals data file
@unnumberedsubsubsec Example: Creating the PRB data file
@cindex Problem and intervals file example
@cindex PRB file example






Next is an example of a problem data file creation, explained step by step:
@enumerate

@item Create and edit the file (@code{problem_type_name.prb} on this example) inside
the @code{problem_type_name} directory (where all your problem type files are located).
Except for the extension, the name of the file and the directory must be
the same. 
@ifhtml
</P>
<P>
@end ifhtml
@item Start the file with this line:

@example
PROBLEM DATA 
@end example 

@ifhtml
</P>
<P>
@end ifhtml

@item Then, add the following lines: 



@example
QUESTION: Unit_System#CB#(SI,CGS,User)
VALUE: SI

QUESTION: Title
VALUE: Default_title
@end example

The first question defines a combo style menu called @code{Unit_System}, which has the @code{SI} option selected by default. The second question defines a text field called @code{Title}, and its default value is @code{Default_title}.

@ifhtml
</P>
<P>
@end ifhtml 
@item To finish the file, add the following line:


@example
END PROBLEM DATA
@end example

@ifhtml
</P>
<P>
@end ifhtml

@item The whole file is as follows:

@example 
PROBLEM DATA
QUESTION: Unit_System#CB#(SI,CGS,User)
VALUE: SI
QUESTION: Title
VALUE: Default_title
END GENERAL DATA
@end example


@item The management of the options defined in the @code{.prb} file, is done in the Problem Data window (found in the @b{Data} menu), in the preprocess of GiD. 
@ifhtml
</P>
<P>
@end ifhtml

@end enumerate

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/PRB.ps,width=5.67cm,height=3.13cm,angle=0}
}}
\unpie{}
{
Problem Data window on the GiD Preprocess
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="PRB.gif"></a>
<img src="images/PRB.gif"> 
<p> Problem Data window on the GiD Preprocess
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset






@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Conditions symbols file , Unit System file, Problem and intervals data file, Configuration Files
@unnumberedsubsec Conditions symbols file (.sim)
@cindex File NAME.sim
@cindex Files ***.geo
@cindex Conditions symbols
@cindex Symbols geometrical definitions

This file @code{NAME.sim} comprises different symbols to represent some conditions 
during the pre-processing stage. The user may define these symbols by creating, 
ad hoc, geometrical drawings and the appropriate symbol will appear
over the entity with the applied condition every time the user asks for it.

One or more symbols can be defined for every condition and the selection will depend on 
the specified values in the file, which may be obtained through mathematical conditions.

Also the spatial orientation can be defined in this file, depending on the values taken 
by the required data. For global definitions, the user must input the three components of
a vector to express its spatial direction. GiD takes these values from the corresponding
conditions window. The orientation of the vector can be 
understood as the rotation from vector (1,0,0) towards the new vector defined in the file.

For line and surface conditions, the symbols may be considered as local. In this case,
GiD does not consider the defined spatial orientation vector and it
takes its values from the line or surface orientation. The orientation assumes
vector (1,0,0) to be the corresponding entity's normal.

These components, making reference to the values obtained from the adequate conditions, 
may include C-language expressions. They express the different field values of the 
mentioned condition as @code{cond(type,i)}, where @code{type} (@code{real} or @code{int})
makes reference to the type of variable (independent of the letters case) and 
@code{i} is the number of the field for that particular condition.



@menu
* Example Symbols File creation ::      
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Example Symbols File creation ,  , Conditions symbols file , Conditions symbols file
@unnumberedsubsubsec Example: Creating the Symbols file
@cindex Symbols file example



Next is an example of a symbol file creation.  
Create and edit the file (@code{problem_type_name.sim} on this example) inside
the @code{problem_type_name} directory (where all your problem type files are located).
Except for the extension, the name of the file and the directory must be
the same.

The contents of the @code{problem_type_name.sim} example should be the following:

@example
cond Point-Constraints
3
global
cond(int,5)
1
0
0
Support3D.geo
global
cond(int,1) && cond(int,3)
1
0
0
Support.geo
global
cond(int,1) || cond(int,3)
cond(int,3)
cond(int,1)*(-1)
0
Support-2D.geo
cond Face-Load
1
local
fabs(cond(real,2))+fabs(cond(real,4))+fabs(cond(real,6))>0.
cond(real,2)
cond(real,4)
cond(real,6)
Normal.geo
@end example

This is a particular example of the file @code{.sim} where the user has defined four
different symbols. Each one is read from a file @code{***.geo}. There is no indication of
how many overall symbols are implemented. GiD simply reads all the file long through the 
end.

The files @code{***.geo} are obtained through GiD. The user may design a 
particular drawing to symbolize a condition and this drawing will be stored as
@code{PROBLEMNAME.geo} when saving this project as @code{PROBLEMNAME.gid}. 
The user needs not to be concerned about the symbol
size but has to keep in mind that the origin corresponds to the point (0,0,0) and
the reference vector is (1,0,0). Subsequently, when these files @code{***.geo} are 
invoked from @code{problem_type_name.sim}, the symbol drawing, appears 
scaled on the display, at the entities location.

Nevertheless, the number of symbols and consequently, the number of files @code{***.geo}, can
vary from a condition to another. In the previous example, for instance, the condition called 
@code{Point-Constraints}, which is so declared by the use of @code{cond}, comprises three
different symbols. GiD knows that from the number 3 written below the condition's name. Next,
GiD reads if the orientation is relative to the spatial axes (global) or 
moves together with its entity (local). In the example, the three symbols concerning 
point constraints are globally oriented.

Let's imagine that this condition has six fields. First, third and fifth field values express 
if there exist constraints along @code{X-axis}, @code{Y-axis} and @code{Z-axis}, respectively.
These values are integers and in case they were null, the concerned degree of freedom
would be assumed to be unconstrained. 

For the first symbol, got from the file @code{Support3D.geo}, GiD reads 
@code{cond(int,5)}, or @code{Z-constraint}. If it is false, what means that the field's 
value is zero, the C-condition will not be accomplished and 
GiD will not draw it. Otherwise, the C-condition will be accomplished and the symbol
will be invoked. When this occurs, GiD skips the rest of symbols related to this
condition. Its orientation will be the same of the original drawing because 
the spatial vector is (1,0,0).

All the considerations are valid for the second symbol, got from the file Support.geo,
but now GiD has to check that both constraints (@code{&&}), @code{X-constraint} 
and @code{Y-constraint} are fixed (values different from zero). 

For the third symbol, got from the file @code{Support-2D.geo}, only one of them has to be
fixed (@code{||}) and the orientation of the symbol will 
depend on which one is free and which one is fixed, showing on the screen the 
corresponding direction for both degrees of freedom.

Finally, for the fourth symbol, got from the file @code{Normal.geo}, it can be observed 
that the drawing of the symbol, related to the local orientation
will appear scaled according to the real-type values of the second, fourth and sixth 
fields values. Different ways of C-language expressions are available in GiD.
@comment (see C-language expressions syntax)
Thus, the last expression would be equivalent to put '@code{(fabs(cond(real,2))>0. || 
fabs(cond(real,4))!=0. || fabs(cond(real,6))>1e-10)}'.

@strong{Note:} As previously mentioned, GiD internally creates a @code{PROJECTNAME.geo} when 
saving a project, where it keeps all the information about the geometry
in binary format. In fact, this is the reason why the extension of these files is 
@code{.geo}. However, the file @code{PROJECTNAME.geo} is stored in the 
@code{PROJECTNAME.gid} directory, whereas these user-created files @code{***.geo} are 
stored in the @code{problem_type_name.gid} directory, being @code{problem_type_name} the problem's name.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Unit System file, Special fields, Conditions symbols file , Configuration Files
@unnumberedsubsec Unit System file (.uni)
@cindex File NAME.uni
@cindex unit system
@cindex model unit

When GiD is installed, the file @code{units.gid} is copied within the GiD
directory.  In this file it's defined a table of magnitudes. For each
magnitude there is a set of units and a convertion factor between the
unit and the reference unit. Also are defined the units systems. An unit
system is a set of mangnitudes and the corresponding unit.

@example
BEGIN TABLE
 LENGTH : m @{reference@}, 100 cm, 1e+3 mm
 ...
 STRENGTH : kg*m/s^2 @{reference@}, N, 1.0e-1 kp
END

BEGIN SYSTEM(INTERNATIONAL)
 LENGTH : m
 MASS : kg
 STRENGTH : N
 ...
 TEMPERATURE : C
END
@end example

The syntax of the unit file (@code{problem_type_name.uni}) within the problem type is similar.
Besides, it could include the line:

@example
USER DEFINED: ENABLED 
(or DISABLED)
@end example

meaning that the user is able (or not) to define it's own system unit
within the project. If the line does not appear in the file then, it's
assumed as having the value @code{ENABLED}

Some magnitudes can be hidden to the user in the units window with this order:
@code{HIDDEN: 'magnitude', 'magnitude'}
@example
HIDDEN: strength, pressure
@end example

If the problem type uses a property which has a unit, then GiD creates the file @code{project_name.uni} in the project directory. This file includes the information related to the unit used in the geometric model
and the unit system used. The structure of this file is:

@example
MODEL: km

PROBLEM: USER DEFINED

BEGIN SYSTEM
 LENGTH: m
 PRESSURE: Pa
 MASS: kg
 STRENGTH: N
END
@end example

In this file, @b{MODEL} refers to the unit of the geometric model,
@b{PROBLEM} is the name of the units system used by GiD to convert all
the data properties in the output to the solver. If this name is
@b{USER DEFINED}, then the system is the one defined within the file. The
block
@example
BEGIN SYSTEM 
 ...
END
@end example
corresponds to the user defined system.

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/unit.ps,width=6cm}
}}
\unpie{}
{
Data unit window
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="unit.gif"></a>
<img src="images/unit.gif"> 
<p>Data unit window 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Special fields,  , Unit System file, Configuration Files
@unnumberedsubsec Special fields
@cindex Book
@cindex Title
@cindex Image
@cindex Unit field
@cindex Dependencies

These fields are useful in order to organize the information within the
data files.  They make the information showed on the data windows nicest
and more readable. In this way the user can concentrate just on the data
properties concerning the current context.

@itemize @bullet
@item @b{Book:}
With the field @b{Book} it is possible to split the data windows in other
windows. For example, we can have two windows for the materials, one for
the steels and another for the concretes:
@example
BOOK: Steels
...
All steels come here
...
BOOK: Concretes
...
All concretes come here
...
@end example

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/booksample.ps}
}}
\unpie{}
{
Options corresponding to books.
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="booksample.gif"></a>
<img src="images/booksample.gif"> 
<p>Options corresponding to books.
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

The same applies to conditions. For general and interval data, the field
@b{book} groups a set of properties.@*
@*
@item @b{Title:}
The @b{Title} field groups a set of properties on diferent tabs of one
book. All properties appearing after this field will be included on this
tab.

@example
TITLE: Basic
...
Basics properties
....
TITLE: Advanced
...
Advanced properties
...
@end example
@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/booktitle.ps}
}}
\unpie{}
{
Book with titles..
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="booktitle.gif"></a>
<img src="images/booktitle.gif"> 
<p>Book with title.
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

@item @b{Help:}
With the @b{Help} field it's posible to assign a description to the data
property preceding it. In this way the user can inspect the meaning of the
property throught the help context function: staying for a while with the
mouse on the property or clicking the right button.

@example
QUESTION: X_flag#CB#(1,0)
VALUE: 1
HELP: If this flag is set, movement is ...
@end example

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/datahelp.ps}
}}
\unpie{}
{
Data property with help.
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="datahelp.gif"></a>
<img src="images/datahelp.gif"> 
<p>Data property with help.
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

@item @b{Image:}
The @b{Image} field is useful to insert descriptive pictures on the data
window. The value of this field is the file name of the picture relative
to the problem type location.

@example
IMAGE: omega3.gif
@end example

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/dataimage.ps}
}}
\unpie{}
{
Data window with an image.
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="dataimage.gif"></a>
<img src="images/dataimage.gif"> 
<p>Data window with an image.
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

@item @b{Unit field:}
With this feature it's posible to define and work with
properties having units. @b{GiD} is responsible for the convertion
between units of the same magnitud.

@example
...
QUESTION: Elastic modulus XX axis:#UNITS#
VALUE: 2.1E+11Pa
...
@end example

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/fieldunit.ps}
}}
\unpie{}
{
Data property with unit.
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<a name="fieldunit.gif"></a>
<img src="images/fieldunit.gif"> 
<p>Data property with unit.
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset

@item @b{Dependencies:} Depending on the value, we can define some behavior asociated to the property. For each value we can have a list of actions. The syntax is as follows:@*
@*
@code{
DEPENDENCIES:(<V1>,[TITLESTATE,<Title>,<State>],<A1>,<P1>,<NV1>,...,<An>,<Pn>,<NVn>)...(<Vm>,<Am>,<Pm>,<NVm>,...)}@*

where:

@example
@end example 

@enumerate

@item 
@b{<Vi>} is the value that triggers the actions. A special value is @b{#DEFAULT#}, which refers to all the values not listed.

@item 

@b{[TITLESTATE,<Title>,<State>]} this argument is optional. @b{Titlestate} should be used to show or hide book labels. Many @b{Titlestate} can be given. @b{<Title>} is the title defined for a book (TITLE: Title). @b{State} is the visualization mode: @code{normal} or @code{hidden}. 


@item 

@b{<Ai>} is the action and can have one of these values: @b{SET, HIDE, RESTORE}.
All these actions change the value of the property with the following diferences: SET disables the property, HIDE hides the property and RESTORE
brings the property to the enabled state.

@item 
@b{<Pi>} is the name of the property to modify.

@item 
@b{<NVi>} is the new value of 
@b{<Pi>}. A special value is @b{#CURRENT#}, which refers to the current value of
@b{<Pi>}.

@end enumerate

@example
@end example
Here is an example,
@example
...
TITLE: General
QUESTION: Type_of_Analysis:#CB#(FILLING,SOLIDIFICATION)
VALUE:  SOLIDIFICATION
DEPENDENCIES: (FILLING,TITLESTATE,Filling-Strategy,normal,RESTORE,
Filling_Analysis,GRAVITY,HIDE,Solidification_Analysis,#CURRENT#)
DEPENDENCIES: (SOLIDIFICATION,TITLESTATE,Filling-Strategy,hidden,HIDE,
Filling_Analysis,#CURRENT#,RESTORE,Solidification_Analysis,#CURRENT#)
TITLE: Filling-Strategy
QUESTION: Filling_Analysis:#CB#(GRAVITY,LOW-PRESSURE,FLOW-RATE)
VALUE:  GRAVITY 
QUESTION: Solidification_Analysis:#CB#(THERMAL,THERMO-MECHANICAL)
VALUE:  THERMAL
...
@end example 

@*@*
@item @b{State:} Defines the state of a field. The state of a field can be @code{disabled}, @code{enabled} or @code{hidden}.@*@*

Here is an example,
@example
...
QUESTION: Elastic modulus XX axis
VALUE: 2.1E+11
STATE: HIDDEN
@end example

@*@*
@item @b{#MAT#('BookName'):} Defines the field as a material, to be selected from the list of materials of the book 'BookName'.@*@*

Here is an example,
@example
QUESTION:Composition_Material#MAT#(BaseMat)
VALUE:AISI_4340_STEEL
@end example

@end itemize


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Template File, Executing an external program, Configuration Files, Customization
@section Template File
@cindex Template File (.bas)

@ifhtml
</body> <body bgcolor="white" fgcolor="black">
@end ifhtml

Once the user has generated the mesh, assigned the conditions and the materials
properties, as well as the general problem and intervals data for the 
solver, it is necessary to produce the data input files to be 
processed by that program.

To manage this reading, GiD has the capability of interpret a file called
@code{problem_type_name.bas} (where @code{problem_type_name } is the name of the working directory of the Problem Type without the @code{.bas} extension).

This file (template file) describes the format and structure of the required data 
input file for the solver that is used in a particular case. This file must remain in
 the @code{problem_type_name.gid} directory, as well as the other files 
already described, @code{problem_type_name.cnd}, @code{problem_type_name.mat}, @code{problem_type_name.prb} and also 
@code{problem_type_name.sim} and @code{***.geo}, if desired.

In case more than one data input file is needed, GiD allows the 
creation of more files by means of additional files @code{***.bas} (note 
that while @code{problem_type_name.bas} creates an data input file named @code{project_name.dat}, 
successive files @code{***.bas},
-where @code{***} can be any name-, create successive files 
@code{project_name-1.dat}, 
@code{project_name-2.dat} and so on), the new files follow
the same rules than the ones explained next for @code{problem_type_name.bas}.


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/bas.ps,width=14cm,height=4.66cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<P><BR></P>
<a name="bas.gif"></a>
<img src="images/bas.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset




These files work as interface from the GiD's 
standard results to the specific data input for any individual solver module.
This allows to complete the process of running the analysis (@pxref{Calculate}) 
as one step more within the system.

In case of an error in the preparation of the data input files, the
programmer has only to fix the corresponding file @code{problem_type_name.bas} or 
@code{***.bas} and rerun the example, without having to leave GiD, recompile or, 
even more, reassign any data or remesh.

This facility is due to the structure of the template files. They 
are a group of macros (like an ordinary programming language) that can be read, 
without need of any compiler, every time the corresponding analysis file is 
to be written. This ensures a fast way to debug mistakes.


@menu
* General description::                 
* Commands used in the .bas file::      
* Detailed example::                    
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node General description, Commands used in the .bas file, Template File, Template File
@unnumberedsubsec General description
@cindex Template file. Description
@cindex File NAME.bas
@cindex Files ***.bas
@cindex data input files
@cindex Writing data input files

All the rules that apply to the file @code{NAME.bas} are also valid for the rest of 
files with extension @code{.bas}. Thus, everything in this section will refer explicitly
to the file @code{NAME.bas}. Any information written into this file, apart from the 
so-called commands, is reproduced exactly in the output file (the data input file for 
the numerical solver). The commands are words that begin with the character @b{*}. 
If the programmer wants to write an asterisk into the file he should write 
@b{**}. The commands are inserted among the text to be literally translated. Everyone 
of these commands returns one (@pxref{Single value return commands}) or multiple
(@pxref{Multiple values return commands}) values obtained from the 
pre-processing. Other commands mimic the traditional structures to do loops or 
conditionals (@pxref{Specific commands}). It is also
possible to create variables to manage some data. Comparing it to a classic programming 
language, the main differences will be the following:

@itemize @bullet
@item The text is reproduced literally, without printing instructions, 
as it is writing-oriented.
@ifhtml
</P>
<P>
@end ifhtml


@item There are no indices in the loops. When the program begins a loop, it already 
knows the number of iterations to perform. Furthermore, the inner variables of the loop 
change their values automatically.

All the commands can be divided into three types:
@ifhtml
</P>
<P>
@end ifhtml

@itemize @minus
@item Commands that return one single value. This value can be an integer, a real 
or a string. The value depends on certain values that are available to the command and 
on the position of the command, within the loop or after setting some other parameters. 
These commands can be inserted within the text and write their value where it corresponds
in it. They can also appear inside an expression, what would be the example of the 
conditionals. For this example, the user may specify the type of the variable, integer 
or real, except when using @code{strcmp} or @code{strcasecmp}. If these commands are 
within an expression, no @b{*} should precede the command.
@ifhtml
</P>
<P>
@end ifhtml

@item Commands that return more than one value. Their use is similar to that of the 
previously indicated commands, except for the fact that they cannot be used in other 
expressions. They can return different values, one after the other, depending on some 
values of the project.
@ifhtml
</P>
<P>
@end ifhtml

@item Commands that perform loops or conditionals, create new variables, or define 
some specifications. The latter include condition or type of element chosen and also 
serve to prevent line-feeding. These commands must start at the beginning of the line 
and nothing will be written into the calculations file. After the command, in the same 
line, there can be other commands or words to complement the definitions, so, in an end 
of a loop or conditional, after the command the user may write what loop or conditional 
was finished.
@end itemize
@end itemize

The arguments that appear in a command are written immediately behind it and 
inside parenthesis. If there are more than one, they will be separated 
by commas. The parenthesis might be put without any argument inside. 
This is useful to write something just behind the command without any 
separation in the middle. The arguments can be real numbers or integers, 
meaning the word @code{REAL} or the word @code{INT} (both in 
upper or lowercase) that the value to which it points has to be considered 
as real or integer, respectively. Other types of arguments are sometimes 
allowed, like the type of element, described by its name, in the command 
@code{*set elem}, or a chain of characters inserted between double quotes 
@b{"} for the C-instructions @code{strcmp} and @code{strcasecmp}. It is 
also possible, sometimes, to write the field's name instead of its 
ordering number.

EXAMPLE:

Next it's showed a piece of what it could be a @code{.bas} file. There are two commands (@b{*nelem} and @b{*npoin}) which return the total number of elements and nodes of a project. 
@example
%%%% Problem Size %%%%
Number of Elements & Nodes:
*nelem *npoin
@end example

This @code{.bas} file will be converted into a @code{project_name.dat} file by GiD. The contents of the @code{project_name.dat} file could be something like this:

@example
%%%% Problem Size %%%%
Number of Elements & Nodes:
5379 4678
@end example

(being 5379 the number of elements of the project, and 4678 the number of nodes)


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Commands used in the .bas file, Detailed example, General description, Template File
@unnumberedsubsec Commands used in the .bas file
@cindex Commands used in the .bas file
@cindex Listing of .bas commands
@printindex fn

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@menu
* Single value return commands::        
* Multiple values return commands::     
* Specific commands::                   
@end menu

@node Single value return commands, Multiple values return commands, Commands used in the .bas file, Commands used in the .bas file
@unnumberedsubsubsec Single value return commands
@cindex Single value return commands
 
When writing a command, it is generally (if not explicitly mentioned) 
independent of the letters case, even a mixture of uppercase or lowercase 
would not affect the results.

@itemize @bullet
@findex Npoin
@cindex Npoin
@findex Ndime
@cindex Ndime
@findex Nnode
@cindex Nnode
@findex Nelem
@cindex Nelem
@findex Nmats
@cindex Nmats

@item @b{*npoin}, @b{*ndime}, @b{*nnode}, @b{*nelem}, @b{*nmats.} They return,
 respectively, the number of points, the dimension of the project
 being considered, the number of nodes of the
element with the highest number, the number of elements and the number of materials. 
All of them are considered as integers and do not carry arguments (see @code{*format}, 
@code{*intformat}), except @code{*nelem}, which can bring different types of elements.
These elements are @code{Linear}, @code{Triangle}, @code{Quadrilateral}, @code{Tetrahedra},
@code{Hexahedra}, depending on the number of edges of the element and @code{All}, that
comprises all the possible types. The command @code{*nmats} returns
the number of materials effectively assigned to an entity, not all the defined ones.
@ifhtml
</P>
<P>
@end ifhtml

@findex GenData
@cindex GenData
@item @b{*GenData.} It must carry an argument of integer type that specifies the number
of the field to be printed. This number is the order of the field inside the general data
list. This must be one of the values that are fixed for all the problem,
independently of the interval (@pxref{Problem and intervals data file}).
The field's name can also be the argument, instead, or even an abbreviation of it.
@ifhtml
</P>
<P>
@end ifhtml

The arguments @code{REAL} or 
@code{INT} to express the type of number for the field are also available 
(see @code{*format}, 
@code{*intformat}, @code{*realformat}, @code{*if}). If they are not specified, 
the program will print a character string. It is 
mandatory to write one of them within an expression, except for @code{strcmp} 
and @code{strcasecmp}. The numeration must start with number 1.
@ifhtml
</P>
<P>
@end ifhtml

@findex IntvData
@cindex IntvData
@item @b{*IntvData.} The only difference with the previous one is that 
the field must be one of those fields varying with the interval 
(@pxref{Problem and intervals data file}). 
This command must be within a loop over intervals (see @code{*loop}) and
the program will automatically update the suitable value for each iteration.
@ifhtml
</P>
<P>
@end ifhtml

@findex MatProp
@cindex MatProp
@item @b{*MatProp.} The only difference with the previous ones is that it 
must be within a loop over the materials (see @code{*loop}). It returns the 
property whose field's number or name is defined by its argument. It's recommended the use of names instead of field numbers. @*
@b{Note:} If argument is 0, it returns the material's name. 
@ifhtml
</P>
<P>
@end ifhtml

@strong{Caution:} If there are materials with
different number of fields, the user must ensure not to print
non-existent fields, using conditionals.
@ifhtml
</P>
<P>
@end ifhtml

@findex ElemsMatProp
@cindex ElemsMatProp
@item @b{*ElemsMatProp.} The same as Matprop but using the material of the current element. 
Must be within a loop over the elements (see @code{*loop}). It returns the 
property whose field's number or name is defined by its argument. 
It's recommended the use of names instead of field numbers. @*

@example
*loop elements
  *elemsnum *elemsmat *elemsmatprop(young)
*end elements
@end example

@findex Cond
@cindex Cond
@item @b{*Cond.} The same previous remarks apply here, although now the user 
must notify with the command @code{*set} (see @code{*set}) which is the 
condition being processed. It can be within a loop (see @code{*loop}) over 
the different intervals in case that the conditions vary for each interval.
@ifhtml
</P>
<P>
@end ifhtml

@findex ElemsNum
@cindex ElemsNum
@findex NodesNum
@cindex NodesNum
@findex MatNum
@cindex MatNum
@findex ElemsMat
@cindex ElemsMat
@item @b{*ElemsNum}: returns the element's number. @*
@b{*NodesNum}: returns the node's number.@*
@b{*MatNum}: returns the material's number.@*
@b{*ElemsMat}: returns the number of the material assigned to the element. @*


All of this commands must be within a proper loop (see @code{*loop}) and change 
automatically for each iteration. They are considered as 
integers and cannot carry any argument. The number of materials will be 
reordered numerically, to begin from number 1 and will increase up to the 
number of materials assigned
to any entity.@*@*

@ifhtml
</P>
<P>
@end ifhtml

@findex LayerNum
@cindex LayerNum
@findex LayerName
@cindex LayerName
@findex LayerColor
@cindex LayerColor
@item 
@b{*LayerNum}: returns the layer's number.@*
@b{*LayerName}: returns the layer's name.@*
@b{*LayerColorRGB}: returns the layer's color in RGB (three integer numbers between 0 and 256). If parameter @code{(1)}, @code{(2)} or @code{(3)} is specified, the command returns the only the value of one color.  RED is 1, GREEN is 2 and BLUE is 3.@*@*

Commands @b{*LayerName}, @b{*LayerNum} and @b{*LayerColorRGB} must be inside a loop over layers; you cannot use this commands in a loop over nodes or elements. @*@*
@b{Example:}
@example
*loop layers
*LayerName *LayerColorRGB
*Operation(LayerColorRGB(1)/255.0) *Operation(LayerColorRGB(2)/255.0) *Operation(LayerColorRGB(3)/255.0)
*end layers
@end example




@ifhtml
</P>
<P>
@end ifhtml

@ifhtml
</P>
<P>
@end ifhtml

@findex NodesLayerNum
@cindex NodesLayerNum
@findex NodesLayerName
@cindex NodesLayerName
@findex ElemsLayerNum
@cindex ElemsLayerNum
@findex ElemsLayerName
@cindex ElemsLayerName
@item 
@b{*NodesLayerNum}: returns the layer's number. Must be used in a loop over nodes.@*
@b{*NodesLayerName}: returns the layer's name. Must be used in a loop over nodes.@*
@b{*ElemsLayerNum}: returns the layer's number. Must be used in a loop over elems.@*
@b{*ElemsLayerName}: returns the layer's name. Must be used in a loop over elems.@*@*

@ifhtml
</P>
<P>
@end ifhtml


@findex CondNumEntities 
@cindex CondNumEntities 
@item @b{*CondNumEntities.} The user must have previously
selected a condition (see @code{*set}). It returns the number of entities that have a 
condition assigned over them.
@ifhtml
</P>
<P>
@end ifhtml

@findex LoopVar
@cindex LoopVar
@item @b{*LoopVar.} This command must be inside a loop and returns, as an integer, what is
considered to be the internal variable of the loop. This variable takes the value 1 in the 
first iteration and increases a unit for each new iteration.
@ifhtml
</P>
<P>
@end ifhtml

The parameter @code{elems,nodes,materials,intervals}, used as argument for the
corresponding loop, allows the program know which one is being processed.
Otherwise, if there are nested loops, the program takes the value of the inner loop.
@ifhtml
</P>
<P>
@end ifhtml

@findex Operation
@cindex Operation
@item @b{*Operation.} It returns the result of an arithmetical expression what should be
written inside parenthesis just immediately behind the command. This operation must be 
defined in C-format and can contain any of the commands that return one single value. The
user can force the return of an integer or a real by means of the mentioned parameters 
@code{INT} or @code{REAL}. Otherwise, GiD returns the type according to the result.
@*
@*
The valid C functions that can be used are:
@*@*
@itemize @{ @}
@item @code{+,-,*,/,(,),=,<,>,!,&,|, numbers and variables}
@item @code{sin}
@item @code{cos}
@item @code{tan}
@item @code{asin}
@item @code{acos}
@item @code{atan}
@item @code{atan2}
@item @code{exp}
@item @code{fabs}
@item @code{abs}
@item @code{pow}
@item @code{sqrt}
@item @code{strcmp}
@item @code{strcasecmp}
@end itemize
@*
@*
The following are valid examples of operations:

@example
*operation(4*elemsnum+1)
*operation(8*(loopvar-1)+1)
@end example

@strong{Note:} There cannot be blank spaces between the commands and the parenthesis 
that include the parameters.
@ifhtml
</P>
<P>
@end ifhtml

@strong{Note:} Commands inside @code{*operation} do not need to put @b{*} at the
beginning. 
@ifhtml
</P>
<P>
@end ifhtml

@findex LocalAxesNum
@cindex LocalAxesNum
@item @b{*LocalAxesNum.} It returns the identification name of the local axes system, 
either when the loop is over the nodes or when it is over the elements, under a 
referenced condition.
@ifhtml
</P>
<P>
@end ifhtml

@findex Nlocalaxes
@cindex Nlocalaxes
@item @b{*nlocalaxes.} It returns the number of the defined local axes system. 
@ifhtml
</P>
<P>
@end ifhtml

@findex IsQuadratic
@cindex IsQuadratic
@item @b{*IsQuadratic.} It returns the value 1 when the elements are 
quadratic or 0 when they are not.
@*
@findex Time
@cindex Time
@item @b{*Time.} It returns the number of seconds elapsed since midnight.
@ifhtml
</P>
<P>
@end ifhtml

@findex Clock
@cindex Clock
@item @b{*Clock.} It returns the number of clock ticks (aprox. milliseconds) of elapsed processor time.
@*
@*
EXAMPLE:
@*@*
@example
*set var t0=clock
*loop nodes
  *nodescoord
*end nodes
*set var t1=clock
ellapsed time=*operation((t1-t0)/1000.0) seconds
@end example
@*

@findex Units
@cindex Units
@item @b{*Units('magnitude').} It returns current unit name for the selected magnitude.
(the curren unit is the unit showed inside the unit window)@*
EXAMPLE
@*
@example
*Units(LENGTH)
@end example

@findex BasicUnit
@cindex BasicUnit
@item @b{*BasicUnit('magnitude').} It returns basic unit name for the selected magnitude.
(the basic unit is the unit defined as @{ Basic @} in the *.uni file)@*
EXAMPLE
@*
@example
*BasicUnit(LENGTH)
@end example

@findex FactorUnit
@cindex FactorUnit
@item @b{*FactorUnit('unit').} It returns the numeric factor to convert a magnitude 
from the selected unit to the basic unit.@*
EXAMPLE
@*
@example
*FactorUnit(PRESSURE)
@end example

@end itemize





@c ********** Multiple Values Return command **********************************

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Multiple values return commands, Specific commands, Single value return commands, Commands used in the .bas file
@unnumberedsubsubsec Multiple values return commands
@cindex Multiple values return commands
  
These commands return more than one value in a prescribed order, writing them one behind another. All of them, but @code{LocalAxesDef}, are able to return one single value when a numerical argument giving the order of the value is added to the command. In this way, these commands can appear within an expression.
@code{LocalAxesDef} or the rest of the commands without the numerical argument
cannot be used inside expressions. Following, it is displayed a list of
the commands with the appropriate description:

@itemize @bullet
@findex NodesCoord
@cindex NodesCoord
@item @b{*NodesCoord.} This command writes the node's coordinates. It must be 
inside a loop (see @code{*loop}) over the nodes or elements. The coordinates are
considered as real numbers (see @code{*realformat} and @code{*format}).
It will write two or three coordinates according to the problem's
dimension (see @code{*Ndime}). If @b{*NodesCoord} receives an argument inside a loop of nodes, this argument indicates which coordinate x, y or z must be written: 
@*@*
Inside a loop of nodes:@*
@code{*NodesCoord    } writes three or two coordinates depending on the problem's dimension.@* 
@code{*NodesCoord(1) } writes the @b{x} coordinate of the actual node of the loop.@*
@code{*NodesCoord(2) } writes the @b{y} coordinate of the actual node of the loop.@*
@code{*NodesCoord(3) } writes the @b{z} coordinate of the actual node of the loop.@*
@*
If the argument @code{real} is given, the coordinates will be treated as a real number. @*@*
@*

Example: using @b{*NodesCoord} inside a loop of nodes
@example
Coordinates:
  Node        X                Y
*set elems(all)
*loop nodes
*format "%5i%14.5e%14.5e"
*NodesNum *NodesCoord(1,real) *NodesCoord(2,real)
*end nodes
@end example
This command effects a rundown of all the nodes of the mesh, listing their identifiers and coordinates (@b{x} and @b{y} coordinates).  

@*
@*
The contents of the @code{project_name.dat} file could be something like this:
@example
Coordinates:
  Node        X                Y
    1  -1.28571e+001  -1.92931e+000
    2  -1.15611e+001  -2.13549e+000
    3  -1.26436e+001  -5.44919e-001
    4  -1.06161e+001  -1.08545e+000
    5  -1.12029e+001   9.22373e-002
    ...
@end example
@*
@*

@b{*NodesCoord} can also be used inside a loop of elements. In this case, it needs an additional argument that gives the local number of the node inside the element. After this argument it's also possible to give which coordinate has to be written x, y or z. @*@*

Inside a loop of elements:@*
@code{*NodesCoord(4)   } writes the coordinates of the 4th node of the actual element of the loop. @* 
@code{*NodesCoord(5,1) } writes the @b{x} coordinate of the 5th node of the actual element of the loop. @*
@code{*NodesCoord(5,2) } writes the @b{y} coordinate of the 5th node of the actual element of the loop. @*
@code{*NodesCoord(5,3) } writes the @b{z} coordinate of the 5th node of the actual element of the loop. @*


@ifhtml
</P>
<P>
@end ifhtml

@findex ElemsConec
@cindex ElemsConec
@item @b{*ElemsConec.} This command writes the element's connectivities, i.e., 
the list of the nodes that belong to the element, keeping the proper sense for 
each case (anti-clockwise sense in 2D and depending on the standards in 3D). 
For shells, the user must define the sense. However, this command accepts the 
argument @code{swap} and this implies that the ordering of the nodes in
quadratic elements will be inverted. The connectivities are considered as 
integer numbers (see @code{*intformat} and @code{*format}).
@ifhtml
</P>
<P>
@end ifhtml

@strong{Note:} In the first versions of GiD, the optional parameter of the 
last command explained was @code{invert} instead of the present 
(@code{swap}). It was changed due to technical reasons. If you have 
an old @code{.bas} file prior to this specification, which contains 
this command in its previous form, when you try to export the 
calculation file, you will be warned about this change 
of use. Be aware that the output file will not be created as 
the user expects.
@ifhtml
</P>
<P>
@end ifhtml

@findex GlobalNodes
@cindex GlobalNodes
@item @b{*GlobalNodes.} This command returns the nodes that belong to an element's face where a condition has been defined (on the loop over the elements).
The sense is the same that the sense of the element's connectivities. The 
returned values are considered as integer numbers (see @code{*intformat} and @code{*format}).
@*
@*
So, the local numeration of the faces is:

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/sense_elements.ps,width=7.55cm,height=2cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<img src="images/sense_elements.gif"> 
<p></center>

@end ifhtml
@end ifset

@end ifset



@example
Triangle:       12  23  31
Quadrilateral:  12  23  34  41
Tetrahedra:     123 243 341 421
Hexahedra:      1234  1562  2673  3784  1485  5876
@end example

@ifhtml 
</P> 
<P> 
@end ifhtml 

@findex LocalNodes
@cindex LocalNodes
@item @b{*LocalNodes.} The only difference with the previous one is that the 
returned value is the local node's numbering for the corresponding element 
(between 1 and @code{nnode)}.
@ifhtml 
</P>
<P>
@end ifhtml

@findex ElemsNnode
@cindex ElemsNnode
@item @b{*ElemsNnode.} This command returns the number of nodes of the current element. (valid only inside a loop over elements)@*
@b{Note:} This command is only available in GiD version 6.2.0b or newer. 
@ifhtml 
</P>
<P>
@end ifhtml
Example:
@example
*loop elems
  *ElemsNnode
*end elems
@end example
@*
@ifhtml 
</P> 
<P>
@end ifhtml 
@findex ElemsNnodeCurt
@cindex ElemsNnodeCurt
@item @b{*ElemsNnodeCurt.} This command returns the number of vertex nodes of the current element. (valid only inside a loop over elements)@*
For example, for a quadilateral of 4, 8 or 9 nodes, it returns the value 4.@*
@b{Note:} This command is only available in GiD version 7.2 or newer. 
@ifhtml 
</P>
<P>
@end ifhtml

@findex ElemsType
@cindex ElemsType
@item @b{*ElemsType}: returns the current element type as a integer value: 1=Linear,2=Triangle,3=Quadrilateral,4=Tetrahedra,5=Hexahedra,6=Prism,7=OnlyPoints. (valid only inside a loop over elements)@* 
@b{Note:} This command is only available in GiD version 7.2.2b or newer.
@ifhtml 
</P> 
<P> 
@end ifhtml 
@findex ElemsTypeName
@cindex ElemsTypeName
@item @b{*ElemsTypeName}: returns the current element type as a string value: Linear,Triangle,Quadrilateral,Tetrahedra,Hexahedra,Prism,OnlyPoints. (valid only inside a loop over elements)@* 
@b{Note:} This command is only available in GiD version 7.2.2b or newer.
@ifhtml 
</P> 
<P> 
@end ifhtml 
@cindex LocalAxesDef
@cindex LocalAxesDef
@item @b{*LocalAxesDef.}  This command returns the nine numbers that define the
transformation matrix of a vector from the local axes system to the global one.
@ifhtml
</P>
<P>
@end ifhtml
Example:
@example
*loop localaxes
*format "%10.4lg %10.4lg %10.4lg"
x'=*LocalAxesDef(1) *LocalAxesDef(4) *LocalAxesDef(7)
*format "%10.4lg %10.4lg %10.4lg"
y'=*LocalAxesDef(2) *LocalAxesDef(5) *LocalAxesDef(8)
*format "%10.4lg %10.4lg %10.4lg"
z'=*LocalAxesDef(3) *LocalAxesDef(6) *LocalAxesDef(9)
*end localaxes
@end example
@*

@findex LocalAxesDef(EulerAngles)
@cindex LocalAxesDef(EulerAngles)
@item @b{*LocalAxesDef(EulerAngles).} Last command with option @code{EulerAngles}, 
returns three numbers that are the 3 Euler angles (radians) that define a local axes system.

@ifset html
@ifhtml
<center>
<a name="euler_angles.gif"></a>
<img src="images/euler_angles.gif"> 
<p>Rotation of a vector expressed in terms of euler angles <img src="images/euler_angles0.gif">.</center>
<p>
@end ifhtml
@end ifset

@end ifset

@*@*
@cindex LocalAxesDefCenter
@findex LocalAxesDefCenter
@item @b{*LocalAxesDefCenter.} This command returns the origin of coordinates of the local axes defined by the user. The "Automatic" local axes do not have a center, so, the point (0,0,0) is returned. The index of the coordinate (from 1 to 3) can optionally be given to @code{LocalAxesDefCenter} to get the x, y or z value.   

@*@*
Example:
@example
*LocalAxesDefCenter
*LocalAxesDefCenter(1) *LocalAxesDefCenter(2) *LocalAxesDefCenter(3)
@end example

@ifhtml
</P>
<P>
@end ifhtml


@end itemize 



@c ********** Specific commands ***********************************************

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Specific commands,  , Multiple values return commands, Commands used in the .bas file
@unnumberedsubsubsec Specific commands
@cindex Specific commands


@itemize @minus
@item @b{*\} To avoid line-feeding, the user must write @b{*\}, so, the currently
used line continues on the following line of the file @code{NAME.bas}.
@item @b{*#} Written at the beginning of the line, consider this line as a comment and does not write it.
@item @b{**} To write an asterisk must be written two asterisks @b{**}.
@item
@findex Include
@cindex Include
@b{*Include.} It is possible to include the contents of a slave file inside a master bas with a include command, setting a relative path from the problemtype directory to this secondary file.@*@*
Example:@*
@code{  *include includes\execntrlmi.h}@*@*
Note: The *.bas extension cannot be used for the slave file to avoid multiple output files.
@item
@findex MessageBox
@cindex MessageBox
@b{*MessageBox.} This command stops the execution of the @code{.bas} file and prints a message in a window; this command should be used only when a fatal error occurs. @*@*
Example:@*
@code{  *MessageBox error: Quadrilateral elements are not permitted.}@*@*


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/bas_msg_box.ps,width=7.3cm,height=5.36cm,angle=0}
}}
\unpie{}
{
This window appears if the command MessageBox is executed.
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="bas_msg_box.gif"></a>
<img src="images/bas_msg_box.gif"> 
<p>This window appears if the command MessageBox is executed.</center>
<p>
@end ifhtml
@end ifset

@end ifset


@item
@findex WarningBox
@cindex WarningBox
@b{*WarningBox.} is the same as @code{MessageBox} but without stoping the execution. @*@*
Example:@*
@code{WarningBox Warning: Exist Bad elements. A STL file is a collection of triangles bounding a volume.}
@*@*
@end itemize

The following commands must be written at the beginning of a line and the rest of the line
will serve for their modifiers. No additional text should be written.

@itemize @bullet
@findex Loop
@cindex Loop
@findex End
@cindex End
@findex Break
@cindex Break
@item @b{*loop}, @b{*end}, @b{*break}. They are declared for the use 
of loops. A loop begins with a line that starts with @code{*loop} (no
matter the letters case, as for the rest of commands) and contains
another word to express the variable of the loop. There are some lines
in the middle that will be repeated depending on the values of the
variable and whose parameters will keep on changing through the
iterations, if necessary. Finally, a loop will end with a line that
finishes with @code{*end}. After @code{*end} the user may write any kind
of comments in the same line. Command @b{*break} inside a @b{*loop} or @b{*for} block, 
will finish the execution of the loop and will continue after the @b{*end} line.
@ifhtml
</P>
<P>
@end ifhtml

The variables that are available for @code{*loop} are the following:
@ifhtml
</P>
<P>
@end ifhtml


@itemize @minus
@item @b{elems},@b{ nodes},@b{ materials},@b{ layers},@b{ intervals},@b{ localaxes}. They 
mean, respectively, that the loop will iterate over the elements, nodes, 
materials, layers, intervals or local axes systems. The loops can be nested among 
them. The loop over the materials will iterate only over the effectively 
assigned materials to an entity, in spite of the fact that more materials had 
been defined. The number of the materials will begin with number 1. If a 
command that depends on the loop is located outside it, the number also will 
take, by default, the value 1.
@end itemize
@ifhtml
</P>
<P>
@end ifhtml

It's possible to make a loop over the materials defined, but not used with the modifier @b{*NotUsed}
@*
Example:
@example
*loop materials *NotUsed
@end example

@findex OnlyInCond
@cindex OnlyInCond
@findex OnlyInLayer
@cindex OnlyInLayer
After the command @code{*loop}, if the variable is @code{elems} or 
@code{nodes}, the user may include a modifier @code{*all},  
@code{*OnlyInCond} or @code{*OnlyInLayer} . The first one signifies that the iteration is going 
to be performed over all the entities; the @code{*OnlyInCond} modifier implies that 
the iteration will only take place over the entities that accomplish the 
concerned condition. This condition must have been previously defined with 
@code{*set cond}. @code{*OnlyInLayer} implies that the iteration will only take place  over the entities that are in the specified layer; layers must be specified with the command @code{*set Layer}. By default, it is assumed that the iteration will affect all the entities. @*@*

Example 1: 
@example
*set elems(all)
*loop nodes
*format "%5i%14.5e%14.5e"
*NodesNum *NodesCoord(1,real) *NodesCoord(2,real)
*end nodes
@end example
This command effects a rundown of all the nodes of the mesh, listing their identifiers and coordinates (@b{x} and @b{y} coordinates).  

@*
@*
@*
Example 2:
@example
*Set Cond Point-Weight *nodes
*loop nodes *OnlyInCond
*NodesNum     *cond(1)          
*end
@end example
This effects a rundown of all the nodes assigned the condition "Point-Weight" and provides a list of their identifiers and the first "weight" field of the condition in each case.  

@*
@*
@*
Example 3: 
@example 
*Loop Elems 
*ElemsNum *ElemsLayerNum
*End Elems
@end example
This effects a rundown of all the elements and provides a list of their identifier and the identifier of the layer to which they belong.

@*
@*
@*
Example 4:
@example
*Loop Layers
*LayerNum *LayerName
*End Layers
@end example
This effects a rundown of all the layers and for each layer it lists its identifier and its name.


@ifhtml
</P>
<P>
@end ifhtml

@findex If
@cindex If
@findex Else
@cindex Else
@findex ElseIf
@cindex ElseIf
@findex Endif
@cindex Endif
@item @b{*if}, @b{*else}, @b{*elseif}, @b{*endif}. These commands 
create the conditionals.
The format is a line which begins with @code{*if} followed by an expression
between parenthesis. This expression will be written in C-language syntax,
@comment (see C-language expressions syntax) may contain any of the single 
value return commands, will not begin with @code{*} and its variables must 
be defined as integers or reals (see @code{*format}, @code{*intformat}, 
@code{*realformat)}, with the only exception of @code{strcmp} and 
@code{strcasecmp}. It can include relational as well as arithmetic 
operators inside the expressions.
@ifhtml
</P>
<P>
@end ifhtml

The following are valid examples of the use of the conditionals:

@example
*if((fabs(loopvar)/4)<1.e+2)
*if((p3<p2)||p4)
*if((strcasecmp(cond(1),"XLoad")==0)&&(cond(2)!=0))
@end example

The first example is a numerical example where the condition is accomplished 
for the values of the loop under 400, while the other two are logical 
operators where the condition is accomplished when @code{p3<p2} or @code{p4} 
is different from 0 in the first case and when the first field of the 
condition is called @code{XLoad} (with this particular writing) and the 
second is not null in the second case.
@ifhtml
</P>
<P>
@end ifhtml

If the checked condition is true, GiD will write all the lines until finding 
the corresponding @code{*else}, @code{*elseif} or @code{*endif} (@code{*end} 
is equivalent to @code{*endif} after @code{*if}). @code{*else} or 
@code{*elseif} are optional and require the writing of all the lines until 
the corresponding @code{*endif}, but only when the condition given by 
@code{*if} is false. If @code{*else} or @code{*elseif} exist, it must be 
written between @code{*if} and @code{*endif}. The conditionals can be nested 
among them.
@ifhtml
</P>
<P>
@end ifhtml

The behavior of @code{*elseif} is identical to the behavior of @code{*else} 
with the addition of a new condition:

@example
*if(GenData(31,int)==1)
  ...(1)
*elseif(GenData(31,int)==2)
  ...(2)
*else
  ...(3)
*endif
@end example

In the previous example, the body of the first condition (written as 
@code{1}) will be written into the data file if @code{GenData(31,int)} is 1, 
the body of the second condition (written as @code{2}) will be written into 
the data file if @code{GenData(31,int)} is 2 and if none of both is true, 
the body of the third condition (written as @code{3}) will be written 
into the data file.
@ifhtml
</P>
<P>
@end ifhtml

@strong{Note:} A conditional can also be written in the middle of a 
line. To do this, the user will begin another line to write the conditional 
by means of the command @b{*\}.
@ifhtml
</P>
<P>
@end ifhtml

@findex For
@cindex For
@item @b{*for}, @b{*end}, @b{*break}. The syntax of this command is equivalent 
to @code{*for} in C-language. 
@example
*for(varname=expr.1;varname<=expr.2;varname=varname+1)
*end for
@end example
The meaning of this statement is the execution of a controlled loop, since
@code{varname} is equal to @code{expr.1} until it is equal to @code{expr.2},
with an incremental value of 1 for each step. @code{varname} is any name and
@code{expr.1} and @code{expr.2} are arithmetical expressions or numbers whose
only restrictions are to express the range of the loop. 
Command @b{*break} inside a @b{*loop} or @b{*for} block, 
will finish the execution of the loop and will continue after the @b{*end} line.

@example
*for(i=1;i<=5;i=i+1)
  variable i=*i
*end for
@end example

@ifhtml
</P>
<P>
@end ifhtml

@item @b{*set.} This command has the following purposes: 
@findex Set
@cindex Set
@cindex Set Layer
@itemize @minus 
@item @code{*set cond.} To set a condition. 
@item @code{*set Layer "layer name" *elems|nodes.} To set a layer. 
@item @code{*set elems.} To indicate the elements. 
@item @code{*set var.} To indicate the variables to use. 
@end itemize 

For all of them it is not binding the use of lower case, so @code{*Set} will 
also be valid in all the examples.
@ifhtml
</P>
<P>
@end ifhtml
@findex Add
@b{*set cond.}: In the case of the conditions, GiD allows the combination of a group of them 
via the use of @code{*add cond.} When a specific condition is about to be 
used, it must be defined first and afterwards, this will be used until the 
definition of another one. If this feature is performed inside a loop over 
intervals, the corresponding entities will be chosen. Otherwise, the 
entities will be those referred to the first interval.
@*@*


This is done in this way because when the user indicates to the program that 
a condition is going to be used, GiD creates a table that allows to know 
the number of entities over which this condition has been applied. It is 
necessary to specify if the condition takes place over the @b{*nodes}, 
over the @b{*elems} or over @b{*layers} to create the table.
@ifhtml
</P>
<P>
@end ifhtml

So, a first example to check the nodes where there displacement 
constraints exist can be:

@example
*Set Cond Volu-Cstrt *nodes
*Add Cond Surf-Cstrt *nodes
*Add Cond Line-Cstrt *nodes
*Add Cond Poin-Cstrt *nodes
@end example

that allows the user to apply the conditions directly over any 
geometric entity.
@ifhtml
</P>
<P>
@end ifhtml



@b{*Set Layer "layer name" *elems|nodes}@*
@b{*Add Layer "layer name"}@*
@b{*Remove Layer "layer name"}@*@*

This command set a group of nodes. In the following loops over nodes/elements with the modifier @code{*OnlyInLayer} the iterations will only take place over the nodes/elements of that group.   

@*@*
Example 1:
@example
*set Layer example_layer_1 *elems
*loop elems *OnlyInLayer
    Nº:*ElemsNum Name of Layer:*ElemsLayerName Nº of Layer :*ElemsLayerNum 
*end elems
@end example
@*@*

Example 2:
@example
*loop layers
*set Layer *LayerName *elems
*loop elems *OnlyInLayer
    Nº:*ElemsNum Name of Layer:*ElemsLayerName Nº of Layer :*ElemsLayerNum 
*end elems
*end layers
@end example

In this example the command @code{*LayerName} is used to get the layer name.
@*@*@*


There are some modifiers available to point out particular 
specifications on the conditions. 
@ifhtml
</P>
<P>
@end ifhtml


If command @code{*CanRepeat} is added after @code{*nodes} or @code{*elems} in 
@code{*Set cond}, one entity can be several times in the entities list. If 
command @code{*NoCanRepeat} is used, entities will be just once 
in the entities list. By default, @code{*CanRepeat} 
is off except for the case of one condition
that have the @code{*CanRepeat} flag already set.
@ifhtml
</P>
<P>
@end ifhtml


A typical case not to use @code{*CanRepeat} would be:

@example
*Set Cond Line-Constraints *nodes
@end example

In this case, when two lines share one endpoint, instead of two nodes in the list,
only one is written.
@ifhtml
</P>
<P>
@end ifhtml

A typical case to use @code{*CanRepeat} would be:

@example
*Set Cond Line-Preassure *elems *CanRepeat
@end example

in this case, if one triangle of quadrilateral has more than 
one face in the marked boundary, we want this element 
to appear several times in the elements list, one 
for each face.
@ifhtml
</P>
<P>
@end ifhtml

Other modifiers are used to inform the program that there are nodes 
or elements that can satisfy one condition more than once 
(for instance, a node that belongs
to a certain number of lines with different prescribed movements) 
and that have to appear unrepeated in the data input file, 
or, in the opposite case, that have to appear
only if they satisfy more than one condition. These requirements are 
achieved with the commands @code{*or(i,type)} and @code{*and(i,type)}, 
respectively, after the input of the condition, where @code{i} is the 
number of the condition to be considered and @code{type} 
is the type of the variable (integer or real).
@ifhtml
</P>
<P>
@end ifhtml


For the previous example there can be nodes or elements in the intersection
of two lines or maybe belonging to different entities where the same condition 
had been applied. To avoid the repetition of these nodes or elements, 
GiD has the  modifier @code{*or}, and in the case that two 
or more different values were applied over a node or element, 
GiD only would consider one, being this value 
different from zero. The reason for that can be easily understood 
looking at the following example. Considering the previous commands 
transformed as:

@example
*Set Cond Volu-Cstrt *nodes *or(1,int) *or(2,int)
*Add Cond Surf-Cstrt *nodes *or(1,int) *or(2,int)
*Add Cond Line-Cstrt *nodes *or(1,int) *or(2,int)
*Add Cond Poin-Cstrt *nodes *or(1,int) *or(2,int)
@end example

where @code{*or(1,int)} means the assignment of that node to the considered 
ones satisfying the condition if the integer value of the first condition's 
field is different from zero (@code{*or(2,int)} means the same assignment 
if the integer value of the second condition's field is different from zero). 
Let us imagine that a zero in the first field implies a restricted movement 
in the direction of the X-axis and a zero in the second field implies 
a restricted movement in the direction of the Y-axis. If a point 
belongs at the same time to an entity whose movement in the direction 
of the X-axis is constrained, whereas its movement in the direction 
of the Y-axis is released and to an entity whose 
movement in the direction of the Y-axis is constrained, whereas its movement
in the direction of the X-axis is released, GiD would join both 
conditions in that point, appearing as a fixed point in both 
directions and as a node satisfying the 
four expressed conditions would be counted only once.
@ifhtml
</P>
<P>
@end ifhtml


@cindex remove
@cindex Add
@findex Remove
@cindex Add
The same considerations explained for adding conditions through the use of 
@code{*add cond} apply to the elements with the only change of putting 
@code{*add elems.} Moreover, sometimes it can be of interest to remove sets of 
elements from the assigned ones to the specific conditions. This can be 
done with the command @code{*remove elems.} So, for instance, GiD allows 
combinations of the type:

@example
*Set Cond Dummy *elems
*Set elems(All)
*Remove elems(Linear) 
@end example

to indicate that all dummy elements apart from the linear ones will be 
considered, as well as:

@example
*Set Cond Dummy *elems
*Set elems(Hexahedra)
*Add elems(Tetrahedra)
*Add elems(Quadrilateral)
*Add elems(Triangle)
@end example

The format for @code{*set var} differs from the syntax for the other two 
@code{*set} commands. Its syntax is as follows:
@findex Var
@cindex Var
@example
*Set var varname = expression
@end example

where @code{varname} is any name and @code{expression} is any arithmetical 
expression, number or command, having the latter to be written without 
@b{*} and having to be defined as @code{Int} or @code{Real}. 
@ifhtml
</P>
<P>
@end ifhtml

The following 
are valid examples for these assignments:

@example
*Set var ko1=cond(1,real)
*Set var ko2=2
*Set var S1=CondNumEntities
*Set var p1=elemsnum()
@end example




@c ******************************************************************
@c ****                 *format                                  ****
@c ******************************************************************

@findex Intformat
@cindex Intformat
@findex Realformat
@cindex Realformat
@findex Format
@cindex Format

@item @b{*intformat}, @b{*realformat},@b{*format.} These commands explain 
how the output of different mathematical expressions will be written into the 
analysis file. The use of this command consist in a line which begins with 
the corresponding version, @code{*intformat}, @code{*realformat} or 
@code{*format}, (independently of the use of capital letters) 
and continues with the desired writing format, expressed 
in C-language syntax argument, between double quotes (@b{"}).   
@ifhtml 
</P> 
<P> 
@end ifhtml 

The integer definition of @code{*intformat} and the 
real of @code{*realformat} remain unchanged until another definition via 
@code{*intformat} and @code{*realformat}, respectively, is provided.
The argument of these two commands is composed by an unique field.
This is the reason why the @code{*intformat} and @code{*realformat} commands 
are usually invoked at the initial stages of the @code{.bas} file, to set 
the format configuration of the integer or real numbers to be output during 
the rest of the process. 
@ifhtml
</P>
<P>
@end ifhtml

The @code{*format} command can include several fields definitions in 
its argument, mixing integer and real definitions, but it will only 
affect the line that follows the command's instance one. Hence, the 
@code{*format} command is typically  used when outputing a listing, 
to set a temporary configuration.
@ifhtml
</P>
<P>
@end ifhtml

In the next paragraphs, there is an explanation of the C format specification, 
refered to the fields specification to be included into the argument of these 
commands. Keep in mind that the type of argument that the 
@code{*format} command expects may be composed by several fields, 
and the @code{*intformat} and @code{*realformat} commands'
arguments are composed by an unique field, 
declared as integer and real, respectively, all inside double quotes:
@ifhtml
</P>
<P>
@end ifhtml

A format specification, which consist of optional and required fields, 
has the following form:@*
@b{%[flags][width][.precision]type} 

@*
The start of a field is signaled by the percentage symbol (@b{%}). for
Each field specification is composed by some flags, the minimum width, a separator point, 
the precision of the field and a letter which specifies the type of the data to be represented.
The type field is the only one required.
@ifhtml
</P>
<P>
@end ifhtml

The most common flags are:@*
@b{-} To left aling the result@*
@b{+} To prefix the numeric output with a sign (+ or -)@*
@b{#} To force the real output value to contain a decimal point.@*

@*
The most usual representations are integers and floats. For the 
integers there are available the @code{d} and @code{i} letters, that force 
to read the data as signed decimal integer and @code{u} 
for unsigned decimal integer.
@ifhtml
</P>
<P>
@end ifhtml


For floating point representation, there are the @code{e}, @code{f} and 
@code{g} letters, being used then a decimal point to separate the minimum width 
of the number and the precision. The number of digits after the decimal 
point depends on the requested precision.@*
Note: Twe standard width specification never causes a value to be truncated. It exists in GiD a special command: @code{*SetFormatForceWidth}, to enable this truncation to a prescribed number of digits.
@ifhtml
</P>
<P>
@end ifhtml

For string representation, must be used the @code{s} letter. Characters are printed until 
the precision value is reached.
@ifhtml
</P>
<P>
@end ifhtml

The following are valid examples of the use of @b{format}:

@example
*Intformat "%5i"
@end example
With this sentence, usually located on the start of the file, the output of
an integer quantity is forced to be right alingned on the fifth column of the 
text format on the right side. If the number of digits 
exceeds five, the representation of the number is not truncated. 

@example
*Realformat "%10.3e"
@end example

This sentence, that also is located frequently at the first lines of 
the template file, sets the output format for the real numbers as exponential
with minimum ten digits, and three digits after the decimal point.

@example
*format "%10i%10.3e%10i%15.6e"
@end example

This complex command will specify a multiple assignment of formats to
some output columns. These columns are generated with the line command
that will follow the format line. The subsequent lines will not use this
format, and will follow the general settings of the template file or the
general formats: *IntFormat, *RealFormat.

@ifhtml
</P>
<P>
@end ifhtml

@findex SetFormatForceWidth
@cindex SetFormatForceWidth
@findex SetFormatStandard
@cindex SetFormatStandard

@item @b{*SetFormatForceWidth}, @b{*SetFormatStandard} 
The default width especification o a "C/C+" format, never causes a value to be truncated.@*
@code{*SetFormatForceWidth} is a special sentence to allows the truncation if the number of characters to print exceeds the specified width.@*
@code{*SetFormatStandard} changes to the default state, with truncation disabled.@* 

For example:
@example 
*SetFormatForceWidth
*set var num=-31415.16789
*format "%8.3f"
*num
*SetFormatStandard
*format "%8.3f"
*num
@end example

Output:
@example 
-31415.1
-31415.168
@end example
The first number is truncated to 8 digits, but the second number, printed 
with "C" standard, have 3 decimals, but more than 8 digits.

@ifhtml 
</P> 
<P> 
@end ifhtml 

@findex Tcl
@cindex Tcl
@*
@*
@item @b{*Tcl}

This command permmits to print information using the TCL extension
language. The argument of this command must be a valid TCL command or
expression that must return the string that will be printed. Typically,
the TCL command is defined in the TCL file (.tcl). (see @pxref{TCL-TK
extension} for details).
@*@*
@b{Example:} in this example the @b{*tcl} command is used to call a @b{tcl} function defined in the problem's type @b{.tcl} file.  That function receives an argument; we use the variable @code{num}.
@*@*
In the .bas file:
@example 
*set var num=1
*tcl(WriteSurfaceInfo *num)
@end example
@*
In the .tcl file:
@example 
proc WriteSurfaceInfo @{ num @} @{
   return [.central.s info list_entities surfaces $num]
@}
@end example



@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml




@node Detailed example,  , Commands used in the .bas file, Template File
@unnumberedsubsec Detailed example - Template file creation
@cindex bas file example
@cindex Template file example

Next is an  example of template file creation, step by step:

Note that this is a concrete file for a particular solver, so it's a sure 
state that some or all of the commands that this solver program expects,
will be non standard or incompatible with the one that another user
owns. 

In this example, this particular solver treats a line like a comment, 
inside the calculation input file, if its prefix is a @code{$} sign. In 
your case, it can be another convention.

Anyway, the actual target of this example is the comprehension of the
commands that GiD exposes to the user. This is the universal method
to access to GiD's internal database, and then output the desired data
to the solver.

Also, it's assumed that the user will create the file or files with @code{.bas}
extension, inside the working directory where the problem type file is 
located. The name must be 
@code{problem_type_name.bas} for the first file and any other name
for the additional .@code{bas} files. Each .@code{bas} file will be read by GiD, and translated to a .@code{dat} file.

It is very important to remark that any word in the @code{.bas} file 
having no meaning as a GiD compilation command or not belonging to any 
command instructions (parameters), will be verbatim written to the output file.


@c ********* COMIENZA EL EJEMPLO .BAS ************************************
@enumerate

@c *********** 1 **************************************
@item First, we create the header that the solver, on this particular case, 
needs.
@ifhtml
</P>
<P>
@end ifhtml

This is the name of the solver aplication and a brief description of 
its behavior.

@example
$-----------------------------------------------------
CALSEF: PROGRAMA PARA CALCULO DE SOLIDOS Y ESTRUCTURAS
@end example

Then, another particular sentence that may be incompatible in your case, 
although a similar one may exist for your solver. It's a commented line
with the @code{ECHO ON} command. This line, when uncommented, is useful 
if you want to monitor the progress of the calculation.
@example
$-----------------------------------------------------
$ECHO ON
@end example

The next line specifies the type of calculation and the materials involved 
on the calculation, and it's not a GiD related command either.
@example
$-----------------------------------------------------
ESTATICO-LINEAL, EN SOLIDOS
@end example
As you can see, it's used a commented line with dashes to separate the
different parts of the file improving the readability of the text. 

@ifhtml
</P>
<P>
@end ifhtml

@c *********** 2 **************************************
@item Here comes the initialitation of some variables. This is needed by 
the solver to start the calculating process.
@ifhtml
</P>
<P>
@end ifhtml

The following assignments take the first (parameter @code{(1)}) 
and second (parameter @code{(2)}) fields in the general problem, 
as the number of problems and the title of the problem. 
@ifhtml
</P>
<P>
@end ifhtml

The actual position of a field is determined checking 
its order on the problem file, so
you will guess this is a method that depends on a strict position. 
@ifhtml
</P>
<P>
@end ifhtml

Assignment of the first (1) Field of the @code{Problem data} file, with 
the command @code{*GenData(1)}:

@example
$-----------------------------------------------------
$NUMBER OF PROBLEMS:
NPROB = *GenData(1)
$-----------------------------------------------------
@end example

Assignment of the second (2) field assignment, @code{*GenData(2)}:

@example
$ TITLE OF THE PROBLEM:          
TITULO= *GenData(2)
$-----------------------------------------------------
@end example

The next instruction takes the field where the starting time is saved.
On this case, it is on the 10th position of the general problem data 
file, but we will use another feature of the @code{*GenData} command, 
the parameter of the command will be the name of the field.
@ifhtml
</P>
<P>
@end ifhtml

This is a preferable method, because if the list is shifted due to 
the adding or substracting of a field, you will not loose the actual 
position. This command accepts an abbreviation, if there is no conflict 
with other field name. 

@example
$-----------------------------------------------------
$ TIME OF START:          
TIME= *GenData(Starting_time)
$-----------------------------------------------------
@end example

Here comes the init of some general variables refering to the project we are 
considering, as the number of points, the number of elements or the number 
of materials.
@ifhtml
</P>
<P>
@end ifhtml

The first line is a description of the section.

@example
$ DIMENSIONS OF THE PROBLEM:
@end example

Then it is a line that introduces the next assignments
@example
DIMENSIONES :  
@end example

Which is followed by another one with the three assignments of variables.
@code{NPNOD} gets, from the @code{*npoin} function, the number of nodes of 
the model; @code{NELEM} gets, from @code{*nelem}, or the total number of 
elements of the model or the number of elements of every kind of element 
and @code{nmats} is initialized with the number of materials:

@example
 NPNOD= *npoin,   NELEM= *nelem,   NMATS= *nmats,   \
@end example

Then comes a line where @code{NNODE} gets the maximum number of nodes per 
element and @code{NDIME} gets the variable @code{*ndime}. This variable must 
be a number that specifies if all the nodes are on the plane whose 
Z values are equal to 0 (@code{NDIME=2}) or if they are not (@code{NDIME=3}):

@example
NNODE= *nnode,   NDIME= *ndime,                    \ 
@end example

The next lines take data from the general data fields in the problem file.
@code{NCARG} gets the number of charge cases;
@code{NGDLN} the number of degrees of freedom; 
@code{NPROP} the properties number;
@code{NGAUSS} the gauss number;
@code{NTIPO}, is assigned dynamically:

@example
NCARG= *GenData(Charge_Cases), *\
@end example

You could use @code{NGDLN= *GenData(Degrees_Freedom), *\}, but because 
the length of the argument will make exceed a line, we have abbreviated 
its parameter (there is no conflict with other question name in 
this problem file), to simplify the command.
 
@example
NGDLN= *GenData(Degrees_Fre), *\
NPROP= *GenData(Properties_Nbr), \
NGAUS= *GenData(Gauss_Nbr) , NTIPO= *\
@end example

Note that the last assignment is ended with the specific command 
@code{*\}, to avoid the line feeding. This permits to include a 
conditional assignment of this variable, depending 
on the data in the General data problem. 
@ifhtml
</P>
<P>
@end ifhtml

Inside the conditional it is used a C format like 
@code{strcmp} instruction. This instruction compares the two strings passed
as parameter, and returns an integer number which express the relationship
between the two strings. If the result of the 
operation is equal to @code{0}, the two strings are identical; 
if it is a positive integer, the first argument is greater than the second, 
and otherwise, the second argument string is less.
@ifhtml
</P>
<P>
@end ifhtml

The script checks what problem type is 
declared in the general data file, and then it assigns the coded 
number for the this type to the @code{NTIPO} variable:

@example
*if(strcmp(GenData(Problem_Type),"Tens-Plana")==0)
1 *\
*elseif(strcmp(GenData(Problem_Type),"Def-Plana")==0)
2 *\
*elseif(strcmp(GenData(Problem_Type),"Sol-Revol")==0)
3 *\
*elseif(strcmp(GenData(Problem_Type),"Sol-Tridim")==0)
4 *\
*elseif(strcmp(GenData(Problem_Type),"Placas")==0)
5 *\
*elseif(strcmp(GenData(Problem_Type),"Laminas-Rev")==0)
6 *\
*endif
@end example

You have to cover all the cases within the @code{if} sentences, 
or end the commands with an @code{else}, if you don't want unpredictable 
results, like the next line raised to the place where the parameter will 
have to be:

@example
$ Default Value:
*else
0*\
*endif
@end example

Although in our case this last rule has not been followed, it could be 
a very good option, when the problem file has been modified or 
created by another user, and the new specification may differ from 
the one we expect.
@ifhtml
</P>
<P>
@end ifhtml

The next assignment is formed by a string compare conditional, to inform 
the solver about a setting of the configuration.
@ifhtml
</P>
<P>
@end ifhtml

First is the output of the variable to be assigned.

@example
, IWRIT= *\
@end example

Then there is a conditional where it's compared the string contained 
on the value of the @code{Result_File} field with the string "Yes". If the 
result is @code{0}, then the two strings are the same, 
and we output an @code{1}, to declare a boolean TRUE.

@example
*if(strcmp(GenData(Result_File),"Yes")==0)
1 ,\
@end example

Then we compare the same value string with the string "No", to check the
complementary option. If we find that the strings match, then we output 
a @code{0}.

@example
*elseif(strcmp(GenData(Result_File),"No")==0)
0 ,\
*endif
@end example

The second last assignment is a simple output of the solver field 
contents into the INDSO variable:

@example
             INDSO= *GenData(Solver) , *\
@end example

The last assign is a little more complicated. It requires the creation of
some internal values, with the aid of the command *@code{set cond}.
@ifhtml
</P>
<P>
@end ifhtml

The first action to execute is to set the conditions, so we can access its 
parameters. 
This setting may serve for several loops or instructions, as long 
as the parameters needed for the other blocks of instructions are the same.
@ifhtml
</P>
<P>
@end ifhtml

This line sets the condition @code{Point-Constraints} as an active condition. 
The @code{*nodes} modifier means that the condition will be listed over nodes. 
The @code{*or(...} modifiers are necessary when an entity shares 
some conditions, because it belongs to two or more elements.
@ifhtml
</P>
<P>
@end ifhtml

As an example, take a node which is part of two lines, and each 
of these lines have assigned a different condition. This node, a common 
point of the two lines, will have this two conditions into 
its list of properties. So declaring the @code{*or} 
modifiers, GiD will decide which condition to use, between the list 
of conditions of the entity.
@ifhtml
</P>
<P>
@end ifhtml

A first instruction will be this, where the parameters of the @code{*or} 
commands are an integer number (@code{(1,} and @code{(3,}, respectively on
this example)  and the specification @code{int}, that forces 
GiD to read the condition whose number position is the integer number.
@ifhtml
</P>
<P>
@end ifhtml

In our case, we find that the first (1) field
of the condition file is @code{X-constraint}, and the third (3), 
is @code{Y-constraint}: 
@ifhtml
</P>
<P>
@end ifhtml

Gid still has no support for the substitution of the position of the 
condition in the file by its corresponding label, as succeeds in the case 
of the fields of the problem data file.

@example
*Set Cond Surface-Constraints *nodes *or(1,int) *or(3,int)
@end example

Now we want to complete the setting of the loop, with the addition of new 
conditions.

@example
*Add Cond Line-Constraints *nodes *or(1,int) *or(3,int)
*Add Cond Point-Constraints *nodes *or(1,int) *or(3,int)
@end example

Observe the order in which the conditions have been included: first the 
surface constraints with the @code{*Set Cond} command, since it is the 
initial sentence. Then the pair of @code{*Add Cond} sentences, the 
line constraints and as the last one, the point constraints sentence. 
This logical hierarchy forces the points as the most important items, due 
to the fact that the program takes 
@ifhtml
</P>
<P>
@end ifhtml

Finally, we set a variable 
with the number of entities assigned to this particular condition.
@ifhtml
</P>
<P>
@end ifhtml

Note that the execution of this instruction is only possible if a condition 
has been set previously.

@example
NPRES= *CondNumEntities
@end example

To end this section, we put a separator on the output file:

@example
$-----------------------------------------------------
@end example

Thus, after the init of those variables, this part of the file ends up as:

@example
$ DIMENSIONS OF THE PROBLEM:
DIMENSIONES :
 NPNOD= *npoin,  NELEM= *nelem,  NMATS= *nmats,     \
 NNODE= *nnode,  NDIME= *ndime,                     \
 NCARG= *GenData(Charge_Cases), *\
 NGDLN= *GenData(Degrees_Fre), *\
 NPROP= *GenData(Properties_Nbr), \
 NGAUS= *GenData(Gauss_Nbr) , NTIPO= *\
*if(strcmp(GenData(Problem_Type),"Tens-Plana")==0)
1 *\
*elseif(strcmp(GenData(Problem_Type),"Def-Plana")==0)
2 *\
*elseif(strcmp(GenData(Problem_Type),"Sol-Revol")==0)
3 *\
*elseif(strcmp(GenData(Problem_Type),"Sol-Tridim")==0)
4 *\
*elseif(strcmp(GenData(Problem_Type),"Placas")==0)
5 *\
*elseif(strcmp(GenData(Problem_Type),"Laminas-Rev")==0)
6 *\
*endif
, IWRIT= *\
*if(strcmp(GenData(Result_File),"Yes")==0)
1 ,\
*elseif(strcmp(GenData(Result_File),"No")==0)
0 ,\
*endif
   INDSO= *GenData(Solver) , *\
*Set Cond Surface-Constraints *nodes *or(1,int) *or(3,int)
*Add Cond Line-Constraints *nodes *or(1,int) *or(3,int)
*Add Cond Point-Constraints *nodes *or(1,int) *or(3,int)
NPRES=*CondNumEntities
$-----------------------------------------------------

@end example

After creation or reading of our model, once generated the mesh 
and applied the conditions, we can export the file (file @code{project_name.dat}) and send it to the solver. 
@ifhtml
</P>
<P>
@end ifhtml

The command to create the @code{.dat} file can be found on the 
@code{ File} / @code{Import/Export} / @code{Write Calculation File} 
 GiD menu. It's also possible to use the keyboard shortcut @code{Control-x Control-c}
@ifhtml
</P>
<P>
@end ifhtml

This would be the contents of the @code{project_name.dat} file:

@example
$-----------------------------------------------------
CALSEF: PROGRAMA PARA CALCULO DE SOLIDOS Y ESTRUCTURAS
$-----------------------------------------------------
$ECHO ON
$-----------------------------------------------------
ESTATICO-LINEAL, EN SOLIDOS
$-----------------------------------------------------
$NUMERO DE PROBLEMAS:
NPROB = 1
$-----------------------------------------------------
$ TITULO DEL PROBLEMA           
TITULO= Title_name
$-----------------------------------------------------
$DIMENSIONES DEL PROBLEMA
DIMENSIONES :
  NPNOD=    116 ,  NELEM= 176 ,   NMATS=  0 ,     \
  NNODE=      3 ,  NDIME=   2 ,                   \ 
  NCARG=      1 ,  NGDLN=   1 ,   NPROP=  5 ,     \
  NGAUS=      1 ,  NTIPO=   1 ,   IWRIT=  1 ,     \
  INDSO=     10 ,  NPRES=   0
$-----------------------------------------------------
@end example

@c *********** 3-A **************************************
@item Here begins the calculation input, the actual starting of data transfer

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@unnumberedsubsubsec A) Elements, materials and connectivities listing

Now we want to output the desired results to the output file.
This first line, apparently a title or label, is the way that 
offers the solver, in this example, to determine the 
beginning and end of a loop section. This 
block of instructions ends with the next @code{FIN_GEOMETRIA} sentence, 
also for this example. 

@example
GEOMETRIA 
@end example

Here, we introduce an user informative couple of lines.
@ifhtml
</P>
<P>
@end ifhtml

A title of the first subsection, @code{CONECTIVIDADES ELEMENTALES}:

@example
$ CONECTIVIDADES ELEMENTALES
@end example

And here is the header that precedes the output list, a user oriented data:

@example
$ ELEM. MATER.    SECUENCIA DE CONECTIVIDADES
@end example

And then we travel trough the elements of the model, by the action of the 
@code{*loop} instruction, followed in this case by the @code{elems} argument.

@example
*loop elems
@end example

For each element in the model, GiD will output: 
its element number, by the action of the @code{*elemsnum} command, 
the material assigned to this element, using the @code{*elemsmat} command, 
and the connectivities associated to the element, with the command 
@code{*elemsConec}:

@example
  *elemsnum *elemsmat *elemsConec
*end elems
@end example

You can use the parameter @code{swap} if you are working with quadratic 
elements and the listing modes of the nodes is not standard. 
A non standard nodes listing would be, for example, an anti-clockwise 
listing of all the elements.

@example
  *elemsnum *elemsmat *elemsConec(swap)
*end elems
@end example

Here finishes the first part of this section.

@c *********** 3-B **************************************

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@unnumberedsubsubsec B) Formatted nodes and coordinates                                              listing

And here starts the next section @code{COORDENADAS DE PUNTOS NODALES}:

@example
$ COORDENADAS DE PUNTOS NODALES
@end example

Next is the header of the output list:

@example
$  NODO  COOR.-X   COOR.-Y   COOR.-Z
@end example

Now GiD will trace all the nodes of the model:
@example
*loop nodes
@end example

For each node in the model, it will generate the output of the number of 
node, @code{*NodesNum} and the coordinates for this node @code{*NodesCoord}.
@ifhtml
</P>
<P>
@end ifhtml

The command executed before the output, @code{*format}, will force that the 
resulting output follow the guidelines of formatting specified.
@ifhtml
</P>
<P>
@end ifhtml

On this case, the @code{*format} command gets a string parameter with a set
of codes: 
%6i, which specify that the first word in the list is coded as a integer and 
is printed six points from the left, the rest of the three codes, 
@code{%15.5f}, are ordering the printing of a real number, represented on 
a floating point format, with a distance of 15 spaces between columns 
(the number will be shifted to have the last digit in the 15th position of 
the column) and the fractional part of the number will be represented with 
five digits.  
@ifhtml
</P>
<P>
@end ifhtml

Note that this is the C language format command.

@example
*format "%6i%15.5f%15.5f%15.5f"
  *NodesNum *NodesCoord
*end
@end example

And at the end of the section, it's the finishing mark sentence, in this 
solver example.

@example
FIN_GEOMETRIA
@end example

The full set of commands to make this part of the output is showed the next 
lines.

@example
GEOMETRIA 
$ CONECTIVIDADES ELEMENTALES
$ ELEM. MATER.    SECUENCIA DE CONECTIVIDADES
*loop elems
  *elemsnum *elemsmat *elemsConec
*end elems
$ COORDENADAS DE PUNTOS NODALES
$  NODO  COOR.-X   COOR.-Y   COOR.-Z
*loop nodes
*format "%6i%15.5f%15.5f%15.5f"
  *NodesNum *NodesCoord
*end
FIN_GEOMETRIA
@end example

The result of the compilation, output to a file (@code{project_name.dat}) to be processed by the 
solver program.
@ifhtml
</P>
<P>
@end ifhtml

The first part of the section:

@example
$-----------------------------------------------------
GEOMETRIA 
$ CONECTIVIDADES ELEMENTALES
$ ELEM. MATER.    SECUENCIA DE CONECTIVIDADES
     1      1     73    89    83
     2      1     39    57    52
     3      1     17    27    26
     4      5      1     3     5
     5      5      3    10     8
     6      2     57    73    67
     .      .      .     .     .
     .      .      .     .     .
     .      .      .     .     .
   176      5     41    38    24
@end example

And the second part of the section:

@example
$ COORDENADAS DE PUNTOS NODALES
$     NODO       COOR.-X        COOR.-Y   COOR.-Z
       1         5.55102        5.51020
       2         5.55102        5.51020
       3         4.60204        5.82993
       4         4.60204        5.82993
       5         4.88435        4.73016
       6         4.88435        4.73016
       .         .              .
       .         .              .
       .         .              .
     116        -5.11565        3.79592
FIN_GEOMETRIA
@end example

@c *********** 4-C **************************************

@item
If the solver module you are using needs a list of the nodes that 
have assigned a condition, like for example, a neighborhood condition,
you have to provide it as is explained in the next example:

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@unnumberedsubsubsec C) Nodes listing declaration

First, we set the necessary conditions, as it was done in the previous section.

@example
*Set Cond Surface-Constraints *nodes *or(1,int) *or(3,int)
*Add Cond Line-Constraints *nodes *or(1,int) *or(3,int)
*Add Cond Point-Constraints *nodes *or(1,int) *or(3,int)
NPRES=*CondNumEntities
@end example

After the data init and declarations, the solver requires a list 
of nodes, with boundary conditions and the fields that have been assigned
@ifhtml
</P>
<P>
@end ifhtml

In this example, all the selected nodes will be output, also printing the 3 conditions. The columns will be output with no aparent format:
@ifhtml
</P>
<P>
@end ifhtml

First, there is a line with the header of the section for the 
solver program and a commentary line for the user

@example
CONTORNO CONDICIONES
$ NODOS RESTRINGIDOS Y PRESCRIPCIONES
@end example

Then comes the first line of the output list, the header:

@example
$ NODO CODIGO         VALORES PRESCRITOS
@end example

Then the @code{loop} instruction, over nodes, and with the specification
argument @code{*OnlyInCond}, to iterate only over the entities that have 
the condition assigned. This is the condition that has been set on 
the previous lines.

@example
*loop nodes *OnlyInCond
@end example

The next line is the @code{format} command, followed by the lines 
with the commands to fill the fields of the list.

@example
*format "%5i%1i%1i%f%f"
   *NodesNum *cond(1,int) *cond(3,int)  *\
@end example

Also into the @code{*format} command influence there are the next couple 
of @code{if} sentences. If the degrees of freedom field contains an 
integer equal or greater than @code{3}, the number of properties will be 
output.

@example
*if(GenData(Degrees_Freedom_Nodes,int)>=3)
*cond(5,int) *\
*endif
@end example

And if the value of the same field is equal to @code{5} the output will be 
a pair of zeros.

@example
*if(GenData(Degrees_Free,int)==5)
0 0  *\
*endif
@end example

The next line ouputs the values contained in the second and fourth fields, 
both real numbers.

@example
*cond(2,real) *cond(4,real) *\
@end example

In a similar manner as done in the previous @code{if} sentences here come 
a group of lines to output the sixth condition field value, if the number 
of degrees of freedom is equal or greater than threee, and output a pair of 
zeros if it's equal to five. 

@example
*if(GenData(Degrees_Free,int)>=3)
*cond(6,real) *\
*endif
*if(GenData(Degrees_Free,int)==5)
0.0 0.0  *\
*endif
@end example

Finally, to end the section, the @code{*end} command closes the previous 
@code{*loop}. The last line is the label of the end of the section.

@example
*end
FIN_CONTORNO CONDICIONES
$-------------------------------------------------------
@end example

The full set of commands included in this section are the next:

@example
CONTORNO CONDICIONES
$ NODOS RESTRINGIDOS Y PRESCRIPCIONES
$ NODO CODIGO         VALORES PRESCRITOS
*loop nodes *OnlyInCond
*format "%5i%1i%1i%f%f"
   *NodesNum *cond(1,int) *cond(3,int)  *\
*if(GenData(Degrees_Free,int)>=3)
*cond(5,int) *\
*endif
*if(GenData(Degrees_Free,int)==5)
0 0  *\
*endif
*cond(2,real) *cond(4,real) *\
*if(GenData(Degrees_Free,int)>=3)
*cond(6,real) *\
*endif
*if(GenData(Degrees_Free,int)==5)
0.0 0.0  *\
*endif
*end
FIN_CONTORNO CONDICIONES
$-----------------------------------------------------
@end example

@c *********** 5-D  **************************************
@item If it is needed the output of a list of the materials 

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@unnumberedsubsubsec D) Materials listing declaration

As a must, the first lines are the title of the section and a commentary.
 
@example
PROPIEDADES MATERIALES
$ PROPIEDADES DE LOS MATERIALES PARA MULTILAMINADO
@end example

Then there is the loop sentence, this time related to materials.

@example
*loop materials
@end example

Then comes the line were the number of the material and its different 
properties are output.

@example
   *matnum() *MatProp(1) *MatProp(2) *MatProp(3) *MatProp(4)
@end example

Finally comes the ending of the section.
@example
*end
FIN_PROPIEDADES MATERIALES
$-----------------------------------------------------
@end example

The full set of commands is the next:

@example
PROPIEDADES MATERIALES
$ PROPIEDADES DE LOS MATERIALES PARA MULTILAMINADO
*loop materials
   *matnum() *MatProp(1) *MatProp(2) *MatProp(3) *MatProp(4)
*end
FIN_PROPIEDADES MATERIALES
$-----------------------------------------------------
@end example

@c *********** 6  **************************************
@item If it is needed the output of a list of the elements

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@unnumberedsubsubsec E) Elements listing declaration

First, we set the loop to the interval of the data.
@example
*loop intervals
@end example

The next couple of lines indicate the starting of one section
and the title of the example, taken from the first field in 
the interval data with an abbreviation on the label.
They are followed by a comment explaining the type of data we are 
using.

@example
FUERZAS
    TITULO: *IntvData(Charge_case)
$ TIPO DE CARGA
@end example

First, we set the condition as done before. If one condition is assigned 
twice or more to the same element, without the include of the 
@code{*CanRepeat} parameter in the @code{*Set Cond} the condition will 
appear once, if exists the  @code{*CanRepeat} parameter, 
then the number of conditions that will appear is the number of times is 
the number of times it was assigned to the condition. 

@example
*Set Cond Face-Load *elems *CanRepeat
@end example

Then, a condition checks if exist any element into the condition.

@example
*if(CondNumEntities(int)>0)
@end example

Next is a title of the next section, followed by a comment for the
user.

@example
DISTRIBUIDA UNIFORMEMENTE EN LADOS
$ CARGAS UNIFORMEMENTE REPARTIDAS EN LADOS DE ELEMENTOS
@end example

We assign the number of nodes to a variable.

@example
$ NUMERO DE NODOS EN LADO      
NODGE =  2  
@end example

Then comes the title of the next loop, followed by the start 
of the loop, now applied over the elements and its operation 
restricted to the group of elements selected into the condition.

@example
$ LADOS CARGADOS Y CARGAS ACTUANTES
*loop elems *OnlyInCond
@end example

The number of elements is written after @code{ELEMENTO=}. 
>From an user point of view, this is treated like a variable assignment. 
The number of nodes that belong to the face of the loop's element is 
written after the @code{CONECTIV} label. This means the number of adjacent 
nodes to the face.

@example
      ELEMENTO=*elemsnum(), CONECTIV *globalnodes
@end example

The conditions that are output are the first and second.

@example
      *cond(1) *cond(1)  *cond(2) *cond(2) 
@end example

Here ends the loop  and after it there's a label 
line to end the section. The last @code{*endif} ends 
the @code{if} statement group.

@example
*end
FIN_DISTRIBUIDA UNIFORME EN LADOS
*endif
@end example

The preceding section is compiled complete into the following lines: 

@example
$-----------------------------------------------------
*loop intervals
FUERZAS
    TITULO: *IntvData(1)
$ TIPO DE CARGA
*Set Cond Face-Load *elems *CanRepeat
*if(CondNumEntities(int)>0)
DISTRIBUIDA UNIFORMEMENTE EN LADOS
$ CARGAS UNIFORMEMENTE REPARTIDAS EN LADOS DE ELEMENTOS
$ NUMERO DE NODOS EN LADO      
NODGE =  2  
$ LADOS CARGADOS Y CARGAS ACTUANTES
*loop elems *OnlyInCond
      ELEMENTO=*elemsnum(), CONECTIV *globalnodes
      *cond(1) *cond(1)  *cond(2) *cond(2) 
*end
FIN_DISTRIBUIDA UNIFORME EN LADOS
*endif
@end example

@c *********** 7  **************************************
@item Finally, output of a list of the nodes and conditions

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@unnumberedsubsubsec F) Nodes and its conditions listing declaration

As ever, the first thing to do in the setting of the conditions.

@example
*Set Cond Point-Load *nodes
@end example

As in the previous section, the next loop will be 
executed only if exists any condition in the selection.

@example
*if(CondNumEntities(int)>0)
@end example

Here starts the loop over the nodes.

@example
PUNTUAL EN NODOS
*loop nodes *OnlyInCond
      *NodesNum *cond(1) *cond(2) *\
@end example

The next @code{*if} sentences, condition the output writting of 
the end of the line.

@example
*if(GenData(Degrees_Free,int)>=3)
*cond(3) *\
*endif
*if(GenData(Degrees_Free,int)==5)
0 0  *\
*endif
*end
@end example

To end the section, here comes the label and the @code{if} closing.

@example
FIN_PUNTUAL EN NODOS
*endif
@end example

Finally, it is written an information label, if the value of 
the second field in the interval data section, inside the problem file, is 
equal to @code{"si"} (yes). 

@example
*if(strcasecmp(IntvData(2),"Si")==0)
PESO_PROPIO
*endif
@end example

After the end of this loop, it comes the label that identifies the end of
the forces section, but the actual end of the section will be the next
@code{*end} command, located some lines after. 

@example
FIN_FUERZAS
@end example

Before the end of the section, nevertheless, we indicate the solver which 
will be the postproces file. This information is gathered from the 
@code{*IntvData} command. The argument that this command receives (@code{3}) 
specifies that the name of the file is in the third field of the loop 
iteration of the interval. 

@example
$-----------------------------------------------------
$ARCHIVO DE POSTPROCESO
FEMV = *IntvData(3)
@end example

To end the forces interval loop, finally comes the @code{*end} 
command:

@example
$-----------------------------------------------------
*end
@end example

Finally, the file is ended with the sentence required by the solver:

@example
FIN_CALSEF
$-----------------------------------------------------
@end example

The preceding section is compiled complete into the following lines: 

@example
*Set Cond Point-Load *nodes
*if(CondNumEntities(int)>0)
PUNTUAL EN NODOS
*loop nodes *OnlyInCond
      *NodesNum *cond(1) *cond(2) *\
*if(GenData(Degrees_Free,int)>=3)
*cond(3) *\
*endif
*if(GenData(Degrees_Free,int)==5)
0 0  *\
*endif
*end
FIN_PUNTUAL EN NODOS
*endif
*if(strcasecmp(IntvData(2),"Si")==0)
PESO_PROPIO
*endif
FIN_FUERZAS
$-----------------------------------------------------
$ARCHIVO DE POSTPROCESO
FEMV = *IntvData(3)
$-----------------------------------------------------
*end
FIN_CALSEF
$-----------------------------------------------------
@end example

@end enumerate

With this section ends the template file example.
  


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Executing an external program,  , Template File, Customization
@section Executing an external program
@cindex Executing external program
@cindex External program execution

Once all the files of the problem type are finished (@code{.cnd, .mat, .prb, .sim, .bas} files), you are able to run the solver. It may be interesting to run it directly from inside GiD. 

To do so, it is necessary to create the file @code{problem_type_name.bat} in the problem type directory.
This must be a shell script that can contain any type of information and that will 
be different for every operating system. When the user selects the option @code{CALCULATE} in the GiD preprocess this shell script is executed. (@pxref{Calculate})

Because the @code{.bat} file will be different depending on the operating system, it's possible to create two files: one for Windows and another for Unix/Linux. @*
The Windows file has to be named as: @code{problem_type_name.win.bat}. @*
The Unix/Linux file has to be named as:  @code{problem_type_name.unix.bat}.@*@*

If @b{GiD} founds a @code{.win.bat} or @code{.unix.bat} file, the file @code{problem_type_name.bat} will be ignored. 

If a @code{.bat} file exists in the problem type directory, when choosing @code{Start} in the calculations window, GiD will automatically write the analysis file inside the example directory assigning
the name @code{project_name.dat} to this file (if more files, names @code{project_name-1.dat} ...
are used). Next, this shell script will be executed. GiD will assign to this script 3
arguments:

@itemize @bullet
@item @b{1st argument:}
@code{project_name} (name of the current project)
@item @b{2nd argument:}
@code{c:\a\b\c\project_name.gid} (path of the current project)
@item @b{3rd argument:}
@code{c:\a\b\c\problem_type_name.gid} (path of the problem type selected)
@end itemize

Among other utilities, this script can move or rename files and execute the process
until it finishes.

@strong{Note1:} This file must have the executable flag set (see UNIX command @code{chmod}) 
in UNIX systems.

@strong{Note2:} GiD sets as current directory the model directory 
        (example: @code{c:\\examples\test1.gid}) just before executing the @code{.bat}
        file. So, the lines (@code{cd $directory}) are not necessary in the scripts.




@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@menu
* Commands accepted by the GiD command.exe::  
* showing feedback when runing the solver::  
* Managing errors ::                    
* Shell script examples::               
@end menu

@node Commands accepted by the GiD command.exe, showing feedback when runing the solver, Executing an external program, Executing an external program
@unnumberedsubsec Commands accepted by the GiD command.exe
@cindex command.exe
@cindex bat file commands
@cindex commands *.bat


The keywords are the following ones:
@itemize @minus
@item % 
@item Shift
@item Rem
@item Chdir (Cd)
@item Del (Delete, Erase)
@item Copy
@item Rename (Ren, Move)
@item Mkdir (Md)
@item Set
@item Echo (@@echo)
@item If
@item Call
@item Goto
@item :
@item Type

@end itemize

Unknown instructions will be executed as if it was an external file. 

In the GiD command.exe are not implemented all the possible parameters and modifiers available in the operating system. 


@b{Note:}@*
At the moment, @b{command.exe} is only used in Windows operating systems, as an alternative to the command.com or cmd.exe. With the @b{GiD command.exe} some of the disadvantages of Windows can be avoided (the limited length of the parameters, temporary use of letters of virtual units that sometimes are not possible to eliminate, fleeting appearance of the console window, etc). 

If GiD finds the file @b{command.exe}, located next to @b{gid.exe}, it will be used to interpret the @code{*.bat} file of the problem type; if the file command.exe cannot be found, the @code{*.bat} file will be interpreted by the windows command.com.
 
If conflicts appear by the use of some instruction still nonimplemented in the @b{GiD command.exe}, it's possible to rename the command.exe file, so that GiD doesn't find it, and the operating system command.com is used.

@*@*@* 
@b{%}@*
Returns the value of a variable. 

%@i{number}@*
%@i{name}%

@b{Parameters} @*
@i{number}@*
The number is the position (from 0 to 9) of one of the parameters which the *.bat file receives. 

@i{name}@*
Is the name of an environment variable. That variable has to be declared with instruction "set".

@b{Note:}@*
GiD sends to the @code{*.bat} file three parameters: @code{%1, %2, %3}@*
@code{%1} is the name of the current project @code{(project_name)} @*
@code{%2} is the path of the current project @code{(c:\a\b\c\project_name.gid)} @*
@code{%3} is path of the problem type @code{(c:\a\b\c\problem_type_name.gid )}

For example, if GiD is installed in c:\gidwin, the "problemtype" name is cmas2d.gid and the project is test.gid, located in c:\temp (the project is a directory called c:\temp\test.gid with some files inside), parameters will have the following values:

@code{%1} test@*
@code{%2} c:\temp\test.gid@*
@code{%3} c:\gidwin\problemtypes\cmas2d.gid@*

@b{Note:} it's possible that the file and directory names of these parameters are in the short mode Windows format. So, parameter %3 would be: c:\GIDWIN\PROBLE~\CMAS2D.GID.

@b{Examples}
@example
echo %1 > %2\%1.txt
echo %TEMP% >> %1.txt
@end example
@*@*@*
@cindex Shift
@b{Shift}@*
The shift command changes the values of parameters %0 to %9 copying each parameter in the previous one. 
That is to say, value %1 copy to %0, value %2 copy to %1, etc.

@b{shift}

@b{Parameter} @*
None.

@b{Note:}@*
The shift command can be used to create a batch program that accepts more than 10 parameters. 
If it specifies more than 10 parameters in the command line, those that appear after tenth (%9) 
will move to parameter %9 one by one.

@*@*@*
@cindex Rem
@b{Rem}@*
Rem is used to include comments in a @code{*.bat} file or in a configuration file.

@b{rem} [@i{coment}] 

@b{Parameter} @*
@i{coment}@* 
Any character string.

@b{Note:}@*
Some comments are GiD commands. 

@*@*@*
@b{Chdir (Cd)}@*
Changes to a different directory.

@b{chdir} [@i{drive:path}] [..]@* 
-or-@*
@b{cd}  [@i{drive:path}] [..] 

@b{Parameters}@*
[@i{drive:path}] @*
Disk and path of the new directory. 

[..]@*
Goes back one directory. For example if you are within the @code{C:\WINDOWS\COMMAND>} directory this would take you to @code{C:\WINDOWS>}.

@b{Note:}@*
When GiD calls the @code{*.bat} file, the path of project is the current path, so it's not necessary to use @code{cd %2} at the begining of the @code{*.bat} file. 


@b{Examples}
@example
chdir e:\tmp
cd ..
@end example

@cindex Del
@cindex Erase
@*@*@*
@b{Delete (Del, Erase)}@*
Command used to delete files permanently from the computer.

@b{delete} [@i{drive:}][@i{path}] @i{fileName} [@i{fileName}] 

@b{Parameters} @*
[@i{drive:}][@i{path}] @i{fileName} [@i{fileName}]@*
Parameters specify the location and the name of the file that has to be erased from disk. Several file names can be given. 

@b{Note:}@*
Files will be eliminated although they have the hidden or read only flag.
Use of wildcards is not allowed. For example del *.* is not valid.
File names must be separated by spaces and if the path contains blank spaces, the path should be inside inverted commas (the short path without spaces can also be used).


@b{Examples}
@example
delete %2\%1\file.cal
del C:\tmp\fa.dat C:\tmp\fb.dat
del "C:\Program files\test 4.txt"
@end example

@*@*@*

@cindex Copy command
@b{Copy}@*
Copies one or more files to another location. 

@b{copy}  @i{source}  [+  @i{source} [+ ...]] @i{destination}

@b{Parameters}@* 
@i{source} @*
Specifies the file or files to be copied 

@i{destination} @*
Specifies the filename for the new file(s).

To append files, specify a single file for destination, but multiple files for source (using @code{file1 + file2 + file3} format).

@b{Note:}@*
If the destination file already exists, it will be overwrited without prompting if you wanted to overwrite the file or not.
 
File names must be separated by spaces. 
If destination only contains the path but not the filename, the new name will be the same as the source filename.

@b{Examples}
@example
copy f1.txt f2.txt
copy f1.txt c:\tmp
rem if directory c:\tmp exists, c:\tmp\f1.txt will be created, if it doesn't exist, file c:\tmp will be created.
copy a.txt + b.txt + c.txt abc.txt
@end example

@*@*@*

@cindex Rename
@b{Rename (Ren, Move)}@*
Used to rename files and directories from the original name to a new name.

@b{rename} [@i{drive}:][@i{path}] @i{fileName1 fileName2} 

@b{Parameter} @*
[@i{drive}:][@i{path}] @i{fileName1} 
Specifies the path and the name of the file which has to be renamed. 

@i{fileName2}@*
Specifies the new name file. 

@b{Note:}@*
If the destination file already exists, it will be overwrited without prompting if you wanted to overwrite the file or not.
Wildcards are not accepted (@code{*},@code{?}), so only one file can be renamed every time.
Note that you cannot specify a new drive for your destination.
A directory can be renamed in the same way as if it was a file. 

@b{Examples}
@example
Rename fa.txt fa.dat
Rename "c:\Program Files\fa.txt" c:\tmp\fa.txt
Rename c:\test.gid c:\test2.gid
@end example 
@*@*@*

@cindex Mkdir
@b{Mkdir (md)}@*
Allows you to create your own directories.

@b{mkdir} [@i{drive}:]@i{path} @*
@b{md} [@i{drive}:]@i{path} @*


@b{Parameter} @*
@i{drive:} @*
Specifies the drive where the new directory has to be created. 

@i{path} @*
Specifies the name and location of the new directory. The maximum length of the path is limited by the file system. 

@b{Note:}@*
mkdir can be used to create a new path with many new directories. 

@b{Examples}
@example
mkdir e:\tmp2
mkdir d1\d2\d3
@end example

@*@*@*

@cindex Set command
@b{Set}@*
Displays, sets, or removes Windows environment variables. 

@b{set} @i{variable}=[@i{string}]

@b{Parameters}@*
@i{variable} @*
Specifies the environment-variable name. 

@i{string}@* 
Specifies a series of characters to assign to the variable. 

@b{Note:}@*
The set command creates variables which can be used in the same way as the variables @code{%0} to @code{%9}. Variables @code{%0} to @code{%9} can be assigned to new variables using the set command. 

To get the value of a variable, the variable has to be written inside two @code{%} symbols. For example, if the environment-variable name is @code{V1}, its value is @code{%V1%}.
Variable names are not case sensitive.

@b{Examples}
@example
set basename = %1
set v1 = my text
@end example
@*@*@*

@cindex Echo
@b{Echo (@@echo)}@*
Displays messages. 

@b{echo} [@i{message}] 

@i{message} @*
Specifies the text that will be displayed in the screen. 

@b{Note:}@*
The message will not be visible because the console is not visible, GiD hides the console. So that this command it's only useful if the output is redirected to a file (using > or >>). Symbol > sends the text to a new file, and symbol >> sends the text to a file if it already exists. 
Commands if and echo can be used in the same command line.

@b{Examples}
@example
Echo %1 > out.txt
Echo %path% >> out.txt
If Not Exist %2\%1.flavia.res Echo "Program failed" >> %2\%1.err
@end example
@*@*@*

@cindex If command
@b{If} @*
Executes a conditional sentence. If the specified condition is true, the command which follows the condition will be executed; if the condition is false, next line is ignored.
@itemize @{ @}
   @b{if} [@i{not}] @i{exist fileName command}@* 
   @b{if} [@i{not}] @i{string1==string2 command}@*
   @b{if} [@i{not}] @i{errorlevel number command} @*
@end itemize

@b{Parameters} @*
@i{not} @*
Specifies that the command has to be executed only if the condition is false. 

@i{exist file} @*
Returns true if @code{file} exists. 

@i{comand} @*
Is the command that has to be executed if the condition returns true. 

@i{string1==string2} @*
Returns true if string1 and string2 are equal. It's possible to compare two strings, or variables (for example, @code{%1}).

@i{errorlevel number}@* 
Returns true if the last program executed returned a code equal or bigger to number.

@b{Note:}@*
Exist can also be used to check if a directory exists.

@b{Examples}
@example
if exist sphere.igs echo File exists >> out.txt
if not exist test.gid echo Dir doesn't exist >> out.txt
if %1 == test echo Equal %1 >> out.txt
@end example 
@*@*@*

@cindex Call
@b{Call}@*
Executes a new program. 

@b{call} [@i{drive}:][@i{path}] @i{file} [@i{parameters}] 

@b{Parameter}@* 
[@i{drive}:][@i{path}] @i{file} 
Specifies the location ant the name of the program that has to be executed. 

@i{parameters}@* 
Parameters required by the program executed. 

@b{Note:}@*
The program can be @code{*.bat} file, a @code{*.exe} file or a @code{*.com} file. 
If the program does a recursive call, some condition has to be imposed to avoid an endless curl.

@b{Examples}
@example
call test.bat %1
call gid.exe -n -PostResultsToBinary %1.flavia.res %1.flavia.bin
@end example
@*@*@*

@cindex Goto
@b{Goto}@*
The execution jumps to a line identified by a label. 

@b{goto} @i{label} 

@b{Parameter}@*
@i{label}@*
It specifies a line of the @code{*.bat} file where the execution will continue. That label must exist when the Goto command is executed.
A label is a line of the @code{*.bat} file and starts with (:).@*
Goto is often used with the command if, in order to execute conditional operations.
The Goto command can be used with the label @code{:EOF} to make the execution jump to the end of the @code{*.bat} file and finish.

@b{Note:}@*
The label can have more than eight characters and cannot have spaces between them. The label name is not case sensitive.

@b{Example}
@example
goto :EOF

if exist %1.err goto end
...
:end
@end example
@*@*@* 

@b{:}@*
Declares a label.

@b{:} @i{labelName} 

@b{Parameter} @*
@i{labelName}@*
Is a string which identifies a line of the file, so that the Goto command can jump there.
The label line will not be executed.

@b{Note:}@*
The label can have more than eight characters and cannot have spaces between them. The label name is not case sensitive.

@b{Examples}
@example
:my_label
:end
@end example
@*@*@*

@cindex Type
@b{Type}@*
Displays the contents of text files. 

@b{type} [@i{drive}:][@i{path}] @i{fileName}

@b{Parameters}@* 
[@i{drive}:][@i{path}] @i{fileName}@*
Specifies the location ant the name of the file to be displayed. If the file name contains blanc spaces it should be inside inverted commas (@code{"}).

@b{Note:}@*
The text will not be visible because the console is not visible, GiD hides the console. So that this command it's only useful if the output is redirected to a file (using > or >>). Symbol > sends the text to a new file, and symbol >> sends the text to a file if it already exists. 
It's recommended to use the copy command instead of type.@*
@*
In general, the @b{type} command should not be used with binary files. 

@b{Examples}
@example
type %2\%1.dat > %2\%1.txt
@end example




@tex 
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node showing feedback when runing the solver, Managing errors , Commands accepted by the GiD command.exe, Executing an external program
@unnumberedsubsec Showing feedback when runing the solver
@cindex Output view

The information about what is displayed when the user presses @code{Output view:}, is
also given here. The way of doing so is to include a commented line in the script
of the form: 

@code{#    OutputFile: $1.log} or @code{rem    OutputFile: %1.log}

where @code{$1.log} means to display in that window, a file whose name is: 
@code{project_name.log} The name can also be and absolute name like @code{output.dat}.
If this line is omitted, when the user presses @code{Output view:}, nothing will be
displayed.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Managing errors , Shell script examples, showing feedback when runing the solver, Executing an external program
@unnumberedsubsec Managing errors 
@cindex Errors when executing an external program


A commented line like

@code{# ErrorFile: $1.err} or @code{rem ErrorFile: %1.err}  

included in the @code{.bat} file, means to consider
that the given filename is the error file. At the end of the execution
of the @code{.bat} file, if the errorfile does not exist or is zero, execution
is considered to be successful. If not, an error window appears an the
contents of the error file are considered to be the error message. If
this line exists, GiD will delete this file just before calculating to
avoid errors with previus calculations.
@*
@*
A commented line like

@code{# WarningFile: $1.err} or @code{rem WarningFile: %1.err}@*@*
  
included in the @code{.bat} file, means to consider that the given filename is the warning file. This file stores the warnings that may appear during the execution of the @code{.bat} file.  


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node Shell script examples,  , Managing errors , Executing an external program
@unnumberedsubsec Examples 
@cindex bat file examples


Two examples are given of easy scripts to do so. One of them is for Unix machines and
the other one is for ms-dos or Windows.


@itemize @bullet
@item @b{UNIX example:}
@example
#!/bin/csh 
set basename = $1
set directory = $2
set ProblemDirectory = $3

#    OutputFile: $1.log          IT IS USED BY GiD
#    ErrorFile: $1.err           IT IS USED BY GiD

rm -f $basename.flavia.res

$ProblemDirectory/myprogram $basename 

mv $basename.post $basename.flavia.res
@*@*
@end example
@item @b{MS-DOS example:}
@example
rem basename=%1                    JUST INFORMATIVE
rem directory=%2                   JUST INFORMATIVE
rem ProblemDirectory=%3            JUST INFORMATIVE

rem    OutputFile: %1.log          IT IS USED BY GiD
rem    ErrorFile: %1.err           IT IS USED BY GiD

del %1.flavia.res

%3\myprogram %1

move %1.post %1.flavia.res
@end example
@end itemize


@c  ***********************************************************************
@c             Chapter  23  :   Post PROCESSING DATA FILES
@c  ***********************************************************************


@node POSTPROCESS DATA FILES, TCL-TK extension, Customization, Top
@chapter POSTPROCESS DATA FILES
@cindex Post-processing data files
@cindex data files
@cindex Postprocess Files 

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

In the GiD postprocess you can study the results obtained from a solver program. The communication between the solver and the GiD Postprocess is made using files. 
The solver program has to write the results in a file that must have the extension @code{.post.res}, or the old @code{.flavia.res}, and its name must be the project name. 

The solver program can also (it is not mandatory) give to GiD the postprocess mesh, and should have the extension @code{.post.msh}, or the old @code{.flavia.msh}.
If this mesh is not provided by the solver program, GiD uses in the post-process, the preprocess mesh.

The extensions @code{.msh} and @code{.res} are also allowed, but 
only the files with the extensions @code{.post.res}, or the old @code{.flavia.res}, and eventually @code{.post.msh}, or the old @code{.flavia.msh}, 
will be automatically read by GiD when postprocessing the GiD project.

So, post-processing data files are ASCII files, and can be separated into two 
categories:

@itemize @bullet
@item Mesh Data File:
@code{project_name.post.msh}
@code{project_name.flavia.msh} for volume and surface (3D or 2D) mesh 
information and
@item Results Data File:
@code{project_name.post.res}
@code{project_name.flavia.res} for results information.
@end itemize


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/flaviaNF.ps,width=14cm,height=7.5cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<a name="flaviaNF.gif"></a>
<img src="images/flaviaNF.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset


@strong{Note:} @code{ProjectName.post.msh}, or the old @code{ProjectName.flavia.msh}, handles meshes of different 
element types: points, lines, triangles, quadrilaterals, tetrahedras and hexahedras. 
The old format, which only handles one type of element per file, is still supported inside GiD (@pxref{old mesh format}).

If a project is loaded into GiD, when changing to @code{PostProcess} it will look
for @code{ProjectName.post.res}, or the olf @code{ProjectName.flavia.res}. If a mesh information file 
with name @code{ProjectName.post.msh}, or the old @code{ProjectName.flavia.msh} 
is present, it will also be read, regardless of the information available from @code{PreProcess}.

@itemize @bullet

@item @b{ProjectName.post.msh}: (or the old @b{ProjectName.flavia.msh}) 
The first file, which is named @code{ProjectName.flavia.msh}, should contain nodal coordinates 
of the 3D, and its nodal connectivities and the material of each element. At the moment
Only one set of nodal coordinates can be entered. Diferent kind of elements can be used but
separated into diferent sets. If no material is supplied, GiD takes the material 
number equal to zero. 
@item @b{ProjectName.post.res}: (or the old @b{ProjectName.flavia.res})
This second file must contain the nodal or gaussian
variables. GiD allows the user to define as many nodal variables as desired, as well as
several steps and analysis cases (limited only by the memory of the machine).
Gauss points and results on these gauss points should also be in this file.
@end itemize

The files are created and read in the order that corresponds with the natural way of 
solving a finite element problem: mesh, surface definition and conditions
and finally, evaluation of the results. 
The format of the read statements is normally free, i.e. it is necessary only 
to separate them by spaces. 

Thus, the users can modify the files with any format, leaving spaces between each field and can
also write out the results with as many decimals as desired. In case of error, the 
program warns the user about the type of mistake found.

GiD reads all the information directly from the 
pre-processing files in order to gain efficiency, whenever possible.


@menu
* File ProjectName.post.msh - ProjectName.flavia.msh::  
* File ProjectName.post.res - ProjectName.flavia.res::  
* old results format::                  
* old mesh format::                     
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node File ProjectName.post.msh - ProjectName.flavia.msh, File ProjectName.post.res - ProjectName.flavia.res, POSTPROCESS DATA FILES, POSTPROCESS DATA FILES
@section New postprocess mesh format: ProjectName.post.msh, ProjectName.flavia.msh
@cindex File ProjectName.post.msh
@cindex File ProjectName.flavia.msh
@cindex ProjectName.post.msh
@cindex ProjectName.flavia.msh
@cindex New postprocess mesh format

@b{Note:} The new postprocess mesh format needs GiD version 6.0 or higher.

Comment are allowed and should begin with a '@code{#}'.
Blank lines are also allowed.

Inside this file one or more @code{MESH}es can be defined, each of them should:

@itemize @bullet

@item Begin with a header with this pattern:
@example

@b{MESH} "mesh_name" @b{dimension} my_dimension @b{Elemtype} my_type @b{Nnode} my_number

@end example
being 
@itemize @minus
@item @code{@b{MESH}}, @code{@b{dimension}}, @code{@b{elemtype}}, @code{@b{nnode}}:
keywords that should be written as they are, case doesn't matter. 
@item @code{"mesh_name"}: an optional name for the mesh,
@item @code{my_dimension}: 2 or 3 according to the geometric dimension of the mesh.
@item @code{my_type}: one of @code{Point}, @code{Linear}, @code{Triangle}, @code{Quadrilateral}, 
    @code{Tetrahedra} or @code{Hexahedra}, describing the element type of this @code{MESH}.
@item @code{my_number}: the number of nodes of @code{my_type} element:


@itemize ·

@item @code{Point}: 1 node,

@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .45
% me salto la primera columna
\tab
Point connectivity:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/punto1.ps,width=0.5cm,height=0.5cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<table>
<tr>
<td width=20></td>
<td valign=top>
Point connectivity:
</td>
<td>
<a name="punto1.gif"></a>
<img src="images/punto1.gif"> 
</td></tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@item @code{Linear}: 2 or 3 nodes,

@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .15 .3
\tab
Line connectivities:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/linea2.ps,width=1cm,height=0.5cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/linea3.ps,width=1cm,height=0.5cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<TABLE>
<tr>
<td width=20></td>
<td valign=top>
Line connectivities:
</td>
<td>
<a name="linea2.gif"></a>
<img src="images/linea2.gif">
</td>
<td> 
<a name="linea3.gif"></a>
<img src="images/linea3.gif">
</td>
</tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@item @code{Triangle}: 3 or 6 nodes,

@ifset photo
@tex
\multitable \columnfractions  .02 .37 .15 .15 .3
\tab
Triangle connectivities:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/triang3.ps,width=1cm,height=1cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/triang6.ps,width=1cm,height=1cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<TABLE>
<tr>
<td width=20></td>
<td valign=top> 
Triangle connectivities:
</td>
<td>
<a name="triang3.gif"></a>
<img src="images/triang3.gif">
</td>
<td align> 
<a name="triang6.gif"></a>
<img src="images/triang6.gif">
</td>
</tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@item @code{Quadrilateral}: 4, 8 or 9 nodes,

@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .15 .15 .15
\tab
Quadrilateral connectivities:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/cuad4.ps,width=1cm,height=1cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/cuad8.ps,width=1cm,height=1cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/cuad9.ps,width=1cm,height=1cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<TABLE>
<td width=20></td>
<td valign=top> 
Quadrilateral connectivities:
</td>
<td>
<a name="cuad4.gif"></a>
<img src="images/cuad4.gif">
</td>
<td> 
<a name="cuad8.gif"></a>
<img src="images/cuad8.gif">
</td>
<td> 
<a name="cuad9.gif"></a>
<img src="images/cuad9.gif">
</td>
</tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@item @code{Tetrahedra}: 4 or 10 nodes,

@ifset photo

@tex
\multitable \columnfractions .02 .37 .15 .15 .3
\tab
Tetrahedral connectivites:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/tetra4.ps,width=1.5cm,height=1.5cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/tetra10.ps,width=1.5cm,height=1.5cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<TABLE>
<td width=20></td>
<td valign=top> 
Tetrahedral connectivities:
</td>
<td>
<a name="tetra4.gif"></a>
<img src="images/tetra4.gif">
</td>
<td> 
<a name="tetra10.gif"></a>
<img src="images/tetra10.gif">
</td>
</tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@item @code{Hexahedra}: 8, 20 or 27 nodes.

@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .15 .15 .15
\tab
Hexahedral connectivities:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/hexa8.ps,width=2cm,height=2cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/hexa20.ps,width=2cm,height=2cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/hexa27.ps,width=2cm,height=2cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ }
@end tex

@ifset html
@ifhtml
<TABLE>
<td width=20></td>
<td valign=top> 
Hexahedral connectivities:
</td>
<td>
<a name="hexa8.gif"></a>
<img src="images/hexa8.gif">
</td>
<td align=center> 
<a name="hexa20.gif"></a>
<img src="images/hexa20.gif">
</td>
<td align=center> 
<a name="hexa27.gif"></a>
<img src="images/hexa27.gif">
</td>
</tr>
</table>
<p>
@end ifhtml
@end ifset
@end ifset

@end itemize

@end itemize

@b{Note:} On elements of order higher than linear, the connectivities 
must written in hierarchical order, i.e. first the vertex nodes, then the middle ones.

@item followed by the coordinates:

@example
@b{coordinates}
   1   0.0   1.0   3.0
. . .

1000  -2.5   9.3  21.8
@b{end coordinates}
@end example
being 
@itemize @minus
@item the pair @code{@b{coordinates}} and @code{@b{end coordinates}} keywords that should be 
written as they are, case doesn't matter.
@item And between these keywords, the nodal coordinates of all the @code{MESH}es or the current one.@*
@strong{Note:} if each @code{MESH} specifies its own coordinates, the node number should be unique,
for instance, if @code{MESH} "mesh one" uses nodes 1..100, and @code{MESH} "other mesh" uses 50
nodes, they should be numbered up 100.
@c @item And in-between if the @code{MESH} is the first one, the nodal coordinates of all the @code{MESH}es.
@c @strong{Note:} the nodal coordinates should be specified on the first @code{MESH}. For the
@c rest of the @code{MESH}es nothing should be written between this pair @code{@b{coordinates}} and @code{@b{end coordinates}}.

@end itemize


@item and followed by the elements conectivity

@example
@b{elements}
#el_num node_1 node_2 node_3 material
   1      1      2      3      215
. . .                         
                                
1000     32     48     23      215
@b{end elements}
@end example
being 
@itemize @minus
@item the pair @code{@b{elements}} and @code{@b{end elements}} keywords that should be 
written as they are, case doesn't matter.
@item And in-between the nodal conectivities for the @code{my_type} elements,

@b{Note:} On elements of order higher than linear, the connectivities 
must written in hierarchical order, i.e. first the vertex nodes, then the middle ones.

@item and an optional material number.
@end itemize

@end itemize

@menu
* Mesh example::                        
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Mesh example,  , File ProjectName.post.msh - ProjectName.flavia.msh, File ProjectName.post.msh - ProjectName.flavia.msh
@unnumberedsubsec Mesh example
@cindex table mesh example
@cindex mesh example

This example clarifies this description:

@example

#mesh of a table
MESH "board" dimension 3 ElemType Triangle  Nnode 3
Coordinates
# node number   coordinate_x  coordinate_y  coordinate_z
    1             -5              3             -3
    2             -5              3              0
    3             -5              0              0
    4             -2              2              0
    5       -1.66667              3              0
    6             -5             -3             -3
    7             -2             -2              0
    8              0              0              0
    9             -5             -3              0
   10        1.66667              3              0
   11       -1.66667             -3              0
   12              2              2              0
   13              2             -2              0
   14        1.66667             -3              0
   15              5              3             -3
   16              5              3              0
   17              5              0              0
   18              5             -3             -3
   19              5             -3              0
end coordinates

#we put both material in the same MESH, 
#but they could be separated into two MESH

Elements
# element  node_1   node_2  node_3 material_number
    5         19      17      13     3
    6          3       9       7     3
    7          2       3       4     3
    8         17      16      12     3
    9         12      16      10     3
   10         12      10       4     3
   11          7       9      11     3
   12          7      11      13     3
   13          2       4       5     3
   14          5       4      10     3
   15         19      13      14     3
   16         14      13      11     3
   17          3       7       4     3
   18         17      12      13     3
   19         13      12       8     4
   20         13       8       7     4
   21          7       8       4     4
   22          4       8      12     4
end elements

MESH    dimension 3 ElemType Linear  Nnode 2
Coordinates
#no coordinates then they are already in the first MESH
end coordinates

Elements
# element  node_1   node_2 material_number
    1          9       6     5
    2         19      18     5
    3         16      15     5
    4          2       1     5
end elements

@end example







@c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node File ProjectName.post.res - ProjectName.flavia.res, old results format, File ProjectName.post.msh - ProjectName.flavia.msh, POSTPROCESS DATA FILES
@section New postprocess results format: ProjectName.post.res, ProjectName.flavia.res
@cindex File ProjectName.flavia.res
@cindex ProjectName.flavia.res
@cindex File ProjectName.post.res
@cindex ProjectName.post.res 
@cindex Results file 
@cindex New postprocess results format
<<<<<<< gid.texinfo
=======

@b{Note}: The new postprocess results format needs GiD version 6.1.4b or higher. 
>>>>>>> 1.192

<<<<<<< gid.texinfo
@b{Note:} The new postprocess results format needs GiD version 6.1.4b or higher. 

=======
@b{Note}: The code developers can download, from the GiD web page, the GiDpost tool, a C/C++/Fortran 
library to create postprocess files for GiD, in ASCII or compressed binary format.

This is the ASCII format description:

>>>>>>> 1.192
The first line of the files with results written in this new postprocess format should be:

@code{GiD Post Results File 1.0}

Comment lines are allowed and should begin with a '@code{#}'.
Blank lines are also allowed.

Results files can also be included with the keyword @b{include}, for instance:

@code{include "My Other Results File"}

This is usefull, for instance, to share several @code{GaussPoints} definitions and @code{ResultRangeTable}
among different analysis.

This 'include' should be outside the @b{Blocks} of information.

There are several types of @b{Blocks} of information, all of them indentified by
a keyword:

@itemize @bullet
@item @code{GaussPoints} Information about gauss points: name, number of gauss points, 
natural coordinates, etc.
@item @code{ResultRangesTable} Information for the result visualization type @b{Contour Ranges}:
name, ranges limits and ranges names.
@item @code{Result} Information about a Result: name, analysis, analysis/time step, type
of result, location, values.
@item @code{ResultGroup} several results grouped in one block. These results share the same
analysis, time step, and location ( nodes or gauss points).
@end itemize

@menu
* Gauss Points::                        
* Result Range Table::                  
* Result Block::                        
* Result Group::                        
* Results example::                     
@end menu

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Gauss Points, Result Range Table, File ProjectName.post.res - ProjectName.flavia.res, File ProjectName.post.res - ProjectName.flavia.res
@unnumberedsubsec Gauss Points
@cindex Gauss points format (new format)

@c To include Gauss points they must be at the beginning of the results file.
To include @code{Gauss points} they must be defined before the @code{Result} which uses them.
@c Comment lines are allowed and should begin with a #. Blank lines are also allowed.

Each @code{Gauss points} block are defined between a pair of @code{GaussPoints} and @code{End GaussPoints}.

The structure is as follows:

@itemize @bullet

@item Begin with a header with this pattern:

@example
@b{GaussPoints} "gauss_points_name" @b{Elemtype} my_type "mesh_name"
@end example

being 
@itemize @minus
@item @code{@b{GaussPoints}}, @code{@b{elemtype}}:
keywords that should be written as they are, case doesn't matter. 
@item @code{"gauss_points_name"}: a name for the @code{gauss points} set, which will be used 
as reference by the results that are located on these @code{gauss points}.
@item @code{my_type}: one of @code{Point}, @code{Linear}, @code{Triangle}, @code{Quadrilateral}, 
    @code{Tetrahedra} or @code{Hexahedra}, describing which element type are these @code{gauss points} for.
@item @code{"mesh_name"}: an optional field. If this field is missing, the @code{gauss points} are defined for
all the elements of type @code{my_type}. If a mesh name is given, the @code{gauss points} are only defined for
this mesh.
@end itemize

@*

@item followed by @code{gauss points} properties:

@example
@b{Number of Gauss Points:} number_gauss_points_per_element
@b{Nodes included} 
@b{Nodes not included}
@b{Natural Coordinates: Internal}
@b{Natural Coordinates: Given}
 natural_coordinates_for_gauss_point_1
 . . .

 natural_coordinates_for_gauss_point_n
@end example

being
@itemize @minus
@item @code{@b{Number of Gauss Points:} number_gauss_points_per_element}: 
a keyword that should be written as it is, case doesn't matter, followed by the number of gauss points
per element that defines this set. If @code{@b{Natural Coordinates:}} is set to @code{@b{Internal}},
@code{number_gauss_points_per_element} should be one of:

@itemize ·
@item 1, 3, 6 for Triangles; 
@item 1, 4, 9 for Quadrilaterals; 
@item 1, 4 for Tetrahedras; 
@item 1, 8, 27 for Hexahedras and 
@item 1, ... n points equally spaced over lines.
@end itemize

For triangles and quadrilaterals the order of the gauss points with @b{Internal} natural coordinates, will be this one:
@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/GaussPoints.ps,width=8.5cm,height=6.9cm,angle=0}
}}
\unpie{}
{
Gauss Points positions of the cuadrature of Gauss-Legendre for Triangles and Quadrilaterals
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="NewGaussPoints.gif"></a>
<TABLE>
<tr>
<td width=20></td>
<td align=center>
<a name="GaussPoints.gif"></a>
<img src="images/GaussPoints.gif"> 
<font size=+1>
Internal coordinates:<br>
( 0, 0)<br>
</font>
</td>
<td align=center> 
<a name="cuadGP4.gif"></a>
<img src="images/cuadGP4.gif"> 
<font size=+1>a=0.57735027<br>
Internal coordinates:<br>
(-a,-a) ( a,-a)<br>
( a, a) (-a, a)<br>
</font>
</td>
<td align=center> 
<a name="cuadGP9.gif"></a>
<img src="images/cuadGP9.gif"> 
<font size=+1>a=0.77459667<br>
Internal coordinates:<br>
(-a,-a) ( a,-a) ( a, a)<br>
(-a, a) ( 0,-a) ( a, 0)<br>
( 0, a) (-a, 0) ( 0, 0)<br>
</font>
</td>
</tr>
<tr>
<td width=20></td>
<td align=center valign=top colspan=3> 
Gauss Points positions of the cuadrature of Gauss-Legendre Quadrilaterals
</td>
</tr>
</table>
</center>
<p>
@end ifhtml
@end ifset

@ifset html
@ifhtml
<center>
<TABLE>
<tr>
<td width=20></td>
<td align=center>
<a name="triangGP1.gif"></a>
<img src="images/triangGP1.gif">  
<font size=+1>a=1/3
Internal coordinates:<br>
( a, a)<br>
</font>
</td>
<td align=center> 
<a name="triangGP3.gif"></a>
<img src="images/triangGP3.gif"> 
<font size=+1>a=1/2<br>
Internal coordinates:<br>
( a, 0) ( a, a) ( 0, a)<br>
</font>
</td>
<td align=center> 
<a name="triangGP6.gif"></a>
<img src="images/triangGP6.gif"> 
<font size=+1>
a=0.09157621 b=0.81684757<br>
c=0.44594849 d=0.10810301<br>
Internal coordinates:<br>
( a, a) ( b, a) ( a, b)<br>
( c, d) ( c, c) ( d, c)<br>
</font>
</td>
</tr>
<tr>
<td width=20></td>
<td align=center valign=top colspan=3> 
Gauss Points positions of the cuadrature of Gauss for Triangles
</td>
</tr>
</table>
</center>
<p>
@end ifhtml
@end ifset

@end ifset

For tetrahedras and hexahedras the order of the @b{Internal} Gauss Points is this:


@ifset photo
@tex
\multitable \columnfractions .02 .37 .15 .15 .15 .15
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/tetGP4.ps,width=2cm,height=2cm,angle=0}
}}
\finfigurafija
\unpie{}
{ 
a,b,c = 0.138197,0.585410
}

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/hexGP8.ps,width=2cm,height=2cm,angle=0}
}}
\finfigurafija
\unpie{}
{ 
a,b,c = +-0.577350
}

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/hexGP27.ps,width=2cm,height=2cm,angle=0}
}}
\finfigurafija
\unpie{}
{ 
a,b,c = 0.0,+-0.774596
}
\end multitable
\unpie{}
{ 
Gauss Points in tetrahedras and hexahedras
}
@end tex

@ifset html
@ifhtml
<center>
<TABLE>
<tr>
<td width=20></td>
<td align=center>
<a name="tetGP4.gif"></a>
<img src="images/tetGP4.gif"><br>
<font size=+1>a=0.58541020, b=0.13819660<br>
Internal coordinates:<br>
( b, b, b)<br>
( a, b, b)<br>
( b, a, b)<br>
( b, b, a)<br>
</font>
</td>
<td align=center> 
<a name="hexGP8.gif"></a>
<img src="images/hexGP8.gif"><br>
<font size=+1>a=0.57735027<br>
Internal coordinates:<br>
(-a,-a,-a) ( a,-a,-a) ( a, a,-a) (-a, a,-a)<br>
(-a,-a, a) ( a,-a, a) ( a, a, a) (-a, a, a)<br>
</font>
</td>
<td align=center> 
<a name="hexGP27.gif"></a>
<img src="images/hexGP27.gif"><br>
<font size=+1>a=0.77459667<br>
Internal coordinates:<br>
(-a,-a,-a) ( a,-a,-a) ( a, a,-a) (-a, a,-a)<br>
(-a,-a, a) ( a,-a, a) ( a, a, a) (-a, a, a)<br>
( 0,-a,-a) ( a, 0,-a) ( 0, a,-a) (-a, 0,-a)<br>
(-a,-a, 0) ( a,-a, 0) ( a, a, 0) (-a, a, 0)<br>
( 0,-a, a) ( a, 0, a) ( 0, a, a) (-a, 0, a)<br> 
( 0, 0,-a)<br>
( 0,-a, 0) ( a, 0, 0) ( 0, a, 0) (-a, 0, 0)<br> 
( 0, 0, a)<br> 
( 0, 0, 0)<br>
</font>
</td>
</tr>
<tr>
<td width=20></td>
<td align=center valign=top colspan=3> 
Gauss Points in tetrahedras and hexahedras
</td>
</tr>
</table>
</center>
<p>
@end ifhtml
@end ifset
@end ifset


@b{Given} natural coordinates for Gauss Points should range:
@itemize ·
@item between @b{0.0} and @b{1.0} for Triangles and Tetrahedras, and
@item between @b{-1.0} and @b{1.0} for Quadrilaterals and Hexahedras.
@end itemize


@strong{Note:} If the natural coordinates used are the internal ones almost all the Results visualization
posibilities with some limitations for Tetrahedras and hexahedras with more than one gauss points.
If the natural coordinates are given, these limitations are extended to those elements with 
@code{number_gauss_points_per_element} not included in the list written above.


@item @code{@b{Nodes Included}} / @code{@b{Nodes not Included}}: 
keywords that should be written as they are, case doesn't matter, only necessary for gauss points on
@code{@b{Linear}} elemets which indicate whether the end nodes of the @code{@b{Linear}} elemet are included
in the @code{number_gauss_points_per_element} count or not.

@ifset photo

@tex
\multitable \columnfractions .02 .37 .15 .15 .3
\tab
Tetrahedral connectivites:
\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/lineaGPNNI.ps,width=2cm,height=5.2cm,angle=0}
}}
\finfigurafija

\tab
\inifigurafija
\centerline{\hbox{
\psfig{figure=images/lineaGPNNI.ps,width=2cm,height=5.3cm,angle=0}
}}
\finfigurafija
\end multitable
\unpie{}
{ 
Pseudo "gauss points" for lines with nodes included and not included
}
@end tex

@ifset html
@ifhtml
<center>
<TABLE>
<tr>
<td width=20></td>
<td>
<a name="lineaGPNI.gif"></a>
<img src="images/lineaGPNI.gif">
</td>
<td> 
<a name="lineaGPNNI.gif"></a>
<img src="images/lineaGPNNI.gif">
</td>
</tr>
<tr>
<td width=20></td>
<td valign=top colspan=2> 
Pseudo "gauss points" for lines with nodes included and not included
</td>
</tr>
</table>
</center>
<p>
@end ifhtml
@end ifset
@end ifset

@b{Note:} By now, Natural Coordinates for linear elements cannot be "@code{Given}"
 
@item  @code{@b{Natural Coordinates: Internal}} / @code{@b{Natural Coordinates: Given}}:
keywords that should be written as they are, case doesn't matter, telling if the natural coordinates are
calculated internally by GiD, or are given in the following lines.@*
The natural coordinates should be written per line and gauss point.
@end itemize

@*

@item Ending with this tail:

@example
@b{End GaussPoints}
@end example

being
@itemize @minus
@item @code{@b{End GaussPoints}}: a keyword that should be written as it is, case doesn't matter.
@end itemize

@end itemize

Here comes an example of results on @code{Gauss Points}:

@example
GaussPoints "Board gauss internal" ElemType Triangle "board"
  Number Of Gauss Points: 3
  Natural Coordinates: internal
end gausspoints
@end example



@c cccccccccccccccccccccccccccc

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Result Range Table, Result Block, Gauss Points, File ProjectName.post.res - ProjectName.flavia.res
@unnumberedsubsec Result Range Table
@cindex Results Range Table, Result Range Table
@cindex Contour Range, Contour Ranges

To include a @code{Result Range Table} it must be defined before the @code{Result} which uses it.

Each @code{Result Range Table} is defined between a pair of @code{ResultRangesTable} and @code{End ResultRangesTable}.

The structure is as follows:

@itemize @bullet

@item Begin with a header with this pattern:

@example
@b{ResultRangesTable} "ResultsRangeTableName"
@end example

being 
@itemize @minus
@item @code{@b{ResultRangesTable}}: 
a keyword which should be written as it is, case doesn't matter. 
@item @code{"ResultsRangeTableName"}: a name for the @code{Result Ranges Table}, which will be used 
as reference by the results that uses this @code{Result Ranges Table}.
@end itemize

@*

@item followed by a list of @code{Ranges}, each of them defined as follows:

@example
Min_Value @b{-} Max_Value@b{:} "Range Name"
@end example

being
@itemize @minus
@item @code{Min_value} : the minimum value of the range, may be void if the @code{Max_value} is given. If void, the minimum value of the result will be used.
@item @code{Max_value} : the maximum value of the range, may be void if the @code{Min_value} is given. If void, the maximum value of the result will be used.
@item @code{"Range Name"} : the name of the range which will appear on legends and labels.
@end itemize

@*

@item Ending with this tail:

@example
@b{End ResultRangesTable}
@end example

being
@itemize @minus
@item @code{@b{End ResultRangesTable}}: a keyword that should be written as it is, case doesn't matter.
@end itemize

@end itemize

Several examples of results ranges table follows,

@itemize @bullet 
@item Ranges defined for the whole result

@example
ResultRangesTable "Mi tabla"
# all the ranges are min <= res < max except
# the last range is min <= res <= max
      - 0.3: "Less"
  0.3 - 0.7: "Normal"
  0.7 -    : "Too much"
End ResultRangesTable
@end example

@item Just a couple of ranges

@example
ResultRangesTable "Mi tabla"
  0.3 - 0.7: "Normal"
  0.7 - 0.9: "Too much"
End ResultRangesTable
@end example

@item or using the maximum of the result:

@example
ResultRangesTable "Mi tabla"
  0.3 - 0.7: "Normal"
  0.7 -    : "Too much"
End ResultRangesTable
@end example

@end itemize

@c ccccccccccccccccc

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Result Block, Result Group, Result Range Table, File ProjectName.post.res - ProjectName.flavia.res
@unnumberedsubsec Result block
@cindex Result entry, Result block

Each @code{Result} block is identified by a @code{Result} header, followed by several 
optional properties: component names, ranges table, and the result values, defined the 
pair of @code{Values} and @code{End Values}.

The structure is as follows:

@itemize @bullet

@item Begin with a header with this pattern:

@example
@b{Result} "result name" "analysis name" step_value my_result_type my_location "location name"
@end example

being 
@itemize @minus
@item @code{@b{Result}}: a keyword that should be written as it is, case doesn't matter. 
@item @code{"result name"}: a name for the @code{Result}, which will be used for menus.
@item @code{"analysis name"}: the name of the analysis of this @code{Result}, 
which will be used for menus.
@item @code{step_value}: the value of the step inside the analysis @code{"analysis name"}.
@item @code{my_type}: type of the @code{Result}, should be one of @code{ Scalar}, @code{ Vector}, 
@code{ Matrix}, @code{ PlainDeformationMatrix}, @code{ MainMatrix}, @code{ LocalAxes}.
@item @code{my_location}: where is the @code{Result} located, should be one of @code{ OnNodes}, 
@code{ OnGaussPoints}. If the @code{Result} is @code{ OnGaussPoints} a @code{"location name"} 
should be entered.
@item @code{"location name"}: name of the @code{Gauss Points} on which the @code{Result} is defined.
@end itemize

@*

@item followed by optional @code{result} properties:

@example
@b{ResultRangesTable} "Name of a result ranges table"
@b{ComponentNames} "Name of Component 1", "Name of Component 2"
@end example

being 
@itemize @minus
@item @code{@b{ResultRangesTable} "Name of a result ranges table"}: ( optional)
a keyword that should be written as it is, case doesn't matter, followed by the name of the previously
defined @code{Tesult Ranges Table} which will be used if the @code{Contour Ranges} result visualization
is choosen ( @pxref{Result Range Table}).
@item @code{@b{ComponentNames} "Name of Component 1", "Name of Component 2"}:  ( optional)
a keyword that should be written as it is, case doesn't matter, followed by the names of the components
of the results which will be used in GiD. The number of @code{Component Names} are these:
@itemize ·
@item One for a @code{Scalar Result}
@item Three for a @code{Vector Result}
@item Six for a @code{Matrix Result}
@item Four for a @code{PlainDeformationMatrix Result}
@item Six for a @code{MainMatrix Result}
@item Three for a @code{LocalAxes Result}
@end itemize

@end itemize

@*

@item and ending with the @code{result} values:

@example
@b{Values}
 node_or_elem_number component_1_value component_2_value
 . . .

 node_or_elem_number component_1_value component_2_value
@b{End Values}
@end example

being
@itemize @minus
@item @code{@b{Values}}: a keyword that should be written as it is, case doesn't matter, which indicates
the beginning of the @code{result's values} section.
@item The lines
@itemize ·
@item @code{node_or_elem_number component_1_value component_2_value}
@item @code{ . . .}
@item @code{ }
@item @code{node_or_elem_number component_1_value component_2_value}
@end itemize
are the values of the result at the related 'node_or_elem_number'. 
The number of results values are limited to:
@itemize ·
@item if the @code{Result} is located @code{OnNodes}: the number of nodes defined in @code{ProjectName.flavia.msh}
@item if the @code{Result} is located @code{OnGaussPoints "My GP"}: if
the @code{Gauss Points "My GP"} are defined for the mesh @code{"My mesh"}, the limit is the number of gauss points
in @code{"My GP"} multiplied by the number of elements of the mesh @code{"My mesh"}.
@end itemize
@*
For results in gauss points, each element must have 'ngauss' lines of results.
@example
for example, if the number of gauss points is 3 , then must appear 3 lines of gauss point result for a element
Values
1 1.155 
  2.9 
  3.955
End Values
@end example

Holes are allowed in any result. The nodes, elements, with no result defined will not be drawn, i.e. they will appear transparent.@*

The number of components for each @code{Result Value} are:
@itemize ·
@item for @code{@b{Scalar}} results: one component 
@ifhtml
<br>
@end ifhtml
@code{ result_number_i scalar_value}

@item for @code{@b{Vector}} results: three components, with an optional fourth component for signed modules

@ifhtml
<br>
@end ifhtml
@code{ result_number_i x_value y_value z_value}

@ifhtml
<br>
@end ifhtml
@code{ result_number_i x_value y_value z_value signed_module_value}

@item for @code{@b{Matrix}} results: three components ( 2D models) or six components (3D models)

@ifhtml
<br>
@end ifhtml
2D: @code{ result_number_i Sxx_value Syy_value Sxy_value}

@ifhtml
<br>
@end ifhtml
3D: @code{ result_number_i Sxx_value Syy_value Szz_value Sxy_value Syz_value Sxz_value}

@item for @code{@b{PlainDeformationMatrix}} results: four components

@ifhtml
<br>
@end ifhtml
@code{ result_number_i Sxx_value Syy_value Sxy_value Szz_value}

@item for @code{@b{MainMatrix}} results: twelve components

@ifhtml
<br>
@end ifhtml
@code{ result_number_i Si_value Sii_value Siii_value Vix_value Viy_value Viz_value Viix_value Viiy_value Viiz_value Viiix_value Viiiy_value Viiiz_value}

@item for @code{@b{LocalAxes}} results: three components describing the Euler angles 

@ifhtml
<br>
@end ifhtml
@code{ result_number_i euler_ang_1_value euler_ang_2_value euler_ang_3_value}

@end itemize


@item @code{@b{End Values}}: a keyword that should be written as it is, case doesn't matter., which indicates
the end of the @code{result's values} section.
@end itemize

@end itemize


@strong{Note:} for @code{@b{Matrix}} and @code{@b{PlainDeformationMatrix}} results, the
Si, Sii and Siii components are calculated by GiD, which represents the eigen values & vectors 
of the matrix results, and which are ordered according to the eigen value.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Result Group, Results example, Result Block, File ProjectName.post.res - ProjectName.flavia.res
@unnumberedsubsec Result group
@cindex Result group
@cindex result groups

Results canbe grouped into on block. These results belongs to the same
time step of the same analysis and are located in the same place. So
all the results in the group are nodal results or are defined over
the same gauss points set.

Each Result group is identified by a @code{ResultGroup} header, followed by 
the results descriptions and its optional properties, such as components names 
and ranges tables, and the results values, between the pair @code{Values}
... @code{End values}.

The structure is as follows:

@itemize @bullet

@item Begin with a header with this pattern

@example
@b{ResultGroup} "analysis name" step_value my_location "location name"
@end example

being 
@itemize @minus
@item @code{@b{ResultGroup}}: a keyword that should be written as it is, case doesn't matter. 
@item @code{"analysis name"}: the name of the analysis of this @code{ResultGroup}, 
which will be used for menus.
@item @code{step_value}: the value of the step inside the analysis @code{"analysis name"}.
@item @code{my_location}: where is the @code{ResultGroup} located, should be one of @code{ OnNodes}, 
@code{ OnGaussPoints}. If the @code{ResultGroup} is @code{ OnGaussPoints} a @code{"location name"} 
should be entered.
@item @code{"location name"}: name of the @code{Gauss Points} on which the @code{ResultGroup} is defined.
@end itemize

@*

@item followed by, at least one, the results descriptions of the group:

@example
@b{ResultDescription} "result name" my_result_type
  @b{ResultRangesTable} "Name of a result ranges table"
  @b{ComponentNames} "Name of Component 1", "Name of Component 2"
@end example

being 
@itemize @minus
@item @code{@b{ResultDescription}}: a keyword that should be written as it is, case doesn't matter. 
@item @code{"result name"}: a name for the @code{Result}, which will be used for menus.
@item @code{my_type}: type of the @code{Result}, should be one of @code{ Scalar}, @code{ Vector}, 
@code{ Matrix}, @code{ PlainDeformationMatrix}, @code{ MainMatrix}, @code{ LocalAxes}.
@end itemize

and optionally

@itemize @minus
@item @code{@b{ResultRangesTable} "Name of a result ranges table"}: ( optional)
a keyword that should be written as it is, case doesn't matter, followed by the name of the previously
defined @code{Tesult Ranges Table} which will be used if the @code{Contour Ranges} result visualization
is choosen ( @pxref{Result Range Table}).
@item @code{@b{ComponentNames} "Name of Component 1", "Name of Component 2"}:  ( optional)
a keyword that should be written as it is, case doesn't matter, followed by the names of the components
of the results which will be used in GiD. The number of @code{Component Names} are these:
@itemize ·
@item One for a @code{Scalar Result}
@item Three for a @code{Vector Result}
@item Six for a @code{Matrix Result}
@item Four for a @code{PlainDeformationMatrix Result}
@item Six for a @code{MainMatrix Result}
@item Three for a @code{LocalAxes Result}
@end itemize

@end itemize

@*

@item and ending with the results values:

@example
@b{Values}
 location_1 result_1_component_1_value result_1_component_2_value result_1_component_3_value result_2_component_2_value result_2_component_2_value result_2_component_3_value
 . . .

 location_n result_1_component_1_value result_1_component_2_value result_1_component_3_value result_2_component_2_value result_2_component_2_value result_2_component_3_value
@b{End Values}
@end example

being
@itemize @minus
@item @code{@b{Values}}: a keyword that should be written as it is, case doesn't matter, which indicates
the beginning of the @code{result's values} section.
@item The lines
@itemize ·
@item @code{location_1 result_1_component_1_value result_1_component_2_value result_1_component_3_value result_2_component_2_value result_2_component_2_value result_2_component_3_value}
@item @code{ . . .}
@item @code{ }
@item @code{location_n result_1_component_1_value result_1_component_2_value result_1_component_3_value result_2_component_2_value result_2_component_2_value result_2_component_3_value}
@end itemize
are the values of the several result described with @code{ResultDescription} for each location. All the
results values for the location 'i' should be written in the same line 'i'.
@*
The number of results values are limited to:
@itemize ·
@item if the @code{Result} is located @code{OnNodes}: the number of nodes defined in @code{ProjectName.post.msh}, 
or the old  @code{ProjectName.flavia.msh}.
@item if the @code{Result} is located @code{OnGaussPoints "My GP"}: if
the @code{Gauss Points "My GP"} are defined for the mesh @code{"My mesh"}, the limit is the number of gauss points
in @code{"My GP"} multiplied by the number of elements of the mesh @code{"My mesh"}.
@end itemize
Holes are allowed. The nodes, elements, with no result defined will not be drawn, i.e. they will appear transparent.@*

The number of components for each @code{ResultDescription} are:
@itemize ·
@item for @code{@b{Scalar}} results: one component 
@ifhtml
<br>
@end ifhtml
@code{ result_number_i scalar_value}

@item for @code{@b{Vector}} results: three components

@ifhtml
<br>
@end ifhtml
@code{ result_number_i x_value y_value z_value}

@item for @code{@b{Matrix}} results: six components (3D models)

@ifhtml
<br>
@end ifhtml
3D: @code{ result_number_i Sxx_value Syy_value Szz_value Sxy_value Syz_value Sxz_value}

@item for @code{@b{PlainDeformationMatrix}} results: four components

@ifhtml
<br>
@end ifhtml
@code{ result_number_i Sxx_value Syy_value Sxy_value Szz_value}

@item for @code{@b{MainMatrix}} results: twelve components

@ifhtml
<br>
@end ifhtml
@code{ result_number_i Si_value Sii_value Siii_value Vix_value Viy_value Viz_value Viix_value Viiy_value Viiz_value Viiix_value Viiiy_value Viiiz_value}

@item for @code{@b{LocalAxes}} results: three components describing the Euler angles

@ifhtml
<br>
@end ifhtml
@code{ result_number_i euler_ang_1_value euler_ang_2_value euler_ang_3_value}

@end itemize


@item @code{@b{End Values}}: a keyword that should be written as it is, case doesn't matter., which indicates
the end of the @code{result's group values} section.
@end itemize

@end itemize


@b{Note:} @code{Vectors} in a @code{ResultGroup} have always three components.

@b{Note:} @code{Matrix} in a @code{ResultGroup} have always six components.

@b{Note:} all the result of one node or gauss point, should be written in the same line.

@strong{Note:} for @code{@b{Matrix}} and @code{@b{PlainDeformationMatrix}} results, the
Si, Sii and Siii components are calculated by GiD, which represents the eigen values & vectors 
of the matrix results, and which are ordered according to the eigen value.


Nodal ResultGroup example:

@example

@b{ResultGroup} "Load Analysis" 1 OnNodes
  @b{ResultDescription} "prueba rangos" Scalar
    @b{ResultRangesTable} "Mi tabla"
  @b{ResultDescription} "ESCALAR DE PRUEBA" Scalar
    @b{ResultRangesTable} "pepito"
  @b{ResultDescription} "Desplacements" Vector
    @b{ComponentNames} "X-DESPL", "Y-DESPL" "Z-DESPL"
  @b{ResultDescription} "Nodal Stresses" Matrix
    @b{ComponentNames} "Sx", "Sy", "Sz", "Sxy", "Syz", "Sxz"
@b{Values}
    1 0.0           0.00000E+00 0.00000E+00  0.00000E+00 0.0 0.55014E+00  0.97276E-01 -0.15427E+00 0.0 0.0 0.0
    2 6.4832835e-01 0.20855E-04 0.20855E-04 -0.19174E-04 0.0 0.50676E+00  0.33886E-01 -0.10559E+00 0.0 0.0 0.0
    3 0.0           0.35517E-04 0.35517E-04 -0.37637E-04 0.0 0.37765E+00  0.44121E-02 -0.54703E-01 0.0 0.0 0.0
...

  115 7.8873599e-01 0.42781E-04 0.42781E-04 -0.17594E-03 0.0 0.15692E-01 -0.15847E-01 -0.30077E-01 0.0 0.0 0.0
  116 7.4978158e-01 0.24357E-04 0.24357E-04 -0.18974E-03 0.0 0.21668E-02 -0.96841E-02 -0.23115E-01 0.0 0.0 0.0
@b{End Values}

@end example



Gauss Points ResultGroup example:

@example

@b{GaussPoints} "Mis Gauss" ElemType Triangle "Mensula 2D"
  @b{Number Of Gauss Points:} 3
  @b{Natural Coordinates:} Internal
@b{End gausspoints}

@b{ResultGroup} "Load Analysis" 1 OnGaussPoints "Mis Gauss" 
  @b{ResultDescription} "GAUSS DE PRUEBA"  Scalar
  @b{ResultDescription} "Vector Gauss" Vector
  @b{ResultDescription} "GAUSS Points Stresses" PlainDeformationMatrix
@b{Values}
  1 1.05   1 0                      0.0     -19.4607 -1.15932 -1.43171 -6.18601           
    2.1	   0 1                      0.0     -19.4607 -1.15932 -1.43171 -6.18601           
    3.15   1 1                      0.0     -19.4607 -1.15932 -1.43171 -6.18601           
  2 1.2	   0 0                      0.0     -20.6207 0.596461 5.04752 -6.00727            
    2.25   0 0                      0.0     -20.6207 0.596461 5.04752 -6.00727            
    3.3	   2.0855e-05 -1.9174e-05   0.0     -20.6207 0.596461 5.04752 -6.00727            
  3 1.35   2.0855e-05 -1.9174e-05   0.0     -16.0982 -1.25991 2.15101 -5.20742            
    2.4	   2.0855e-05 -1.9174e-05   0.0     -16.0982 -1.25991 2.15101 -5.20742            
    3.45   2.0855e-05 -1.9174e-05   0.0     -16.0982 -1.25991 2.15101 -5.20742            
...

191 29.55  4.2781e-05 -0.00017594   0.0     -0.468376 12.1979 0.610867 3.51885            
    30.6   4.2781e-05 -0.00017594   0.0     -0.468376 12.1979 0.610867 3.51885            
    31.65  4.2781e-05 -0.00017594   0.0     -0.468376 12.1979 0.610867 3.51885            
192 29.7   4.2781e-05 -0.00017594   0.0     0.747727 11.0624 1.13201 3.54303              
    30.75  4.2781e-05 -0.00017594   0.0     0.747727 11.0624 1.13201 3.54303              
    31.8   2.4357e-05 -0.00018974   0.0     0.747727 11.0624 1.13201 3.54303              
@b{End Values}

@end example


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Results example,  , Result Group, File ProjectName.post.res - ProjectName.flavia.res
@unnumberedsubsec Results example
@cindex Table results example
@cindex results example

Here comes an example of results for the table of the previous example
(@pxref{Mesh example}):

@example

GiD Post Results File 1.0

GaussPoints "Board gauss internal" ElemType Triangle "board"
  Number Of Gauss Points: 3
  Natural Coordinates: internal
end gausspoints

GaussPoints "Board gauss given" ElemType Triangle "board"
  Number Of Gauss Points: 3
  Natural Coordinates: Given
      0.2 0.2
      0.6 0.2
      0.2 0.6
End gausspoints

GaussPoints "Board elements" ElemType Triangle "board"
  Number Of Gauss Points: 1
  Natural Coordinates: internal
end gausspoints

GaussPoints "Legs gauss points" ElemType Linear
  Number Of Gauss Points: 5
  Nodes included
  Natural Coordinates: Internal
End Gausspoints	

ResultRangesTable "Mi tabla"
# el ultimo rango es min <= res <= max
      - 0.3: "Poco"
  0.3 - 0.9: "Normal"
  0.9 - 1.2: "Mucho"
End ResultRangesTable

Result "Gauss element" "Load Analysis" 1 Scalar OnGaussPoints "Board elements"
Values
    5     0.00000E+00 
    6     0.20855E-04 
    7     0.35517E-04 
    8     0.46098E-04 
    9     0.54377E-04 
   10     0.60728E-04 
   11     0.65328E-04 
   12     0.68332E-04 
   13     0.69931E-04 
   14     0.70425E-04 
   15     0.70452E-04 
   16     0.51224E-04 
   17     0.32917E-04 
   18     0.15190E-04 
   19    -0.32415E-05 
   20    -0.22903E-04 
   21    -0.22919E-04 
   22    -0.22283E-04 
End Values

Result "Displacements" "Load Analysis"  1  Vector OnNodes
ResultRangesTable "Mi tabla"
ComponentNames "X-DESPL", "Y-DESPL", "Z-DESPL"
Values
    1    0.0   0.0   0.0
    2   -0.1   0.1   0.5
    3    0.0   0.0   0.8
    4   -0.04  0.04  1.0
    5   -0.05  0.05  0.7
    6    0.0   0.0   0.0
    7   -0.04 -0.04  1.0
    8    0.0   0.0   1.2
    9   -0.1  -0.1   0.5
   10    0.05  0.05  0.7
   11   -0.05 -0.05  0.7
   12    0.04  0.04  1.0
   13    0.04 -0.04  1.0
   14    0.05 -0.05  0.7
   15    0.0   0.0   0.0
   16    0.1   0.1   0.5
   17    0.0   0.0   0.8
   18    0.0   0.0   0.0
   19    0.1  -0.1   0.5
End Values

Result "Gauss displacements" "Load Analysis" 1 Vector OnGaussPoints "Board gauss given"
Values
    5    0.1  -0.1   0.5
         0.0   0.0   0.8
         0.04 -0.04  1.0
    6    0.0   0.0   0.8
        -0.1  -0.1   0.5
        -0.04 -0.04  1.0
    7   -0.1   0.1   0.5
         0.0   0.0   0.8
        -0.04  0.04  1.0
    8    0.0   0.0   0.8
         0.1   0.1   0.5
         0.04  0.04  1.0
    9    0.04  0.04  1.0
         0.1   0.1   0.5
         0.05  0.05  0.7
   10    0.04  0.04  1.0
         0.05  0.05  0.7
        -0.04  0.04  1.0
   11   -0.04 -0.04  1.0
        -0.1  -0.1   0.5
        -0.05 -0.05  0.7
   12   -0.04 -0.04  1.0
        -0.05 -0.05  0.7
         0.04 -0.04  1.0
   13   -0.1   0.1   0.5
        -0.04  0.04  1.0
        -0.05  0.05  0.7
   14   -0.05  0.05  0.7
        -0.04  0.04  1.0
         0.05  0.05  0.7
   15    0.1  -0.1   0.5
         0.04 -0.04  1.0
         0.05 -0.05  0.7
   16    0.05 -0.05  0.7
         0.04 -0.04  1.0
        -0.05 -0.05  0.7
   17    0.0   0.0   0.8
        -0.04 -0.04  1.0
        -0.04  0.04  1.0
   18    0.0   0.0   0.8
         0.04  0.04  1.0
         0.04 -0.04  1.0
   19    0.04 -0.04  1.0
         0.04  0.04  1.0
         0.0   0.0   1.2 
   20    0.04 -0.04  1.0
         0.0   0.0   1.2
        -0.04 -0.04  1.0
   21   -0.04 -0.04  1.0
         0.0   0.0   1.2
        -0.04  0.04  1.0
   22   -0.04  0.04  1.0
         0.0   0.0   1.2
         0.04  0.04  1.0
End Values

Result "Legs gauss displacements" "Load Analysis" 1 Vector OnGaussPoints "Legs gauss points"
Values
    1   -0.1  -0.1   0.5
        -0.2  -0.2   0.375
        -0.05 -0.05  0.25 
         0.2   0.2   0.125
         0.0   0.0   0.0
    2    0.1  -0.1   0.5
         0.2  -0.2   0.375
         0.05 -0.05  0.25 
        -0.2   0.2   0.125
         0.0   0.0   0.0
    3    0.1   0.1   0.5
         0.2   0.2   0.375
         0.05  0.05  0.25 
        -0.2  -0.2   0.125
         0.0   0.0   0.0
    4   -0.1   0.1   0.5
        -0.2   0.2   0.375
        -0.05  0.05  0.25 
         0.2  -0.2   0.125
         0.0   0.0   0.0
End Values

@end example

@c ccccccccccccccccccccccccccc

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node old results format, old mesh format, File ProjectName.post.res - ProjectName.flavia.res, POSTPROCESS DATA FILES
@section Old postprocess results format
@cindex Postprocess Files (Old results format)



This file is a complete list of the dumped results, where each result will be organized 
as follows:

@noindent @b{Set 1: Header. Results description}
@cindex Scalar result format
@cindex Vector result format
@cindex Matrix result format
@cindex Main Stresses result format
@cindex Local Axes result format
@cindex Euler Angles result format

The total number of lines in this set is 1, composed by 1 character string, 1 integer, 1 
real, 1 optional character string what depends on the first integer, plus 3 integers:

@noindent @code{descr_menu} @code{ load_type} @code{step_val} [@code{load_desc}] 
@code{data_type} @code{data_loc} @code{desc_comp} [@code{"gauss_points_name"}]

where:
@itemize @bullet
@item @code{descr_menu} = results title that will appear on the menus (maximum 15 
characters without any blank spaces inside).
@item @code{load_type} = type of analysis effectuated to obtain this result:

@itemize @minus
@item 1 - time analysis (Time Step).
@item 2 - load analysis (Load Step).
@item 3 - frequency analysis (Frequency).
@item 4 - user defined analysis (User Step).
@end itemize

@item @code{step_val} = number of steps inside the analysis.

@item @code{load_desc} = description, without any blank spaces inside, of the analysis 
that will appear on the menus. This field must only be specified when the analysis is 
defined by the user (@code{load_type} = 4).

@item @code{data_type} = kind of results:

@itemize @minus
@item 1 - scalar.
@item 2 - vector.
@item 3 - matrix.
@item 4 - 2D plane deformation matrix
@item 5 - Main stresses ( 3 modules and 3 vectors)
@item 6 - Euler angles ( for local axes)
@end itemize

@item @code{data_loc} = position of the data:

1 - on the nodes.
2 - on the Gauss points.


@item @code{desc_comp} = specification of the existence of a description of each 
component that will be displayed as a menu's button:

@itemize @minus
@item 0 - no description (inside GiD, the program itself creates the description for the
corresponding components).
@item 1 - there will be a description, without any blank spaces inside, of the components,
with one component per line.
@end itemize

@item @code{"gauss_points_name"}: optional field that specifies the set of gauss points to be used
(new gauss point format @pxref{Gauss Points}). If not specified the general gauss points 
definition will be used (old format).

@end itemize

@noindent @b{Set 2: Description of the components}

The description of each one of the result's components, without any blank spaces inside, 
should be described here if needed, one per line. The number of lines will be as 
follows:
@itemize @bullet
@item One line if it is a scalar.
@item Three lines if it is vector.
@item Six lines if it is a matrix.
@item Four lines if it is a 2D plane deformation matrix.
@item Six lines if it is Main Stresses.
@item Three lines if it is a Euler angles result.
@end itemize
This description will appear in different menus to select the variable to be displayed 
at each stage.

@strong{Note:} GiD also supports 2D results types, so description components can be two for 
vectors, and three or four for matrix and plane strain analysis, respectively.

@noindent @b{Set 3: Results}

The total number of lines in this set is the total number of points if @code{data_loc} = 
1 or the total number of elements multiplied by the number of Gauss points per element
if @code{data_loc} = 2. The definition of the results is itemized below.

@itemize @bullet
@item @strong{Scalar}: Each line is composed by one integer plus one real number:
@end itemize

@code{i} @code{result[i]} 

@itemize @bullet
where:
@itemize @minus
@item @code{i} = node or Gauss point number.
@item @code{result[i]} = value of the result on the node or Gauss point number @code{i}.
@end itemize
@end itemize


@itemize @bullet
@item @strong{Vector}: Each line is composed by 1 integer plus 3 reals:
@end itemize

@code{i} @code{result_x[i]} @code{result_y[i]} @code{result_z[i]} @code{result_m[i]}

@itemize @bullet
where:
@itemize @minus
@item @code{i} = node or Gauss point number.
@item @code{result_x[i]} = value of the x_component of the result on the node or Gauss 
point number @code{i}.
@item @code{result_y[i]} = value of the y_component of the result on the node or Gauss 
point number @code{i}.
@item @code{result_z[i]} = value of the x_component of the result on the node or Gauss 
point number @code{i}. Optional if a 2D result type is specified. Should be specified
if @code{result_m[i]} is given.
@item @code{result_m[i]} = value of the signed module of the vector (to allow negative 
values for the vector diagram result view). This component is optional, if not
specified, GiD calculates the module of the entered vector. But if it is defined,
@code{result_z[i]} should be defined too.
@end itemize
@end itemize

@itemize @bullet
@item @strong{Matrix}: Each line is composed by 1 integer plus 6 reals:
@end itemize
@code{i} @code{result_Sxx[i]} @code{result_Syy[i]} @code{result_Szz[i]}
@code{result_Sxy[i]} @code{result_Syz[i]} @code{result_Sxz[i]} 

@itemize @bullet
where:
@itemize @minus
@item @code{i} = node or Gauss point number.
@item @code{result_Sxx[i]} = value of the xx_component of the result on the node or 
Gauss point number @code{i}.
@item @code{result_Syy[i]} = value of the yy_component of the result on the node or 
Gauss point number @code{i}.
@item @code{result_Szz[i]} = value of the zz_component of the result on the node or 
Gauss point number @code{i}. Optional if a 2D result type is specified that is not a
plane deformation matrix.
@item @code{result_Sxy[i]} = value of the xy_component of the result on the node or 
Gauss point number @code{i}.
@item @code{result_Syz[i]} = value of the yz_component of the result on the node or 
Gauss point number @code{i}. Optional if a 2D result type is specified.
@item @code{result_Sxz[i]} = value of the xz_component of the result on the node or 
Gauss point number @code{i}. Optional if a 2D result type is specified.
@end itemize
@end itemize

@itemize @bullet
@item @strong{Main Stresses}: Another way to give Stresses to GiD is entering modules and
vectors of these main stresses, so each line is composed by 1 integer plus 12 reals:
@end itemize

@code{i} @code{result_Si[i]} @code{result_Sii[i]} @code{result_Siii[i]}
@code{result_Vi_x[i]} @code{result_Vi_y[i]} @code{result_Vi_z[i]} 
@code{result_Vii_x[i]} @code{result_Vii_y[i]} @code{result_Vii_z[i]} 
@code{result_Viii_x[i]} @code{result_Viii_y[i]} @code{result_Viii_z[i]} 

@itemize @bullet
where:
@itemize @minus
@item @code{i} = node or Gauss point number.
@item @code{result_Si[i]} = value of the Si_module of the result on the node or 
Gauss point number @code{i}.
@item @code{result_Sii[i]} = value of the Sii_module of the result on the node or 
Gauss point number @code{i}.
@item @code{result_Siii[i]} = value of the Siii_module of the result on the node or 
Gauss point number @code{i}. Optional if a 2D result type is specified.
@item @code{result_Vi_x[i]} = value of the X_component of the vector Si on the node or 
Gauss point number @code{i}.
@item @code{result_Vi_y[i]} = value of the Y_component of the vector Si on the node or 
Gauss point number @code{i}.
@item @code{result_Vi_z[i]} = value of the Z_component of the vector Si on the node or 
Gauss point number @code{i}. Optional if a 2D result type is specified.
@item @code{result_Vii_x[i]} = value of the X_component of the vector Sii on the node or 
Gauss point number @code{i}.
@item @code{result_Vii_y[i]} = value of the Y_component of the vector Sii on the node or 
Gauss point number @code{i}.
@item @code{result_Vii_z[i]} = value of the Z_component of the vector Sii on the node or 
Gauss point number @code{i}. Optional if a 2D result type is specified.
@item @code{result_Viii_x[i]} = value of the X_component of the vector Siii on the node or 
Gauss point number @code{i}.
@item @code{result_Viii_y[i]} = value of the Y_component of the vector Siii on the node or 
Gauss point number @code{i}.
@item @code{result_Viii_z[i]} = value of the Z_component of the vector Siii on the node or 
Gauss point number @code{i}. Optional if a 2D result type is specified.
@end itemize
@end itemize


@itemize @bullet
@item @strong{Local Axes}: Local Axes are entered using the Euler angles that define them, 
so each line is composed by 1 integer plus 3 reals:
@end itemize

@code{i} @code{euler_ang_1[i]} @code{euler_ang_2[i]} @code{euler_ang_3[i]} 

@itemize @bullet
where:
@itemize @minus
@item @code{i} = node or Gauss point number.
@item @code{euler_ang_1[i]} = value of the 1st. angle of Euler of the local axis on the node 
or Gauss point number @code{i}.
@item @code{euler_ang_2[i]} = value of the 2nd. angle of Euler of the local axis on the node 
or Gauss point number @code{i}.
@item @code{euler_ang_3[i]} = value of the 3rd. angle of Euler of the local axis on the node 
or Gauss point number @code{i}.
@end itemize
@end itemize

@strong{Note:} for @code{@b{Matrix}} and @code{@b{PlainDeformationMatrix}} results, the
Si, Sii and Siii components are calculated by GiD, which represents the eigen values & vectors 
of the matrix results, and which are ordered according to the eigen value.

@strong{Results on GaussPoints:} When defining results on Gauss Points using the new Gauss points
format, i.e. giving a @code{"gauss_points_name"} on the Result's @code{Header} description, the
results should be given on a per element basis specifying the element number only once. For instance:

assuming a three gauss points set named "GaussTriang" has been defined over triangles,
there are only two triangles, then a supposed 'Displacement' result will look like this:

@example
GaussDISPLAC.   2    1    2    2    0 "GaussTriang"
    5    0.1  -0.1   0.5
         0.0   0.0   0.8
         0.04 -0.04  1.0
    6    0.0   0.0   0.8
        -0.1  -0.1   0.5
        -0.04 -0.04  1.0
@end example

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@menu
* Gauss Points - Old format::           
@end menu



@node Gauss Points - Old format,  , old results format, old results format
@unnumberedsubsec Gauss Points (Old format)
@cindex Gauss points format (old format)

@b{Note:} Next is described the @b{old Gauss Points file format} for the old results file format. However, the @b{new Gauss Points file format} (@pxref{Gauss Points}) is also compatible with the old results format.


@noindent @strong{Gauss Points}:
To include the Gauss points in the results, they must be
treated as if they were a type of result, but:

- they must be inserted at the beginning of the file,

- the header structure is the same as of the results ones, but the meaning changes.

@strong{Note:} At the time only Gauss Points on Lines, Triangles and 
Quadrilaterals, and one Gauss Point for Tetrahedras and Hexahedras 
are supported inside GiD.

@noindent @b{Set 1: Header. Gauss points}

The total number of lines in this set is also 1, but it is composed always now 
by one character string, one integer, one real plus three integers:

@noindent @code{descr_menu} @code{load_type} @code{step_val}
@code{data_type} @code{data_loc} @code{desc_comp}

where:
@itemize @bullet
@item @code{descr_menu} will not be used.
@item @code{load_type} = 0, to indicate that they are Gauss points.
@item @code{step_val} = number of Gauss points per element:

@itemize @minus
@item 1, 3, 6 for Triangles; 
@item 1, 4, 9 for quadrilaterals; 
@item 1, 4, 10 for Tetrahedras; 
@item 1, 8, 27 for hexahedras and 
@item 1, ... points equally spaced over lines.
@end itemize


@strong{Note:} This must be constant for the whole geometry.
@strong{Note:} Tetrahedras with 4 and 10 Gauss Points and Hexahedras with 
8 and 27 Gauss Points are not functional and still under development.

@item @code{data_type} = this field indicates whether the Natural coordinates for the
Gauss points are the ones described below this header or are the ones defined inside GiD.

@itemize @minus
@item 0 - the Natural Coordinates for the Gauss points will be the ones which are described below, 
for Triangles and Tetrahedras they should be between 0.0 and 1.0, and for Quadrilaterals
and Hexahedras should be between -1.0 and 1.0. 

For instance, the Natural Coordinates of three Gauss Points on Triangles will be:
@itemize @minus
@example
Coords_P_Gauss     0    3    0    0    0
1     0.5     0.0
2     0.5     0.5
3     0.0     0.5
@end example
@end itemize
These are also the ones that GiD uses internally to calculate Gauss Points for Triangles with three Gauss Points,
when this field is set to @code{1}.

@item 1 - the program must calculate the Gauss Points and will be these ones:

@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/GaussPoints.ps,width=8.5cm,height=6.9cm,angle=0}
}}
\unpie{}
{
Gauss Points positions of the cuadrature of Gauss-Legendre for Triangles and Quadrilaterals
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="GaussPoints.gif"></a>
<img src="images/GaussPoints.gif"> 
<p>Gauss Points positions of the cuadrature of Gauss-Legendre for Triangles and Quadrilaterals
</center>
<p>
@end ifhtml
@end ifset
@end ifset

@end itemize

This field is meaningless to lines, and should be set to 1

@item @code{data_loc} = this option indicates whether the nodes are included inside
the number of points over lines or not.

@itemize @minus
@item 1 - nodes are not included in the points count for lines, so points are placed 
at a distance from the nodes @code{i / ( n_points + 1)} with @code{i = 1..n_points} 
and @code{n_points >= 1}.
@item 2 - nodes are included in the points count for lines, so points are placed 
at a distance from the nodes @code{( i - 1) / ( n_points - 1)} with @code{i = 1..n_points}
and @code{n_points >= 2}.
@end itemize

This field is meaningless to triangles, quadrilaterals, tetrahedras and hexahedras.

@item @code{desc_comp} does not matter, but it must be specified.
@end itemize




@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node old mesh format,  , old results format, POSTPROCESS DATA FILES
@section Old postprocess mesh format
@cindex Postprocess Files (Old mesh format)



The old postproces mesh format is still compatible with this version of GiD. The files containing the postprocess mesh (in the old file format) can be separated into two categories: 

@itemize @bullet
@item 3D Data Files:
@code{ProjectName.post.msh}, or the old 
@code{ProjectName.flavia.msh}, for volume mesh information and
@code{ProjectName.post.bon}, or the old 
@code{ProjectName.flavia.bon}, for surface mesh information.
@item 2D Data Files:
@code{ProjectName.post.dat}, or the old 
@code{ProjectName.flavia.dat} for 2D mesh information.
@end itemize

Postprocessing data files are ASCII files and must be in a specific format, which is explained below. Each mesh information file can only handle 
one type of element.



@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/flavia.ps,width=14cm,height=7.05cm,angle=0}
}}
\unpie{}
{
}
\bigskip
@end tex

@ifset html
@c@html
@ifhtml
<center>
<p><br></p>
<a name="flavia.gif"></a>
<img src="images/flavia.gif"> 
<p> 
</center>
<p>
@end ifhtml
@c@end html
@end ifset

@end ifset





@itemize @bullet
@item @b{ProjectName.flavia.msh}:
The first file, which is named @code{ProjectName.flavia.msh}, should contain the information 
relative to the 3D volume mesh. It contains the nodal coordinates of the 3D mesh, its nodal 
connectivities and the material of each element. The nodal coordinates must include those
on the surface mesh. If no material is supplied, GiD takes the material number equal to zero. 
@item @b{ProjectName.flavia.bon}:
The second file, which is named @code{ProjectName.flavia.bon}, should contain the information 
about 3D surface sets. It can be used to represent boundary conditions of the volumetric 
mesh and additional surfaces (for instance, sheets, beams and shells). At least, all the 
mesh points supplied in @code{ProjectName.flavia.msh} should be present in 
@code{ProjectName.flavia.bon} at the beginning of the file.
@item @b{ProjectName.flavia.dat}:
This file contains information about 2D meshes. And only can be used if none of the two above
are used. It should specify nodal coordinates of the meshes, its connectivities ( elements) and,
if desired, its material number ( if not specified, GiD takes to be 0).


The files are created and read in the order that corresponds with the natural way of 
solving a finite element problem: mesh, surface definition and conditions
and finally, evaluation of the nodal results. 
The format of the read statements is normally free, i.e. it is necessary only to separate them by spaces. 
Thus, the users can modify the files with any format, leaving spaces between each field and can
also write out the results with as many decimals as desired. In case of error, the 
program warns the user about the type of mistake found.

GiD reads all the information directly from the 
pre-processing files in order to gain efficiency, whenever possible).

@end itemize

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@menu
* File ProjectName.flavia.msh old::     
* File ProjectName.flavia.bon old::     
* File ProjectName.flavia.dat old::     
@end menu

@node File ProjectName.flavia.msh old, File ProjectName.flavia.bon old, old mesh format, old mesh format
@unnumberedsubsec Old format - File ProjectName.flavia.msh
@cindex File ProjectName.flavia.msh (Old Format)

@noindent @b{Set 1: Header}

The total number of lines in this set is 6. All of them are
free lines for any use.
This will be the case of the first five lines, which may have an information role, 
informing about the project name, current version, as well as extra comments that
can seem useful to add. Although they can be skipped, they are kept as a particular
option inside GiD (comment lines) and as an utility to comment some additional information, 
like the type of project, equations, conditions and others. 

@strong{Note:} It is advisable,
as it occurs in different solver modules used by GiD, that the sixth line 
explains the contents of the seventh line.

@noindent @b{Set 2: General mesh data}

The total number of lines in this set is 1, composed by at least 3 integers, the 4th integer is optional:

@noindent @code{n_3D_mesh_elements} @code{n_3D_mesh_points} @code{n_element_type} [ @code{last_node}]

where:
@itemize @bullet
@item @code{n_3D_mesh_elements} = number of mesh elements.
@item @code{n_3D_mesh_points} = number of mesh points.
@item @code{n_element_type} = type of elements.
@item @code{last_node} = number of the last node and required if nodes are not between 1 and @code{n_3D_mesh_points}.
@end itemize

The third parameter is used by the program to recognize what kind of finite element 
is being used. To do this in a standard way, GiD considers the following finite
element types:
@itemize @minus
@item number 1 corresponds to a hexahedra with eight nodes.
@item number 3 corresponds to a tetrahedra with four nodes.
@end itemize

@noindent @b{Set 3: Free line for any use}

The total number of lines in this set is 1, which is a free line for any use,
though most modules inside GiD write here the
word 'Coordinates' to point the meaning of the following lines.

@noindent @b{Set 4: Coordinates}

The total number of lines in this set is @code{n_3D_mesh_points}, one for each
nodal point, composed by 1 integer plus 3 reals numbers:

@noindent @code{i} @code{x_coord[i]} @code{y_coord[i]} @code{z_coord[i]} 

where:
@itemize @bullet
@item @code{i} = node number.
@item @code{x_coord[i]} = x_coordinate of the node number @code{i}.
@item @code{y_coord[i]} = y_coordinate of the node number @code{i}.
@item @code{z_coord[i]} = z_coordinate of the node number @code{i}.
@end itemize

All the points of the meshes of the domain have to appear in this file.

@noindent @b{Set 5: Free line for any use}

The total number of lines in this set is 1, which is a free line for any use.
The same comments used for set number 3 are valid here, with the change of
including the word 'Connectivities' instead of 'Coordinates'.

@noindent @b{Set 6: Connectivities}

The total number of lines in this set is @code{n_3D_mesh_elements}, composed by 1
integer plus @code{n_nodes/element} integers and 1 optional integer more:

@noindent @code{j} @code{node[j][1]} @code{node[j][2]} ... @code{node[j][n_nodes/element]}
@code{mat[j]} 

where:
@itemize @bullet
@item @code{j} = element number.
@item @code{node[j][1]} = node number 1 for the element number @code{j}.
@item @code{node[j][2]} = node number 2 for the element number @code{j}.

...

@item @code{node[j][n_nodes/element]} = last node number for the element number @code{j}.
@item @code{mat[j]} = material index of the element number @code{j}.
@end itemize

The nodal connections must follow some specifications, so, for each tetrahedral 
element with four nodes, the rule is that the first three nodes that form a triangular 
face must be so sorted in order to define a normal which points towards the 
semi space containing the fourth node.

The vector @code{mat[j]} holds
the material index of the element number @code{j}.

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node File ProjectName.flavia.bon old, File ProjectName.flavia.dat old, File ProjectName.flavia.msh old, old mesh format
@unnumberedsubsec Old format - File ProjectName.flavia.bon
@cindex File ProjectName.flavia.bon (Old Format)
 
@noindent @b{Set 1: Header}

The total number of lines in this set is 6. All of them are
free lines for any use. All the comments relative to the header of
@code{ProjectName.flavia.msh} remain
valid for the current file @code{ProjectName.flavia.bon}.

@strong{Note:} It is advisable,
as it occurs in different calculation modules included in GiD, that the sixth line
explains the contents of the seventh line.
 
@noindent @b{Set 2: General boundary data}

The total number of lines in this set is 1, composed by at least 3 integers, the 4th integer is optional:

@noindent @code{n_bound_elements} @code{n_bound_points} @code{n_element_type} [ @code{last_node}]

where:
@itemize @bullet
@item @code{n_bound_elements} = number of boundary elements.
@item @code{n_bound_points} = number of boundary points.
@item @code{n_element_type} = type of elements.
@item @code{last_node} = number of the last node and required if nodes are not between 1 and @code{n_bound_points}.
@end itemize

For the third parameter, GiD considers the following
finite element types:
@itemize @minus
@item number 7 corresponds to a triangle with three nodes.
@item number 9 corresponds to a quadrilateral with four nodes.
@item number 11 corresponds to a line with two nodes.
@end itemize

@noindent @b{Set 3: Free line for any use}
 
The total number of lines in this set is 1, which is a free line for any use,
though most modules inside GiD write here the
word 'Coordinates' to point the meaning of the following lines.

@noindent @b{Set 4: Coordinates}
 
The total number of lines in this set is @code{n_bound_points}, one for each
nodal point, composed by 1 integer plus 3 reals:

@noindent @code{i} @code{x_coord[i]} @code{y_coord[i]} @code{z_coord[i]} 

where:
@itemize @bullet
@item @code{i} = node number.
@item @code{x_coord[i]} = x_coordinate of the node number @code{i}.
@item @code{y_coord[i]} = y_coordinate of the node number @code{i}.
@item @code{z_coord[i]} = z_coordinate of the node number @code{i}.
@end itemize

All the points of the domain have to appear in this file, what includes all the 
mesh points introduced in @code{ProjectName.flavia.msh} at the beginning. Once all the 
volumetric mesh had been introduced, it is possible to add surfaces that belong 
to a boundary of the domain but do not belong to a volumetric mesh and by this 
reason they will not appear in @code{ProjectName.flavia.msh} and only in 
@code{ProjectName.flavia.bon}.

@noindent @b{Set 5: Free line for any use}
 
The total number of lines in this set is 1, which is a free line for any use. 
The same comments used for set number 3 are valid here, with the change of 
including the word 'Connectivities' instead of 'Coordinates'.

@noindent @b{Set 6: Connectivities}
 
The total number of lines in this set is @code{n_bound_elements}, composed by 1 
integer plus @code{n_nodes/element} integers and 2 optional integers more:

@noindent @code{j} @code{node[j][1]} @code{node[j][2]} ... @code{node[j][n_nodes/element]}
@code{set[j]}

where:
@itemize @bullet
@item @code{j} = element number.
@item @code{node[j][1]} = node number 1 for the element number @code{j}.
@item @code{node[j][2]} = node number 2 for the element number @code{j}.

...

@item @code{node[j][n_nodes/element]} = last node number for the element number @code{j}.
@item @code{set[j]} = number of set to which the element number @code{j} belongs.
@end itemize

The vector @code{set[j]} allows to distinguish groups of elements in different sets.
It applies, for instance, in the case of defining the different conditions
that the element fulfills.


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@menu
@end menu

@node File ProjectName.flavia.dat old,  , File ProjectName.flavia.bon old, old mesh format
@unnumberedsubsec Old format - File ProjectName.flavia.dat
@cindex File ProjectName.flavia.dat (Old Format)
 
@noindent @b{Set 1: Header}

The total number of lines in this set is 6. All of them are
free lines for any use.
The first five lines, which may have an information role, 
informing about the project name, current version, as well as extra comments that
can seem useful to add. Although they can be skipped, they are kept as a particular
option inside GiD (comment lines) and as an utility to comment some additional information, 
like the type of project, equations, conditions and others. 

@strong{Note:} It is advisable,
as it occurs in different solver modules used by GiD, that the sixth line 
explains the contents of the seventh line.
 
@noindent @b{Set 2: General mesh data}

The total number of lines in this set is 1, composed by at least 3 integers, the 4th integer is optional:

@noindent @code{n_2D_mesh_elements} @code{n_2D_mesh_points} @code{n_element_type} [ @code{last_node}]

where:
@itemize @bullet
@item @code{n_2D_mesh_elements} = number of 2D mesh elements.
@item @code{n_2D_mesh_points} = number of 2D points.
@item @code{n_element_type} = type of elements.
@item @code{last_node} = number of the last node and required if nodes are not between 1 and @code{n_2D_mesh_points}.
@end itemize

The third parameter is used by the program to recognize what kind of finite element 
is being used. To do this GiD considers the number of nodes that the finite
element type uses. So, 
@itemize @minus
@item number 2 corresponds to a line with two nodes.
@item number 3 corresponds to a triangle with three nodes.
@item number 4 corresponds to a quadrilateral with four nodes.
@item number 6 corresponds to a triangle with six nodes.
@item number 8 corresponds to a quadrilateral with eight nodes.
@item number 9 corresponds to a quadrilateral with nine nodes.
@end itemize

@noindent @b{Set 3: Free line for any use}
 
The total number of lines in this set is 1, which is a free line for any use,
though most modules inside GiD write here the
word 'Coordinates' to point the meaning of the following lines.

@noindent @b{Set 4: Coordinates}
 
The total number of lines in this set is @code{n_2D_mesh_points}, one for each
nodal point, composed by 1 integer plus 3 reals:

@noindent @code{i} @code{x_coord[i]} @code{y_coord[i]} 

where:
@itemize @bullet
@item @code{i} = node number.
@item @code{x_coord[i]} = x_coordinate of the node number @code{i}.
@item @code{y_coord[i]} = y_coordinate of the node number @code{i}.
@end itemize

All the points of the domain have to appear in this file, what includes all the 
mesh points introduced in @code{ProjectName.flavia.msh} at the beginning. Once all the 
volumetric mesh had been introduced, it is possible to add surfaces that belong 
to a boundary of the domain but do not belong to a volumetric mesh and by this 
reason they will not appear in @code{ProjectName.flavia.msh} and only in 
@code{ProjectName.flavia.bon}.

@noindent @b{Set 5: Free line for any use}
 
The total number of lines in this set is 1, which is a free line for any use. 
The same comments used for set number 3 are valid here, with the change of 
including the word 'Connectivities' instead of 'Coordinates'.

@noindent @b{Set 6: Connectivities}
 
The total number of lines in this set is @code{n_2D_mesh_elements}, composed by 1 
integer plus @code{n_nodes/element} integers and 2 optional integers more:

@noindent @code{j} @code{node[j][1]} @code{node[j][2]} ... @code{node[j][n_nodes/element]}
@code{set[j]}

where:
@itemize @bullet
@item @code{j} = element number.
@item @code{node[j][1]} = node number 1 for the element number @code{j}.
@item @code{node[j][2]} = node number 2 for the element number @code{j}.

...

@item @code{node[j][n_nodes/element]} = last node number for the element number @code{j}.
@item @code{set[j]} = number of set to which the element number @code{j} belongs.
@end itemize

The vector @code{set[j]} allows to distinguish groups of elements in different sets.
It applies, for instance, in the case of defining the different conditions
that the element fulfills.

@b{Note:} The numeration of quadratic elements is linear and not hierarchical, i.e. nodes
should be specified counterclockwise, without jumping internal nodes.




@c  *********************************************************************** 
@c             Chapter  22  :   TCL-TK EXTENSION
@c  ***********************************************************************

@node TCL-TK extension, INDEX, POSTPROCESS DATA FILES, Top
@chapter TCL-TK EXTENSION
@cindex TCL-TK extension

@ifhtml
</body>
<body bgcolor="white" fgcolor="black">
@end ifhtml

In this chapter, there are exposed the advanced features of GiD in 
terms of expandability and total control. The TCL-TK extension is the way to create script files to automatize any process created with GiD. With this language it is possible to add new windows or new functionalities to the program.

For more information about the TCL-TK programming language look at www.scriptics.com.

If such TCL file exists, it must be in the problem type directory; the name of the file has to be the problem type name with the @code{.tcl} extension.
   


@ifset photo
@tex
\inifigura
\centerline{\hbox{
\psfig{figure=images/fitxer_tcl.ps,width=9.08cm,height=7.32cm,angle=0}
}}
\unpie{}
{
}
\finfigura
@end tex

@ifset html
@ifhtml
<P></P>
<center>
<a name="fitxer_tcl.gif"></a>
<img src="images/fitxer_tcl.gif"> 

</center>
<p>
@end ifhtml
@end ifset
@end ifset


@menu
* Event procedures::                    
* Control functions::                   
* Managing menus::                      
* HTML support::                        
* GiD version::                         
* Using EXEC in GiD::                   
* Detailed example - TCL-TK extension creation::  
@end menu

@node Event procedures, Control functions, TCL-TK extension, TCL-TK extension
@section Event procedures
@cindex TCL Functions
@cindex Event

The structure of @code{problem_type_name.tcl} can optionally implements some of these TCL
prototype procedures (and other user defined procedures).  
The procedures listed below are automatically called by GiD. Their syntax correspond 
to standard TCL-language:

@example
proc InitGIDProject @{ dir @} @{ 
...body(1)...
@}
proc InitGIDPostProcess @{@} @{ 
...body(2)...
@}
proc EndGIDProject @{@} @{ 
...body(3)...
@}
proc EndGiDPostprocess @{@} @{
...body(4)...
@}
proc LoadGIDProject @{ filespd @} @{
...body(5)...
@}
proc SaveGIDProject @{ filespd @} @{
...body(6)...
@}
proc LoadResultsGIDPostProcess @{ file @} @{
...body(7)...
@}
proc BeforeMeshGeneration @{ elementsize @} @{
...body(8)...
@}
proc AfterMeshGeneration @{ fail @} @{
...body(9)...
@}
proc SelectGIDBatFile @{ dir basename @} @{
...body(10)...
@}
proc ChangedLanguage @{ language @} @{
...body(11)...
@}
@c proc BeforeWriteCalcFileGIDProject @{ file @} @{
@c ...body(12)...
@c @}
@c proc AfterWriteCalcFileGIDProject @{ file @} @{
@c ...body(13)...
@c @}
@end example


@itemize @bullet
@item
@b{InitGIDProject}: will be called when the problem type is selected. It receives the @code{dir} argument, which is the absolute path to the @code{problem_type_name.gid} directory, which can be useful inside the routine to locate some alternative files. 
@item
@b{InitGIDPostProcess}: will be called when the postprocess starts. It has no arguments.
@item
@b{EndGIDProject}: will be called when this project is about to be closed. It has no arguments.
@item
@b{EndGIDPostProcess}: will be called when the user leaves postprocess and opens preprocess. It has no arguments.
@item
@b{LoadGIDProject}: will be called when a GiD project is loaded. It receives the @code{filespd} argument, which is the path of the file which is being opened, but with a @code{.spd} extension (@b{s}pecific @b{p}roblemtype @b{d}ata). This path can be useful if you want to write specific information of the problem type in a new file.  
@item
@b{SaveGIDProject}: will be called when the current opened file is saved to disk. It receives the @code{filespd} argument, which is the path of the file which is being saved, but with a @code{.spd} extension (@b{s}pecific @b{p}roblemtype @b{d}ata). This path can be useful if you want to write specific information of the problem type in a new file.  
@item
@b{LoadResultsGIDPostProcess}: will be called when a results file is opened in the postprocess. It receives one argument, the name of the file being opened without its extension. 
@item
@b{BeforeMeshGeneration}: will be called before the mesh generation. It receives as argument 'elementsize' the user desired mesh size. This event can be used tipically to automatically assign some condition.
@item
@b{AfterMeshGeneration}: will be called after the mesh generation. It receives as argument 'fail' a true value if the mesh is not created.
@item
@b{SelectGIDBatFile}: Must be used to switch the default bat file for special cases. 
This procedure must return the alternative pathname of the bat file.
For example must be used as a trick to select a different analysis between a list of bat 
calculation files.
@item
@b{ChangedLanguage}: will be called when the user change the current language. The argument is the new language (en, es, ...). 
Must be used, for example, to update problemtype customized menus, etc.
@end itemize

@strong{Note:} To use TCL to improve the capabilities of writing the
calculations file, it is possible to use the command @code{@b{*tcl}} in the
template file (.bas file); @pxref{Specific commands} for details.

@c  ***********************************************************************
@c             FUNCIONS QUE APORTA GiD
@c  ***********************************************************************
@menu
* Control functions::                   
* Managing menus::                      
* HTML support::                        
* GiD version::                         
* Using EXEC in GiD::                   
* Detailed example - TCL-TK extension creation::  
@end menu


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Control functions, Managing menus, Event procedures, TCL-TK extension
@section Control functions
@cindex TCL Functions
@cindex Control functions

GiD offers the following TCL functions:



@itemize @bullet
@item
@b{.central.s process} @i{command_1 command_2 ...}: used to execute GiD commands 
@item
@b{.central.s info} @i{option}: used to obtain information about the actual GiD project
@end itemize



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@menu
* process function::                    
* info function::                       
* special functions::                   
@end menu

@node process function, info function, Control functions, Control functions
@unnumberedsubsec Process function
@cindex Process function
@cindex TCL Process Function


@b{.central.s process} @i{command_1 command_2 ...}


This is a simple function but really powerfull. 
It is used to enter commands directly inside the central event manager. 
The format of the comand has to be a string with the same style 
as if they were entered by typing on the command line interface. 

You have to enter exactly the same sequence as you would do interactively, 
including the escape sequences, using the word @code{escape}, and 
selecting the menus and operations used.

It is possible to obtain the exact commands that GiD needs, by checking
the right buttons toolbar (Utilities > Graphical > Toolbars). It's also
possible to save a batch file (Utilities > Preferences > Batch file) and
check there the commands used during the GiD session.

One simple example to create one line:
@example
.central.s process escape escape escape escape \
        geometry create line 0,0,0 10,0,0 escape
@end example



@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node info function, special functions, process function, Control functions
@unnumberedsubsec Info function
@cindex Info function
@cindex TCL Info Function

@b{.central.s info} @i{option}

This function provides any information about GiD, the current data or 
the state of any task inside the aplication. Depending on the arguments introduced after the @code{.central.s info} 
sentence, GiD will output different information:

@itemize @bullet

@item @b{.central.s info materials} @*
This command returns a list of the materials of the project. 

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Also these options are avalaible: 
@itemize @minus
@item
[@i{"material_name"}]: If a material name is given, its properties are returned. If the material name is given it's also possible to add the option [@i{OTHERFIELDS}] to get the fields of that material, or the option [@i{BOOK}], to get the book of that material.
@item
[@i{BOOKS}]: If this option is given, a list of the material books of the project is returned. 

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Examples: @*
in:  @code{.central.s info materials} @*
out: @code{"Air Steel Aluminium Concrete Water Sand"} @*
@*
in:  @code{.central.s info materials Steel} @*
out: @code{"1 Density 7850"}
@end itemize 

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml


@item @b{.central.s info conditions ovpnt | ovline | ovsurf | ovvol} @*
This command returns a list of the conditions in the project. Argument @b{ovpnt, ovline, ovsurf, ovvol} must be given to indicate the type of condition: condition over points, lines, surfaces or volumes.
 
@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Instead of @b{ovpnt, ovline, ovsurf, ovvol}, the following options are also avalaible:
@itemize @minus
@item
[@i{-interval "intv"}] [@i{-localaxes | -localaxesmat | -localaxescenter | -localaxesmatcenter }] @i{"condition_name"} [@i{geometry | mesh}]: 
if a condition name is given, the command returns the properties of that condition. @*
If the condition name is given, it's also possible to add the option @i{geometry} or @i{mesh}, and all mesh or geometry entities that have this condition assigned, will be returned. @*
If @i{-interval "intv"} is set, then are returned the contitions on this interval ("intv"=1,...n) instead the current interval.@*
If @i{-localaxes} is set, then also are returned three numbers that are the 3 Euler angles that define a local axes system (only for conditions with local axes, @xref{Local axes}). 
Selecting @i{-localaxesmat} are returned the nine numbers that define the transformation matrix of a vector from the local axes system to the global one.@*
If @i{-localaxescenter} is set, then also are returned the three Euler angles and the local axis center.@* 
Selecting @i{-localaxesmatcenter} are returned the nine matrix numbers and the center.@*

Adding the number id of an entity ( [@i{"entity_id"}] ) after the options @i{mesh} or @i{geometry}, the command returns the value of the condition assigned to that entity. @*

Other options avalaible if the condition name is given are [@i{OTHERFIELD}], to get the fields of that condition, and [@i{BOOK}], to get the book of the condition.
@item
[@i{BOOKS}]: If this option is given, a list of the condition books of the project is returned.
@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml
Examples: @*
in:  @code{.central.s info conditions ovpnt} @*
out: @code{"Point-Weight Point-Load"} @*
@*
in:  @code{.central.s info conditions Point-Weight} @*
out: @code{"ovpnt 1 Weight 0"} @*
@*
in:  @code{.central.s info conditions Point-Weight geometry} @*
out: @code{"E 1 - 2334 , E 2 - 2334 , E 3 - 343"}  
@*
in:  @code{.central.s info Conditions -localaxes Concrete_rec_section mesh 2} @*
out: @code{@{E 2 - @{4.7123889803846897 1.5707963267948966 0.0@} N-m 0.3 0.3 HA-25@}}@*
@*
@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info layers}@*
This command returns a list of the layers of the project.

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Also these options are avalaible:
@itemize @minus
@item
[@i{"layer_name"}]: If a layer name is given, the command returns the properties of that layer.
@item
[@i{-on}]: returns a list of the visible layers. 
@item
[@i{-off}]: returns a list of the hidden layers.
@item
[@i{-hasbacklayers}]: returns 1 if the project have entities inside back layers. @b{.central.s info back_layers} returns a list with the back layers@*
Example: @*
in:  @code{.central.s info back_layers} @*
out: @code{Layer2_*back*} @*
@item
[@i{-bbox}[-use geometry|mesh] ]: layer_name_1 layer_name_2 ...]: returns two coordinates (x1,y1,z1,x2,y2,z2) which define the bounding box of the entities that belong to the list of layers. If the option [-use geometry|mesh] is used, the command returns the bounding box of the @b{geometry} or the bounding box of the @b{mesh}. If the list of layers is empty, the maximum bounding box is returned. 
@item
[@i{-entities}]: One of the following arguments must be given: @i{nodes, elements, points, lines, surfaces or volumes}.A layer name must also be given. The command will return the nodes, elements, points, lines surfaces or volumes of that layer. 

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Examples: @*
in:  @code{.central.s info layers} @*
out: @code{"layer1 layer2 layer_aux"} @*
@*
in:  @code{.central.s info layers -on} @*
out: @code{"layer1 layer2"} @*
@*
in:  @code{.central.s info layers -entities lines layer2} @*
out: @code{"6 7 8 9"}  
@* 
@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

@item @b{.central.s info gendata}@*
This command returns the information entered in the @b{Problem Data} window (@pxref{Problem and intervals data file}).@*

The following options are avalaible:
@itemize @minus
@item
[@i{OTHERFIELDS}]: it is possible to add this option to get the additional fields of the Problem Data window.
@item
[@i{BOOKS}]: If this option is given, a list of the Problem Data books of the project is returned. 
@*@*
Example: @*
in:  @code{.central.s info gendata} @*
out: @code{"2 Unit_System#CB#(SI,CGS,User) SI Title M_title"} @*
@*
@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info intvdata}@*
This command returns a list of the interval data in the project (@pxref{Problem and intervals data file}).@*
The following options are avalaible:
@itemize @minus
@item
[@i{OTHERFIELDS}]: it is possible to add this option to get the additional fields of the Interval Data window.
@item
[@i{BOOKS}]: If this option is given, a list of the Interval Data books of the project is returned.@*
@item
[@i{NUM}]: if this option is given, a list of two naturals is returned. The first element of the list is the current interval and the second element is the total number of intervals. @* 
@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml



@item @b{.central.s info Project} @*
This command returns information about the project. More precisely, it is returned a list with:
@itemize @bullet

@item @b{Problem type} name.
@item Current example name.
@item 'There are changes' flag.
@item Current layer.
@item Active part (GEOMETRYUSE,MESHUSE,POSTUSE or GRAFUSE).
@item Quadratic problem flag.
@item Drawing type (normal,polygons,render,postprocess).
@item NOPOST or YESPOST
@item debug or nodebug
@item GiD temporary directory.
@item Geometry changes since the mesh was created (0 or 1).
@item Last size of element used for meshing (@code{NONE} if there's no mesh).

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Example: @*
in:  @code{.central.s info Project} @*
out: @code{"cmas2d e:\models\car_model 1 layer3 MESHUSE 0 normal YESPOST nodebug C:\TEMP\gid2 0 1.4"} @*
@*
@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info Mesh}@*
This command gives to the user information about the selected mesh
in the project. It returns a @code{1} followed by a list with all types of element used in the mesh. @*
The following two options are avalaible:
@itemize @minus
@item
[@i{MaxNumElements}]: returns the total number of elements of the mesh.
@item
[@i{MaxNumNodes}]: returns the total number of nodes of the mesh. 
@item
[@i{Elements Elemtype}[@i{First_id} @i{Last_id}]]: returns a list with the element number, 
the connectivities and the material number, from 'first_id' to 'last_id, if they are specified.
@i{Elemtype} can be: @i{Linear/Triangle/Quadrilateral/Tetrahedra/Hexahedra/Prisma}.

@item
[@i{Nodes}[@i{First_id} @i{Last_id}]]: returns a list with the node number and x y z coordinates, 
from 'first_id' to 'last_id', if they are specified.

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Examples: @*
in:  @code{.central.s info Mesh} @*
out: @code{"1 Tetrahedra Triangle"} @*
@*
in:  @code{.central.s info Mesh MaxNumNodes} @*
out: @code{"1623"} @*
@*
@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml


@item @b{.central.s info Coordinates point_id/node_id [geometry|mesh]} @*
This command returns the coordinates (x,y,z) of the given point or node.

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info variables "variable_name"} @* 
This command returns the value of the variable indicated. GiD variables can be found through the right buttons menu (@pxref{Graphical}), under the option @b{utilities > variables}.

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info localaxes ?<name>? ?-localaxesmat?}@*
@i{info localaxes} returns a list with all the user defined local axes. @*
@i{info localaxes <name>} returns the parameters (3 euler angles and the center} that define the local axes named @i{<name>}. @*
@i{info localaxes <name> -localaxesmat} instead to return the 3 euler angles, are returned the nine numbers that define the transformation matrix of a vector from the local axes system to the global one.@*

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info ortholimits} @*  
This command returns a list of the limits of the geometry in the project.

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info perspectivefactor} @*
This command returns which perspective 
factor is being currently used in the project.

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info graphcenter} @*
This command returns the coordinates (x,y,z) of the center of rotation.

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info MeshQuality} @*
This command returns a list of numbers. These naturals are the @b{Y} relative values of the graph showed in the option @b{Meshing > Mesh quality} (@pxref{Mesh quality}). 

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

This command has the following arguments:
@itemize @minus
@item
@b{MinAngle}/@b{MaxAngle}: quality criteria.@*
@item
@b{Linear}/@b{Triangle}/@b{Tetrahedra}/@b{Quadrilateral}@b{Hexahedra}/@b{Prisma}: type of element @*
@item
@b{"min_degrees"}: number of minimum degrees accepted.@*
@item
@b{"max_degrees"}: number of maximum degrees accepted.@*
@item
@b{"num_divisions"}: number of divisions.

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Example: @*
in:  @code{.central.s info MeshQuality MinAngle Triangle 20 60 4} @*
out: @code{"13 34 23 0"}
@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml


@item @b{.central.s info postprocess arewein} @*
This command returns @code{YES} if the user is in the GiD postprocess, and @code{NO}, if the user is not.

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info postprocess get} @*
This command returns information about the GiD postprocess. The following options are avalaible:
@itemize @minus
@item 
@b{all_volumes}: returns a list of all volumes.
@item 
@b{all_surfaces}: returns a list of all surfaces.
@item 
@b{all_cuts}: returns a list of all cuts.
@item 
@b{all_graphs}: returns a list of all graphs.
@item 
@b{all_volumes_colors}: returns a list of the volume colors used in the project. Colors are represented in RGB in hexadecimal format. Example: @code{#000000} would be black, and @code{#FFFFFF} would be white. 
@item 
@b{all_surfaces_colors}: returns a list of the surface colors used in the project. Colors are represented in RGB in hexadecimal format. Example: @code{#000000} would be black, and @code{#FFFFFF} would be white. 
@item 
@b{all_cuts_colors} :returns a list of the cut colors used in the project. Colors are represented in RGB in hexadecimal format. Example: @code{#000000} would be black, and @code{#FFFFFF} would be white. 
@item 
@b{cur_volumes}: returns a list of the visible volumes. 
@item 
@b{cur_surfaces}: returns a list of the visible surfaces.
@item 
@b{cur_cuts}: returns a list of the visible cuts.
@item 
@b{all_display_styles}: returns a list of all types of display styles avalaible.
@item 
@b{cur_display_style}: returns the current display style.
@item 
@b{all_display_renders}: returns a list of all types of render avalaible.
@item 
@b{cur_display_render}: returns the current rendering  method.
@item 
@b{all_display_culling}: returns a list of all types of culling avalaible.
@item 
@b{cur_display_culling}: returns the current culling visualization.
@item 
@b{cur_display_transparence}: returns @code{Opaque} or @code{Transparent} depending on the current transparency. Transparency is chosen by the user in the @b{Select & Display Style} window. 
@item
@b{cur_display_body_type}: returns @code{Massive} if the option @b{Massive} of the window @b{Select & Display Style} is selected. It returns @code{Hollow} if that option is not activated. 
@item 
@b{all_analisis}: returns a list of all analisis in the project.
@item 
@b{all_steps "analisis_name"}: returns the number of steps of "analisis_name".
@item 
@b{cur_analisis}: returns the name of the current analisis.
@item 
@b{cur_step}: returns the current step.
@item 
@b{all_results_views}: returns all avalaible result views.
@item 
@b{cur_results_view}: retuns the current result view.
@item 
@b{cur_results_list}: this option has one more argument: the kind of result visualization must be given. The avalaible kinds of result visualization are given by the option @i{all_results_views}. The comand returns a list of all the results that can be represented with that visualization in the current step of the current analysis. 

@item 
@b{results_list}: this option has three arguments: the first argument is the kind of result visualization. The avalaible kinds of result visualization are given by the option @i{all_results_views}. The second argument the analysis name. The third argument is the number of step. The comand returns a list of all the results that can be represented with that visualization in the given step. 

@item 
@b{cur_result}: returns the current selected result. The kind of result is selected by the user in the @b{View results} window.
@item 
@b{cur_components_list "result_name"}: returns a list of all the components of the result "result_name".
@item 
@b{cur_component}: returns the current component of the current result.
@item 
@b{main_geom_state}: returns if the main geometry is @code{Deformed} or @code{Original}
@item 
@b{main_geom_all_deform}: returns a list of all the deformation variables (vectors) of the main geometry.
@item 
@b{main_geom_cur_deform}: returns the current deformation variable (vectors) of the main geometry. 
@item 
@b{main_geom_cur_step}: returns the main geometry current step.
@item 
@b{main_geom_cur_anal}: returns the main geometry current analysis.
@item 
@b{main_geom_cur_factor}: returns the main geometry current deformation factor.
@item 
@b{show_geom_state}: returns if the reference geometry is @code{Deformed} or @code{Original}. 
@item
@b{show_geom_cur_deform}: returns the current deformation variable (vectors) of the reference geometry. 
@item 
@b{show_geom_cur_analisis}: returns the reference geometry current analysis.
@item 
@b{show_geom_cur_step}: returns the reference geometry current step.
@item 
@b{iso_all_display_styles}: returns a list of all avalaible display styles for iso surfaces.
@item 
@b{iso_cur_display_style}: returns the current display style for iso surfaces.
@item 
@b{iso_all_display_renders}: returns a list of all types of render avalaible for iso surfaces. 
@item 
@b{iso_cur_display_render}: returns the current rendering  method for iso surfaces.
@item
@b{iso_cur_display_transparence}: returns @b{Opaque} or @b{Transparent} depending on the current transparency of iso surfaces.
@item
@b{contour_limits}: returns the minimum and maximum value of the contour limits. Before each value, the word @code{STD} appears if the contour limit value is the default value, and @code{USER}, if it's defined by the user.
@item 
@b{animationformat}: returns the default animation format. 
@item 
@b{cur_show_conditions}: returns the option selected in the @b{Conditions} combo box of the @b{Select & Display Style} window. (Possible values: @code{Geometry Mesh None})
@item 
@b{all_show_conditions}: returns all the options avalaible in the @b{Conditions} combo box of the @b{Select & Display Style} window. (@code{Geometry Mesh None})
@item 
@b{cur_contour_limits}: returns the minimum and maximum value of the current value. 
@item
@b{current_color_scale}: returns a list of the colors used for the color scale; the first element of the list is the number of colors. Each color is represented in RGB in hexadecimal format. Example: @code{#000000} would be black, and @code{#FFFFFF} would be white. 
@end itemize


@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info AutomaticTolerance} @*
This command returns the value of the @b{Import Tolerance} used in the project. This value is defined in the @b{Preferences} window under @b{Import}. 

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml


@item @b{.central.s info RGBDefaultBackground} @*
This command returns the default background color in RGB. The format is three 8 bit numbers separated by #. Example: @code{255#255#255} would be @b{white}.  

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml



@item @b{.central.s info list_entities status} @*
This command returns a list with general information about the current GiD project.
@itemize @minus

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml


Example: @*
in:  @code{.central.s info list_entities status} @*
out: @*
@code{
Project name: UNNAMED@*
Problem type: UNKNOWN@*
Changes to save(0/1): 1 @*
Necessary to mesh again (0/1): 1@*
Using LAYER: NONE@*
@*
Interval 1 of 1 intervals@*
Degree of elements is: Normal@*
Using now mode(geometry/mesh): geometry@*
@*
number of points: 6@*
number of points with 2 higher entities: 6@*
@*
number of points with 0 conditions: 6@*
number of lines: 6@*
number of lines with 1 higher entities: 6@*
@*
number of lines with 0 conditions: 6@*
number of surfaces: 1@*
number of surfaces with 0 higher entities: 1@*
@*
number of surfaces with 0 conditions: 1@*
number of volumes: 0@*
@*
number of nodes: 8@*
number of nodes with 0 conditions: 8@*
number of Triangle elements: 6@*
number of elements  with 0 conditions: 6@*
@*
Total number of elements: 6@*
Last size used for meshing: 10@*

Internal information:@*
Total MeshingData:0   Active: 0   0%} @*
@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info list_entities} @*
This command returns information about entities. @* 
It has the following arguments:
@itemize @minus
@item @b{Points/Lines/Surfaces/Volumes/Nodes/Elements/Results}: type of entity or Results.
@b{Note:} if the user is postprocessing in GiD, the information returned by @b{Nodes/Elements} is the
relative to the nodes and elements in postprocess, including its results information. To access the
preprocess information about the preprocess mesh the following entities keywords should be 
used @b{PreNodes/PreElements}.
@item
@b{entity_id}: number of entity. It is also possible to enter a list of entities (example: @code{2 3 6 45}) a range of entities (example: entities from 3 to 45, would be @code{3:45}) or a layer (example: @code{layer:layer_name}).
@end itemize
@*
Using "list_entities Results"  must also specify <analysis_name> <step> <result_name> <indexes>
@*
With option @b{-more} returns more information about the entity. Option @b{-more} used with lines, returns the length of the line, its radius (arcs), and the list of surfaces which are higuer entities of that line; used with elements, it returns the type of element, its number of nodes and its volume.
@*
@itemize @bullet
@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Example 1: @*
in:  @code{.central.s info list_entities Points 2 1} @*
out: @*
@code{POINT@*
Num: 2 HigherEntity: 1 conditions: 0 material: 0@*
LAYER: car_lines@*
Coord: -11.767595 -2.403779 0.000000@*
END POINT@*
POINT@*
Num: 1 HigherEntity: 1 conditions: 0 material: 0@*
LAYER: car_lines@*
Coord: -13.514935 2.563781 0.000000@*
END POINT} @*

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Example 2: @*
in:  @code{.central.s info list_entities lines layer:car_lines} @*
out: @*
@code{STLINE@*
Num: 1 HigherEntity: 0 conditions: 0 material: 0@*
LAYER: car_lines@*
Points: 1 2@*
END STLINE@*
STLINE@*
Num: 13 HigherEntity: 0 conditions: 0 material: 0@*
LAYER: car_lines@*
Points: 13 14@*
END STLINE} @*

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Example 3 (using @b{-more}): @*
in:  @code{.central.s info list_entities -more Lines 2} @*
out: @*
@code{
STLINE@*
Num: 2 HigherEntity: 2 conditions: 0 material: 0@*
LAYER: Layer0@* 
Points: 2 3 @* 
END STLINE @*
LINE (more) @*
Length=3.1848 Radius=100000 @*
Higher entities surfaces: 1 3 @*
END LINE} @*

@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info parametric} @*
This command returns geometric information (coordinates, derivates, etc.) about parametric lines or surfaces.@* 
For lines it has the following syntax:@* 
@b{.central.s info parametric line entity_id coord|deriv_t|deriv_tt|t_fromcoord t|x y z} @*
And for surfaces:@* 
@b{.central.s info parametric surface entity_id coord|deriv_u|deriv_v|deriv_uu|deriv_vv|deriv_uv|normal|uv_fromcoord u v|x y z} @*
@*
The result for each argument is:
@itemize @minus
@item @b{line|surface}: type of entity.
@item @b{entity_id}: number of entity.
@item @b{coord}: 3D coordinate of the point with parameter t (line) or u,v (surface).
@item @b{deriv_t}: first curve derivative at parameter t.
@item @b{deriv_tt}: second curve derivative at parameter t.
@item @b{t_fromcoord}: t parameter for a 3D point.
@item @b{deriv_u,deriv_v}: first partial u or v surface derivatives.
@item @b{deriv_uu,deriv_vv,deriv_uv}: second surface partial derivatives.
@item @b{normal}: unitary surface normal at u,v parameters.
@item @b{uv_fromcoord}: u,v space parameters for a 3D point.
@end itemize
@*
@b{Note:} the vector derivatives are not normalized.

@itemize @bullet
@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Example: @*
in:  @code{.central.s info parametric line 26 deriv_t 0.25} @*
out: @code{8.060864 -1.463980 0.000000} @*

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info ListMassProperties} @*
This command returns properties of the selected entities. It returns the @b{length} if entities are lines, @b{area}, if surfaces, @b{volume} if volumes, or the @b{gravity center} if entities are nodes or elements.@*
It has the following arguments:
@itemize @minus
@item @b{Points/Lines/Surfaces/Volumes/Nodes/Elements}: type of entity.
@b{entity_id}: number of entity. It is also possible to enter a list of entities (example: @code{2 3 6 45}) a range of entities (example: entities from 3 to 45, would be @code{3:45}).

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml

Example: @*
in:  @code{.central.s info ListMassProperties Lines 13 15} @*
out: @*
@code{LINES@*
n. Length@*
13 9.876855@*
15 9.913899@*
Selected 2 figures@*
________________________@*
Total Length=19.790754} @*
@*
@end itemize

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item @b{.central.s info problemtypepath} @*
This command returns the absolute path to the current Problem Type.

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml


@item @b{.central.s info GiDVersion} @*
This command returns the GiD version number. For example 6.2.0b. 


@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml
@end itemize


@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml



@node special functions,  , info function, Control functions
@unnumberedsubsec Special functions
@cindex Special functions
@cindex TCL Special functions

It exists some special commands to control the redraw and wait state of GiD:

@b{.central.s disable graphics 'value'}
The value 0/1 Enable/Disable Graphics (GiD doesn't redraw)@*
@*
EXAMPLE to disable the redraw:
@*
@example
.central.s disable graphics 1
@end example

@b{.central.s disable graphinput 'value'}
The value 0/1 Enable/Disable GraphInput (enable or disable peripherals: mouse, keyboard, ...)@*
@*
EXAMPLE to disable the peripherals input:
@*
@example
.central.s disable graphinput 1
@end example

@b{.central.s disable windows 'value'}
The value 0/1 Enable/Disable Windows (GiD displays, or not, windows which require interaction with the user)@*
@*
EXAMPLE to disable the interaction windows:
@*
@example
.central.s disable windows 1
@end example

@b{.central.s waitstate 'value'}
The value 0/1 Enable/Disable the Wait state (GiD displays a hourglass cursor in wait state)@*
@*
EXAMPLE to set the state to wait:
@*
@example
.central.s waitstate 1
@end example

Usually these command are used jointly:@*
@*
EXAMPLE
@*
@example
#deactivate redraws, etc wit a witget named $w
$w conf -cursor watch
.central.s waitstate 1
update
.central.s disable graphics 1
.central.s disable windows 1
.central.s disable graphinput 1

...

#reactivate all and redraw
.central.s disable graphics 0
.central.s disable windows 0
.central.s disable graphinput 0
.central.s process "redraw"
$w conf -cursor ""
.central.s waitstate 0
@end example

@*
Note: It's more recommended for a tcl developer, to use the more 'user-friendly' procedures defined 
inside the file 'dev_kit.tcl' (located in the directory \scripts).@*
For example, to disable and enable redraws, you can use:
@example
::GidUtils::DisableGraphics 
::GidUtils::EnableGraphics
@end example
@*

It exists other GiD-tcl special commands to directly manage materials, conditions, intervals or create nodes and elements, as follows:

@b{GiD_CreateData create|delete material ?<basename>? <name> ?<values>?}
@*
To create or delete materials
@*
@itemize @minus
@item @b{<basename>} only required for create, is the name of material from with derive
@item @b{<name>} is the name of material
@item @b{<values>} list of all field values for the new material
@end itemize
Example:
@example
GiD_CreateData create material Steel Aluminium {3.5 4 0.2}
GiD_CreateData delete material Aluminium
@end example
@*

@b{GiD_AssignData material|condition <name> <over> ?<values>? <entities>}
@*
To assign materials or contitions over entities
@*
@itemize @minus
@item @b{<name>} is the name of the material or condition
@item @b{<over>} must be: points lines surfaces volumes layers nodes elements body_elements face_elements
(elements is equivalent to body_elements)
@item @b{<newvalues>} only requiered for conditions, if set to "" then are used the default values
@item @b{<entities>} a list of entities (is valid to use ranges as a:b)
(if <over> is face_elements then must specify a list of "entity numface" instead only "entity")
@end itemize
Example:
@example
GiD_AssignData materials Steel Surface {1 5}
GiD_AssignData condition Point-Load Nodes {3.5 2.1 8.0} {4 8}
GiD_AssignData condition Face-Load face_elements {3.5 2.1 8.0} {15 1 18 1 20 2}
@end example
@*

@b{GiD_ModifyData materials|intvdata|gendata ?<name>? <values>}
@*
To change all field values of materials, interval data or general data
@*
@itemize @minus
@item @b{<name>} is the material name or interval number
@item @b{<values>} list of all the new field values for the material, interval data or general data
@end itemize
Example:
@example
GiD_ModifyData materials Steel {2.1e6 0.3 7800}
GiD_ModifyData intvdata  1 ...
GiD_ModifyData gendata ...
@end example
@*

@b{GiD_AccessValue set|get materials|conditions|intvdata|gendata ?<name>? <question> ?<attribute>? <value>}
@*
To change only some field value of materials, interval data or general data
@*
@itemize @minus
@item @b{<name>} is the material, condition name or interval number (unneeded for gendata)
@item @b{<question>} field name
@item @b{<attribute>} attribute name to change (STATE, HELP, etc.) instead of the field value.
@item @b{<value>} new field or attribute value
@end itemize
Example:
@example
GiD_AccessValue set gendat Solver Direct
@end example
@*

@b{GiD_IntervalData <mode> <number>|?copyconditions?}
@*
To create, delete or set a interval data
@*
@itemize @minus
@item @b{<mode>} must be 'create', 'delete' or 'set'
@item @b{<number>} is the interval number (integer >=1)@*
For create mode, instead a <number> can optionally set 'copyconditions'@*
For set mode, if <number> is not supplied, then the current interval number is returned.
@end itemize
Example:
@example
GiD_IntervalData set
GiD_IntervalData set 2
GiD_IntervalData create
GiD_IntervalData create copyconditions
@end example
@*

@b{GiD_LocalAxes <mode> <name> ?<type>? <Cx Cy Cz> <PAxex PAxey PAxez> <PPlanex PPlaney PPlanez>?}
@*
To create delete or modify local axes.
@*
@itemize @minus
@item @b{<mode>}: "create|delete|edit|exists". Operation to make: create, delete edit or exists
@item @b{<name>}: is the name of local axes to create or delete
@item @b{<type>}: "rectangular|cylindrical|spherical C_XZ_Z||C_XY_X". At this moment, GiD only supports rectangular axes @*
C_XZ_Z is an optional word to specify a point over the XZ plane and other over the Z axe (default) @*
C_XY_X is an optional word to specify a point over the XY plane and other over the X axe
@item @b{<Cx Cy Cz>} tcl list with the point real coordinates of local axes origin
@item @b{<PAxex PAxey PAxez>} tcl list with the coordinates of a point located over the Z' local axes (with Z' positive). The coordinates must be space separated. If the z coordinate is missing, then it's set to z=0.0
@item @b{<PPlanex PPlaney PPlanez>} tcl list with the coordinates of a point located over the Z'X'half-plane (with X' positive)
@end itemize
@*
For the 'exists' operation, if only it's specified the <name> field, then it's returned 1 when this name exists, and 0 if not.@*
If also is specified the other values, then <name> is ignored.@*
The returned value is:
@*
-1 if match the global axes.@*
-2 if match the automatic local axes.@*
-3 if match the automatic alternative local axes.@*
 0 if it does not match with any axes.@*
<n> if match the user defined number <n> (n>0) local axes.@*
@*
Example:
@example
GiD_LocalAxes create "axes_1" rectangular C_XY_X {0 0 0} {0 1 0} {1 0 0}
GiD_LocalAxes delete axes_1
GiD_LocalAxes exists axes_1
	 
GiD_LocalAxes exists "" rectangular C_XY_X {0 0 0} {0 1 0} {1 0 0}
this last sample returns -1 (equivalent to global axis)
@end example
@*

@b{GiD_Mesh create|delete node|element <num>|append <elemtype> <nnode> <N1 ... Nnnode> ?<mat>? | <x y z>}
@*
To create or delete mesh nodes or elements.
@*
@itemize @minus
@item @b{<num>|append}: <num> is the identifier (integer > 0) for the node or element. Can use the word 'append' to automatically set a new number.
@item @b{<elemtype>}: "onlypoints|linear|triangle|quadrilateral|tetrahedra|hexahedra|prism". Element type
@item @b{<N1 ... Nnnode>} tcl list with the element connectivities
@item @b{<mat>} optional element material name
@item @b{<x y z>} node coordinates. If the z coordinate is missing, then it's set to z=0.0
@end itemize
@*
Example:
@example
GiD_Mesh create node append {1.5 3.4e2 6.0}
GiD_Mesh create element 58 triangle 3 {7 15 2} steel
GiD_Mesh delete element 58
@end example

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node Managing menus, HTML support, Control functions, TCL-TK extension
@section Managing menus
@cindex Managing menus 
@cindex TCL menu functions 
@cindex Menu TCL functions 
 
@b{GiD} offers some functions to change the @b{GiD} menus. With these functions it is possible to add new menus or to change the existing ones. If you are creating a problem type, these functions should be called from the @code{InitGIDProject} or @code{InitGIDPostProcess} functions (@pxref{TCL-TK extension}). 



@ifset photo
@tex
\inifigura
\centerline{\hbox{
\psfig{figure=images/custom_menu.ps,width=7.745cm,height=2.1cm,angle=0}
}}
\unpie{}
{
}
\finfigura
@end tex

@ifset html
@ifhtml
<P></P>
<center>
<a name="custom_menu.gif"></a>
<img src="images/custom_menu.gif"> 

</center>
<p>
@end ifhtml
@end ifset
@end ifset

@b{Note:} Menus and option menus are identified by its name.@*
@b{Note:} It is not necessary to restore the menus when leaving the problem type, GiD already does it.

The TCL functions are:
@itemize @bullet
@item
@b{CreateMenu @{new_menu_name prepost@}}
@*
Creates a new menu. New menus are inserted between the @b{Calculate} and @b{Help} menu.@*
@itemize @minus
@item
@code{new_menu_name}: name of the new menu.
@item
@code{prepost} can have these values:@*
@code{"PRE"} to create the menu only in the preprocess@*
@code{"POST"} to create the menu only in the postprocess@*
or @code{"PREPOST"} to create the menu in the pre and postprocess
@end itemize
@*@*@*  

@item
@b{InsertMenuOption @{menu_name option_name position command prepost [insert/replace] @}}
@*
Creates a new option for a given menu in a given position (positions start at 0). By default, if it already exists an option in the given position, that option is substitued by the new one. If the @code{insert} argument is given, the new menu option is inserted.
@itemize @minus
@item
@code{menu_name}: name of the menu where you want to insert the new option. 
@item
@code{option_name}: name of the new option you want to insert. If @code{option_name} is @code{"---"}, then , a separator line is inserted in the menu. If you want to insert an option to a submenu, you have to specify the path with ">". @*
Example: @code{Geometry>Create>MyOption}@*
@item
@code{position}: position in the menu where the option has to be inserted. Note that positions start at 0, and separator lines also count.
@item
@code{command}: is the command called when the menu option is selected.
@item
@code{prepost}: this argument can have the following values: @*
@code{"PRE"} to insert the option in the preprocess menus @*               
@code{"POST"} to insert the option in the postprocess menus @*             
or @code{"PREPOST"} to insert the option in the pre and postprocess menus  
@item
@code{insert/replace}: if this argument is @code{insert} the new option is inserted. If the argument is @code{replace} the new option replaces the option of the given position. This argument is optional, and by default the new option replaces the existing one. @*
@end itemize
@*@*@*

@item
@b{GidAddUserDataOptions @{option_name command position accelerator@}}@*
Add a new entry to the data menu of GiD (this menu is special, it change loading a problem type).
@itemize @minus
@item
@code{option_name}: name of the new option you want to insert. If @code{option_name} is @code{"---"}, 
then , a separator line is inserted in the menu.
@item
@code{command}: is the command called when the menu option is selected.
@item
@code{position}: position in the menu where the option has to be inserted: an integer 
or @code{end} (default) to indicate the last position in the menu. Note that positions 
start at 0, and separator lines also count.
@item
@code{accelerator}: Acceleration key combination (default "").
@end itemize
@*@*@*

@item
@b{RemoveMenuOption @{menu_name option_name prepost@}}@*
Removes an option of a given menu. 
@itemize @minus
@item
@code{menu_name}: name of the menu which has the option you want to remove.
@item
@code{option_name}: name of the option you want to remove. If you want to remove a submenu or a submenu option, you have to specify the path with ">". Example: @code{Geometry>Create>Point}@*
@item
@code{prepost}: this argument can have the following values: @*
@code{"PRE"} to remove an option of the preprocess menus@*
@code{"POST"} to remove an option of the postprocess menus@*
or @code{"PREPOST"} to remove an option of the pre and the postprocess menus
@end itemize
@*
@b{Note:} @code{menu_name} and @code{option_name} are case sensitive.@* 
@*@*@*

@item
@b{UpdateMenus @{@}}@*
Updates changes made on menus. This function must be called when all calls to @code{CreateMenu}, @code{InsertMenuOption} or @code{RemoveMenuOption}, are done. 
@end itemize 

@tex
\bigskip
@end tex
@ifhtml
<p></p>
@end ifhtml
@*@*

@b{EXAMPLE: creating and modifying menus} @*
In this example we create a new menu called "New Menu" and we modify the GiD @b{Help} menu: 

@ifset photo
@tex
\inifigura
\centerline{\hbox{
\psfig{figure=images/custom_menu2.ps,width=7.9cm,height=3.5cm,angle=0}
}}
\unpie{}
{
}
\finfigura
@end tex

@ifset html
@ifhtml
<P></P>
<center>
<a name="custom_menu2.gif"></a>
<img src="images/custom_menu2.gif"> 

</center>
<p>
@end ifhtml
@end ifset
@end ifset

The code to make these changes would be:
@example
CreateMenu "New Menu" "PRE"
InsertMenuOption "New Menu" "Option 1" 0 "Command_1" "PRE" 
InsertMenuOption "New Menu" "Option 2" 1 "Command_2" "PRE"
InsertMenuOption "New Menu" "---"      2 "" "PRE"
InsertMenuOption "New Menu" "Option 3" 3 "Command_3" "PRE" 

InsertMenuOption "Help" "My Help" 1 "" "PRE" "insert"
InsertMenuOption "Help" "My Help>My help 1" 0 "Command_help1" "PRE" 
InsertMenuOption "Help" "My Help>My help 2" 1 "Command_help2" "PRE" 


RemoveMenuOption  "Help" "Customization Help" "PRE" 
RemoveMenuOption  "Help" "What is new ..." "PRE"
RemoveMenuOption  "Help" "FAQ" "PRE"
UpdateMenus

@end example
@*@*
@b{EXAMPLE: removing a submenu or a submenu option} @*
In this example we remove the option @code{Quadrilateral} of the @code{Meshing} menu.  

@ifset photo
@tex
\inifigura
\centerline{\hbox{
\psfig{figure=images/custom_menu3.ps,width=8.96cm,height=4.62cm,angle=0}
}}
\unpie{}
{
}
\finfigura
@end tex

@ifset html
@ifhtml
<P></P>
<center>
<a name="custom_menu3.gif"></a>
<img src="images/custom_menu3.gif"> 

</center>
<p>
@end ifhtml
@end ifset
@end ifset

To remove option @code{Quadrilateral}:

@example
RemoveMenuOption  "Meshing" "Element type>Quadrilateral" "PRE" 
UpdateMenus
@end example




@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node HTML support, GiD version, Managing menus, TCL-TK extension
@section HTML support
@cindex HTML support 
@cindex Help 

The problem type developver can take advantage of the internal HTML
browser if he wants to provide an online help.


@menu
* HelpWindow::                          
* GiDCustomHelp::                       
@end menu

@node HelpWindow, GiDCustomHelp, HTML support, HTML support
@subsection HelpWindow
@cindex HelpWindow
@comment  node-name,  next,  previous,  up

@itemize @bullet

1 - Create a directory named @code{html} inside your problem type directory@*
2 - Call @b{HelpWindow "CUSTOM_HELP" "problem_type_name"}, where @code{problem_type_name} is the name of your problem type with the @code{.gid} extension (for example, @code{cmas2d.gid}).@*
3 - Function @b{HelpWindow} opens the file "index.html" which must be inside the @code{html} folder.@*
@end itemize


@ifset photo
@tex
\inifigura
\centerline{\hbox{
\psfig{figure=images/help_cm2d.ps,width=9.23cm,height=8.23cm,angle=0}
}}
\unpie{}
{
}
\finfigura 
@end tex

@ifset html 
@ifhtml 
<P></P>
<center>
<a name="help_cm2d.gif"></a>
<img src="images/help_cm2d.gif"> 

</center> 
<p> 
@end ifhtml 
@end ifset 
@end ifset 

It's a good idea to call the function @b{HelpWindow "CUSTOM_HELP" "problem_type_name"} using the menu functions (@pxref{Managing menus}). @*@*@* 

@b{EXAMPLE: Adding a customized HTML help in the Help menu for the CMAS2D problem type:} 

@example 
InsertMenuOption "Help" \ 
    "Help CMAS2D"  0 @{HelpWindow "CUSTOM_HELP" "cmas2d.gid"@} "PREPOST" 

UpdateMenus

@end example 

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml

@node GiDCustomHelp,  , HelpWindow, HTML support
@subsection GiDCustomHelp
@cindex GiDCustomHelp
@comment  node-name,  next,  previous,  up

@node GiD version, Using EXEC in GiD, HTML support, TCL-TK extension
@section GiD version
@cindex version
@cindex GiDVersionCmp 

Normally a problem type requires a minimum version of GiD to run. Because the problem type can be distributed or sold separately from GiD, it's important to check the GiD version before continuing with the execution of the problem type. GiD offers a function, @b{GiDVersionCmp}, which compares the version of the GiD which is currently running with a given version.



@b{GiDVersionCmp @{ Version @}  } @*@*

Returns a negative integer if @code{Version} is greater than the currently executed GiD version; zero if the two versions are identical; and a positive integer if @code{Version} is less than the GiD version.@*@*

@b{Note:} This function will always return a -1 if the GiD version is previous to 6.1.5. 

@*
EXAMPLE
@*
@example
proc InitGIDProject @{ dir @} @{
    global GidPriv
    set VersionRequired "6.2.0b"
    set comp -1
    catch @{ 
      set comp [GiDVersionCmp $VersionRequired]
    @}
    if @{ $comp < 0 @} @{
	tk_dialogRAM .gid.tempwinw Warning \
	  "This interface requires GiD $VersionRequired or later" error 0 OK
    @}
@}
@end example

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Using EXEC in GiD, Detailed example - TCL-TK extension creation, GiD version, TCL-TK extension
@section Using EXEC in GiD
@cindex EXEC
@cindex Invoking a subprocess

The TCL language has the @code{exec} command used to invoke a subprocess. This command treats its arguments as the specification of one or more subprocesses to execute. It's possible to invoke a subprocess from GiD using this option. 

@b{Example: invoking a process in the background}
@example
exec netscape http://www.gidhome.com & 
@end example

@*
@*
@b{Note:} In Windows, instead of @code{&} it's necessary to put @code{>& NUL: &} to run the process in the background. Example: @code{exec PROGRAM_NAME >& NUL: & }
@*
@*






@c  ***********************************************************************
@c             EXEMPLE DE CREACIÓ TCL/TK
@c  ***********************************************************************

@tex
\bigskip
\bigskip
@end tex
@ifhtml
<p><br><br></p>
@end ifhtml


@node Detailed example - TCL-TK extension creation,  , Using EXEC in GiD, TCL-TK extension
@section Detailed example - TCL-TK extension creation
@cindex TCL-TK extension creation example

Next is an example of the creation of a TCL-TK extension, step by step. In this example we will create the @code{cmas2d.tcl} file, so, we will extend the capabilities of the @b{cmas2d} problem type. The file @code{cmas2d.tcl} has to be placed inside the @b{cdmas2d} problem type directory. 

@b{Note:} The @b{cmas2d} problem type calculates the center of masses of a 2D surface. This problem type is located inside @code{problemtypes}, in the GiD directory.

In this example, the @code{cmas2d.tcl} creates a window which appears when the problem type is selected. 


@ifset photo
@tex
\bigskip
\centerline{\hbox{
\psfig{figure=images/win_tcl_example.ps,width=6.65cm,height=3.56cm,angle=0}
}}
\unpie{}
{
Window created in the cmas2d.tcl example file
}
\bigskip
@end tex

@ifset html
@ifhtml
<center>
<a name="win_tcl_example.gif"></a>
<img src="images/win_tcl_example.gif"> 
<p>Window created in the cmas2d.tcl example file
</center>
</p>
@end ifhtml
@end ifset

@end ifset

This window gives information about the location, materials and conditions of the problem type. The window has two buttons: the button @b{CONTINUE} lets the users continue working with the @b{cmas2d} problem type; the button @b{RANDOM SURFACE} creates a random 2D surface in the plane XY.

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

Here starts the TCL code for the example. There are three main procedures in the @code{cmas2d.tcl} file:
@itemize @bullet 
@item 
@b{proc InitGIDProject @{dir@}}

@example
proc InitGIDProject @{dir @} @{

  set materials  [.central.s info materials] 
  set conditions [.central.s info conditions ovpnt] 

  CreateWindow $dir $materials $conditions

@}
@end example


This is the main procedure. It is executed when the problem type is selected. It calls the @b{CreateWindow} procedure. 

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item
@b{proc CreateWindow @{dir mat cond@}}
@example
proc CreateWindow @{dir mat cond@} @{

 set w .gid.win_example

 InitWindow $w "CMAS2D.TCL - Example tcl file" ExampleCMAS "" \
	    "" 1

 frame $w.top
 label $w.top.title_text \
        -text " TCL window example for CMAS2D problem type "
   
 frame $w.information  -relief ridge -bd 2 
 label $w.information.path        \
        -text " Problem Type path: $dir "
 label $w.information.materials   \
        -text " Avalaible materials: $mat"
 label $w.information.conditions  \
        -text " Avalaible conditions: $cond"

 frame $w.bottom
 button $w.bottom.start \
        -text "CONTINUE" \
        -height 1 -width 14 -command "destroy $w"
 button $w.bottom.random \
        -text "RANDOM SURFACE" \
        -height 1 -width 20 -command "CreateRandomSurface $w"



 pack $w.top.title_text -pady 10
 pack $w.information.path $w.information.materials \
      $w.information.conditions -side top -anchor w
    
 pack $w.bottom.start $w.bottom.random \
       -side left -anchor center
 pack $w.top 
 pack $w.information -expand yes -fill both
 pack $w.bottom -side top -padx 6 -pady 10 -ipady 2
@}
@end example


This procedure creates the window with information about the path, the materials and the conditions of the project. The window has two buttons: if the @b{CONTINUE} button is pressed the window is dismissed; if the @b{RANDOM SURFACE} button is pressed, it calls the @b{CreateRandomSurface} procedure. 

@tex
\bigskip
@end tex
@ifhtml
<p><br></p>
@end ifhtml

@item
@b{proc CreateRandomSurface @{w@}}

@example
proc CreateRandomSurface @{w@} @{

 set ret [tk_dialogRAM $w.dialog "Warning!!" \
    "Warning: this will create a nurbs surface in your \
     current project" "" 1 "ok" "cancel"]

 if @{$ret ==0@} @{
       Create_surface
       destroy $w
  @}
@}
@end example
This procedure is called when the @b{RANDOM SURFACE} button is pressed. Before creating the surface, a dialog asks the user to continue or to cancel the creation of the surface. If the surface has to be created, the @b{Create_surface} procedure is called. Then, the window is destroyed. 


@example 
proc Create_surface @{@} @{ 


  set a_x [expr rand()*10] 
  set a_y [expr rand()*10] 

  set b_x [expr $a_x + rand()*10]
  set b_y [expr $a_y + rand()*10]

  set c_x [expr $b_x + rand()*10]
  set c_y [expr $b_y - rand()*10]


   
  if @{$a_y < $c_y@} @{
           set d_y [expr $a_y - rand()*10]
	   set d_x [expr $a_x + rand()*10]
	   @} else @{
	   set d_y [expr $c_y - rand()*10] 
	   set d_x [expr $c_x - rand()*10]
	   @}


  .central.s process escape escape escape escape 
    
  .central.s process geometry create line \
  $a_x,$a_y,0.000000tol0.176991 \
  $b_x,$b_y,0.000000tol0.176991 \
  $c_x,$c_y,0.000000tol0.176991 \
  $d_x,$d_y,0.000000tol0.176991 \
  close 



  .central.s process escape escape escape escape
  .central.s process geometry create NurbsSurface Automatic \
  4 \
  escape \

  .central.s process zoom frame escape escape escape escape 
 @}

@end example

@ifset photo
@tex
\inifigura
\centerline{\hbox{
\psfig{figure=images/random_surf.ps,width=5.91cm,height=3.49cm,angle=0}
}}
\unpie{}
{
}
\finfigura
@end tex

@ifset html
@ifhtml
<P></P>
<center>
<a name="random_surf.gif"></a>
<img src="images/random_surf.gif"> 

</center>
<p>
@end ifhtml
@end ifset

@end ifset



A 2D surface (a 4 side 2D polygon) is created. The points of this surface are chosen at random.
@end itemize


@node INDEX,  , TCL-TK extension, Top
@unnumbered INDEX

@iftex
@headings off
@evenheading @thispage @| @|
@oddheading @| @| @thispage
@comment @evenheading @thispage @| @| Concept Index
@comment @oddheading Concept Index @| @| @thispage
@end iftex

@printindex cp
@c @printindex cm
@iftex
@headings off
@evenheading @thispage @| @|
@oddheading @| @| @thispage
@end iftex

@contents
@bye

@c Local Variables: ***
@c texinfo-column-for-description:40 ***
@c End: ***
