$search
00001 /* 00002 James R. Diebel 00003 Stanford University 00004 00005 Started: 24 August 2004 00006 Last revised: 00007 00008 mesh_vert.cc - class implementation of Mesh class (mesh.hh) 00009 00010 Depends on: 00011 - Mesh class (mesh.hh) 00012 */ 00013 00014 #include "bmtk/mesh.hh" 00015 #include <iostream> 00016 00017 namespace bmtk { 00018 00020 // Per-Edge Functions // 00022 void Mesh::findEdgeLengths() { 00023 if (po) cout << "- Computing edge lengths..." << flush; 00024 for (int i=0;i<ne;i++) e[i].findLength(); 00025 if (po) cout << "Done." << endl << flush; 00026 } 00027 00028 void Mesh::findEdgeAngles() { 00029 if (po) cout << "- Computing edge angles..." << flush; 00030 for (int i=0;i<ne;i++) e[i].findAngle(); 00031 if (po) cout << "Done." << endl << flush; 00032 } 00033 00034 void Mesh::findEdgeProps() { 00035 if (po) cout << "- Computing edge properties..." << flush; 00036 for (int i=0;i<ne;i++) { 00037 e[i].findLength(); 00038 e[i].findAngle(); 00039 } 00040 if (po) cout << "Done." << endl << flush; 00041 } 00042 00043 void Mesh::findEdgePotentials() { 00044 if (po) cout << "- Computing edge potentials..." << flush; 00045 bool temp = po; 00046 po = false; 00047 for (int i=0;i<ne;i++) { 00048 e[i].findPotential(); 00049 e[i].flag = -1; 00050 } 00051 po = temp; 00052 if (po) cout << "Done." << endl << flush; 00053 } 00054 00055 void Mesh::resetEdgeFlags() { 00056 if (po) cout << "- Reseting edge flags..." << flush; 00057 for (int i=0;i<ne;i++) e[i].flag = -1; 00058 if (po) cout << "Done." << endl << flush; 00059 } 00060 00061 } // namespace bmtk