Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Pane_boundary.C File Reference
#include <map>
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include "Pane_boundary.h"
Include dependency graph for Pane_boundary.C:

Go to the source code of this file.

Classes

struct  Four_tuple< T >
 A structure used to represent element faces. More...
 

Typedefs

typedef std::map< Four_tuple,
Facet_ID
Corners2Face_Map
 

Functions

static void check_face_unique (const Four_tuple &face_corners, const Facet_ID &fid, std::vector< Corners2Face_Map > &c2f_vec, int &num_external_face, int &counter)
 
double square (double x)
 

Typedef Documentation

typedef std::map< Four_tuple, Facet_ID> Corners2Face_Map

Definition at line 73 of file Pane_boundary.C.

Function Documentation

static void check_face_unique ( const Four_tuple face_corners,
const Facet_ID fid,
std::vector< Corners2Face_Map > &  c2f_vec,
int &  num_external_face,
int &  counter 
)
static

Definition at line 79 of file Pane_boundary.C.

Referenced by Pane_boundary::determine_border_nodes_3().

82  {
83 
84  // Sort the node ids of the face
85  Four_tuple sorted_ns( face_corners);
86  std::sort( &sorted_ns[0], &sorted_ns[4]);
87 
88  // Check whether the sorted node-list is in vec2facemap_vec
89  // by trying to insert it
90  Corners2Face_Map &c2f = c2f_vec[sorted_ns[1]-1];
91 
92  std::pair<Corners2Face_Map::iterator, bool>
93  ans = c2f.insert( std::make_pair(sorted_ns, fid));
94 
95  // If the node-list already exists, then remove it from vecFaceMap
96  if ( !ans.second) {
97  counter++;
98  c2f.erase( ans.first);
99  --num_external_face;
100  }
101  // Otherwise, insertion succeeded.
102  else ++num_external_face;
103 }
A structure used to represent element faces.
Definition: Pane_boundary.C:60
std::map< Four_tuple, Facet_ID > Corners2Face_Map
Definition: Pane_boundary.C:73

Here is the caller graph for this function: