]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add contributed Cubit->UCD mesh conversion utility.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 16 Apr 2009 14:58:17 +0000 (14:58 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 16 Apr 2009 14:58:17 +0000 (14:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@18629 0785d39b-7218-0410-832d-ea1e28bc413d

20 files changed:
deal.II/contrib/mesh_conversion/Main.cc [new file with mode: 0755]
deal.II/contrib/mesh_conversion/Makefile [new file with mode: 0755]
deal.II/contrib/mesh_conversion/MeshConversion.cc [new file with mode: 0755]
deal.II/contrib/mesh_conversion/MeshConversion.h [new file with mode: 0755]
deal.II/contrib/mesh_conversion/README.txt [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/2d/2d_test.cub [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/2d/2d_test.inp [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/2d/2d_test.ucd [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/2d/quad.cub [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/2d/quad.inp [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/2d/quad.ucd [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/3d/test_cube_1.cub [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/3d/test_cube_1.inp [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/3d/test_cube_1.ucd [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/3d/test_cube_pave_1.cub [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/3d/test_cube_pave_1.inp [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/3d/test_cube_pave_1.ucd [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/3d/test_cube_two_materials.cub [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/3d/test_cube_two_materials.inp [new file with mode: 0755]
deal.II/contrib/mesh_conversion/mesh/3d/test_cube_two_materials.ucd [new file with mode: 0755]

diff --git a/deal.II/contrib/mesh_conversion/Main.cc b/deal.II/contrib/mesh_conversion/Main.cc
new file mode 100755 (executable)
index 0000000..2cc001e
--- /dev/null
@@ -0,0 +1,50 @@
+#include "MeshConversion.h"
+#include <iostream>
+
+using namespace std;
+
+//--------------------------------------------------------------------------------
+
+int main (int argc, char* argv[]) {
+
+    if (argc == 4)
+    {
+       try
+       {
+               const unsigned int dimension = *argv[1] - '0';
+               std::cout << "Dimension: " << dimension << std::endl;
+               std::string input_file = argv[2];
+               std::string output_file = argv[3];
+               
+               MeshConversion mesh (dimension);
+
+               const bool readin_successul = mesh.read_in_abaqus_inp(input_file);
+
+               if (readin_successul == true)
+                       mesh.write_out_avs_ucd(output_file);
+               else
+                       std::cerr << "ERROR: Input file not found." << std::endl;
+       }
+
+       catch (...)
+       {
+           std::cerr << std::endl
+                     << "==============" << std::endl;
+           std::cerr << "UNKNOWN ERROR!" << std::endl
+                     << "==============" << std::endl;
+
+           return 1;
+       }
+    }
+    else {
+       std::cerr   << "WRONG NUMBER OF INPUT ARGUMENTS:" << std::endl
+                   << "The first input argument is the spatial dimension of the input file, the second is the path to the read-in Abaqus .inp file, and the third is the name of the file to which you wish to write the output AVS .ucd file to." << std::endl << std::endl
+                   << "Correct program usage is: " << std::endl
+                   << "      './convert_mesh <spatial_dimension> /path/to/input_file.inp /path/to/output_file.ucd'" << std::endl
+                   << "e.g.  './convert_mesh 3 mesh/3d/test_in.inp mesh/3d/test_out.ucd'" << std::endl;
+    }
+       
+       return 0;
+}
+
+//--------------------------------------------------------------------------------
diff --git a/deal.II/contrib/mesh_conversion/Makefile b/deal.II/contrib/mesh_conversion/Makefile
new file mode 100755 (executable)
index 0000000..a61d039
--- /dev/null
@@ -0,0 +1,29 @@
+SHELL = /bin/sh
+
+#MACROS
+CPP = g++ -g -ansi -pedantic -Wall
+PROG = convert_mesh
+
+#SUFFIX RULES
+.SUFFIXES: .o .cpp
+.cpp.o:
+       $(CPP) -c $<
+
+all: $(PROG)
+
+$(PROG): Main.o MeshConversion.o
+       $(CPP)  -o      $(PROG) Main.o MeshConversion.o
+Main.o:        Main.cc         MeshConversion.o
+MeshConversion.o:      MeshConversion.cc
+
+clean:
+       @echo "-------------------------------------------------"
+       @echo "REMOVING EXECUTABLES, *.o, a.out AND FILE BACKUPS"
+       -rm -f  ${PROG} *.o *.*~ makefile~ *~
+       @echo "-------------------------------------------------"
+
+clean-temp:
+       @echo "-------------------------------------------------"
+       @echo "REMOVING EXECUTABLES, *.o, a.out AND FILE BACKUPS"
+       -rm -f  *.o *.*~ makefile~ *~
+       @echo "-------------------------------------------------"
diff --git a/deal.II/contrib/mesh_conversion/MeshConversion.cc b/deal.II/contrib/mesh_conversion/MeshConversion.cc
new file mode 100755 (executable)
index 0000000..eb7d2f2
--- /dev/null
@@ -0,0 +1,440 @@
+#include "MeshConversion.h"
+
+//--------------------------------------------------------------------------------
+
+MeshConversion::MeshConversion (const unsigned int dimension):
+dimension (dimension),
+tolerance (5e-16) // Used to offset Cubit tolerance error when outputting value close to zero
+{
+       greeting ();
+       
+       if (dimension == 2)
+       {
+               node_per_face = 2;              // Line edge
+               node_per_cell = 4;              // Quad face
+               face_per_cell = 2*dimension;    // Lines per quad
+       }
+       else if (dimension == 3)
+       {
+               node_per_face = 4;              // Quad face
+               node_per_cell = 8;              // Hex cell
+               face_per_cell = 2*dimension;    // Quads per hex
+       }
+       else
+       {
+               std::cout << "ERROR: Chosen spatial dimension is invalid!" << std::endl;
+       }
+}
+
+//--------------------------------------------------------------------------------
+
+MeshConversion::~MeshConversion ()
+{
+
+}
+
+//--------------------------------------------------------------------------------
+
+// ========================================================
+// http://www.codeguru.com/forum/showthread.php?t=231054
+// ========================================================
+template <class T> bool from_string(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&))
+{
+       std::istringstream iss(s);
+       return !(iss >> f >> t).fail();
+}
+
+//--------------------------------------------------------------------------------
+
+void MeshConversion::greeting () {
+       std::cout << std::endl; std::cout << std::endl; std::cout << std::endl;
+       std::cout << "************************************************************************************" << std::endl;
+       std::cout << "***                         FEM Mesh conversion tool                             ***" << std::endl;
+       std::cout << "************************************************************************************" << std::endl;
+       std::cout << "*** Author: Jean-Paul Pelteret                                                   ***" << std::endl;
+       std::cout << "*** Date:   December 2008                                                        ***" << std::endl;
+       std::cout << "*** References:                                                                  ***" << std::endl;
+       std::cout << "***    http://www.dealii.org/developer/doxygen/deal.II/structGeometryInfo.html   ***" << std::endl;
+       std::cout << "***    http://people.scs.fsu.edu/~burkardt/html/ucd_format.html                  ***" << std::endl;
+       std::cout << "***    http://people.scs.fsu.edu/~burkardt/data/ucd/ucd.html                     ***" << std::endl;
+       std::cout << "***    http://www.cprogramming.com/tutorial/string.html                          ***" << std::endl;
+       std::cout << "***    http://www.codeguru.com/forum/showthread.php?t=231054                     ***" << std::endl;
+       std::cout << "************************************************************************************" << std::endl;
+       std::cout << "*** FEATURES:                                                                    ***" << std::endl;
+       std::cout << "*** Read-in file types:                                                          ***" << std::endl;
+       std::cout << "***      - Abaqus inp                                                            ***" << std::endl;
+       std::cout << "*** Write-out file types:                                                        ***" << std::endl;
+       std::cout << "***      - AVS UCD                                                               ***" << std::endl;
+       std::cout << "************************************************************************************" << std::endl;
+       std::cout << std::endl;
+}
+
+//--------------------------------------------------------------------------------
+
+bool MeshConversion::read_in_abaqus_inp (const std::string filename) 
+{
+       input_file_name = filename;
+       bool read_in_successful = true;
+       std::cout << "Reading in ABAQUS .inp FILE: " << input_file_name << std::endl;
+       
+       std::ifstream input_stream;
+       
+       input_stream.open(filename.c_str(), std::ifstream::in);
+       
+       // Check to see if file exists
+       if (input_stream.good() == true)
+       {
+               std::string buffer;
+               std::vector < std::string > temp_data;
+               
+               // Loop over all the contents of the fibre data file and read it into buffer
+               while (input_stream >> buffer)
+               {
+                       for(int i = 0; i < buffer.length(); ++i)
+                               if (buffer[i] == ',')   // Get rid of the .inp file's useless comma's
+                               {
+                                       buffer.erase(i);
+                                       --i;
+                               }
+                               
+                       temp_data.push_back(buffer);
+               }
+               
+               const bool print_input_deck = false;
+               if (print_input_deck == true)
+               {
+                       // =========== TEMP ===========
+                       std::string filename_out ("checks/input_stream.txt");
+                       std::ofstream output;
+                       output.open(filename_out.c_str());
+                       
+                       for (int ii = 0; ii < temp_data.size(); ii++ )
+                               output << temp_data[ii] << std::endl;
+                       
+                       output.close();
+                       // =========== TEMP ===========
+               }
+               
+               for (int k = 0; k < temp_data.size(); ++k)
+               {
+                       // ================================ NODES ===================================
+                       // ABAQUS formatting
+                       //      *NODE
+                       //      <global node number>, <x coordinate>, <y coordinate>, <z coordinate>
+                       // ==========================================================================
+
+                       if (temp_data[k] == "*NODE")
+                       {
+                               int j = 0;
+                               float temp_float;
+                               
+                               while (from_string<float> (temp_float, temp_data[k + 1 + j*(dimension+1+(dimension==2 ? 1 : 0))], std::dec) == true)
+                               {
+                                       // Initilise storage variables
+                                       std::vector <double> node (dimension+1);
+                                       
+                                       // Convert from string to the variable types
+                                       for (int i = 0; i < dimension+1; ++i)
+                                               from_string<double> (node[i], temp_data[k + 1 + j*(dimension+1+(dimension==2 ? 1 : 0)) + i], std::dec);
+                                               
+                                       // Add to the global node number vector
+                                       node_list.push_back(node);
+                                       
+                                       ++j;
+                               }
+                       }
+                       
+                       // ===================== 2D QUADS / 3D HEX CELLS =======================
+                       // ABAQUS formatting
+                       //      *ELEMENT, TYPE=C3D8R, ELSET=EB< block-set number (material-id) >
+                       //      <cell number>, <8 x node number>
+                       // =====================================================================
+
+                       else if (temp_data[k] == "*ELEMENT")
+                       {
+                               int j = 0;
+                               float temp_float;
+                               const int data_per_cell = node_per_cell + 1;
+                               
+                               // Get material id
+                               std::string material_id_line = temp_data[k+ 2];
+                               std::string material_id_temp;
+                               for (int ll = 8 /*Characters in "ELSET=EB" */; ll < material_id_line.length(); ++ll)
+                                       material_id_temp += material_id_line[ll];
+                               
+                               int material_id = 0;
+                               for (int ll = 0; ll < material_id_temp.length(); ++ll)
+                                       material_id += (material_id_temp[material_id_temp.length() - ll - 1] - 48 /* ASCII TRICKS */) * pow(10.0,ll);
+                               
+                               while (from_string<float> (temp_float, temp_data[k + 3 + j*(data_per_cell)], std::dec) == true)
+                               {
+                                       // Initilise storage variables
+                                       std::vector <double> cell (data_per_cell);
+                                       
+                                       // Material id
+                                       cell[0] = material_id;
+                                       
+                                       // Convert from string to the variable types
+                                       for (int i = 1; i < data_per_cell; ++i)
+                                               from_string<double> (cell[i], temp_data[k + 3 + j*(data_per_cell) + i], std::dec);
+                                               
+                                       // Add to the global node number vector
+                                       cell_list.push_back(cell);
+                                       
+                                       ++j;
+                               }
+                       }
+                       
+                       // =========== 2D LINES / 3D BC_QUADS ===========
+                       // ABAQUS formatting
+                       //      SURFACE, NAME=SS<side-set number>
+                       //      <cell number>, <cell side number>
+                       // ==============================================
+                       
+                       else if (temp_data[k] == "*SURFACE" )
+                       {
+                               float temp_float;
+                               const int data_per_quad = node_per_face + 1;
+                               
+                               // Get sideset id
+                               std::string sideset_id_line = temp_data[k + 1];
+                               std::string sideset_id_temp;
+                               for (int m = 7 /*Characters in "NAME=SS" */; m < sideset_id_line.length(); ++m)
+                                       sideset_id_temp += sideset_id_line[m];
+                               
+                               int sideset_id = 0;
+                               for (int m = 0; m < sideset_id_temp.length(); ++m)
+                                       sideset_id += (sideset_id_temp[sideset_id_temp.length() - m - 1] - 48 /* ASCII TRICKS */) * pow(10.0,m);
+                               
+                               const int data_per_face = 2;
+                               int j = 0;
+                               while (( (k + 2) + j * data_per_face ) < temp_data.size() && from_string<float> (temp_float, temp_data[(k + 2) + j * data_per_face], std::dec) == true)
+                               {
+                                       // Get cell to which the face belongs
+                                       std::string face_cell_no_line = temp_data[(k + 2) + j * data_per_face];
+                                       int face_cell_no = 0;
+                                       for (int m = 0; m < face_cell_no_line.length(); ++m)
+                                               face_cell_no += (face_cell_no_line[face_cell_no_line.length() - m - 1] - 48 /* ASCII TRICKS */) * pow(10.0,m);
+                                       
+                                       // Get ABAQUS cell face number
+                                       std::string face_cell_face_no_line = temp_data[(k + 2) + j * data_per_face + 1];
+                                       std::string face_cell_face_no_temp;
+                                       for (int m = 1 /*Characters in "S" */; m < face_cell_face_no_line.length(); ++m)
+                                               face_cell_face_no_temp += face_cell_face_no_line[m];
+                                       
+                                       int face_cell_face_no = 0;
+                                       for (int m = 0; m < face_cell_face_no_temp.length(); ++m)
+                                               face_cell_face_no += (face_cell_face_no_temp[face_cell_face_no_temp.length() - m - 1] - 48 /* ASCII TRICKS */) * pow(10.0,m);
+                                       
+                                       // Initilise storage variables
+                                       std::vector <double> quad (data_per_quad);
+                                       std::vector <double> quad_node_list (node_per_face);
+                                       
+                                       quad_node_list = get_global_node_numbers(face_cell_no, face_cell_face_no);
+                                       
+                                       // Sideset id
+                                       quad[0] = sideset_id;
+                                       
+                                       // Global node numbers
+                                       for (int m = 0; m < node_per_face; ++m)
+                                               quad[m + 1] = quad_node_list[m];
+                                       
+                                       // Add to the global quad vector
+                                       face_list.push_back(quad);
+                                       
+                                       ++j;
+                               }
+                       }
+               }
+       }
+       else
+       {
+               return false;
+       }
+               
+       return read_in_successful;
+}
+
+//--------------------------------------------------------------------------------
+
+std::vector <double> MeshConversion::get_global_node_numbers (const int face_cell_no, const int face_cell_face_no) 
+{
+       std::vector <double> quad_node_list (node_per_face);
+       
+       if (dimension == 2)
+       {
+               if (face_cell_face_no == 1)
+               {
+                       quad_node_list[0] = cell_list[face_cell_no - 1][1];
+                       quad_node_list[1] = cell_list[face_cell_no - 1][2];
+               }
+               else if (face_cell_face_no == 2)
+               {
+                       quad_node_list[0] = cell_list[face_cell_no - 1][2];
+                       quad_node_list[1] = cell_list[face_cell_no - 1][3];
+               }
+               else if (face_cell_face_no == 3)
+               {
+                       quad_node_list[0] = cell_list[face_cell_no - 1][3];
+                       quad_node_list[1] = cell_list[face_cell_no - 1][4];
+               }
+               else if (face_cell_face_no == 4)
+               {
+                       quad_node_list[0] = cell_list[face_cell_no - 1][4];
+                       quad_node_list[1] = cell_list[face_cell_no - 1][1];
+               }
+               else
+               {
+                       std::cerr << "ERROR! Invalid face number inputted!" << std::endl;
+                       std::cerr << "face_cell_face_no = " << face_cell_face_no << std::endl;
+               }
+       }
+       else // (dimension == 3)
+       {
+               if (face_cell_face_no == 1)
+               {
+                       quad_node_list[0] = cell_list[face_cell_no - 1][1];
+                       quad_node_list[1] = cell_list[face_cell_no - 1][4];
+                       quad_node_list[2] = cell_list[face_cell_no - 1][3];
+                       quad_node_list[3] = cell_list[face_cell_no - 1][2];
+               }
+               else if (face_cell_face_no == 2)
+               {
+                       quad_node_list[0] = cell_list[face_cell_no - 1][5];
+                       quad_node_list[1] = cell_list[face_cell_no - 1][8];
+                       quad_node_list[2] = cell_list[face_cell_no - 1][7];
+                       quad_node_list[3] = cell_list[face_cell_no - 1][6];
+               }
+               else if (face_cell_face_no == 3)
+               {
+                       quad_node_list[0] = cell_list[face_cell_no - 1][1];
+                       quad_node_list[1] = cell_list[face_cell_no - 1][2];
+                       quad_node_list[2] = cell_list[face_cell_no - 1][6];
+                       quad_node_list[3] = cell_list[face_cell_no - 1][5];
+               }
+               else if (face_cell_face_no == 4)
+               {
+                       quad_node_list[0] = cell_list[face_cell_no - 1][2];
+                       quad_node_list[1] = cell_list[face_cell_no - 1][3];
+                       quad_node_list[2] = cell_list[face_cell_no - 1][7];
+                       quad_node_list[3] = cell_list[face_cell_no - 1][6];
+               }
+               else if (face_cell_face_no == 5)
+               {
+                       quad_node_list[0] = cell_list[face_cell_no - 1][3];
+                       quad_node_list[1] = cell_list[face_cell_no - 1][4];
+                       quad_node_list[2] = cell_list[face_cell_no - 1][8];
+                       quad_node_list[3] = cell_list[face_cell_no - 1][7];
+               }
+               else if (face_cell_face_no == 6)
+               {
+                       quad_node_list[0] = cell_list[face_cell_no - 1][1];
+                       quad_node_list[1] = cell_list[face_cell_no - 1][5];
+                       quad_node_list[2] = cell_list[face_cell_no - 1][8];
+                       quad_node_list[3] = cell_list[face_cell_no - 1][4];
+               }
+               else
+               {
+                       std::cerr << "ERROR! Invalid face number inputted!" << std::endl;
+                       std::cerr << "face_cell_face_no = " << face_cell_face_no << std::endl;
+               }
+       }
+       
+       return quad_node_list;
+}
+
+//--------------------------------------------------------------------------------
+
+bool MeshConversion::write_out_avs_ucd (const std::string filename) 
+{
+       output_file_name = filename;
+       bool write_out_successful = true;
+       std::cout << "Writing out AVS .ucd FILE:   " << output_file_name << std::endl;
+       
+       std::ofstream output;
+       output.open(filename.c_str());
+       
+       // Write out title - Note: No other commented text can be inserted below the title in a UCD file
+       output << "# FEM Mesh Converter" << std::endl;
+       output << "# Mesh type: AVS UCD" << std::endl;
+       output << "# Input file name: " << input_file_name << std::endl;
+       
+       // ========================================================
+       // http://people.scs.fsu.edu/~burkardt/html/ucd_format.html
+       // ========================================================
+       // ASCII UCD File Format
+       // The input file cannot contain blank lines or lines with leading blanks. Comments, if present, must precede all data in the file. Comments within the data will cause read errors. The general order of the data is as follows:
+       // 1. Numbers defining the overall structure, including the number of nodes, the number of cells, and the length of the vector of data associated with the nodes, cells, and the model.
+       //     e.g. 1:
+       //        <num_nodes> <num_cells> <num_ndata> <num_cdata> <num_mdata> 
+       //     e.g. 2:
+       //        n_elements = n_hex_cells + n_bc_quads + n_quad_cells + n_bc_edges
+       //        outfile.write(str(n_nodes) + " " + str(n_elements) + " 0 0 0\n")
+       // 2. For each node, its node id and the coordinates of that node in space. Node-ids must be integers, but any number including non sequential numbers can be used. Mid-edge nodes are treated like any other node.
+       // 3. For each cell: its cell-id, material, cell type (hexahedral, pyramid, etc.), and the list of node-ids that correspond to each of the cell's vertices. The below table specifies the different cell types and the keyword used to represent them in the file.
+       
+       // Write out header
+       output << node_list.size() << "\t" << (cell_list.size() + face_list.size()) << "\t0\t0\t0" << std::endl;
+       
+       // Write out node numbers
+       for (int ii = 0; ii < node_list.size(); ++ii) // Loop over all nodes
+       {
+               for (int jj = 0; jj < dimension + 1; ++jj) // Loop over entries to be outputted
+               {
+                       if (jj == 0)    // Node number
+                       {
+                               output.precision();
+                               output << node_list[ii][jj] << "\t";
+                       }
+                       else            // Node coordinates
+                       {
+                               output.width(16);
+                               output.setf(ios::scientific, ios::floatfield);
+                               output.precision(8);
+                               if (abs(node_list[ii][jj]) > tolerance) // invoke tolerance -> set points close to zero equal to zero
+                                       output << static_cast<double> (node_list[ii][jj]) << "\t";
+                               else
+                                       output << 0.0 << "\t";
+                       }
+               }
+               if (dimension == 2)
+                       output << 0.0 << "\t";
+               
+               output << std::endl;
+               output.unsetf(ios::floatfield);
+       }
+       
+       // Write out cell node numbers
+       for (int ii = 0; ii < cell_list.size(); ++ii)
+       {
+               output << ii + 1 << "\t" << cell_list[ii][0] << "\t" << (dimension==2 ? "quad" : "hex") << "\t";
+               for (int jj = 1; jj < node_per_cell + 1; ++jj)
+                       output << cell_list[ii][jj] << "\t";
+               
+               output << std::endl;
+       }
+       
+       // Write out quad node numbers
+       for (int ii = 0; ii < face_list.size(); ++ii)
+       {
+               output << ii + 1 << "\t" << face_list[ii][0] << "\t" << (dimension==2 ? "line" : "quad") << "\t";
+               for (int jj = 1; jj < node_per_face + 1; ++jj)
+                       output << face_list[ii][jj] << "\t";
+               
+               output << std::endl;
+       }
+       
+       output.close();
+       
+       if (write_out_successful == true)
+       {
+               std::cout << "Output successful!" << std::endl;
+               std::cout << "   Number of nodes: " << node_list.size() << std::endl;
+               std::cout << "   Number of cells: " << cell_list.size() << std::endl;
+               std::cout << "   Number of boundary faces: " << face_list.size() << std::endl << std::endl;
+       }
+       
+       return write_out_successful;
+}
+
+//--------------------------------------------------------------------------------
diff --git a/deal.II/contrib/mesh_conversion/MeshConversion.h b/deal.II/contrib/mesh_conversion/MeshConversion.h
new file mode 100755 (executable)
index 0000000..c44a384
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef MESH_CONVERSION_H
+#define MESH_CONVERSION_H
+
+//--------------------------------------------------------------------------------
+
+#include <string>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+#include <iomanip>
+#include <cmath>
+#include <vector>
+
+using namespace std;
+
+class MeshConversion
+{
+       public:
+               MeshConversion (const unsigned int dimension);
+               ~MeshConversion ();
+               bool read_in_abaqus_inp (const std::string file_name);
+               bool write_out_avs_ucd (const std::string file_name);
+
+       private:
+               void greeting ();
+               std::vector <double> get_global_node_numbers(const int face_cell_no, const int face_cell_face_no);
+               
+               const double                            tolerance;
+               const unsigned int                      dimension;
+               
+               unsigned int                            node_per_face;
+               unsigned int                            node_per_cell;
+               unsigned int                            face_per_cell;
+               
+               std::string                             input_file_name;
+               std::string                             output_file_name;
+               
+               std::vector< std::vector<double> >      node_list;      // Stored as [ global node-id (int), x-coord, y-coord, z-coord ]
+               std::vector< std::vector<double> >      cell_list;      // Stored as [ material-id (int), node1, node2, node3, node4, node5, node6, node7, node8 ]
+               std::vector< std::vector<double> >      face_list;      // Stored as [ sideset-id (int), node1, node2, node3, node4 ]
+};
+
+#endif // MESH_CONVERSION_H
diff --git a/deal.II/contrib/mesh_conversion/README.txt b/deal.II/contrib/mesh_conversion/README.txt
new file mode 100755 (executable)
index 0000000..40af3ac
--- /dev/null
@@ -0,0 +1,46 @@
+====================================================
+MESH CONVERSION TOOL
+v. 1.0
+
+Use: Convert an ABAQUS .inp file to an AVS UCD file.
+
+Author: Jean-Paul Pelteret
+        jppelteret.uct@gmail.com
+===================================================
+
+Cubit features captured by ABAQUS .inp files:
+---------------------------------------------
+1. Multiple material-id's can be defined in the mesh. This is done by specifying blocksets in the pre-processor.
+2. Arbitrary surface boundaries can be defined in the mesh. This is done by specifying sidesets in the pre-processor. In particular, boundaries are not confined to just surfaces (in 3d) - individual element faces can be added to the sideset as well. This is useful when a boundary condition is to be applied on a complex shape boundary that is difficult to define using "surfaces" alone. Similar can be done in 2d.
+
+How to use:
+-----------
+1. It is necessary to save the mesh as an Abaqus input file .inp. In Cubit, this is done as follows:
+1.1. Go to "Analysis setup mode" by clicking on the disc icon in the toolbar on the right.
+1.2. Select "Export Mesh" under "Operation" by clicking on the necessary icon in the toolbar on the right.
+1.3. Select an output file. I have found that in Cubit version 11.0 and 12.0 beta that it is necessary to click on the browse button and type it in the dialogue that pops up.
+1.4. Select the dimension to output in. 
+1.5. Tick the overwrite box.
+1.6. Click apply.
+
+2. Converting the mesh
+2.1. Compile the program using 'make' or another suitable tool
+2.2. Run the program with the following command line arguments:
+       './convert_mesh <spatial_dimension> /path/to/input_file.inp /path/to/output_file.ucd'
+
+       The first input argument is the spatial dimension of the input file, the second is the path to the read-in Abaqus .inp file, and the third is the name of the file to which you wish to write the output AVS .ucd file to.
+       An example of the correct program usage is: 
+e.g.  './convert_mesh 3 mesh/3d/test_in.inp mesh/3d/test_out.ucd'
+
+
+Notes:
+------
+1. This tool was made with the specific intention of the output file being used as a mesh for deal.ii.
+2. It has been tested with the deal.ii 6.2-pre subversion as distributed on 12 Jan 2009.
+3. It has been tested for both 2d and 3d meshes, although more thoroughly for the latter. The 2d grids that were tested were drawn in the X-Y plane.
+4. A few example / test meshes are provided in the directory "mesh".
+
+Copyright:
+----------
+This program is distributed under the GNU GPL v2.0 copyright. Details can be found at:
+http://www.gnu.org/licenses/gpl-2.0.html
diff --git a/deal.II/contrib/mesh_conversion/mesh/2d/2d_test.cub b/deal.II/contrib/mesh_conversion/mesh/2d/2d_test.cub
new file mode 100755 (executable)
index 0000000..90511d4
Binary files /dev/null and b/deal.II/contrib/mesh_conversion/mesh/2d/2d_test.cub differ
diff --git a/deal.II/contrib/mesh_conversion/mesh/2d/2d_test.inp b/deal.II/contrib/mesh_conversion/mesh/2d/2d_test.inp
new file mode 100755 (executable)
index 0000000..687c0ba
--- /dev/null
@@ -0,0 +1,252 @@
+*HEADING
+cubit(rent/Geometry/Mesh_conversion/Program/mesh/2d/2d_test.inp): 01/17/2009: 16
+*NODE
+       1,  -1.000000e+00,   0.000000e+00,   0.000000e+00
+       2,  -1.000000e+00,  -1.666667e-01,   0.000000e+00
+       3,  -8.333333e-01,  -1.666667e-01,   0.000000e+00
+       4,  -8.333333e-01,   0.000000e+00,   0.000000e+00
+       5,  -1.000000e+00,  -3.333333e-01,   0.000000e+00
+       6,  -8.333333e-01,  -3.333333e-01,   0.000000e+00
+       7,  -1.000000e+00,  -5.000000e-01,   0.000000e+00
+       8,  -8.333333e-01,  -5.000000e-01,   0.000000e+00
+       9,  -1.000000e+00,  -6.666667e-01,   0.000000e+00
+      10,  -8.333333e-01,  -6.666667e-01,   0.000000e+00
+      11,  -1.000000e+00,  -8.333333e-01,   0.000000e+00
+      12,  -8.333333e-01,  -8.333333e-01,   0.000000e+00
+      13,  -1.000000e+00,  -1.000000e+00,   0.000000e+00
+      14,  -8.333333e-01,  -1.000000e+00,   0.000000e+00
+      15,  -6.666667e-01,  -1.666667e-01,   0.000000e+00
+      16,  -6.666667e-01,   0.000000e+00,   0.000000e+00
+      17,  -6.666667e-01,  -3.333333e-01,   0.000000e+00
+      18,  -6.666667e-01,  -5.000000e-01,   0.000000e+00
+      19,  -6.666667e-01,  -6.666667e-01,   0.000000e+00
+      20,  -6.666667e-01,  -8.333333e-01,   0.000000e+00
+      21,  -6.666667e-01,  -1.000000e+00,   0.000000e+00
+      22,  -5.000000e-01,  -1.666667e-01,   0.000000e+00
+      23,  -5.000000e-01,   0.000000e+00,   0.000000e+00
+      24,  -5.000000e-01,  -3.333333e-01,   0.000000e+00
+      25,  -5.000000e-01,  -5.000000e-01,   0.000000e+00
+      26,  -5.000000e-01,  -6.666667e-01,   0.000000e+00
+      27,  -5.000000e-01,  -8.333333e-01,   0.000000e+00
+      28,  -5.000000e-01,  -1.000000e+00,   0.000000e+00
+      29,  -3.333333e-01,  -1.666667e-01,   0.000000e+00
+      30,  -3.333333e-01,   0.000000e+00,   0.000000e+00
+      31,  -3.333333e-01,  -3.333333e-01,   0.000000e+00
+      32,  -3.333333e-01,  -5.000000e-01,   0.000000e+00
+      33,  -3.333333e-01,  -6.666667e-01,   0.000000e+00
+      34,  -3.333333e-01,  -8.333333e-01,   0.000000e+00
+      35,  -3.333333e-01,  -1.000000e+00,   0.000000e+00
+      36,  -1.666667e-01,  -1.666667e-01,   0.000000e+00
+      37,  -1.666667e-01,   0.000000e+00,   0.000000e+00
+      38,  -1.666667e-01,  -3.333333e-01,   0.000000e+00
+      39,  -1.666667e-01,  -5.000000e-01,   0.000000e+00
+      40,  -1.666667e-01,  -6.666667e-01,   0.000000e+00
+      41,  -1.666667e-01,  -8.333333e-01,   0.000000e+00
+      42,  -1.666667e-01,  -1.000000e+00,   0.000000e+00
+      43,  -1.387779e-17,  -1.666667e-01,   0.000000e+00
+      44,   0.000000e+00,   0.000000e+00,   0.000000e+00
+      45,  -3.122502e-17,  -3.333333e-01,   0.000000e+00
+      46,  -4.250073e-17,  -5.000000e-01,   0.000000e+00
+      47,  -4.531965e-17,  -6.666667e-01,   0.000000e+00
+      48,  -5.990217e-17,  -8.333333e-01,   0.000000e+00
+      49,   0.000000e+00,  -1.000000e+00,   0.000000e+00
+      50,   1.666667e-01,  -1.666667e-01,   0.000000e+00
+      51,   1.666667e-01,   1.387779e-17,   0.000000e+00
+      52,   1.666667e-01,  -3.333333e-01,   0.000000e+00
+      53,   1.666667e-01,  -5.000000e-01,   0.000000e+00
+      54,   1.666667e-01,  -6.666667e-01,   0.000000e+00
+      55,   1.666667e-01,  -8.333333e-01,   0.000000e+00
+      56,   1.666667e-01,  -1.000000e+00,   0.000000e+00
+      57,   3.333333e-01,  -1.666667e-01,   0.000000e+00
+      58,   3.333333e-01,   3.122502e-17,   0.000000e+00
+      59,   3.333333e-01,  -3.333333e-01,   0.000000e+00
+      60,   3.333333e-01,  -5.000000e-01,   0.000000e+00
+      61,   3.333333e-01,  -6.666667e-01,   0.000000e+00
+      62,   3.333333e-01,  -8.333333e-01,   0.000000e+00
+      63,   3.333333e-01,  -1.000000e+00,   0.000000e+00
+      64,   5.000000e-01,  -1.666667e-01,   0.000000e+00
+      65,   5.000000e-01,   4.943962e-17,   0.000000e+00
+      66,   5.000000e-01,  -3.333333e-01,   0.000000e+00
+      67,   5.000000e-01,  -5.000000e-01,   0.000000e+00
+      68,   5.000000e-01,  -6.666667e-01,   0.000000e+00
+      69,   5.000000e-01,  -8.333333e-01,   0.000000e+00
+      70,   5.000000e-01,  -1.000000e+00,   0.000000e+00
+      71,   6.666667e-01,  -1.666667e-01,   0.000000e+00
+      72,   6.666667e-01,   4.705437e-17,   0.000000e+00
+      73,   6.666667e-01,  -3.333333e-01,   0.000000e+00
+      74,   6.666667e-01,  -5.000000e-01,   0.000000e+00
+      75,   6.666667e-01,  -6.666667e-01,   0.000000e+00
+      76,   6.666667e-01,  -8.333333e-01,   0.000000e+00
+      77,   6.666667e-01,  -1.000000e+00,   0.000000e+00
+      78,   8.333333e-01,  -1.666667e-01,   0.000000e+00
+      79,   8.333333e-01,   6.033585e-17,   0.000000e+00
+      80,   8.333333e-01,  -3.333333e-01,   0.000000e+00
+      81,   8.333333e-01,  -5.000000e-01,   0.000000e+00
+      82,   8.333333e-01,  -6.666667e-01,   0.000000e+00
+      83,   8.333333e-01,  -8.333333e-01,   0.000000e+00
+      84,   8.333333e-01,  -1.000000e+00,   0.000000e+00
+      85,   1.000000e+00,  -1.666667e-01,   0.000000e+00
+      86,   1.000000e+00,   0.000000e+00,   0.000000e+00
+      87,   1.000000e+00,  -3.333333e-01,   0.000000e+00
+      88,   1.000000e+00,  -5.000000e-01,   0.000000e+00
+      89,   1.000000e+00,  -6.666667e-01,   0.000000e+00
+      90,   1.000000e+00,  -8.333333e-01,   0.000000e+00
+      91,   1.000000e+00,  -1.000000e+00,   0.000000e+00
+      92,   1.000000e+00,   1.666667e-01,   0.000000e+00
+      93,   8.333333e-01,   1.666667e-01,   0.000000e+00
+      94,   1.000000e+00,   3.333333e-01,   0.000000e+00
+      95,   8.333333e-01,   3.333333e-01,   0.000000e+00
+      96,   1.000000e+00,   5.000000e-01,   0.000000e+00
+      97,   8.333333e-01,   5.000000e-01,   0.000000e+00
+      98,   1.000000e+00,   6.666667e-01,   0.000000e+00
+      99,   8.333333e-01,   6.666667e-01,   0.000000e+00
+     100,   1.000000e+00,   8.333333e-01,   0.000000e+00
+     101,   8.333333e-01,   8.333333e-01,   0.000000e+00
+     102,   1.000000e+00,   1.000000e+00,   0.000000e+00
+     103,   8.333333e-01,   1.000000e+00,   0.000000e+00
+     104,   6.666667e-01,   1.666667e-01,   0.000000e+00
+     105,   6.666667e-01,   3.333333e-01,   0.000000e+00
+     106,   6.666667e-01,   5.000000e-01,   0.000000e+00
+     107,   6.666667e-01,   6.666667e-01,   0.000000e+00
+     108,   6.666667e-01,   8.333333e-01,   0.000000e+00
+     109,   6.666667e-01,   1.000000e+00,   0.000000e+00
+     110,   5.000000e-01,   1.666667e-01,   0.000000e+00
+     111,   5.000000e-01,   3.333333e-01,   0.000000e+00
+     112,   5.000000e-01,   5.000000e-01,   0.000000e+00
+     113,   5.000000e-01,   6.666667e-01,   0.000000e+00
+     114,   5.000000e-01,   8.333333e-01,   0.000000e+00
+     115,   5.000000e-01,   1.000000e+00,   0.000000e+00
+     116,   3.333333e-01,   1.666667e-01,   0.000000e+00
+     117,   3.333333e-01,   3.333333e-01,   0.000000e+00
+     118,   3.333333e-01,   5.000000e-01,   0.000000e+00
+     119,   3.333333e-01,   6.666667e-01,   0.000000e+00
+     120,   3.333333e-01,   8.333333e-01,   0.000000e+00
+     121,   3.333333e-01,   1.000000e+00,   0.000000e+00
+     122,   1.666667e-01,   1.666667e-01,   0.000000e+00
+     123,   1.666667e-01,   3.333333e-01,   0.000000e+00
+     124,   1.666667e-01,   5.000000e-01,   0.000000e+00
+     125,   1.666667e-01,   6.666667e-01,   0.000000e+00
+     126,   1.666667e-01,   8.333333e-01,   0.000000e+00
+     127,   1.666667e-01,   1.000000e+00,   0.000000e+00
+     128,   0.000000e+00,   1.666667e-01,   0.000000e+00
+     129,   0.000000e+00,   3.333333e-01,   0.000000e+00
+     130,   0.000000e+00,   5.000000e-01,   0.000000e+00
+     131,   0.000000e+00,   6.666667e-01,   0.000000e+00
+     132,   0.000000e+00,   8.333333e-01,   0.000000e+00
+     133,   0.000000e+00,   1.000000e+00,   0.000000e+00
+*ELEMENT, TYPE=S4R, ELSET=EB1
+       1,       1,       2,       3,       4
+       2,       2,       5,       6,       3
+       3,       5,       7,       8,       6
+       4,       7,       9,      10,       8
+       5,       9,      11,      12,      10
+       6,      11,      13,      14,      12
+       7,       4,       3,      15,      16
+       8,       3,       6,      17,      15
+       9,       6,       8,      18,      17
+      10,       8,      10,      19,      18
+      11,      10,      12,      20,      19
+      12,      12,      14,      21,      20
+      13,      16,      15,      22,      23
+      14,      15,      17,      24,      22
+      15,      17,      18,      25,      24
+      16,      18,      19,      26,      25
+      17,      19,      20,      27,      26
+      18,      20,      21,      28,      27
+      19,      23,      22,      29,      30
+      20,      22,      24,      31,      29
+      21,      24,      25,      32,      31
+      22,      25,      26,      33,      32
+      23,      26,      27,      34,      33
+      24,      27,      28,      35,      34
+      25,      30,      29,      36,      37
+      26,      29,      31,      38,      36
+      27,      31,      32,      39,      38
+      28,      32,      33,      40,      39
+      29,      33,      34,      41,      40
+      30,      34,      35,      42,      41
+      31,      37,      36,      43,      44
+      32,      36,      38,      45,      43
+      33,      38,      39,      46,      45
+      34,      39,      40,      47,      46
+      35,      40,      41,      48,      47
+      36,      41,      42,      49,      48
+      37,      44,      43,      50,      51
+      38,      43,      45,      52,      50
+      39,      45,      46,      53,      52
+      40,      46,      47,      54,      53
+      41,      47,      48,      55,      54
+      42,      48,      49,      56,      55
+      43,      51,      50,      57,      58
+      44,      50,      52,      59,      57
+      45,      52,      53,      60,      59
+      46,      53,      54,      61,      60
+      47,      54,      55,      62,      61
+      48,      55,      56,      63,      62
+      49,      58,      57,      64,      65
+      50,      57,      59,      66,      64
+      51,      59,      60,      67,      66
+      52,      60,      61,      68,      67
+      53,      61,      62,      69,      68
+      54,      62,      63,      70,      69
+      55,      65,      64,      71,      72
+      56,      64,      66,      73,      71
+      57,      66,      67,      74,      73
+      58,      67,      68,      75,      74
+      59,      68,      69,      76,      75
+      60,      69,      70,      77,      76
+      61,      72,      71,      78,      79
+      62,      71,      73,      80,      78
+      63,      73,      74,      81,      80
+      64,      74,      75,      82,      81
+      65,      75,      76,      83,      82
+      66,      76,      77,      84,      83
+      67,      79,      78,      85,      86
+      68,      78,      80,      87,      85
+      69,      80,      81,      88,      87
+      70,      81,      82,      89,      88
+      71,      82,      83,      90,      89
+      72,      83,      84,      91,      90
+      73,      86,      92,      93,      79
+      74,      92,      94,      95,      93
+      75,      94,      96,      97,      95
+      76,      96,      98,      99,      97
+      77,      98,     100,     101,      99
+      78,     100,     102,     103,     101
+      79,      79,      93,     104,      72
+      80,      93,      95,     105,     104
+      81,      95,      97,     106,     105
+      82,      97,      99,     107,     106
+      83,      99,     101,     108,     107
+      84,     101,     103,     109,     108
+      85,      72,     104,     110,      65
+      86,     104,     105,     111,     110
+      87,     105,     106,     112,     111
+      88,     106,     107,     113,     112
+      89,     107,     108,     114,     113
+      90,     108,     109,     115,     114
+      91,      65,     110,     116,      58
+      92,     110,     111,     117,     116
+      93,     111,     112,     118,     117
+      94,     112,     113,     119,     118
+      95,     113,     114,     120,     119
+      96,     114,     115,     121,     120
+      97,      58,     116,     122,      51
+      98,     116,     117,     123,     122
+      99,     117,     118,     124,     123
+     100,     118,     119,     125,     124
+     101,     119,     120,     126,     125
+     102,     120,     121,     127,     126
+     103,      51,     122,     128,      44
+     104,     122,     123,     129,     128
+     105,     123,     124,     130,     129
+     106,     124,     125,     131,     130
+     107,     125,     126,     132,     131
+     108,     126,     127,     133,     132
+*SURFACE, NAME=SS1
+      78,     E2
+      84,     E2
+      90,     E2
+      96,     E2
+     102,     E2
+     108,     E2
diff --git a/deal.II/contrib/mesh_conversion/mesh/2d/2d_test.ucd b/deal.II/contrib/mesh_conversion/mesh/2d/2d_test.ucd
new file mode 100755 (executable)
index 0000000..9223200
--- /dev/null
@@ -0,0 +1,251 @@
+# FEM Mesh Converter
+# Mesh type: AVS UCD
+# Input file name: mesh/2d/2d_test.inp
+133    114     0       0       0
+1       -1.00000000e+00          0.00000000e+00        0.00000000e+00  
+2       -1.00000000e+00         -1.66666700e-01        0.00000000e+00  
+3       -8.33333300e-01         -1.66666700e-01        0.00000000e+00  
+4       -8.33333300e-01          0.00000000e+00        0.00000000e+00  
+5       -1.00000000e+00         -3.33333300e-01        0.00000000e+00  
+6       -8.33333300e-01         -3.33333300e-01        0.00000000e+00  
+7       -1.00000000e+00         -5.00000000e-01        0.00000000e+00  
+8       -8.33333300e-01         -5.00000000e-01        0.00000000e+00  
+9       -1.00000000e+00         -6.66666700e-01        0.00000000e+00  
+10      -8.33333300e-01         -6.66666700e-01        0.00000000e+00  
+11      -1.00000000e+00         -8.33333300e-01        0.00000000e+00  
+12      -8.33333300e-01         -8.33333300e-01        0.00000000e+00  
+13      -1.00000000e+00         -1.00000000e+00        0.00000000e+00  
+14      -8.33333300e-01         -1.00000000e+00        0.00000000e+00  
+15      -6.66666700e-01         -1.66666700e-01        0.00000000e+00  
+16      -6.66666700e-01          0.00000000e+00        0.00000000e+00  
+17      -6.66666700e-01         -3.33333300e-01        0.00000000e+00  
+18      -6.66666700e-01         -5.00000000e-01        0.00000000e+00  
+19      -6.66666700e-01         -6.66666700e-01        0.00000000e+00  
+20      -6.66666700e-01         -8.33333300e-01        0.00000000e+00  
+21      -6.66666700e-01         -1.00000000e+00        0.00000000e+00  
+22      -5.00000000e-01         -1.66666700e-01        0.00000000e+00  
+23      -5.00000000e-01          0.00000000e+00        0.00000000e+00  
+24      -5.00000000e-01         -3.33333300e-01        0.00000000e+00  
+25      -5.00000000e-01         -5.00000000e-01        0.00000000e+00  
+26      -5.00000000e-01         -6.66666700e-01        0.00000000e+00  
+27      -5.00000000e-01         -8.33333300e-01        0.00000000e+00  
+28      -5.00000000e-01         -1.00000000e+00        0.00000000e+00  
+29      -3.33333300e-01         -1.66666700e-01        0.00000000e+00  
+30      -3.33333300e-01          0.00000000e+00        0.00000000e+00  
+31      -3.33333300e-01         -3.33333300e-01        0.00000000e+00  
+32      -3.33333300e-01         -5.00000000e-01        0.00000000e+00  
+33      -3.33333300e-01         -6.66666700e-01        0.00000000e+00  
+34      -3.33333300e-01         -8.33333300e-01        0.00000000e+00  
+35      -3.33333300e-01         -1.00000000e+00        0.00000000e+00  
+36      -1.66666700e-01         -1.66666700e-01        0.00000000e+00  
+37      -1.66666700e-01          0.00000000e+00        0.00000000e+00  
+38      -1.66666700e-01         -3.33333300e-01        0.00000000e+00  
+39      -1.66666700e-01         -5.00000000e-01        0.00000000e+00  
+40      -1.66666700e-01         -6.66666700e-01        0.00000000e+00  
+41      -1.66666700e-01         -8.33333300e-01        0.00000000e+00  
+42      -1.66666700e-01         -1.00000000e+00        0.00000000e+00  
+43       0.00000000e+00         -1.66666700e-01        0.00000000e+00  
+44       0.00000000e+00          0.00000000e+00        0.00000000e+00  
+45       0.00000000e+00         -3.33333300e-01        0.00000000e+00  
+46       0.00000000e+00         -5.00000000e-01        0.00000000e+00  
+47       0.00000000e+00         -6.66666700e-01        0.00000000e+00  
+48       0.00000000e+00         -8.33333300e-01        0.00000000e+00  
+49       0.00000000e+00         -1.00000000e+00        0.00000000e+00  
+50       1.66666700e-01         -1.66666700e-01        0.00000000e+00  
+51       1.66666700e-01          0.00000000e+00        0.00000000e+00  
+52       1.66666700e-01         -3.33333300e-01        0.00000000e+00  
+53       1.66666700e-01         -5.00000000e-01        0.00000000e+00  
+54       1.66666700e-01         -6.66666700e-01        0.00000000e+00  
+55       1.66666700e-01         -8.33333300e-01        0.00000000e+00  
+56       1.66666700e-01         -1.00000000e+00        0.00000000e+00  
+57       3.33333300e-01         -1.66666700e-01        0.00000000e+00  
+58       3.33333300e-01          0.00000000e+00        0.00000000e+00  
+59       3.33333300e-01         -3.33333300e-01        0.00000000e+00  
+60       3.33333300e-01         -5.00000000e-01        0.00000000e+00  
+61       3.33333300e-01         -6.66666700e-01        0.00000000e+00  
+62       3.33333300e-01         -8.33333300e-01        0.00000000e+00  
+63       3.33333300e-01         -1.00000000e+00        0.00000000e+00  
+64       5.00000000e-01         -1.66666700e-01        0.00000000e+00  
+65       5.00000000e-01          0.00000000e+00        0.00000000e+00  
+66       5.00000000e-01         -3.33333300e-01        0.00000000e+00  
+67       5.00000000e-01         -5.00000000e-01        0.00000000e+00  
+68       5.00000000e-01         -6.66666700e-01        0.00000000e+00  
+69       5.00000000e-01         -8.33333300e-01        0.00000000e+00  
+70       5.00000000e-01         -1.00000000e+00        0.00000000e+00  
+71       6.66666700e-01         -1.66666700e-01        0.00000000e+00  
+72       6.66666700e-01          0.00000000e+00        0.00000000e+00  
+73       6.66666700e-01         -3.33333300e-01        0.00000000e+00  
+74       6.66666700e-01         -5.00000000e-01        0.00000000e+00  
+75       6.66666700e-01         -6.66666700e-01        0.00000000e+00  
+76       6.66666700e-01         -8.33333300e-01        0.00000000e+00  
+77       6.66666700e-01         -1.00000000e+00        0.00000000e+00  
+78       8.33333300e-01         -1.66666700e-01        0.00000000e+00  
+79       8.33333300e-01          0.00000000e+00        0.00000000e+00  
+80       8.33333300e-01         -3.33333300e-01        0.00000000e+00  
+81       8.33333300e-01         -5.00000000e-01        0.00000000e+00  
+82       8.33333300e-01         -6.66666700e-01        0.00000000e+00  
+83       8.33333300e-01         -8.33333300e-01        0.00000000e+00  
+84       8.33333300e-01         -1.00000000e+00        0.00000000e+00  
+85       1.00000000e+00         -1.66666700e-01        0.00000000e+00  
+86       1.00000000e+00          0.00000000e+00        0.00000000e+00  
+87       1.00000000e+00         -3.33333300e-01        0.00000000e+00  
+88       1.00000000e+00         -5.00000000e-01        0.00000000e+00  
+89       1.00000000e+00         -6.66666700e-01        0.00000000e+00  
+90       1.00000000e+00         -8.33333300e-01        0.00000000e+00  
+91       1.00000000e+00         -1.00000000e+00        0.00000000e+00  
+92       1.00000000e+00          1.66666700e-01        0.00000000e+00  
+93       8.33333300e-01          1.66666700e-01        0.00000000e+00  
+94       1.00000000e+00          3.33333300e-01        0.00000000e+00  
+95       8.33333300e-01          3.33333300e-01        0.00000000e+00  
+96       1.00000000e+00          5.00000000e-01        0.00000000e+00  
+97       8.33333300e-01          5.00000000e-01        0.00000000e+00  
+98       1.00000000e+00          6.66666700e-01        0.00000000e+00  
+99       8.33333300e-01          6.66666700e-01        0.00000000e+00  
+100      1.00000000e+00          8.33333300e-01        0.00000000e+00  
+101      8.33333300e-01          8.33333300e-01        0.00000000e+00  
+102      1.00000000e+00          1.00000000e+00        0.00000000e+00  
+103      8.33333300e-01          1.00000000e+00        0.00000000e+00  
+104      6.66666700e-01          1.66666700e-01        0.00000000e+00  
+105      6.66666700e-01          3.33333300e-01        0.00000000e+00  
+106      6.66666700e-01          5.00000000e-01        0.00000000e+00  
+107      6.66666700e-01          6.66666700e-01        0.00000000e+00  
+108      6.66666700e-01          8.33333300e-01        0.00000000e+00  
+109      6.66666700e-01          1.00000000e+00        0.00000000e+00  
+110      5.00000000e-01          1.66666700e-01        0.00000000e+00  
+111      5.00000000e-01          3.33333300e-01        0.00000000e+00  
+112      5.00000000e-01          5.00000000e-01        0.00000000e+00  
+113      5.00000000e-01          6.66666700e-01        0.00000000e+00  
+114      5.00000000e-01          8.33333300e-01        0.00000000e+00  
+115      5.00000000e-01          1.00000000e+00        0.00000000e+00  
+116      3.33333300e-01          1.66666700e-01        0.00000000e+00  
+117      3.33333300e-01          3.33333300e-01        0.00000000e+00  
+118      3.33333300e-01          5.00000000e-01        0.00000000e+00  
+119      3.33333300e-01          6.66666700e-01        0.00000000e+00  
+120      3.33333300e-01          8.33333300e-01        0.00000000e+00  
+121      3.33333300e-01          1.00000000e+00        0.00000000e+00  
+122      1.66666700e-01          1.66666700e-01        0.00000000e+00  
+123      1.66666700e-01          3.33333300e-01        0.00000000e+00  
+124      1.66666700e-01          5.00000000e-01        0.00000000e+00  
+125      1.66666700e-01          6.66666700e-01        0.00000000e+00  
+126      1.66666700e-01          8.33333300e-01        0.00000000e+00  
+127      1.66666700e-01          1.00000000e+00        0.00000000e+00  
+128      0.00000000e+00          1.66666700e-01        0.00000000e+00  
+129      0.00000000e+00          3.33333300e-01        0.00000000e+00  
+130      0.00000000e+00          5.00000000e-01        0.00000000e+00  
+131      0.00000000e+00          6.66666700e-01        0.00000000e+00  
+132      0.00000000e+00          8.33333300e-01        0.00000000e+00  
+133      0.00000000e+00          1.00000000e+00        0.00000000e+00  
+1      1       quad    1       2       3       4       
+2      1       quad    2       5       6       3       
+3      1       quad    5       7       8       6       
+4      1       quad    7       9       10      8       
+5      1       quad    9       11      12      10      
+6      1       quad    11      13      14      12      
+7      1       quad    4       3       15      16      
+8      1       quad    3       6       17      15      
+9      1       quad    6       8       18      17      
+10     1       quad    8       10      19      18      
+11     1       quad    10      12      20      19      
+12     1       quad    12      14      21      20      
+13     1       quad    16      15      22      23      
+14     1       quad    15      17      24      22      
+15     1       quad    17      18      25      24      
+16     1       quad    18      19      26      25      
+17     1       quad    19      20      27      26      
+18     1       quad    20      21      28      27      
+19     1       quad    23      22      29      30      
+20     1       quad    22      24      31      29      
+21     1       quad    24      25      32      31      
+22     1       quad    25      26      33      32      
+23     1       quad    26      27      34      33      
+24     1       quad    27      28      35      34      
+25     1       quad    30      29      36      37      
+26     1       quad    29      31      38      36      
+27     1       quad    31      32      39      38      
+28     1       quad    32      33      40      39      
+29     1       quad    33      34      41      40      
+30     1       quad    34      35      42      41      
+31     1       quad    37      36      43      44      
+32     1       quad    36      38      45      43      
+33     1       quad    38      39      46      45      
+34     1       quad    39      40      47      46      
+35     1       quad    40      41      48      47      
+36     1       quad    41      42      49      48      
+37     1       quad    44      43      50      51      
+38     1       quad    43      45      52      50      
+39     1       quad    45      46      53      52      
+40     1       quad    46      47      54      53      
+41     1       quad    47      48      55      54      
+42     1       quad    48      49      56      55      
+43     1       quad    51      50      57      58      
+44     1       quad    50      52      59      57      
+45     1       quad    52      53      60      59      
+46     1       quad    53      54      61      60      
+47     1       quad    54      55      62      61      
+48     1       quad    55      56      63      62      
+49     1       quad    58      57      64      65      
+50     1       quad    57      59      66      64      
+51     1       quad    59      60      67      66      
+52     1       quad    60      61      68      67      
+53     1       quad    61      62      69      68      
+54     1       quad    62      63      70      69      
+55     1       quad    65      64      71      72      
+56     1       quad    64      66      73      71      
+57     1       quad    66      67      74      73      
+58     1       quad    67      68      75      74      
+59     1       quad    68      69      76      75      
+60     1       quad    69      70      77      76      
+61     1       quad    72      71      78      79      
+62     1       quad    71      73      80      78      
+63     1       quad    73      74      81      80      
+64     1       quad    74      75      82      81      
+65     1       quad    75      76      83      82      
+66     1       quad    76      77      84      83      
+67     1       quad    79      78      85      86      
+68     1       quad    78      80      87      85      
+69     1       quad    80      81      88      87      
+70     1       quad    81      82      89      88      
+71     1       quad    82      83      90      89      
+72     1       quad    83      84      91      90      
+73     1       quad    86      92      93      79      
+74     1       quad    92      94      95      93      
+75     1       quad    94      96      97      95      
+76     1       quad    96      98      99      97      
+77     1       quad    98      100     101     99      
+78     1       quad    100     102     103     101     
+79     1       quad    79      93      104     72      
+80     1       quad    93      95      105     104     
+81     1       quad    95      97      106     105     
+82     1       quad    97      99      107     106     
+83     1       quad    99      101     108     107     
+84     1       quad    101     103     109     108     
+85     1       quad    72      104     110     65      
+86     1       quad    104     105     111     110     
+87     1       quad    105     106     112     111     
+88     1       quad    106     107     113     112     
+89     1       quad    107     108     114     113     
+90     1       quad    108     109     115     114     
+91     1       quad    65      110     116     58      
+92     1       quad    110     111     117     116     
+93     1       quad    111     112     118     117     
+94     1       quad    112     113     119     118     
+95     1       quad    113     114     120     119     
+96     1       quad    114     115     121     120     
+97     1       quad    58      116     122     51      
+98     1       quad    116     117     123     122     
+99     1       quad    117     118     124     123     
+100    1       quad    118     119     125     124     
+101    1       quad    119     120     126     125     
+102    1       quad    120     121     127     126     
+103    1       quad    51      122     128     44      
+104    1       quad    122     123     129     128     
+105    1       quad    123     124     130     129     
+106    1       quad    124     125     131     130     
+107    1       quad    125     126     132     131     
+108    1       quad    126     127     133     132     
+1      1       line    102     103     
+2      1       line    103     109     
+3      1       line    109     115     
+4      1       line    115     121     
+5      1       line    121     127     
+6      1       line    127     133     
diff --git a/deal.II/contrib/mesh_conversion/mesh/2d/quad.cub b/deal.II/contrib/mesh_conversion/mesh/2d/quad.cub
new file mode 100755 (executable)
index 0000000..71a0829
Binary files /dev/null and b/deal.II/contrib/mesh_conversion/mesh/2d/quad.cub differ
diff --git a/deal.II/contrib/mesh_conversion/mesh/2d/quad.inp b/deal.II/contrib/mesh_conversion/mesh/2d/quad.inp
new file mode 100755 (executable)
index 0000000..e809a6d
--- /dev/null
@@ -0,0 +1,29 @@
+*HEADING
+cubit(y/Work/Current/Geometry/Mesh_conversion/mesh/2d/quad2.inp): 01/17/2009: 13
+*NODE
+       1,  -1.000000e+00,   1.000000e+00,   0.000000e+00
+       2,  -1.000000e+00,   0.000000e+00,   0.000000e+00
+       3,   0.000000e+00,   0.000000e+00,   0.000000e+00
+       4,   0.000000e+00,   1.000000e+00,   0.000000e+00
+       5,  -1.000000e+00,  -1.000000e+00,   0.000000e+00
+       6,   0.000000e+00,  -1.000000e+00,   0.000000e+00
+       7,   1.000000e+00,   0.000000e+00,   0.000000e+00
+       8,   1.000000e+00,   1.000000e+00,   0.000000e+00
+       9,   1.000000e+00,  -1.000000e+00,   0.000000e+00
+*ELEMENT, TYPE=S4R, ELSET=EB14
+       1,       1,       2,       3,       4
+       2,       2,       5,       6,       3
+       3,       4,       3,       7,       8
+       4,       3,       6,       9,       7
+*SURFACE, NAME=SS1
+       1,     E1
+       2,     E1
+*SURFACE, NAME=SS2
+       2,     E2
+       4,     E2
+*SURFACE, NAME=SS3
+       3,     E3
+       4,     E3
+*SURFACE, NAME=SS4
+       1,     E4
+       3,     E4
diff --git a/deal.II/contrib/mesh_conversion/mesh/2d/quad.ucd b/deal.II/contrib/mesh_conversion/mesh/2d/quad.ucd
new file mode 100755 (executable)
index 0000000..d77e008
--- /dev/null
@@ -0,0 +1,25 @@
+# FEM Mesh Converter
+# Mesh type: AVS UCD
+# Input file name: mesh/2d/quad.inp
+9      12      0       0       0
+1       -1.00000000e+00          1.00000000e+00        0.00000000e+00  
+2       -1.00000000e+00          0.00000000e+00        0.00000000e+00  
+3        0.00000000e+00          0.00000000e+00        0.00000000e+00  
+4        0.00000000e+00          1.00000000e+00        0.00000000e+00  
+5       -1.00000000e+00         -1.00000000e+00        0.00000000e+00  
+6        0.00000000e+00         -1.00000000e+00        0.00000000e+00  
+7        1.00000000e+00          0.00000000e+00        0.00000000e+00  
+8        1.00000000e+00          1.00000000e+00        0.00000000e+00  
+9        1.00000000e+00         -1.00000000e+00        0.00000000e+00  
+1      14      quad    1       2       3       4       
+2      14      quad    2       5       6       3       
+3      14      quad    4       3       7       8       
+4      14      quad    3       6       9       7       
+1      1       line    1       2       
+2      1       line    2       5       
+3      2       line    5       6       
+4      2       line    6       9       
+5      3       line    7       8       
+6      3       line    9       7       
+7      4       line    4       1       
+8      4       line    8       4       
diff --git a/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_1.cub b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_1.cub
new file mode 100755 (executable)
index 0000000..4b577a2
Binary files /dev/null and b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_1.cub differ
diff --git a/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_1.inp b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_1.inp
new file mode 100755 (executable)
index 0000000..6e3a898
--- /dev/null
@@ -0,0 +1,25 @@
+*HEADING
+cubit(t/Geometry/Mesh_conversion/mesh/Test_cube/test_cube_1.inp): 11/06/2008: 09
+*NODE
+       1,  -1.000000e+00,  -1.000000e+00,   1.000000e+00
+       2,  -1.000000e+00,  -1.000000e+00,  -1.000000e+00
+       3,  -1.000000e+00,   1.000000e+00,  -1.000000e+00
+       4,  -1.000000e+00,   1.000000e+00,   1.000000e+00
+       5,   1.000000e+00,  -1.000000e+00,   1.000000e+00
+       6,   1.000000e+00,  -1.000000e+00,  -1.000000e+00
+       7,   1.000000e+00,   1.000000e+00,  -1.000000e+00
+       8,   1.000000e+00,   1.000000e+00,   1.000000e+00
+*ELEMENT, TYPE=C3D8R, ELSET=EB1
+       1,       1,       2,       3,       4,       5,       6,       7,       8
+*SURFACE, NAME=SS1
+       1,     S6
+*SURFACE, NAME=SS2
+       1,     S4
+*SURFACE, NAME=SS3
+       1,     S3
+*SURFACE, NAME=SS4
+       1,     S1
+*SURFACE, NAME=SS5
+       1,     S5
+*SURFACE, NAME=SS6
+       1,     S2
diff --git a/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_1.ucd b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_1.ucd
new file mode 100755 (executable)
index 0000000..e466858
--- /dev/null
@@ -0,0 +1,19 @@
+# FEM Mesh Converter
+# Mesh type: AVS UCD
+# Input file name: mesh/3d/test_cube_1.inp
+8      7       0       0       0
+1       -1.00000000e+00         -1.00000000e+00          1.00000000e+00        
+2       -1.00000000e+00         -1.00000000e+00         -1.00000000e+00        
+3       -1.00000000e+00          1.00000000e+00         -1.00000000e+00        
+4       -1.00000000e+00          1.00000000e+00          1.00000000e+00        
+5        1.00000000e+00         -1.00000000e+00          1.00000000e+00        
+6        1.00000000e+00         -1.00000000e+00         -1.00000000e+00        
+7        1.00000000e+00          1.00000000e+00         -1.00000000e+00        
+8        1.00000000e+00          1.00000000e+00          1.00000000e+00        
+1      1       hex     1       2       3       4       5       6       7       8       
+1      1       quad    1       5       8       4       
+2      2       quad    2       3       7       6       
+3      3       quad    1       2       6       5       
+4      4       quad    1       4       3       2       
+5      5       quad    3       4       8       7       
+6      6       quad    5       8       7       6       
diff --git a/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_pave_1.cub b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_pave_1.cub
new file mode 100755 (executable)
index 0000000..3222831
Binary files /dev/null and b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_pave_1.cub differ
diff --git a/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_pave_1.inp b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_pave_1.inp
new file mode 100755 (executable)
index 0000000..336d442
--- /dev/null
@@ -0,0 +1,97 @@
+*HEADING
+cubit(metry/Mesh_conversion/mesh/Test_cube/test_cube_pave_1.inp): 11/06/2008: 10
+*NODE
+       1,   1.000000e+00,   1.000000e+00,   0.000000e+00
+       2,   5.000000e-01,   1.000000e+00,   0.000000e+00
+       3,   5.583559e-01,   3.929331e-01,   0.000000e+00
+       4,   1.000000e+00,   0.000000e+00,   0.000000e+00
+       5,   1.000000e+00,   1.000000e+00,   1.000000e+00
+       6,   5.000000e-01,   1.000000e+00,   1.000000e+00
+       7,   5.583559e-01,   3.929331e-01,   1.000000e+00
+       8,   1.000000e+00,   0.000000e+00,   1.000000e+00
+       9,   0.000000e+00,   1.000000e+00,   0.000000e+00
+      10,   1.562409e-01,   1.799288e-01,   0.000000e+00
+      11,   0.000000e+00,   1.000000e+00,   1.000000e+00
+      12,   1.562409e-01,   1.799288e-01,   1.000000e+00
+      13,  -5.000000e-01,   1.000000e+00,   0.000000e+00
+      14,  -3.897075e-01,   6.804246e-02,   0.000000e+00
+      15,  -5.000000e-01,   1.000000e+00,   1.000000e+00
+      16,  -3.897075e-01,   6.804246e-02,   1.000000e+00
+      17,  -1.000000e+00,   1.000000e+00,   0.000000e+00
+      18,  -1.000000e+00,   0.000000e+00,   0.000000e+00
+      19,  -1.000000e+00,   1.000000e+00,   1.000000e+00
+      20,  -1.000000e+00,   0.000000e+00,   1.000000e+00
+      21,  -1.000000e+00,  -1.000000e+00,   0.000000e+00
+      22,   0.000000e+00,  -1.000000e+00,   0.000000e+00
+      23,  -1.000000e+00,  -1.000000e+00,   1.000000e+00
+      24,   0.000000e+00,  -1.000000e+00,   1.000000e+00
+      25,   1.000000e+00,  -1.000000e+00,   0.000000e+00
+      26,   1.000000e+00,  -1.000000e+00,   1.000000e+00
+      27,   1.000000e+00,   1.000000e+00,  -1.000000e+00
+      28,   5.000000e-01,   1.000000e+00,  -1.000000e+00
+      29,   5.583559e-01,   3.929331e-01,  -1.000000e+00
+      30,   1.000000e+00,   0.000000e+00,  -1.000000e+00
+      31,   0.000000e+00,   1.000000e+00,  -1.000000e+00
+      32,   1.562409e-01,   1.799288e-01,  -1.000000e+00
+      33,  -5.000000e-01,   1.000000e+00,  -1.000000e+00
+      34,  -3.897075e-01,   6.804246e-02,  -1.000000e+00
+      35,  -1.000000e+00,   1.000000e+00,  -1.000000e+00
+      36,  -1.000000e+00,   0.000000e+00,  -1.000000e+00
+      37,  -1.000000e+00,  -1.000000e+00,  -1.000000e+00
+      38,   0.000000e+00,  -1.000000e+00,  -1.000000e+00
+      39,   1.000000e+00,  -1.000000e+00,  -1.000000e+00
+*ELEMENT, TYPE=C3D8R, ELSET=EB1
+       1,       1,       2,       3,       4,       5,       6,       7,       8
+       2,       2,       9,      10,       3,       6,      11,      12,       7
+       3,       9,      13,      14,      10,      11,      15,      16,      12
+       4,      13,      17,      18,      14,      15,      19,      20,      16
+       5,      21,      22,      14,      18,      23,      24,      16,      20
+       6,      10,      14,      22,      25,      12,      16,      24,      26
+       7,      25,       4,       3,      10,      26,       8,       7,      12
+       8,      27,      28,      29,      30,       1,       2,       3,       4
+       9,      28,      31,      32,      29,       2,       9,      10,       3
+      10,      31,      33,      34,      32,       9,      13,      14,      10
+      11,      33,      35,      36,      34,      13,      17,      18,      14
+      12,      37,      38,      34,      36,      21,      22,      14,      18
+      13,      32,      34,      38,      39,      10,      14,      22,      25
+      14,      39,      30,      29,      32,      25,       4,       3,      10
+*SURFACE, NAME=SS1
+       1,     S2
+       2,     S2
+       3,     S2
+       4,     S2
+       5,     S2
+       6,     S2
+       7,     S2
+*SURFACE, NAME=SS2
+       8,     S1
+       9,     S1
+      10,     S1
+      11,     S1
+      12,     S1
+      13,     S1
+      14,     S1
+*SURFACE, NAME=SS3
+       5,     S3
+       6,     S5
+      12,     S3
+      13,     S5
+*SURFACE, NAME=SS4
+       4,     S4
+       5,     S6
+      11,     S4
+      12,     S6
+*SURFACE, NAME=SS5
+       1,     S3
+       2,     S3
+       3,     S3
+       4,     S3
+       8,     S3
+       9,     S3
+      10,     S3
+      11,     S3
+*SURFACE, NAME=SS6
+       1,     S6
+       7,     S3
+       8,     S6
+      14,     S3
diff --git a/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_pave_1.ucd b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_pave_1.ucd
new file mode 100755 (executable)
index 0000000..02c7fd4
--- /dev/null
@@ -0,0 +1,91 @@
+# FEM Mesh Converter
+# Mesh type: AVS UCD
+# Input file name: mesh/3d/test_cube_pave_1.inp
+39     48      0       0       0
+1        1.00000000e+00          1.00000000e+00          0.00000000e+00        
+2        5.00000000e-01          1.00000000e+00          0.00000000e+00        
+3        5.58355900e-01          3.92933100e-01          0.00000000e+00        
+4        1.00000000e+00          0.00000000e+00          0.00000000e+00        
+5        1.00000000e+00          1.00000000e+00          1.00000000e+00        
+6        5.00000000e-01          1.00000000e+00          1.00000000e+00        
+7        5.58355900e-01          3.92933100e-01          1.00000000e+00        
+8        1.00000000e+00          0.00000000e+00          1.00000000e+00        
+9        0.00000000e+00          1.00000000e+00          0.00000000e+00        
+10       1.56240900e-01          1.79928800e-01          0.00000000e+00        
+11       0.00000000e+00          1.00000000e+00          1.00000000e+00        
+12       1.56240900e-01          1.79928800e-01          1.00000000e+00        
+13      -5.00000000e-01          1.00000000e+00          0.00000000e+00        
+14      -3.89707500e-01          6.80424600e-02          0.00000000e+00        
+15      -5.00000000e-01          1.00000000e+00          1.00000000e+00        
+16      -3.89707500e-01          6.80424600e-02          1.00000000e+00        
+17      -1.00000000e+00          1.00000000e+00          0.00000000e+00        
+18      -1.00000000e+00          0.00000000e+00          0.00000000e+00        
+19      -1.00000000e+00          1.00000000e+00          1.00000000e+00        
+20      -1.00000000e+00          0.00000000e+00          1.00000000e+00        
+21      -1.00000000e+00         -1.00000000e+00          0.00000000e+00        
+22       0.00000000e+00         -1.00000000e+00          0.00000000e+00        
+23      -1.00000000e+00         -1.00000000e+00          1.00000000e+00        
+24       0.00000000e+00         -1.00000000e+00          1.00000000e+00        
+25       1.00000000e+00         -1.00000000e+00          0.00000000e+00        
+26       1.00000000e+00         -1.00000000e+00          1.00000000e+00        
+27       1.00000000e+00          1.00000000e+00         -1.00000000e+00        
+28       5.00000000e-01          1.00000000e+00         -1.00000000e+00        
+29       5.58355900e-01          3.92933100e-01         -1.00000000e+00        
+30       1.00000000e+00          0.00000000e+00         -1.00000000e+00        
+31       0.00000000e+00          1.00000000e+00         -1.00000000e+00        
+32       1.56240900e-01          1.79928800e-01         -1.00000000e+00        
+33      -5.00000000e-01          1.00000000e+00         -1.00000000e+00        
+34      -3.89707500e-01          6.80424600e-02         -1.00000000e+00        
+35      -1.00000000e+00          1.00000000e+00         -1.00000000e+00        
+36      -1.00000000e+00          0.00000000e+00         -1.00000000e+00        
+37      -1.00000000e+00         -1.00000000e+00         -1.00000000e+00        
+38       0.00000000e+00         -1.00000000e+00         -1.00000000e+00        
+39       1.00000000e+00         -1.00000000e+00         -1.00000000e+00        
+1      1       hex     1       2       3       4       5       6       7       8       
+2      1       hex     2       9       10      3       6       11      12      7       
+3      1       hex     9       13      14      10      11      15      16      12      
+4      1       hex     13      17      18      14      15      19      20      16      
+5      1       hex     21      22      14      18      23      24      16      20      
+6      1       hex     10      14      22      25      12      16      24      26      
+7      1       hex     25      4       3       10      26      8       7       12      
+8      1       hex     27      28      29      30      1       2       3       4       
+9      1       hex     28      31      32      29      2       9       10      3       
+10     1       hex     31      33      34      32      9       13      14      10      
+11     1       hex     33      35      36      34      13      17      18      14      
+12     1       hex     37      38      34      36      21      22      14      18      
+13     1       hex     32      34      38      39      10      14      22      25      
+14     1       hex     39      30      29      32      25      4       3       10      
+1      1       quad    5       8       7       6       
+2      1       quad    6       7       12      11      
+3      1       quad    11      12      16      15      
+4      1       quad    15      16      20      19      
+5      1       quad    23      20      16      24      
+6      1       quad    12      26      24      16      
+7      1       quad    26      12      7       8       
+8      2       quad    27      30      29      28      
+9      2       quad    28      29      32      31      
+10     2       quad    31      32      34      33      
+11     2       quad    33      34      36      35      
+12     2       quad    37      36      34      38      
+13     2       quad    32      39      38      34      
+14     2       quad    39      32      29      30      
+15     3       quad    21      22      24      23      
+16     3       quad    22      25      26      24      
+17     3       quad    37      38      22      21      
+18     3       quad    38      39      25      22      
+19     4       quad    17      18      20      19      
+20     4       quad    21      23      20      18      
+21     4       quad    35      36      18      17      
+22     4       quad    37      21      18      36      
+23     5       quad    1       2       6       5       
+24     5       quad    2       9       11      6       
+25     5       quad    9       13      15      11      
+26     5       quad    13      17      19      15      
+27     5       quad    27      28      2       1       
+28     5       quad    28      31      9       2       
+29     5       quad    31      33      13      9       
+30     5       quad    33      35      17      13      
+31     6       quad    1       5       8       4       
+32     6       quad    25      4       8       26      
+33     6       quad    27      1       4       30      
+34     6       quad    39      30      4       25      
diff --git a/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_two_materials.cub b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_two_materials.cub
new file mode 100755 (executable)
index 0000000..abfe095
Binary files /dev/null and b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_two_materials.cub differ
diff --git a/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_two_materials.inp b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_two_materials.inp
new file mode 100755 (executable)
index 0000000..1e329c1
--- /dev/null
@@ -0,0 +1,67 @@
+*HEADING
+cubit(rsion/Mesh_conversion/mesh/3d/test_cube_two_materials.inp): 01/20/2009: 07
+*NODE
+       1,  -1.000000e+00,  -1.000000e+00,   1.000000e+00
+       2,  -1.000000e+00,  -1.000000e+00,   0.000000e+00
+       3,  -1.000000e+00,   0.000000e+00,   0.000000e+00
+       4,  -1.000000e+00,   0.000000e+00,   1.000000e+00
+       5,   0.000000e+00,  -1.000000e+00,   1.000000e+00
+       6,   0.000000e+00,  -1.000000e+00,   0.000000e+00
+       7,   0.000000e+00,   0.000000e+00,   0.000000e+00
+       8,   0.000000e+00,   0.000000e+00,   1.000000e+00
+       9,  -1.000000e+00,  -1.000000e+00,  -1.000000e+00
+      10,  -1.000000e+00,   0.000000e+00,  -1.000000e+00
+      11,   0.000000e+00,  -1.000000e+00,  -1.000000e+00
+      12,   0.000000e+00,   0.000000e+00,  -1.000000e+00
+      13,  -1.000000e+00,   1.000000e+00,   0.000000e+00
+      14,  -1.000000e+00,   1.000000e+00,   1.000000e+00
+      15,   0.000000e+00,   1.000000e+00,   0.000000e+00
+      16,   0.000000e+00,   1.000000e+00,   1.000000e+00
+      17,  -1.000000e+00,   1.000000e+00,  -1.000000e+00
+      18,   0.000000e+00,   1.000000e+00,  -1.000000e+00
+      19,   1.000000e+00,  -1.000000e+00,   1.000000e+00
+      20,   1.000000e+00,  -1.000000e+00,   0.000000e+00
+      21,   1.000000e+00,   0.000000e+00,   0.000000e+00
+      22,   1.000000e+00,   0.000000e+00,   1.000000e+00
+      23,   1.000000e+00,  -1.000000e+00,  -1.000000e+00
+      24,   1.000000e+00,   0.000000e+00,  -1.000000e+00
+      25,   1.000000e+00,   1.000000e+00,   0.000000e+00
+      26,   1.000000e+00,   1.000000e+00,   1.000000e+00
+      27,   1.000000e+00,   1.000000e+00,  -1.000000e+00
+*ELEMENT, TYPE=C3D8R, ELSET=EB1
+       1,       1,       2,       3,       4,       5,       6,       7,       8
+       2,       2,       9,      10,       3,       6,      11,      12,       7
+       3,       4,       3,      13,      14,       8,       7,      15,      16
+       4,       3,      10,      17,      13,       7,      12,      18,      15
+       5,       5,       6,       7,       8,      19,      20,      21,      22
+*ELEMENT, TYPE=C3D8R, ELSET=EB2
+       6,       6,      11,      12,       7,      20,      23,      24,      21
+       7,       8,       7,      15,      16,      22,      21,      25,      26
+       8,       7,      12,      18,      15,      21,      24,      27,      25
+*SURFACE, NAME=SS1
+       1,     S6
+       3,     S6
+       5,     S6
+       7,     S6
+       3,     S5
+       4,     S5
+       7,     S5
+       8,     S5
+       1,     S1
+       2,     S1
+       3,     S1
+       4,     S1
+       1,     S3
+       2,     S3
+       5,     S3
+       6,     S3
+*SURFACE, NAME=SS2
+       2,     S4
+       4,     S4
+       8,     S4
+       8,     S2
+*SURFACE, NAME=SS3
+       5,     S2
+       6,     S4
+       6,     S2
+       7,     S2
diff --git a/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_two_materials.ucd b/deal.II/contrib/mesh_conversion/mesh/3d/test_cube_two_materials.ucd
new file mode 100755 (executable)
index 0000000..3889718
--- /dev/null
@@ -0,0 +1,63 @@
+# FEM Mesh Converter
+# Mesh type: AVS UCD
+# Input file name: mesh/3d/test_cube_two_materials.inp
+27     32      0       0       0
+1       -1.00000000e+00         -1.00000000e+00          1.00000000e+00        
+2       -1.00000000e+00         -1.00000000e+00          0.00000000e+00        
+3       -1.00000000e+00          0.00000000e+00          0.00000000e+00        
+4       -1.00000000e+00          0.00000000e+00          1.00000000e+00        
+5        0.00000000e+00         -1.00000000e+00          1.00000000e+00        
+6        0.00000000e+00         -1.00000000e+00          0.00000000e+00        
+7        0.00000000e+00          0.00000000e+00          0.00000000e+00        
+8        0.00000000e+00          0.00000000e+00          1.00000000e+00        
+9       -1.00000000e+00         -1.00000000e+00         -1.00000000e+00        
+10      -1.00000000e+00          0.00000000e+00         -1.00000000e+00        
+11       0.00000000e+00         -1.00000000e+00         -1.00000000e+00        
+12       0.00000000e+00          0.00000000e+00         -1.00000000e+00        
+13      -1.00000000e+00          1.00000000e+00          0.00000000e+00        
+14      -1.00000000e+00          1.00000000e+00          1.00000000e+00        
+15       0.00000000e+00          1.00000000e+00          0.00000000e+00        
+16       0.00000000e+00          1.00000000e+00          1.00000000e+00        
+17      -1.00000000e+00          1.00000000e+00         -1.00000000e+00        
+18       0.00000000e+00          1.00000000e+00         -1.00000000e+00        
+19       1.00000000e+00         -1.00000000e+00          1.00000000e+00        
+20       1.00000000e+00         -1.00000000e+00          0.00000000e+00        
+21       1.00000000e+00          0.00000000e+00          0.00000000e+00        
+22       1.00000000e+00          0.00000000e+00          1.00000000e+00        
+23       1.00000000e+00         -1.00000000e+00         -1.00000000e+00        
+24       1.00000000e+00          0.00000000e+00         -1.00000000e+00        
+25       1.00000000e+00          1.00000000e+00          0.00000000e+00        
+26       1.00000000e+00          1.00000000e+00          1.00000000e+00        
+27       1.00000000e+00          1.00000000e+00         -1.00000000e+00        
+1      1       hex     1       2       3       4       5       6       7       8       
+2      1       hex     2       9       10      3       6       11      12      7       
+3      1       hex     4       3       13      14      8       7       15      16      
+4      1       hex     3       10      17      13      7       12      18      15      
+5      1       hex     5       6       7       8       19      20      21      22      
+6      2       hex     6       11      12      7       20      23      24      21      
+7      2       hex     8       7       15      16      22      21      25      26      
+8      2       hex     7       12      18      15      21      24      27      25      
+1      1       quad    1       5       8       4       
+2      1       quad    4       8       16      14      
+3      1       quad    5       19      22      8       
+4      1       quad    8       22      26      16      
+5      1       quad    13      14      16      15      
+6      1       quad    17      13      15      18      
+7      1       quad    15      16      26      25      
+8      1       quad    18      15      25      27      
+9      1       quad    1       4       3       2       
+10     1       quad    2       3       10      9       
+11     1       quad    4       14      13      3       
+12     1       quad    3       13      17      10      
+13     1       quad    1       2       6       5       
+14     1       quad    2       9       11      6       
+15     1       quad    5       6       20      19      
+16     1       quad    6       11      23      20      
+17     2       quad    9       10      12      11      
+18     2       quad    10      17      18      12      
+19     2       quad    12      18      27      24      
+20     2       quad    21      25      27      24      
+21     3       quad    19      22      21      20      
+22     3       quad    11      12      24      23      
+23     3       quad    20      21      24      23      
+24     3       quad    22      26      25      21      

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.