![]() |
MechSys
1.0
Computing library for simulations in continuum and discrete mechanics
|
#include <iostream>
#include <fstream>
#include <sstream>
#include <cfloat>
#include <cstdarg>
#include <cstdlib>
#include <map>
#include <boost/tuple/tuple_io.hpp>
#include <boost/tuple/tuple_comparison.hpp>
#include <mechsys/util/array.h>
#include <mechsys/util/fatal.h>
#include <mechsys/util/util.h>
#include <mechsys/util/numstreams.h>
#include <mechsys/linalg/matvec.h>
#include <mechsys/vtkcelltype.h>
Go to the source code of this file.
Classes | |
struct | Mesh::Share |
Forward declaration due to the following definitions. More... | |
struct | Mesh::Vertex |
struct | Mesh::Cell |
class | Mesh::Generic |
Namespaces | |
namespace | Mesh |
Mesh generation | |
Defines | |
#define | VTU_NEWLINE_DEFINED |
#define | VTU_NEWLINE(I, K, N, KMAX, OF) if (K>KMAX) { OF<<(I<N-1?"\n ":"\n"); K=0; } else if (I==N-1) { OF<<"\n"; } |
#define | NOEDGE {-1,-1,-1} |
#define | NOFACE {-1,-1,-1,-1} |
#define | NOEDGES {NOEDGE,NOEDGE,NOEDGE,NOEDGE} |
#define | NOEDGES3D {NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE} |
#define | NOFACES {NOFACE,NOFACE,NOFACE,NOFACE,NOFACE,NOFACE} |
#define | BRYKEY(num_verts, idx_cell, idx_bry) |
Typedefs | |
typedef std::map< int, int > | Mesh::BryTag_t |
Map: edge/face ID => edge/face tag. | |
typedef boost::tuple< int, int, int, int > | Mesh::BryKey_t |
Edge/face key = (left_node,right_node) for edges or (node0,node1,node2) for faces. | |
typedef std::pair< int, Cell * > | Mesh::NeighDat_t |
Pair: local edge/face ID, neighbour cell. | |
typedef std::map< BryKey_t, NeighDat_t > | Mesh::Neighs_t |
Map: edge/face key => neighbour data. | |
typedef std::map< BryKey_t, Array< NeighDat_t > > | Mesh::BryCell_t |
Map: edge/face key => cells sharing this boundary (edge/face) | |
typedef std::map< Vertex *, Array< Vertex * > > | Mesh::Pin_t |
Pin type. | |
Functions | |
int | Mesh::CellGetBryTag (int iSide, Cell const *c) |
int | Mesh::CellGetNeigh (int iSide, Cell const *c) |
std::ostream & | Mesh::operator<< (std::ostream &os, BryKey_t const &BK) |
std::ostream & | Mesh::operator<< (std::ostream &os, Generic const &M) |
Variables | |
size_t | Mesh::MaxNVerts2D = 8 |
size_t | Mesh::NVertsToNEdges2D [] = {0,0,0,3,4,0,3,0,4} |
size_t | Mesh::NVertsToNVertsPerEdge2D [] = {0,0,0,2,2,0,3,0,3} |
int | Mesh::NVertsToEdge2D [][4][3] |
size_t | Mesh::MaxNVerts3D = 20 |
size_t | Mesh::NVertsToNFaces3D [] = {0,0,0,0, 4, 0,0,0, 6, 0, 4, 0,0,0,0,0,0,0,0,0, 6} |
size_t | Mesh::NVertsToNVertsPerFace3D [] = {0,0,0,0, 3, 0,0,0, 4, 0, 3, 0,0,0,0,0,0,0,0,0, 4} |
int | Mesh::NVertsToFace3D [][6][4] |
size_t | Mesh::NVertsToNEdges3D [] = {0,0,0,0, 6, 0,0,0, 12, 0, 6, 0,0,0,0,0,0,0,0,0, 12} |
int | Mesh::NVertsToEdge3D [][12][3] |
size_t | Mesh::NVertsToGeoNVerts2D [] |
size_t | Mesh::NVertsToGeoNVerts3D [] |
#define BRYKEY | ( | num_verts, | |
idx_cell, | |||
idx_bry | |||
) |
int vert_a, vert_b, vert_c=-1, vert_d=-1; \ if (NDim==2) \ { \ vert_a = Cells[idx_cell]->V[NVertsToEdge2D[num_verts][idx_bry][0]]->ID; \ vert_b = Cells[idx_cell]->V[NVertsToEdge2D[num_verts][idx_bry][1]]->ID; \ Util::Sort (vert_a,vert_b); \ } \ else \ { \ vert_a = Cells[idx_cell]->V[NVertsToFace3D[num_verts][idx_bry][0]]->ID; \ vert_b = Cells[idx_cell]->V[NVertsToFace3D[num_verts][idx_bry][1]]->ID; \ vert_c = Cells[idx_cell]->V[NVertsToFace3D[num_verts][idx_bry][2]]->ID; \ if (NVertsToNVertsPerFace3D[num_verts]>3) \ vert_d = Cells[idx_cell]->V[NVertsToFace3D[num_verts][idx_bry][3]]->ID; \ Util::Sort (vert_a,vert_b,vert_c,vert_d); \ } \ BryKey_t brykey(vert_a,vert_b,vert_c,vert_d);
#define NOEDGE {-1,-1,-1} |
#define NOEDGES3D {NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE,NOEDGE} |
#define NOFACE {-1,-1,-1,-1} |
#define VTU_NEWLINE | ( | I, | |
K, | |||
N, | |||
KMAX, | |||
OF | |||
) | if (K>KMAX) { OF<<(I<N-1?"\n ":"\n"); K=0; } else if (I==N-1) { OF<<"\n"; } |
#define VTU_NEWLINE_DEFINED |