Commit a4fb6160 authored by Dave Moxey's avatar Dave Moxey
Browse files

Remove m_elLink from remaining 3D element constructors, couple of very minor modifications

parent aefdffb4
......@@ -29,7 +29,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: boolean evaluations of mesh objects.
// Description: Boolean operators for comparison of mesh objects.
//
////////////////////////////////////////////////////////////////////////////////
......@@ -44,7 +44,7 @@ namespace NekMeshUtils
{
/**
* @brief compares two element config structs
* @brief Compares two element config structs
*/
bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
{
......@@ -52,7 +52,7 @@ bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
}
/**
* @brief compares two element sharedptrs
* @brief Compares two element shared pointers
*/
bool operator==(ElementSharedPtr const &e1, ElementSharedPtr const &e2)
{
......@@ -124,11 +124,11 @@ bool operator==(NodeSharedPtr const &p1, NodeSharedPtr const &p2)
}
/**
* @brief compares two nodes for inequality
* @brief Compares two nodes for inequality based on IDs
*/
bool operator!=(NodeSharedPtr const &p1, NodeSharedPtr const &p2)
{
if(p1->m_id != p2->m_id)
if (p1->m_id != p2->m_id)
{
return true;
}
......@@ -147,7 +147,7 @@ bool operator< (NodeSharedPtr const &p1, NodeSharedPtr const &p2)
}
/**
* @brief ostream operator for nodes
* @brief Print description of node to given ostream.
*/
std::ostream &operator<<(std::ostream &os, const NodeSharedPtr &n)
{
......
......@@ -55,14 +55,8 @@ public:
std::vector<NodeSharedPtr> pNodeList,
std::vector<int> pTagList)
{
ElementSharedPtr e = boost::shared_ptr<Element>(
return boost::shared_ptr<Element>(
new Hexahedron(pConf, pNodeList, pTagList));
std::vector<FaceSharedPtr> faces = e->GetFaceList();
for (int i = 0; i < faces.size(); ++i)
{
faces[i]->m_elLink.push_back(std::pair<ElementSharedPtr, int>(e, i));
}
return e;
}
/// Element type
static LibUtilities::ShapeType m_type;
......
......@@ -126,7 +126,7 @@ public:
/// apply spherigon surface smoothing.
std::set<std::pair<int, int> > m_spherigonSurfs;
/// List of face labels for composite annotation
std::map<int, std::string> m_faceLabels;
std::map<int, std::string> m_faceLabels;
/// Whether the mesh has CAD
bool m_hasCAD;
/// CAD file ID
......
......@@ -55,14 +55,8 @@ public:
std::vector<NodeSharedPtr> pNodeList,
std::vector<int> pTagList)
{
ElementSharedPtr e =
boost::shared_ptr<Element>(new Prism(pConf, pNodeList, pTagList));
//std::vector<FaceSharedPtr> faces = e->GetFaceList();
//for (int i = 0; i < faces.size(); ++i)
//{
// faces[i]->m_elLink.push_back(std::pair<ElementSharedPtr, int>(e, i));
//}
return e;
return boost::shared_ptr<Element>(
new Prism(pConf, pNodeList, pTagList));
}
/// Element type
static LibUtilities::ShapeType m_type;
......
......@@ -54,14 +54,8 @@ public:
std::vector<NodeSharedPtr> pNodeList,
std::vector<int> pTagList)
{
ElementSharedPtr e =
boost::shared_ptr<Element>(new Pyramid(pConf, pNodeList, pTagList));
std::vector<FaceSharedPtr> faces = e->GetFaceList();
for (int i = 0; i < faces.size(); ++i)
{
faces[i]->m_elLink.push_back(std::pair<ElementSharedPtr, int>(e, i));
}
return e;
return boost::shared_ptr<Element>(
new Pyramid(pConf, pNodeList, pTagList));
}
/// Element type
static LibUtilities::ShapeType type;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment