33 const int *to_normalize,
34 const COM::Attribute *pnts) {
36 assert( elem_nrmls != NULL && elem_nrmls ->size_of_components() == 3);
38 std::vector< COM:: Pane*> panes;
39 elem_nrmls->window() -> panes( panes);
45 std::vector< COM::Pane*>::const_iterator it = panes.begin();
47 for (
int i=0, local_npanes = panes.size();
i<local_npanes; ++
i, ++it){
48 const COM::Pane &pane = **it;
50 const COM::Attribute *nc_pane = (pnts==NULL)?pane.attribute(
COM::COM_NC):
51 pane.attribute( pnts->id());
52 COM_assertion( pane.size_of_elements()==0 || nc_pane->stride()==3);
56 (pane.attribute( elem_nrmls->id())->pointer());
61 for (
int j=pane.size_of_elements();
j>0; --
j, ene.
next(),++ptr) {
63 ps.
set( pnts, ene, 1);
65 e.Jacobian( ps, nc, J);
67 if ( to_normalize==NULL || *to_normalize)
69 else if ( e.size_of_edges()==3)
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
An adaptor for enumerating node IDs of an element.
#define SURF_END_NAMESPACE
Encapsulation of the element-wise computations for two-dimensional elements.
#define SURF_BEGIN_NAMESPACE
This is a helper class for accessing nodal data.
int size_of_edges() const
Number of edges per element.
int size_of_nodes() const
Number of nodes per element.
static Vector_3 cross_product(const Vector_3 &v, const Vector_3 &w)
static void compute_element_normals(COM::Attribute *nrm, const int *to_normalize=NULL, const COM::Attribute *pnts=NULL)
Computes elemental normals of a given window.
void set(const Value *p, Element_node_enumerator &ene, int strd)
initialize the accessor with a pointer and a specific stride.
void next()
Go to the next element within the connectivity tables of a pane.