BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_ElementTemplate.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_CL_ELEMENT_TEMPLATE_HPP
13#define BELFEM_CL_ELEMENT_TEMPLATE_HPP
14
15#include "assert.hpp"
16#include "typedefs.hpp"
17#include "cl_Bitset.hpp"
18#include "Mesh_Enums.hpp"
19#include "cl_Element.hpp"
20
21namespace belfem
22{
23 namespace mesh
24 {
25//------------------------------------------------------------------------------
26
36 template< uint N, uint C, uint E, uint T, uint F >
37 class ElementTemplate : public Element
38 {
40 Node **mNodes;
41
43 Edge **mEdges;
44
46 Face **mFaces;
47
49 bool mHaveEdges = false ;
50
52 bool mHaveFaces = false ;
53
56 Bitset<E> mEdgeOrientations ;
57
58//------------------------------------------------------------------------------
59 public:
60//------------------------------------------------------------------------------
61
62 ElementTemplate( const id_t & aID );
63
64//------------------------------------------------------------------------------
65
66 ~ElementTemplate() override;
67
68//------------------------------------------------------------------------------
69
74 type() const override;
75
76//------------------------------------------------------------------------------
77
78 uint
79 dimension() const override ;
80
81//------------------------------------------------------------------------------
82
86 uint
87 number_of_nodes() const override;
88
89//------------------------------------------------------------------------------
90
95 uint
96 number_of_corner_nodes() const override;
97
98//------------------------------------------------------------------------------
99
103 uint
104 number_of_facets() const override;
105
106//------------------------------------------------------------------------------
107
111 uint
112 number_of_faces() const override;
113
114//------------------------------------------------------------------------------
115
119 uint
120 number_of_edges() const override ;
121
122//------------------------------------------------------------------------------
123
127 void
128 insert_node( Node * aNode, const uint aIndex ) override;
129
130//------------------------------------------------------------------------------
131
135 Node *
136 node( const uint aIndex ) override;
137
138 const Node *
139 node( const uint aIndex ) const override;
140
141//------------------------------------------------------------------------------
142
146 void
147 insert_edge( Edge * aEdge, const uint aIndex ) override;
148
149//------------------------------------------------------------------------------
150
154 void
155 insert_face( Face * aFace, const uint aIndex ) override;
156
157//------------------------------------------------------------------------------
158
162 bool
163 has_edges() const override;
164
165//------------------------------------------------------------------------------
166
167 size_t
168 memory() const override;
169
170//------------------------------------------------------------------------------
171
175 bool
176 has_faces() const override;
177
178//------------------------------------------------------------------------------
179
183 Edge *
184 edge( const uint aIndex ) override;
185
189 const Edge *
190 edge( const uint aIndex ) const override;
191
192//------------------------------------------------------------------------------
193
197 Face *
198 face( const uint aIndex ) override;
199
203 const Face *
204 face( const uint aIndex ) const override;
205
206//------------------------------------------------------------------------------
207
211 void unflag_nodes( const uint8_t aIndex=0 ) override;
212
213//------------------------------------------------------------------------------
214
218 void flag_nodes( const uint8_t aIndex=0 ) override;
219
220//------------------------------------------------------------------------------
221
225 void
226 flag_corner_nodes( const uint8_t aIndex=0 ) override;
227
228//------------------------------------------------------------------------------
229
233 void
234 unflag_corner_nodes( const uint8_t aIndex=0 ) override;
235
236//------------------------------------------------------------------------------
237
241 void
242 unflag_edges() override;
243
244//------------------------------------------------------------------------------
245
249 void
250 flag_edges() override;
251
252//------------------------------------------------------------------------------
253
257 void
258 unflag_faces() override;
259
260//------------------------------------------------------------------------------
261
265 void
266 flag_faces() override;
267
268//------------------------------------------------------------------------------
269
270 void
271 get_nodes_of_facet( const uint aFacetIndex, Cell< Node * > & aNodes ) override;
272
273//------------------------------------------------------------------------------
274
275 void
276 get_corner_nodes_of_facet( const uint aFacetIndex, Cell< Node * > & aNodes ) override;
277
278//------------------------------------------------------------------------------
279
280 void
281 get_edges_of_facet( const uint aFacetIndex, Cell< Edge * > & aEdges ) override;
282
283//------------------------------------------------------------------------------
284
285 void
286 get_nodes_of_edge( const uint aEdgeIndex, Cell< Node * > & aNodes ) override;
287
288//------------------------------------------------------------------------------
289
293 void
294 allocate_edge_container() override;
295
296//------------------------------------------------------------------------------
297
301 void
302 allocate_face_container() override;
303
304//------------------------------------------------------------------------------
305
309 void
310 print() const override ;
311
312//------------------------------------------------------------------------------
313
314 void
315 set_edge_direction( const uint aEdgeIndex, const bool aIsPlus ) override;
316
317//------------------------------------------------------------------------------
318
319
320 bool
321 edge_direction( const uint aEdgeIndex ) const override ;
322
323//------------------------------------------------------------------------------
324
328 void
329 reset_edge_container() override;
330
331//------------------------------------------------------------------------------
332
336 void
337 reset_face_container() override;
338
339//------------------------------------------------------------------------------
340
341 bool
342 is_thinshell() const override;
343
344//------------------------------------------------------------------------------
345 private:
346//------------------------------------------------------------------------------
347
351 void
352 allocate_node_container();
353
354//------------------------------------------------------------------------------
355
359 void
360 reset_node_container();
361
362//------------------------------------------------------------------------------
363
367 void
368 throw_facet_error( const uint aFacetIndex );
369
370//------------------------------------------------------------------------------
371
375 void
376 throw_edge_error( const uint aEdgeIndex );
377
378//------------------------------------------------------------------------------
379 };
380
381//------------------------------------------------------------------------------
382
383 template< uint N, uint C, uint E, uint T, uint F >
384 void
385 ElementTemplate< N, C, E, T, F >::allocate_node_container()
386 {
387 // create the contiainer
388 mNodes = new Node * [ N ];
389
390 // populate the members with null pointers
391 for ( uint k = 0; k < N; ++k )
392 {
393 mNodes[ k ] = nullptr;
394 }
395
396 }
397
398//------------------------------------------------------------------------------
399
400 template< uint N, uint C, uint E, uint T, uint F >
401 void
403 {
404 // make sure that container is empty
405 BELFEM_ASSERT( ! mHaveEdges, "Edge container for element %lu has already been allocated",
406 ( long unsigned int ) this->id() );
407
408 // create the contiainer
409 mEdges = new Edge * [ E ];
410
411 // populate the members with null pointers
412 for ( uint k = 0; k < E; ++k )
413 {
414 mEdges[ k ] = nullptr;
415 }
416
417 mHaveEdges = true ;
418 }
419
420//------------------------------------------------------------------------------
421
422 template< uint N, uint C, uint E, uint T, uint F >
423 void
425 {
426 // make sure that container is empty
427 BELFEM_ASSERT( ! mHaveFaces, "Face container for element %lu has already been allocated",
428 ( long unsigned int ) this->id() );
429
430 // create the contiainer
431 mFaces = new Face * [ F ];
432
433 // populate the members with null pointers
434 for ( uint k = 0; k < F ; ++k )
435 {
436 mFaces[ k ] = nullptr;
437 }
438
439 mHaveFaces = true ;
440 }
441
442//------------------------------------------------------------------------------
443
444 template< uint N, uint C, uint E, uint T, uint F >
446 Element( aID )
447 {
448 this->allocate_node_container();
449
450 // default setting, might be overwritten later the curved checker
454 }
455
456//------------------------------------------------------------------------------
457
458 template< uint N, uint C, uint E, uint T, uint F >
460 {
461 this->reset_face_container();
462 this->reset_edge_container();
463 this->reset_node_container();
464 }
465
466//------------------------------------------------------------------------------
467
468 template< uint N, uint C, uint E, uint T, uint F >
471 {
472 BELFEM_ERROR( false, "type() function not implemented for ElementTemplate< %u, %u, %u, %u, %u > with id %lu",
473 ( unsigned int ) N,
474 ( unsigned int ) C,
475 ( unsigned int ) E,
476 ( unsigned int ) T,
477 ( unsigned int ) F,
478 ( long unsigned int ) this->id() );
479
481 }
482
483//------------------------------------------------------------------------------
484
485 template< uint N, uint C, uint E, uint T, uint F >
486 uint
488 {
489 return N;
490 }
491
492//------------------------------------------------------------------------------
493
494 template< uint N, uint C, uint E, uint T, uint F >
495 inline uint
500
501//------------------------------------------------------------------------------
502
503 template< uint N, uint C, uint E, uint T, uint F >
504 uint
506 {
507 return T;
508 }
509
510//------------------------------------------------------------------------------
511
512 template< uint N, uint C, uint E, uint T, uint F >
513 uint
515 {
516 return F;
517 }
518
519
520//------------------------------------------------------------------------------
521
522 template< uint N, uint C, uint E, uint T, uint F >
523 uint
528
529//------------------------------------------------------------------------------
530
531 template< uint N, uint C, uint E, uint T, uint F >
532 size_t
534 {
535 // the node array always exists, edges and faces only on demand
536 size_t tMem = sizeof( *this ) + this->array_memory()
537 + N * sizeof( Node * );
538
539 if( mHaveEdges )
540 {
541 tMem += E * sizeof( Edge * );
542 }
543 if( mHaveFaces )
544 {
545 tMem += F * sizeof( Face * );
546 }
547
548 return tMem ;
549 }
550
551//------------------------------------------------------------------------------
552
553 template< uint N, uint C, uint E, uint T, uint F >
554 void
555 ElementTemplate< N, C, E, T, F >::reset_node_container()
556 {
557 // delete the node container
558 delete[] mNodes;
559 }
560//------------------------------------------------------------------------------
561
562 template< uint N, uint C, uint E, uint T, uint F >
563 void
565 {
566 // check if container has been allocated
567 if ( mHaveFaces )
568 {
569 // delete the face container
570 delete[] mFaces;
571
572 // unset flag
573 mHaveFaces = false;
574 }
575 }
576
577//------------------------------------------------------------------------------
578
579 template< uint N, uint C, uint E, uint T, uint F >
580 void
582 {
583 // check if container has been allocated
584 if ( mHaveEdges )
585 {
586 // delete the edge container
587 delete[] mEdges;
588
589 // unset flag
590 mHaveEdges = false;
591 }
592 }
593
594//------------------------------------------------------------------------------
595
596 template< uint N, uint C, uint E, uint T, uint F >
597 void
599 {
600 // make sure that index is valid
601 BELFEM_ASSERT(aIndex < N,
602 "Tried to write node into index %u of %u node element %lu",
603 ( unsigned int ) aIndex,
604 ( unsigned int ) N,
605 ( long unsigned int ) this->id() );
606
607 // write node into index
608 mNodes[ aIndex ] = aNode;
609 }
610
611//------------------------------------------------------------------------------
612
613 template< uint N, uint C, uint E, uint T, uint F >
614 Node *
616 {
617 // make sure that index is valid
618 BELFEM_ASSERT(aIndex < N,
619 "Tried acces node %u of %u node element %lu",
620 ( unsigned int ) aIndex,
621 ( unsigned int ) N,
622 ( long unsigned int ) this->id() );
623
624 // return the node
625 return mNodes[ aIndex ];
626 }
627
628//------------------------------------------------------------------------------
629
630 template< uint N, uint C, uint E, uint T, uint F >
631 const Node *
633 {
634 // make sure that index is valid
635 BELFEM_ASSERT(aIndex < N,
636 "Tried acces node %u of %u node element %lu",
637 ( unsigned int ) aIndex,
638 ( unsigned int ) N,
639 ( long unsigned int ) this->id() );
640
641 // return the node
642 return mNodes[ aIndex ];
643 }
644
645
646//------------------------------------------------------------------------------
647
648 template< uint N, uint C, uint E, uint T, uint F >
649 inline bool
651 {
652 return mHaveEdges ;
653 }
654
655//------------------------------------------------------------------------------
656
657 template< uint N, uint C, uint E, uint T, uint F >
658 inline bool
660 {
661 return mHaveFaces ;
662 }
663
664//------------------------------------------------------------------------------
665
666 template< uint N, uint C, uint E, uint T, uint F >
667 void
669 {
670 // make sure that index is valid
671 BELFEM_ASSERT(aIndex < E,
672 "Tried to write edge into index %u of %u element %lu",
673 ( unsigned int ) aIndex,
674 ( unsigned int ) E,
675 ( long unsigned int ) this->id() );
676
677 // write node into index
678 mEdges[ aIndex ] = aEdge;
679 }
680
681// ------------------------------------------------------------------
682
683 template< uint N, uint C, uint E, uint T, uint F >
684 void
686 {
687 // make sure that index is valid
688 BELFEM_ASSERT( aIndex < F,
689 "Tried to write face into index %u of %u element %lu",
690 ( unsigned int ) aIndex,
691 ( unsigned int ) F,
692 ( long unsigned int ) this->id() );
693
694 // write node into index
695 mFaces[ aIndex ] = aFace;
696 }
697
698//------------------------------------------------------------------------------
699
700 template< uint N, uint C, uint E, uint T, uint F >
701 Edge *
703 {
704
705 BELFEM_ASSERT( mHaveEdges, "Edges for element %lu on block %lu have not been allocated",
706 ( long unsigned int ) this->id(),
707 ( long unsigned int ) this->block_id() );
708
709 // make sure that index is valid
710 BELFEM_ASSERT( aIndex < E,
711 "Tried to access edge %u of %u node element %lu",
712 ( unsigned int ) aIndex,
713 ( unsigned int ) E,
714 ( long unsigned int ) this->id() );
715
716 // return the node
717 return mEdges[ aIndex ];
718 }
719
720//------------------------------------------------------------------------------
721
722 template< uint N, uint C, uint E, uint T, uint F >
723 const Edge *
725 {
726
727 BELFEM_ASSERT( mHaveEdges, "Edges for element %lu have not been allocated",
728 ( long unsigned int ) this->id() );
729
730 // make sure that index is valid
731 BELFEM_ASSERT(aIndex < E,
732 "Tried to access edge %u of %u node element %lu",
733 ( unsigned int ) aIndex,
734 ( unsigned int ) E,
735 ( long unsigned int ) this->id() );
736
737 // return the node
738 return mEdges[ aIndex ];
739 }
740
741//------------------------------------------------------------------------------
742
743 template< uint N, uint C, uint E, uint T, uint F >
744 Face *
746 {
747
748 BELFEM_ASSERT( mHaveFaces, "Faces for element %lu ( block %lu ) have not been allocated",
749 ( long unsigned int ) this->id(),
750 ( long unsigned int ) this->block_id() );
751
752 // make sure that index is valid
753 BELFEM_ASSERT(aIndex < F,
754 "Tried to access face %u of %u node element %lu",
755 ( unsigned int ) aIndex,
756 ( unsigned int ) F,
757 ( long unsigned int ) this->id() );
758
759 // return the node
760 return mFaces[ aIndex ];
761 }
762
763//------------------------------------------------------------------------------
764
765 template< uint N, uint C, uint E, uint T, uint F >
766 const Face *
768 {
769
770 BELFEM_ASSERT( mHaveFaces, "Edges for element %lu have not been allocated",
771 ( long unsigned int ) this->id() );
772
773 // make sure that index is valid
774 BELFEM_ASSERT(aIndex < F,
775 "Tried to access face %u of %u node element %lu",
776 ( unsigned int ) aIndex,
777 ( unsigned int ) F,
778 ( long unsigned int ) this->id() );
779
780 // return the node
781 return mFaces[ aIndex ];
782 }
783
784//------------------------------------------------------------------------------
785
786 template< uint N, uint C, uint E, uint T, uint F >
787 void
789 {
790 for( uint k=0; k<N; ++k )
791 {
792 mNodes[ k ]->unflag( aIndex );
793 }
794 }
795
796//------------------------------------------------------------------------------
797
798 template< uint N, uint C, uint E, uint T, uint F >
799 void
801 {
802 for( uint k=0; k<N; ++k )
803 {
804 mNodes[ k ]->flag( aIndex );
805 }
806 }
807
808//------------------------------------------------------------------------------
809
810 template< uint N, uint C, uint E, uint T, uint F >
811 void
813 {
814 for( uint k=0; k<C; ++k )
815 {
816 mNodes[ k ]->flag( aIndex );
817 }
818 }
819
820//------------------------------------------------------------------------------
821
822 template< uint N, uint C, uint E, uint T, uint F >
823 void
825 {
826 for( uint k=0; k<C; ++k )
827 {
828 mNodes[ k ]->unflag( aIndex );
829 }
830 }
831
832//------------------------------------------------------------------------------
833
834 template< uint N, uint C, uint E, uint T, uint F >
835 void
837 {
838 if( mHaveEdges )
839 {
840 for ( uint k = 0; k < E; ++k )
841 {
842 mEdges[ k ]->unflag();
843 }
844 }
845 }
846
847//------------------------------------------------------------------------------
848
849 template< uint N, uint C, uint E, uint T, uint F >
850 void
852 {
853 if( mHaveEdges )
854 {
855 for ( uint k = 0; k < E; ++k )
856 {
857 mEdges[ k ]->flag();
858 }
859 }
860 }
861
862//------------------------------------------------------------------------------
863
864 template< uint N, uint C, uint E, uint T, uint F >
865 void
867 {
868 if( mHaveFaces )
869 {
870 for ( uint k = 0; k < F; ++k )
871 {
872 mFaces[ k ]->unflag();
873 }
874 }
875 }
876
877//------------------------------------------------------------------------------
878
879 template< uint N, uint C, uint E, uint T, uint F >
880 void
882 {
883 if( mHaveFaces )
884 {
885 for ( uint k = 0; k < F; ++k )
886 {
887 mFaces[ k ]->flag();
888 }
889 }
890 }
891
892//------------------------------------------------------------------------------
893
894 template< uint N, uint C, uint E, uint T, uint F >
895 void
897 {
898 BELFEM_ERROR( false,
899 "Function get_nodes_of_facet() not implemented for element %lu",
900
901 ( long unsigned int ) this->id() );
902 }
903//------------------------------------------------------------------------------
904
905 template< uint N, uint C, uint E, uint T, uint F >
906 void
908 {
909 BELFEM_ERROR( false,
910 "Function get_corner_nodes_of_facet() not implemented for element %lu",
911 ( long unsigned int ) this->id() );
912 }
913
914//------------------------------------------------------------------------------
915
916 template< uint N, uint C, uint E, uint T, uint F >
917 void
919 {
920 BELFEM_ERROR( false,
921 "invalid call of base class function get_edges_of_facet() from element %lu",
922 ( long unsigned int ) this->id() );
923 }
924
925
926//------------------------------------------------------------------------------
927
928 template< uint N, uint C, uint E, uint T, uint F >
929 void
931 {
932 // unless this is a 3D element, this function is identical to get_nodes_of_facet
933 this->get_nodes_of_facet( aEdgeIndex, aNodes );
934 }
935
936//------------------------------------------------------------------------------
937
938 template< uint N, uint C, uint E, uint T, uint F >
939 void
940 ElementTemplate< N, C, E, T, F >::throw_facet_error( const uint aFacetIndex )
941 {
942 BELFEM_ERROR( aFacetIndex<T,
943 "invalid facet index %u for element %lu ( must be < %u )",
944 ( unsigned int ) aFacetIndex,
945 ( long unsigned int ) this->id(),
946 ( unsigned int ) T );
947 }
948
949//------------------------------------------------------------------------------
950
951 template< uint N, uint C, uint E, uint T, uint F >
952 void
953 ElementTemplate< N, C, E, T, F >::set_edge_direction( const uint aEdgeIndex, const bool aIsPlus )
954 {
955 BELFEM_ASSERT( mHaveEdges, "edges have not been allocated for element %lu",
956 ( long unsigned int ) this->id() );
957
958 BELFEM_ASSERT( aEdgeIndex<E,
959 "invalid edge index %u for element %lu ( must be < %u )",
960 ( unsigned int ) aEdgeIndex,
961 ( long unsigned int ) this->id(),
962 ( unsigned int ) E );
963
964 if( aIsPlus )
965 {
966 mEdgeOrientations.set( aEdgeIndex );
967 }
968 else
969 {
970 mEdgeOrientations.reset( aEdgeIndex );
971 }
972 }
973
974//------------------------------------------------------------------------------
975
976 template< uint N, uint C, uint E, uint T, uint F >
977 uint
979 {
980 BELFEM_ERROR( false, "no dimension implemented for this element" );
981 return BELFEM_UINT_MAX ;
982 }
983
984//------------------------------------------------------------------------------
985
986 template< uint N, uint C, uint E, uint T, uint F >
987 bool
989 {
990 BELFEM_ASSERT( mHaveEdges, "edges have not been allocated for element %lu",
991 ( long unsigned int ) this->id() );
992
993 BELFEM_ASSERT( aEdgeIndex<E,
994 "invalid edge index %u for element %lu ( must be < %u )",
995 ( unsigned int ) aEdgeIndex,
996 ( long unsigned int ) this->id(),
997 ( unsigned int ) E );
998
999 return mEdgeOrientations.test( aEdgeIndex );
1000 }
1001
1002//------------------------------------------------------------------------------
1003
1004 template< uint N, uint C, uint E, uint T, uint F >
1005 void
1006 ElementTemplate< N, C, E, T, F >::throw_edge_error( const uint aEdgeIndex )
1007 {
1008 BELFEM_ERROR( aEdgeIndex<E,
1009 "invalid edge index %u for element %lu ( must be < %u )",
1010 ( unsigned int ) aEdgeIndex,
1011 ( long unsigned int ) this->id(),
1012 ( unsigned int ) E );
1013 }
1014
1015//------------------------------------------------------------------------------
1016
1017 template <uint N, uint C, uint E, uint T, uint F>
1019 {
1020 return false ;
1021 }
1022
1023//------------------------------------------------------------------------------
1024
1025 template< uint N, uint C, uint E, uint T, uint F >
1026 void
1028 {
1029 std::cout << "Element " << this->id() << " of type " <<
1030 to_string( this->type() ) << std::endl << std::endl
1031
1032 << " Nodes : " << std::endl ;
1033
1034 for( uint k=0; k<N; ++k )
1035 {
1036 std::cout << " " << k << " " << mNodes[ k ]->id() << std::endl ;
1037 }
1038 }
1039
1040
1041//------------------------------------------------------------------------------
1042
1043 }
1044}
1045#endif //BELFEM_CL_ELEMENT_TEMPLATE_HPP
#define BELFEM_ERROR(aCheck,...)
Definition assert.hpp:264
#define BELFEM_ASSERT(aCheck,...)
Definition assert.hpp:244
Compile-time fixed-size bitset.
Definition cl_Bitset.hpp:32
Cell is a wrapper around the standard vector.
Definition cl_Cell.hpp:42
id_t id() const
Definition cl_Graph_Vertex.hpp:218
Special Edge class for NEDELEC-Type elements.
Definition cl_Edge.hpp:30
id_t block_id() const
Definition cl_Element.hpp:728
size_t array_memory() const
Definition cl_Element.hpp:826
Element(const id_t aID)
Definition cl_Element.cpp:21
bool mCurvedFlag
flag telling if this element is curved
Definition cl_Element.hpp:41
void get_nodes_of_edge(const uint aEdgeIndex, Cell< Node * > &aNodes) override
Definition cl_ElementTemplate.hpp:930
size_t memory() const override
Definition cl_ElementTemplate.hpp:533
void get_nodes_of_facet(const uint aFacetIndex, Cell< Node * > &aNodes) override
Definition cl_ElementTemplate.hpp:896
void flag_faces() override
flag all faces of this element
Definition cl_ElementTemplate.hpp:881
void allocate_edge_container() override
Initialize the edge container.
Definition cl_ElementTemplate.hpp:402
void unflag_nodes(const uint8_t aIndex=0) override
unflag all nodes of this element
Definition cl_ElementTemplate.hpp:788
uint number_of_faces() const override
how faces can this element have
Definition cl_ElementTemplate.hpp:514
bool is_thinshell() const override
Definition cl_ElementTemplate.hpp:1018
void unflag_faces() override
unflag all faces of this element
Definition cl_ElementTemplate.hpp:866
void flag_edges() override
flag all edges of this element
Definition cl_ElementTemplate.hpp:851
void flag_corner_nodes(const uint8_t aIndex=0) override
flag all corner nodes of this element
Definition cl_ElementTemplate.hpp:812
void print() const override
display some debug information
Definition cl_ElementTemplate.hpp:1027
uint number_of_edges() const override
how many edges this element has
Definition cl_ElementTemplate.hpp:524
void get_corner_nodes_of_facet(const uint aFacetIndex, Cell< Node * > &aNodes) override
Definition cl_ElementTemplate.hpp:907
void unflag_corner_nodes(const uint8_t aIndex=0) override
unflag all corner nodes of this element
Definition cl_ElementTemplate.hpp:824
Face * face(const uint aIndex) override
return the face pointer
Definition cl_ElementTemplate.hpp:745
void insert_edge(Edge *aEdge, const uint aIndex) override
insert an edge to a position in the member array
Definition cl_ElementTemplate.hpp:668
void reset_face_container() override
Delete the face container.
Definition cl_ElementTemplate.hpp:564
void flag_nodes(const uint8_t aIndex=0) override
flag all nodes of this element
Definition cl_ElementTemplate.hpp:800
void set_edge_direction(const uint aEdgeIndex, const bool aIsPlus) override
Definition cl_ElementTemplate.hpp:953
uint number_of_corner_nodes() const override
how many corner nodes does this element have ( for linear interpolation )
Definition cl_ElementTemplate.hpp:496
void reset_edge_container() override
Delete the edge container.
Definition cl_ElementTemplate.hpp:581
bool has_faces() const override
tells if the face container has been allocated
Definition cl_ElementTemplate.hpp:659
uint dimension() const override
Definition cl_ElementTemplate.hpp:978
Node * node(const uint aIndex) override
return the node pointer
Definition cl_ElementTemplate.hpp:615
void insert_face(Face *aFace, const uint aIndex) override
insert a face to a position in the member array
Definition cl_ElementTemplate.hpp:685
ElementType type() const override
return the type of the element
Definition cl_ElementTemplate.hpp:470
void unflag_edges() override
unflag all edges of this element
Definition cl_ElementTemplate.hpp:836
ElementTemplate(const id_t &aID)
Definition cl_ElementTemplate.hpp:445
bool has_edges() const override
tells if the edge container has been allocated
Definition cl_ElementTemplate.hpp:650
void get_edges_of_facet(const uint aFacetIndex, Cell< Edge * > &aEdges) override
Definition cl_ElementTemplate.hpp:918
void allocate_face_container() override
Initialize the face container.
Definition cl_ElementTemplate.hpp:424
uint number_of_facets() const override
how facets can this element have
Definition cl_ElementTemplate.hpp:505
~ElementTemplate() override
Definition cl_ElementTemplate.hpp:459
void insert_node(Node *aNode, const uint aIndex) override
insert a node to a position in the member array
Definition cl_ElementTemplate.hpp:598
Edge * edge(const uint aIndex) override
return the edge pointer
Definition cl_ElementTemplate.hpp:702
uint number_of_nodes() const override
how many nodes does this element have
Definition cl_ElementTemplate.hpp:487
bool edge_direction(const uint aEdgeIndex) const override
Definition cl_ElementTemplate.hpp:988
Definition cl_Face.hpp:29
Definition cl_Node.hpp:30
Definition cl_EF_EdgeFunction.hpp:17
belfem::InterpolationOrder interpolation_order(const enum ElementType aElementType)
Definition meshtools.cpp:210
string to_string(CutAlgorithm aCutAlgorithm)
Definition en_CutAlgorithm.hpp:31
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30
unsigned int id_t
Definition typedefs.hpp:41
ElementType
Element types.
Definition Mesh_Enums.hpp:27
@ UNDEFINED
Definition Mesh_Enums.hpp:64
@ E
Definition cl_Material.hpp:155
@ LINEAR
Definition Mesh_Enums.hpp:87
#define BELFEM_UINT_MAX
Definition typedefs.hpp:80