Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Manifold_2.h File Reference
#include "surfbasic.h"
#include "../Rocmap/include/Simple_manifold_2.h"
Include dependency graph for Manifold_2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Pane_manifold_2
 This class implements a data structure for 2-manifold on each pane. More...
 
class  Window_manifold_2
 This class implements a data structure for 2-manifold over a whole window, which can be composed of multiple panes. More...
 
class  Node
 This class encapsulate a node over a window manifold. More...
 
class  Halfedge
 This class encapsulate a halfedge over a window manifold. More...
 

Namespaces

 MAP
 

Typedefs

typedef MAP::Facet_ID Edge_ID
 

Enumerations

enum  Access_Mode { REAL_PANE, WHOLE_PANE, ACROSS_PANE }
 

Functions

Vector_3< Realget_normal (const Halfedge &h, const Vector_2< Real > &nc)
 Get the face normal of a point in the element incident on h. More...
 
Vector_3< Realget_deformed_normal (const Halfedge &h, const Vector_2< Real > &nc, const COM::Attribute *disp)
 Get the normal of the deformed shape (coordinates plus given displacements) of the incident facet of a halfedge. More...
 
Vector_3< Realget_tangent (const Halfedge &h)
 Get the tangent of the given halfedge. More...
 

Typedef Documentation

typedef MAP::Facet_ID Edge_ID

Definition at line 49 of file Manifold_2.h.

Enumeration Type Documentation

Enumerator
REAL_PANE 
WHOLE_PANE 
ACROSS_PANE 

Definition at line 52 of file Manifold_2.h.

Function Documentation

Vector_3<Real> get_deformed_normal ( const Halfedge h,
const Vector_2< Real > &  nc,
const COM::Attribute *  disp 
)

Get the normal of the deformed shape (coordinates plus given displacements) of the incident facet of a halfedge.

Definition at line 1263 of file Manifold_2.C.

References Node::addr(), COM_assertion, COM_assertion_msg, Vector_3< Type >::cross_product(), Generic_element_2::Jacobian(), Halfedge::next(), Halfedge::origin(), Node::point(), and v.

Referenced by Halfedge::deformed_normal().

1266 {
1267  COM_assertion_msg( disp, "Unexpected NULL pointer");
1268  COM_assertion_msg( disp->is_nodal(), "disp must be nodal attribute");
1269 
1270  // Obtain the deformed coordinates
1271  Point_3<Real> points[4];
1272 
1273  int ne = 0;
1274  Halfedge hit = h;
1275  do {
1276  Node v=hit.origin();
1277  points[ne] = v.point() + *(Vector_3<Real>*)v.addr( disp);
1278  ++ne;
1279  COM_assertion( ne<=4);
1280  } while ( (hit=hit.next()) != h);
1281 
1282  // Evaluate the Jacobian and the cross product
1283  Vector_3<Real> J[2];
1284  Generic_element_2(ne).Jacobian( points, nc, J);
1285 
1286  return Vector_3<Real>::cross_product( J[0], J[1]);
1287 }
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
This class encapsulate a node over a window manifold.
Definition: Manifold_2.h:370
#define COM_assertion_msg(EX, msg)
Encapsulation of the element-wise computations for two-dimensional elements.
This class encapsulate a halfedge over a window manifold.
Definition: Manifold_2.h:446
Definition: points.h:30
Halfedge next() const
Get the next halfedge of its owner element.
Definition: Manifold_2.h:465
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
Definition: roccomf90.h:20
static Vector_3 cross_product(const Vector_3 &v, const Vector_3 &w)
Definition: mapbasic.h:104
const void * addr(const COM::Attribute *attr) const
Obtain the address of an attribute associated with the node.
Definition: Manifold_2.C:1191
const Point_3< Real > & point() const
Obtain the coordinates of a node.
Definition: Manifold_2.h:394
void Jacobian(const Field &f, const Nat_coor &nc, Vector_3 J[2]) const
Evaluates the Jacobian at a given point.
Node origin() const
Obtain the (primary copy of the) origin of the edge.
Definition: Manifold_2.h:468

Here is the call graph for this function:

Here is the caller graph for this function:

Vector_3<Real> get_normal ( const Halfedge h,
const Vector_2< Real > &  nc 
)

Get the face normal of a point in the element incident on h.

Definition at line 1240 of file Manifold_2.C.

References Vector_3< Type >::cross_product(), Pane_manifold_2::get_bd_normal(), Halfedge::id(), Halfedge::is_border(), Generic_element_2::Jacobian(), Halfedge::pane(), Halfedge::pane_manifold(), Element_node_vectors_k_const< Value >::set(), and Element_node_enumerator::size_of_edges().

Referenced by Halfedge::normal().

1240  {
1241  if ( h.is_border()) {
1242  // Precondition: boundary normal must have been updated.
1243  return h.pane_manifold()->get_bd_normal( h.id());
1244  }
1245 
1246  Element_node_enumerator ene( h.pane(), h.id().eid());
1247  const int ne = ene.size_of_edges();
1248  Generic_element_2 e(ne);
1249 
1250  // First evaluate face normal
1252  ps.set((const Point_3<Real>*)(h.pane()->coordinates()), ene,1);
1253 
1254  Vector_3<Real> J[2];
1255  e.Jacobian( ps, nc, J);
1256  return Vector_3<Real>::cross_product( J[0], J[1]);
1257 }
An adaptor for enumerating node IDs of an element.
Encapsulation of the element-wise computations for two-dimensional elements.
Edge_ID id() const
Obtain the ID of the edge.
Definition: Manifold_2.h:547
This is a helper class for accessing nodal data.
int size_of_edges() const
Number of edges per element.
static Vector_3 cross_product(const Vector_3 &v, const Vector_3 &w)
Definition: mapbasic.h:104
bool is_border() const
Is the edge a border edge?
Definition: Manifold_2.h:476
const Pane_manifold_2 * pane_manifold() const
Obtain the pane manifold that owns the edge.
Definition: Manifold_2.h:540
void set(const Value *p, Element_node_enumerator &ene, int strd)
initialize the accessor with a pointer and a specific stride.
const Vector_3< Real > & get_bd_normal(Edge_ID) const
Obtain normal of incident face of border edge.
Definition: Manifold_2.h:587
const COM::Pane * pane() const
Obtain the owner Pane_manifold_2 of the node.
Definition: Manifold_2.h:543

Here is the call graph for this function:

Here is the caller graph for this function:

Vector_3<Real> get_tangent ( const Halfedge h)
inline

Get the tangent of the given halfedge.

Definition at line 704 of file Manifold_2.h.

References Halfedge::tangent().

Referenced by RFC_Window_overlay::cos_edge_angle(), and RFC_Window_overlay::detect_features().

705 { return h.tangent(); }
Vector_3< Real > tangent() const
Get the tangent of the given halfedge.
Definition: Manifold_2.h:484

Here is the call graph for this function:

Here is the caller graph for this function: