Some keywords can be used in a desciption file to modify default values, read meshes or field values:
The problem name of the next mesh to read will be the name following the keyword set_pb_name.
The solution name of the next mesh to read will be the name following the keyword set_sol_name.
The name of the next udsurf (user defined surface) to read for a 3d solution will be the name following the keyword set_surf_name. An udsurf can be loaded by the use of the get_asurf keyword.
The default xrange values (min and max) for 1d problems are set to the two values following the keyword set_def_xrange.
The default xtics values (initial and increment) for 1d problems are set to the two values following the keyword set_def_xtics.
The default yrange values (min and max) for 1d problems are set to the two values following the keyword set_def_yrange.
The default ytics values (initial and increment) for 1d problems are set to the two values following the keyword set_def_ytics.
The name following the keyword get_rcs must be the name of a file containing sequences of couple values of angle (in degree) and RCS. Theses data are loaded as a 1d problem solution.
The name following the keyword get_amesh must be the name of a file containing the ascii description of a mesh as descibed for get_bmesh but with formatted output data. Theses data are loaded as the mesh of a new 2d or 3d problem solution.
An example:
# dimension 2, 1 block : 2 1 # # block 1 : # # unstructured block : 0 # 6 nodes, 4 elements, 6 boundary elements : 6 4 6 # homogeneous element type, homogeneous boundary element type : 1 1 # 6 nodes : 0.00000E+00 0.00000E+00 1.0000 0.00000E+00 2.0000 0.00000E+00 0.00000E+00 1.0000 1.0000 1.0000 2.0000 1.0000 # type of element: T3 (triangles) : 6 # 4 triangles (connectivity and logic) : 1 2 5 1 1 5 4 1 2 3 6 2 2 6 5 2 # type of boundary element: S2 (segment) : 7 # 6 segments (connectivity and logic) : 1 2 2 2 3 2 3 6 2 6 5 2 5 4 2 4 1 2
The name following the keyword get_bmesh must be the name of
a file containing the binary description of a mesh created as described
by the fortran program at the end of this chapter (see
page ).
If the current solution is a solution of a 3d problem with the solution name and the problem name defined as the current solution and problem names, the defined surface is added to the current 3d problem, else a new problem solution is created and the defined surface is added to this new problem.
This kind of surface for a 3d problem is called an udsurf for ``user defined surface''. This surface is described by an ascii file whose name follows the keyword get_asurf.
Example of a such file for the definition a structured mesh:
# structured mesh : 1 # idim, jdim : 3 3 -0.1666667 -0.1666667 0.0000000E+00 0.1666667 -0.1666667 0.0000000E+00 0.5000000 -0.1666667 0.2222222 -0.1666667 0.1666667 0.0000000E+00 0.1666667 0.1666667 0.0000000E+00 0.5000000 0.1666667 0.2222222 -0.1666667 0.5000000 -0.2222222 0.1666667 0.5000000 -0.2222222 0.5000000 0.5000000 0.0000000E+00
Another example for the definition of an unstructured homogeneous mesh:
# unstructured mesh : 0 # number of nodes : 26 # nodes : -0.5773503 -0.5773503 -0.5773503 0.5773503 -0.5773503 -0.5773503 -0.5773503 0.5773503 -0.5773503 -0.5773503 -0.5773503 0.5773503 0.5773503 0.5773503 -0.5773503 -0.5773503 0.5773503 0.5773503 0.5773503 -0.5773503 0.5773503 0.5773503 0.5773503 0.5773503 0.0000000E+00 -0.7071068 -0.7071068 0.0000000E+00 0.7071068 -0.7071068 0.0000000E+00 -0.7071068 0.7071068 0.0000000E+00 0.7071068 0.7071068 -0.7071068 0.0000000E+00 -0.7071068 0.7071068 0.0000000E+00 -0.7071068 -0.7071068 0.0000000E+00 0.7071068 0.7071068 0.0000000E+00 0.7071068 -0.7071068 -0.7071068 0.0000000E+00 0.7071068 -0.7071068 0.0000000E+00 -0.7071068 0.7071068 0.0000000E+00 0.7071068 0.7071068 0.0000000E+00 0.0000000E+00 0.0000000E+00 -1.000000 0.0000000E+00 0.0000000E+00 1.000000 -1.000000 0.0000000E+00 0.0000000E+00 1.000000 0.0000000E+00 0.0000000E+00 0.0000000E+00 -1.000000 0.0000000E+00 0.0000000E+00 1.000000 0.0000000E+00 # homogeneous mesh : 1 # element type : 4 # number of quadrangles : 24 # quadrangles : 1 9 21 13 9 2 14 21 13 21 10 3 21 14 5 10 4 15 22 11 11 22 16 7 15 6 12 22 22 12 8 16 1 13 23 17 13 3 19 23 17 23 15 4 23 19 6 15 2 14 24 18 14 5 20 24 18 24 16 7 24 20 8 16 1 17 25 9 17 4 11 25 9 25 18 2 25 11 7 18 3 19 26 10 19 6 12 26 10 26 20 5 26 12 8 20
A last example for an unstructured non-homogeneous mesh:
# unstructured mesh : 0 # number of nodes : 10 # nodes : 8.6602539E-02 0.0000000E+00 -0.6000000 -3.7855172E-09 0.3464102 -0.6000000 -8.6602539E-02 -3.0284138E-08 -0.6000000 1.0327250E-09 -0.3464102 -0.6000000 8.6602539E-02 0.0000000E+00 0.6000000 -3.7855172E-09 0.3464102 0.6000000 -8.6602539E-02 -3.0284138E-08 0.6000000 1.0327250E-09 -0.3464102 0.6000000 0.0000000E+00 0.0000000E+00 -1.200000 0.0000000E+00 0.0000000E+00 1.200000 # non homogeneous mesh : 0 # number of elements : 12 # elements : 4 0 1 5 4 4 1 2 6 5 4 2 3 7 6 4 3 0 4 7 3 0 1 8 3 4 5 9 3 1 2 8 3 5 6 9 3 2 3 8 3 6 7 9 3 3 0 8 3 7 4 9
The variable name of the next scalar value to read for an udsurf will be the name following the keyword set_scalar_name.
The name following the keyword get_scalar_asurf must be the name of a file containing the ascii representation of variable values known at the nodes of the current udsurf for the current solution od a 3d problem. Comment lines can be included in this file, and the first value must be the number of nodes of the udsurf concerned with.
Example of an extended description file describing udsurf surfaces and variable values knowns at their nodes:
set_pb_name surfaces set_sol_name selle set_surf_name col get_asurf ../sol/selle.asurf set_scalar_name x get_scalar_asurf ../sol/selle_x.ascal set_scalar_name sph get_scalar_asurf ../sol/selle_sph.ascal set_sol_name sphere set_surf_name umsphere get_asurf ../sol/sphere.asurf set_scalar_name x get_scalar_asurf ../sol/sphere_x.ascal set_sol_name ellipsoid set_surf_name umnhmgel get_asurf ../sol/ellipsoid.asurf set_scalar_name x get_scalar_asurf ../sol/ellipsoid_x.ascal set_scalar_name sph get_scalar_asurf ../sol/ellipsoid_sph.ascal
The variable name of the next field to read will be the name following the keyword set_field_name.
The name following the keyword get_afield must be the name of a file containing the ascii representation of variable values known at the nodes of the current problem. Comment lines can be included in this file, and the first value must be the number of nodes of the first block of the current problem. If the current problem has several nodes, number of nodes and values must follow for each block.
An example:
# # block 1 : # # unstructured block : # 6 nodes : 6 1.1 1.4 1.6 1.8 1.6 1.5
The name following the keyword get_bfield must be the name of a file containing the binary representation of variable values known at the nodes of the current problem. The first value must be the number of nodes of the first block of the current problem. If the current problem has several nodes, number of nodes and values must follow for each block.
The name following the keyword get_apoint must be the name of
a file containing sequences of couple values of and
.
Theses data are loaded as a new 1d problem solution.
The name following the keyword get_2dapts must be the name of a file containing a number of points followed by the ascii decimal representation of the 2d coordinates of this number of points. A new 2d problem solution is initialised with a Delaunay mesh contructed with the specified points.
An example:
20 0.51387 0.175741 0.308652 0.534534 0.947628 0.171736 0.702231 0.226431 0.494774 0.12472 0.0838988 0.389647 0.277226 0.368071 0.983437 0.535398 0.765682 0.646473 0.767139 0.780237 0.822952 0.151932 0.625477 0.314685 0.346901 0.917205 0.51976 0.401154 0.606759 0.785402 0.931523 0.869921 0.866525 0.674521 0.7584 0.581894 0.389248 0.355635 0.200232 0.826927
The keyword set_field_name can be used to define new default values for the name, the componant names and the step which will be set to a new vector field at the execution of get_2davect.
An example:
set_2dvect_name vitesse u v .01
The name following the keyword get_2davect must be the name of a file containing a number of vectors followed by the ascii decimal representation of the 2d componants of this number of vectors known at the node points of the current problem solution.
An example:
20 0.324259 0.0138702 -0.034534 -0.191348 0.328264 0.447628 0.273569 0.202231 0.37528 -0.0052264 0.110353 -0.416101 0.131929 -0.222774 -0.0353981 0.483437 -0.146473 0.265682 -0.280237 0.267139 0.348068 0.322952 0.185315 0.125477 -0.417205 -0.153099 0.0988457 0.0197601 -0.285402 0.106759 -0.369921 0.431523 -0.174521 0.366525 -0.0818936 0.2584 0.144365 -0.110752 -0.326927 -0.299768
The name following the keyword get_desc must be the name of a description file for a single problem solution description. This new problem solution will be loaded with the currents problem name and solution name.
An example:
set_pvm_mode on set_pb_name les_zozos set_sol_name bobo get_desc /u/elrond/0/vigie/data/desc/multi_3d/grosbobo.desc set_sol_name lolo get_desc /u/elrond/0/vigie/data/desc/multi_3d/dulolo.desc set_sol_name troto get_desc /u/elrond/0/vigie/data/desc/multi_3d/patroto.desc set_sol_name dodo get_desc /u/elrond/0/vigie/data/desc/multi_3d/faidodo.desc
The keyword set_pvm_mode can be used only when Vigie is running the PVM compiled code. It can be followed by on or off. When the pvm_mode is on, problem solutions defined in the desciptionn file are loaded under a new PVM task.
The keyword activate_m3d can be used only when one or more 3d solutions are loaded for the current problem. The context needed for working simultaneously on theses solutions is created as in interactive mode after the ``multi 3D plot'' Pushbutton activation. When this mode has been activated, all actions specifics to the ``multi 3D'' - string ``m3d'' included in the keyword definig the action - can be executed.
The keyword set_m3d_drawing_areas must be followed by the string ``on'' or ``off'' specifying to set on or off the ``Drawing areas'' toggle widget of the window ``3D multiple solutions''.
The keyword set_m3d_toggle must be followed by the name of a ``toggle'' of the window ``3D multiple solutions'' specifying what to draw and how to draw it. The recognized ``toggle'' names are: name, global_bb, local_bb, skeleton, user_fr, comp_fr, planes, isos, csurf, mesh, ivalue, ilines, painter.
The ``toggle'' name must be followed by the string ``on'' or ``off'' specifying to set on or off the named toggle widget.
The keyword set_m3d_rot must be followed by three decimal values specifying the rotation angles, in degrees, around the x, y and z axes to define the position of the objects to visualize. This angles can be found in interactive mode with the use of the ``rot'' pushbutton and their values obtained by the ``get'' pushbutton in the ``rot M3D'' window.
The keyword set_m3d_zoom must be followed by the name of a file defining a zoom boxe. A such file can be created with the ``save'' button of the ``zoom3D'' dialog widget in ``multi 3d'' mode., or directly with a text editor. An example of a file defining a zoom boxe follows:
$ more sm3d2b_m3d.zoom xmin -18.274099 xmax 18.274099 ymin -17.208799 ymax 19.339500 zmin -20.453300 zmax 16.094900
The keyword add_m3d_plane must be followed by a character string
defining the name of a new plane, and by for decimal value, a, b, c, d,
which will be used to define this plane by the
equation :
The keyword m3d_plane must be followed by a character string identifying a plane by its name. The plane name must be followed by an operator name. Two operators using planes are now available: compute_cut and set_equation.
The operator compute_cut allows to cut all the blocks of the volume meshes for all the solutions of the current problem by the defined plane. This operator name must by followed by one of these three character string: mesh (for the computation of the interpolated mesh defining intersection of the volume by the plane), cur_value (for computation of the interpolated plane mesh and values for the current variable at their nodes), all_values (for computation of the plane mesh and interpolation of all the variables knowns at the nodes of the volume meshes).
The operator set_equation allows to reset equation coefficients of a predefined plane. This operator name must by followed by the for decimal value, a, b, c, d, defining the plane equation.
If arguments following the keyword m3d_plane don't follow this defined syntax, this warning message is send to the user in a warning window:
m3d_plane p_name compute_cut mesh m3d_plane p_name compute_cut cur_value m3d_plane p_name compute_cut all_values m3d_plane p_name set_equation a b c d
The keyword comp_m3d_surf allows to define how to compute a new meshed surface (csurf, for computed surface) by execution of a specified operation on already known meshes.
This keyword must be followed by the name of the new csurf created. This
name will be used in other operations as an identifier for this csurf.
This name must be followed by the operator name which will be used to create
a new csurf. Available operator names are : pos_pcut for positive
plane cut, and neg_pcut for negative plane cut. A positive (or negative)
plane cut operation allows to retain only the points of the first operand
which are in the half space defined by the inequation (or
), where
are the coefficients defining the plane
used as the second operand.
The operator name (one the two operators now defined) must be followed by two operands. The first is the name of an already known meshed surface and the second must be the name of the plane which will be used for the cut operation.
The value of the first operand can be explicitly the character strings ``user_fr'' or ``comp_fr'' to define the already known meshed surface as the ``user frontier'' or the ``computed frontier''. It can also be the name of a mesh plane (p_name) obtained by a compute_cut operation, the name of an iso-surface (i_name) obtained by a m3d_isosurf operation, or the name (s_name) of a precomputed csurf.
If arguments following the keyword comp_m3d_surf don't follow this defined syntax, this warning message is send to the user in a warning window:
comp_m3d_surf s_name op_name olds_name p_name s_name : name of a new surface op_name : pos_pcut|neg_pcut olds_name : old surface name (user_fr|comp_fr| p_name|i_name|s_name) p_name : name of the plane used for the cut operation
The keyword del_m3d_surf must be followed by the name of a previously computed meshed surface (a csurf). This csurf will be deleted.
The keyword add_m3d_isosurf must be followed by a character string defining the name of a new iso-surface, and by a character string defining the name of a variable and a decimal value.
After execution, a new iso-surface is known and can be acceeded by its name. At this point, only a variable name and a floating point value is associated to the created iso-surface. This operation is similar to the definition of a new plane by add_m3d_plane, in which the created plane is defined by en equation.
If arguments following the keyword add_m3d_isosurf don't follow this defined syntax, this warning message is send to the user in a warning window:
add_m3d_isosurf iso_name u_name v
The keyword m3d_isosurf must be followed by a character string identifying an iso-surface by its name. The iso-surface name must be followed by an operator name. Two operators using iso-surface are now available: compute and set_value.
The operator compute allows to compute the meshed iso-surface defined by the variable name and the value associated to a previously defined iso-surface, for all the blocks of the volume meshes for all the solutions of the current problem. This operator name must by followed by one of these three character string: mesh (for the computation of the interpolated mesh defining the iso-surface), cur_value (for computation of the interpolated mesh and values for the current variable at their nodes), all_values (for computation of the mesh and interpolation of all the variables knowns at the nodes of the volume meshes).
The operator set_value allows to reset the value associated to a predefined iso-surface. This operator name must by followed by a decimal representaion of the new value to set to the named iso-surface.
If arguments following the keyword m3d_isosurf don't follow this defined syntax, this warning message is send to the user in a warning window:
m3d_isosurf iso_name compute mesh m3d_isosurf iso_name compute cur_value m3d_isosurf iso_name compute all_values m3d_isosurf iso_name set_value v
The keyword save_m3d_csurf must be followed by three character strings identifying a computed surface, a solution and a file in which the mesh of the defined surface will be wrote in ``asurf'' format. A such file can be read by get_asurf to load an udsurf.
If arguments following the keyword save_m3d_csurf can't be recognized as defined here, this message is send to the user in a warning window:
save_m3d_csurf cs_name solname filename cs_name: name of a csurf to save solname: only csurf of the named solution will be saved filename: name of a file to write the csurf in asurf format
The keyword set_m3d_light_ambient can be used to define the ambient
RGBA intensity for the entire scene when VIGIE has been compiled with
OPENGL compilation option set. The default value is
as defined by OpenGl specifications.
The following warning message, send if set_m3d_light_ambient has not been used rightly, indicates how it must be used:
set_m3d_light_ambient r g b a
The keyword set_m3d_light can be used to define light characteristics for visualisation in ``multi 3d'' mode when VIGIE has been compiled with OPENGL compilation option set.
Eight lights are predeclared and, by default, only the first one is enabled.
set_m3d_light can be used to enable or disable one of theses eight lights, or for modification of their light source parameters as defined by OpenGl specifications.
The following warning message, send if set_m3d_light has not been used rightly, indicates how it can be used:
set_m3d_light light_nb enable set_m3d_light light_nb disable set_m3d_light light_nb ambient r g b a set_m3d_light light_nb diffuse r g b a set_m3d_light light_nb specular r g b a set_m3d_light light_nb position x y z w
set_udsurf_color allows to define a color for a ``user defined surface''. This color is set to all ``udsurf'' of the specified name of all known problems, and defined the ambient and diffuse reflectance of the material. This color is used for the surface representation when the user doesn't need to show a known value on this surface. The default color for all ``udsurf'' is green.
The keyword set_udsurf_color must be followed by an ``udsurf'' name and by 3 normalized (in the rangge [0,1]) color RGB componant values.
set_udsurf_color uds_name r g b
set_udsurf_specular allows to define the specular material reflectance
for a ``user defined surface''. This material parameter is set to all
``udsurf'' of the specified name of all known problems. The default value
for a new ``udsurf'' is .
The keyword set_udsurf_specular must be followed by an ``udsurf'' name and by 3 normalized (in the rangge [0,1]) coefficients for each RGB color componant.
set_udsurf_specular uds_name r g b
set_udsurf_shininess allows to define the shininess exponent for
the computation of the specular material reflectance of a ``user defined
surface''. This material parameter is set to all ``udsurf'' of the
specified name of all known problems. The default value for a
new ``udsurf'' is .
The keyword set_udsurf_shininess must be followed by an ``udsurf'' name and by a floating point value which will be used as a shininess exponent.
set_udsurf_shininess uds_name shininess
set_udsurf_shade allows to define the shading mode representation for a ``user defined surface''. The default value is flat and it can be set to flat or smooth. This shading mode is set to all ``udsurf'' of the specified name of all known problems.
The keyword set_udsurf_shade must be followed by an ``udsurf'' name and by the string ``flat'' or the string ``smooth''.
set_udsurf_shade uds_name flat|smooth
bmesh: general format description.
c================================================================= c UPDATED VERSION 27/01/95 15h20 ( Herve STEVE ) : c WITH INTERIOR AND BOUNDARY PATCHES ( STRUCTURED CASE ) c c c The "WRITE" instructions listed below are requested in order c to be able to read the file.mesh by our graphic tools. c c ----------------------------------- c c A MESH COULD BE SUBDIVIDED IN BLOCKS, AND FOR EACH BLOCK c "WRITE" INSTRUCTIONS 1) AND 2) ARE ALWAYS REQUIRED. c THEN THE FOLLOWING "WRITE" INSTRUCTIONS ARE REQUESTED C DEPENDING ON THE MESH TYPES: c c 1st CASE: STRUCTURED BLOCK WITH INTERIOR AND BOUNDARY PATCHES : c INSTRUCTIONS 3a) 3b) 3c) 3d) 3e) c c 2nd CASE: UNSTRUCTURED BLOCK WITH HOMOGENEOUS ELEMENTS AND c HOMOGENEOUS BOUNDARY ELEMENTS : c INSTRUCTIONS 4a) 4b) 4c) 4d1) 4d2) 4f1) 4f2) c c 3rd CASE: UNSTRUCTURED BLOCK WITH HOMOGENEOUS ELEMENTS AND c NON HOMEGENEOUS BOUNDARY ELEMENTS : c INSTRUCTIONS 4a) 4b) 4c) 4d1) 4d2) 4g1) 4g2) c c 4th CASE: UNSTRUCTURED BLOCK WITH NON HOMOGENEOUS ELEMENTS AND c NON HOMOGENEOUS BOUNDARY ELEMENTS : c INSTRUCTIONS 4a) 4b) 4c) 4e1) 4e2) 4g1) 4g2) c c 5th CASE: UNSTRUCTURED BLOCK WITH NON HOMOGENEOUS ELEMENTS AND c HOMOGENEOUS BOUNDARY ELEMENTS : c INSTRUCTIONS 4a) 4b) 4c) 4e1) 4e2) 4f1) 4f2) c c REMARKS: c c a) DEFINITION OF ELEMENT TYPES ( 7 POSSIBILITIES HERE ) c c itypX=1 ==> HE8 8-noded 3D hex-cube element c itypX=2 ==> P6 6-noded 3D prismatic element c itypX=3 ==> P5 5-noded 3D pyramidal element c itypX=4 ==> TE4 4-noded 3D tetrahedral element c itypX=5 ==> Q4 4-noded 2D quadrangular element c itypX=6 ==> T3 3-noded 2D triangular element c itypX=7 ==> S2 2-noded 1D edge element c c b) LOGIC OF INTERIOR : LOGVOL=0 FOR VACUUM DOMAIN, c ELEMENTS OR PATCHES : LOGVOL>0 FOR OTHER DOMAINS OF MATERIALS c c c) LOGIC OF BOUNDARY : LOGFAC=1 FOR ARTIFICIAL BOUNDARY, c ELEMENTS OR PATCHES : LOGFAC=2 FOR OBSTACLE (PERFECTLY CONDUCTING) c LOGFAC>10 FOR OTHER BOUNDARIES c c======================================================================= c PROGRAM MAIN c c======================================================================= c parameters: c------------ c ndimax : space dimension (2 ou 3) c idimax,jdimax[,kdimax] : max number of indices in X1,X2[,X3] directions c for structured meshes c npatchmax : max number of patches (structured meshes) c nsmax : max number of nodes for unstructured meshes c neltmax : max number of elements for unstructured meshes c nfacmax : max number of boundary elements for c unstructured meshes c c arrays: c-------- c c FOR STRUCTURED MESHES: c c coor1 : X1,X2[,X3] coordinates c ibegi,...kendi : extreme indices of interior patches c ibegf,...kendf : extreme indices of boundary patches c c FOR UNSTRUCTURED MESHES: c c coor2 : X1,X2[,X3] coordinates c nnperel : number of nodes per element or boundary element c nuvol : connectivity for element c logvol : logic type of the elements c nuvoltyp : type of elements (non homogeneous) c nuvolp : connectivity pointer for element (non homogeneous) c nufac : connectivity for boundary element c logfac : logic type of the boundary elements c nufacltyp : type of boundary elements (non homogeneous) c nufacp : connectivity pointer for boundary element (non homogeneous) c============================================================================= c c GIVE HERE PARAMETERS : parameter (ndimax=.....) c real*4 coor1(ndimax,idimax,jdimax,kdimax),coor2(ndimax,nsmax) integer nnperel(7),iunit integer nuvoltyp(neltmax),nuvol(8*neltmax),logvol(neltmax) integer nufactyp(nfacmax),nufac(4*nfacmax),logfac(nfacmax) integer nuvolp(neltmax),nufacp(nfacmax) integer ibegi(npatchmax),iendi(npatchmax), & jbegi(npatchmax),jendi(npatchmax), & kbegi(npatchmax),kendi(npatchmax) integer ibegf(npatchmax),iendf(npatchmax), & jbegf(npatchmax),jendf(npatchmax), & kbegf(npatchmax),kendf(npatchmax) c c iunit is given arbitrary by the contributer open(iunit,file='file.mesh',form='unformatted') c c 1) Dimension (2 or 3) and number of blocks : c ============================================ WRITE(iunit) ndim,nblock c do ib=1,nblock c c GIVE HERE THE DEFINITION OF YOUR BLOCKS call lmesh(......) c c WRITING OF YOUR MESH IN EEDB FORMAT call wmesh(ndimax,idimax,jdimax,kdimax,nsmax,neltmax, & nfacmax,npatchmax,iunit, & ndim,nblock,idim,jdim,kdim,istruc,npatchi,npatchf, & ns,nfac,nelt,ihmgel,ihmgfac,itypel,itypfac, & coor1,coor2,nnperel,nuvoltyp,nuvol,logvol, & nuvolp,nufacp,nufactyp,nufac,logfac, & ibegi,iendi,jbegi,jendi,kbegi,kendi, & ibegf,iendf,jbegf,jendf,kbegf,kendf) c enddo c stop end c================================================================= subroutine wmesh(ndimax,idimax,jdimax,kdimax,nsmax,neltmax, & nfacmax,npatchmax,iunit, & ndim,nblock,idim,jdim,kdim,istruc,npatchi,npatchf, & ns,nfac,nelt,ihmgel,ihmgfac,itypel,itypfac, & coor1,coor2,nnperel,nuvoltyp,nuvol,logvol, & nuvolp,nufacp,nufactyp,nufac,logfac, & ibegi,iendi,jbegi,jendi,kbegi,kendi, & ibegf,iendf,jbegf,jendf,kbegf,kendf) c real*4 coor1(ndimax,idimax,jdimax,kdimax),coor2(ndimax,nsmax) integer nnperel(7),iunit integer nuvoltyp(neltmax),nuvol(8*neltmax),logvol(neltmax) integer nufactyp(nfacmax),nufac(4*nfacmax),logfac(nfacmax) integer nuvolp(neltmax),nufacp(nfacmax) integer ibegi(npatchmax),iendi(npatchmax), & jbegi(npatchmax),jendi(npatchmax), & kbegi(npatchmax),kendi(npatchmax) integer ibegf(npatchmax),iendf(npatchmax), & jbegf(npatchmax),jendf(npatchmax), & kbegf(npatchmax),kendf(npatchmax) c======================================================================= c c Definition of element or boundary element types : itypel,itypfac c The type (from 1 to 7) give implicitely the number of nodes per element c itypX=1 ==> HE8 8-noded 3D hex-cube element nnperel(1)=8 c itypX=2 ==> P6 6-noded 3D prismatic element nnperel(2)=6 c itypX=3 ==> P5 5-noded 3D pyramidal element nnperel(3)=5 c itypX=4 ==> TE4 4-noded 3D tetrahedral element nnperel(4)=4 c itypX=5 ==> Q4 4-noded 2D quadrangular element nnperel(5)=4 c itypX=6 ==> T3 3-noded 2D triangular element nnperel(6)=3 c itypX=7 ==> S2 2-noded 1D edge element nnperel(7)=2 c c 2) Type of each block : c ======================== c istruc=1 Structured Block c istruc=0 Unstructured Block WRITE(iunit) istruc c c=====Case of structured block : if(istruc.eq.1) then c c 3a) Number of interior patches, number of boundary patches : WRITE(iunit) npatchi,npatchf c c 3b) Number of points in X1,X2[,X3] directions : (In 2D, kdim=1) WRITE(iunit) idim,jdim,kdim if(ndim.eq.2) kdim=1 c Number of nodes ns=idim*jdim*kdim c c 3c) Coordinates : WRITE(iunit)((((coor1(l,i,j,k),l=1,ndim) & ,i=1,idim),j=1,jdim),k=1,kdim) c c 3d) for each interior patch, indices min et max in each direction : c ( In 2D, kbegi=kendi=1 ) do ip=1,npatchi WRITE(iunit)ibegi(ip),iendi(ip),jbegi(ip),jendi(ip) & ,kbegi(ip),kendi(ip),logvol(ip) enddo c c 3e) for each boundary patch, indices min et max in each direction : c ( In 2D, kbegf=kendf=1 ) do ip=1,npatchf WRITE(iunit)ibegf(ip),iendf(ip),jbegf(ip),jendf(ip) & ,kbegf(ip),kendf(ip),logfac(ip) enddo c c=====end of istruc=1 endif c c=====Case of unstructured block : if(istruc.eq.0) then c c 4a) Numbers of nodes, elements, boundary elements : WRITE(iunit) ns,nelt,nfac c c 4b) Homegeneous element type, homegeneous boundary element type : c ihmgX=1 Homegeneous c ihmgX=0 Non-Homegeneous WRITE(iunit) ihmgel,ihmgfac c c 4c) Coordinates: WRITE(iunit) ((coor2(l,i),l=1,ndim),i=1,ns) c c-----Case of homogeneous element type : if(ihmgel.eq.1) then c c 4d1) Type of elements : (see the definitions above) WRITE(iunit) itypel c c 4d2) For each element, nodal connectivity and logic of element : iptr=0 do iel=1,nelt WRITE(iunit)(nuvol(iptr+i),i=1,nnperel(itypel)),logvol(iel) iptr=iptr+nnperel(itypel) enddo c c-----end of ihmgel=1 endif c c-----Case of non-homogeneous element type : if(ihmgel.eq.0) then c iptr=0 do iel=1,nelt nuvolp(iel)=iptr+1 itypel=nuvoltyp(iel) c 4e1) Type of elements : WRITE(iunit) itypel c 4e2) nodal connectivity and logic of element : WRITE(iunit)(nuvol(iptr+i),i=1,nnperel(itypel)),logvol(iel) iptr=iptr+nnperel(itypel) enddo c c-----end of ihmgel=0 endif c c-----Case of homogeneous boundary element type : if(ihmgfac.eq.1) then c c 4f1) Type of elements : (see the definitions above) WRITE(iunit) itypfac c c 4f2) For each element, nodal connectivity and logic of element : iptr=0 do ifac=1,nfac WRITE(iunit)(nufac(iptr+i),i=1,nnperel(itypfac)),logfac(ifac) iptr=iptr+nnperel(itypfac) enddo c c-----end of ihmgfac=1 endif c c-----Case of non-homogeneous boundary element type : if(ihmgfac.eq.0) then c iptr=0 do ifac=1,nfac nufacp(ifac)=iptr+1 itypfac=nufactyp(ifac) c 4g1) Type of elements : WRITE(iunit) itypfac c 4g2) nodal connectivity and logic of element : WRITE(iunit)(nufac(iptr+i),i=1,nnperel(itypfac)),logfac(ifac) iptr=iptr+nnperel(itypfac) enddo c c-----end of ihmgfac=0 endif c c=====end of istruc=0 endif c return end