ElementCmp Class Reference

Function-type-object to perform comparison of elements. More...

Public Member Functions

bool operator() (GeneralisedElement *const &x, GeneralisedElement *const &y) const
 Comparison. Are the values identical or not? More...
 
bool operator() (GeneralisedElement *const &x, GeneralisedElement *const &y) const
 Comparison. Are the values identical or not? More...
 
bool operator() (GeneralisedElement *const &x, GeneralisedElement *const &y) const
 Comparison. Are the values identical or not? More...
 
bool operator() (GeneralisedElement *const &x, GeneralisedElement *const &y) const
 Comparison. Are the values identical or not? More...
 
bool operator() (GeneralisedElement *const &x, GeneralisedElement *const &y) const
 Comparison. Are the values identical or not? More...
 

Detailed Description

Function-type-object to perform comparison of elements.

Function-type-object to perform comparison of elements in y-direction.

////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

Member Function Documentation

◆ operator()() [1/5]

bool ElementCmp::operator() ( GeneralisedElement *const &  x,
GeneralisedElement *const &  y 
) const
inline

Comparison. Are the values identical or not?

323  {
324  FiniteElement* cast_x = dynamic_cast<FiniteElement*>(x);
325  FiniteElement* cast_y = dynamic_cast<FiniteElement*>(y);
326 
327  if((cast_x ==0) || (cast_y==0)) {return 0;}
328  else
329  {return cast_x->node_pt(0)->x(0) < cast_y->node_pt(0)->x(0);}
330  }
Definition: elements.h:1313
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
Scalar * y
Definition: level1_cplx_impl.h:128
list x
Definition: plotDoE.py:28

References oomph::FiniteElement::node_pt(), plotDoE::x, oomph::Node::x(), and y.

◆ operator()() [2/5]

bool ElementCmp::operator() ( GeneralisedElement *const &  x,
GeneralisedElement *const &  y 
) const
inline

Comparison. Are the values identical or not?

121  {
122  FiniteElement* cast_x = dynamic_cast<FiniteElement*>(x);
123  FiniteElement* cast_y = dynamic_cast<FiniteElement*>(y);
124 
125  // Orders elements vertically, starting from the bottom of each spine
126  if((cast_x==0) || (cast_y==0)) { return 0; }
127  else
128  {
129  return ((cast_x->node_pt(0)->x(0) + 1.0e-8*cast_x->node_pt(0)->x(1))
130  < (cast_y->node_pt(0)->x(0) + 1.0e-8*cast_y->node_pt(0)->x(1)));
131  }
132  }

References oomph::FiniteElement::node_pt(), plotDoE::x, oomph::Node::x(), and y.

◆ operator()() [3/5]

bool ElementCmp::operator() ( GeneralisedElement *const &  x,
GeneralisedElement *const &  y 
) const
inline

Comparison. Are the values identical or not?

51  {
52  FiniteElement* cast_x = dynamic_cast<FiniteElement*>(x);
53  FiniteElement* cast_y = dynamic_cast<FiniteElement*>(y);
54 
55  if((cast_x ==0) || (cast_y==0)) {return 0;}
56  else
57  {return cast_x->node_pt(0)->x(2) < cast_y->node_pt(0)->x(2);}
58  }

References oomph::FiniteElement::node_pt(), plotDoE::x, oomph::Node::x(), and y.

◆ operator()() [4/5]

bool ElementCmp::operator() ( GeneralisedElement *const &  x,
GeneralisedElement *const &  y 
) const
inline

Comparison. Are the values identical or not?

53  {
54  FiniteElement* cast_x = dynamic_cast<FiniteElement*>(x);
55  FiniteElement* cast_y = dynamic_cast<FiniteElement*>(y);
56 
57  if((cast_x ==0) || (cast_y==0)) {return 0;}
58  else
59  {return cast_x->node_pt(0)->x(2) < cast_y->node_pt(0)->x(2);}
60  }

References oomph::FiniteElement::node_pt(), plotDoE::x, oomph::Node::x(), and y.

◆ operator()() [5/5]

bool ElementCmp::operator() ( GeneralisedElement *const &  x,
GeneralisedElement *const &  y 
) const
inline

Comparison. Are the values identical or not?

100  {
101  FiniteElement* cast_x = dynamic_cast<FiniteElement*>(x);
102  FiniteElement* cast_y = dynamic_cast<FiniteElement*>(y);
103 
104  if((cast_x ==0) || (cast_y==0)) {return 0;}
105  else
106  {return (cast_x->node_pt(0)->x(1)< cast_y->node_pt(0)->x(1));}
107 
108  }

References oomph::FiniteElement::node_pt(), plotDoE::x, oomph::Node::x(), and y.


The documentation for this class was generated from the following files: