BELFEM 0.9.3
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
147 void
148 insert_edge( Edge * aEdge, const uint aIndex ) override;
149
150//------------------------------------------------------------------------------
151
155 void
156 insert_face( Face * aFace, const uint aIndex ) override;
157
158//------------------------------------------------------------------------------
159
163 bool
164 has_edges() const override;
165
166//------------------------------------------------------------------------------
167
168 size_t
169 memory() const override;
170
171//------------------------------------------------------------------------------
172
176 bool
177 has_faces() const override;
178
179//------------------------------------------------------------------------------
180
184 Edge *
185 edge( const uint aIndex ) override;
186
190 const Edge *
191 edge( const uint aIndex ) const override;
192
193//------------------------------------------------------------------------------
194
198 Face *
199 face( const uint aIndex ) override;
200
204 const Face *
205 face( const uint aIndex ) const override;
206
207//------------------------------------------------------------------------------
208
212 void unflag_nodes( const uint8_t aIndex=0 ) override;
213
214//------------------------------------------------------------------------------
215
219 void flag_nodes( const uint8_t aIndex=0 ) override;
220
221//------------------------------------------------------------------------------
222
226 void
227 flag_corner_nodes( const uint8_t aIndex=0 ) override;
228
229//------------------------------------------------------------------------------
230
234 void
235 unflag_corner_nodes( const uint8_t aIndex=0 ) override;
236
237//------------------------------------------------------------------------------
238
242 void
243 unflag_edges() override;
244
245//------------------------------------------------------------------------------
246
250 void
251 flag_edges() override;
252
253//------------------------------------------------------------------------------
254
258 void
259 unflag_faces() override;
260
261//------------------------------------------------------------------------------
262
266 void
267 flag_faces() override;
268
269//------------------------------------------------------------------------------
270
271 void
272 get_nodes_of_facet( const uint aFacetIndex, Cell< Node * > & aNodes ) override;
273
274//------------------------------------------------------------------------------
275
276 void
277 get_corner_nodes_of_facet( const uint aFacetIndex, Cell< Node * > & aNodes ) override;
278
279//------------------------------------------------------------------------------
280
281 void
282 get_edges_of_facet( const uint aFacetIndex, Cell< Edge * > & aEdges ) override;
283
284//------------------------------------------------------------------------------
285
286 void
287 get_nodes_of_edge( const uint aEdgeIndex, Cell< Node * > & aNodes ) override;
288
289//------------------------------------------------------------------------------
290
294 void
295 allocate_edge_container() override;
296
297//------------------------------------------------------------------------------
298
302 void
303 allocate_face_container() override;
304
305//------------------------------------------------------------------------------
306
310 void
311 print() const override ;
312
313//------------------------------------------------------------------------------
314
315 void
316 set_edge_direction( const uint aEdgeIndex, const bool aIsPlus ) override;
317
318//------------------------------------------------------------------------------
319
320
321 bool
322 edge_direction( const uint aEdgeIndex ) const override ;
323
324//------------------------------------------------------------------------------
325
329 void
330 reset_edge_container() override;
331
332//------------------------------------------------------------------------------
333
337 void
338 reset_face_container() override;
339
340//------------------------------------------------------------------------------
341
342 bool
343 is_thinshell() const override;
344
345//------------------------------------------------------------------------------
346 private:
347//------------------------------------------------------------------------------
348
352 void
353 allocate_node_container();
354
355//------------------------------------------------------------------------------
356
360 void
361 reset_node_container();
362
363//------------------------------------------------------------------------------
364
368 void
369 throw_facet_error( const uint aFacetIndex );
370
371//------------------------------------------------------------------------------
372
376 void
377 throw_edge_error( const uint aEdgeIndex );
378
379//------------------------------------------------------------------------------
380 };
381
382//------------------------------------------------------------------------------
383
384 template< uint N, uint C, uint E, uint T, uint F >
385 void
386 ElementTemplate< N, C, E, T, F >::allocate_node_container()
387 {
388 mNodes = new Node * [ N ];
389
390 for ( uint k = 0; k < N; ++k )
391 {
392 mNodes[ k ] = nullptr;
393 }
394
395 }
396
397//------------------------------------------------------------------------------
398
399 template< uint N, uint C, uint E, uint T, uint F >
400 void
402 {
403 // make sure that container is empty
404 BELFEM_ASSERT( ! mHaveEdges, "Edge container for element %lu has already been allocated",
405 ( long unsigned int ) this->id() );
406
407 mEdges = new Edge * [ E ];
408
409 for ( uint k = 0; k < E; ++k )
410 {
411 mEdges[ k ] = nullptr;
412 }
413
414 mHaveEdges = true ;
415 }
416
417//------------------------------------------------------------------------------
418
419 template< uint N, uint C, uint E, uint T, uint F >
420 void
422 {
423 // make sure that container is empty
424 BELFEM_ASSERT( ! mHaveFaces, "Face container for element %lu has already been allocated",
425 ( long unsigned int ) this->id() );
426
427 mFaces = new Face * [ F ];
428
429 for ( uint k = 0; k < F ; ++k )
430 {
431 mFaces[ k ] = nullptr;
432 }
433
434 mHaveFaces = true ;
435 }
436
437//------------------------------------------------------------------------------
438
439 template< uint N, uint C, uint E, uint T, uint F >
441 Element( aID )
442 {
443 this->allocate_node_container();
444
445 // default setting, might be overwritten later the curved checker
449 }
450
451//------------------------------------------------------------------------------
452
453 template< uint N, uint C, uint E, uint T, uint F >
455 {
456 this->reset_face_container();
457 this->reset_edge_container();
458 this->reset_node_container();
459 }
460
461//------------------------------------------------------------------------------
462
463 template< uint N, uint C, uint E, uint T, uint F >
466 {
467 BELFEM_ERROR( false, "type() function not implemented for ElementTemplate< %u, %u, %u, %u, %u > with id %lu",
468 ( unsigned int ) N,
469 ( unsigned int ) C,
470 ( unsigned int ) E,
471 ( unsigned int ) T,
472 ( unsigned int ) F,
473 ( long unsigned int ) this->id() );
474
476 }
477
478//------------------------------------------------------------------------------
479
480 template< uint N, uint C, uint E, uint T, uint F >
481 uint
483 {
484 return N;
485 }
486
487//------------------------------------------------------------------------------
488
489 template< uint N, uint C, uint E, uint T, uint F >
490 inline uint
495
496//------------------------------------------------------------------------------
497
498 template< uint N, uint C, uint E, uint T, uint F >
499 uint
501 {
502 return T;
503 }
504
505//------------------------------------------------------------------------------
506
507 template< uint N, uint C, uint E, uint T, uint F >
508 uint
510 {
511 return F;
512 }
513
514
515//------------------------------------------------------------------------------
516
517 template< uint N, uint C, uint E, uint T, uint F >
518 uint
523
524//------------------------------------------------------------------------------
525
526 template< uint N, uint C, uint E, uint T, uint F >
527 size_t
529 {
530 // the node array always exists, edges and faces only on demand
531 size_t tMem = sizeof( *this ) + this->array_memory()
532 + N * sizeof( Node * );
533
534 if( mHaveEdges )
535 {
536 tMem += E * sizeof( Edge * );
537 }
538 if( mHaveFaces )
539 {
540 tMem += F * sizeof( Face * );
541 }
542
543 return tMem ;
544 }
545
546//------------------------------------------------------------------------------
547
548 template< uint N, uint C, uint E, uint T, uint F >
549 void
550 ElementTemplate< N, C, E, T, F >::reset_node_container()
551 {
552 delete[] mNodes;
553 }
554//------------------------------------------------------------------------------
555
556 template< uint N, uint C, uint E, uint T, uint F >
557 void
559 {
560 if ( mHaveFaces )
561 {
562 delete[] mFaces;
563
564 mHaveFaces = false;
565 }
566 }
567
568//------------------------------------------------------------------------------
569
570 template< uint N, uint C, uint E, uint T, uint F >
571 void
573 {
574 if ( mHaveEdges )
575 {
576 delete[] mEdges;
577
578 mHaveEdges = false;
579 }
580 }
581
582//------------------------------------------------------------------------------
583
584 template< uint N, uint C, uint E, uint T, uint F >
585 void
587 {
588 // make sure that index is valid
589 BELFEM_ASSERT(aIndex < N,
590 "Tried to write node into index %u of %u node element %lu",
591 ( unsigned int ) aIndex,
592 ( unsigned int ) N,
593 ( long unsigned int ) this->id() );
594
595 mNodes[ aIndex ] = aNode;
596 }
597
598//------------------------------------------------------------------------------
599
600 template< uint N, uint C, uint E, uint T, uint F >
601 Node *
603 {
604 // make sure that index is valid
605 BELFEM_ASSERT(aIndex < N,
606 "Tried acces node %u of %u node element %lu",
607 ( unsigned int ) aIndex,
608 ( unsigned int ) N,
609 ( long unsigned int ) this->id() );
610
611 return mNodes[ aIndex ];
612 }
613
614//------------------------------------------------------------------------------
615
616 template< uint N, uint C, uint E, uint T, uint F >
617 const Node *
619 {
620 // make sure that index is valid
621 BELFEM_ASSERT(aIndex < N,
622 "Tried acces node %u of %u node element %lu",
623 ( unsigned int ) aIndex,
624 ( unsigned int ) N,
625 ( long unsigned int ) this->id() );
626
627 return mNodes[ aIndex ];
628 }
629
630
631//------------------------------------------------------------------------------
632
633 template< uint N, uint C, uint E, uint T, uint F >
634 inline bool
636 {
637 return mHaveEdges ;
638 }
639
640//------------------------------------------------------------------------------
641
642 template< uint N, uint C, uint E, uint T, uint F >
643 inline bool
645 {
646 return mHaveFaces ;
647 }
648
649//------------------------------------------------------------------------------
650
651 template< uint N, uint C, uint E, uint T, uint F >
652 void
654 {
655 // make sure that index is valid
656 BELFEM_ASSERT(aIndex < E,
657 "Tried to write edge into index %u of %u element %lu",
658 ( unsigned int ) aIndex,
659 ( unsigned int ) E,
660 ( long unsigned int ) this->id() );
661
662 mEdges[ aIndex ] = aEdge;
663 }
664
665// ------------------------------------------------------------------
666
667 template< uint N, uint C, uint E, uint T, uint F >
668 void
670 {
671 // make sure that index is valid
672 BELFEM_ASSERT( aIndex < F,
673 "Tried to write face into index %u of %u element %lu",
674 ( unsigned int ) aIndex,
675 ( unsigned int ) F,
676 ( long unsigned int ) this->id() );
677
678 mFaces[ aIndex ] = aFace;
679 }
680
681//------------------------------------------------------------------------------
682
683 template< uint N, uint C, uint E, uint T, uint F >
684 Edge *
686 {
687
688 BELFEM_ASSERT( mHaveEdges, "Edges for element %lu on block %lu have not been allocated",
689 ( long unsigned int ) this->id(),
690 ( long unsigned int ) this->block_id() );
691
692 // make sure that index is valid
693 BELFEM_ASSERT( aIndex < E,
694 "Tried to access edge %u of %u node element %lu",
695 ( unsigned int ) aIndex,
696 ( unsigned int ) E,
697 ( long unsigned int ) this->id() );
698
699 return mEdges[ aIndex ];
700 }
701
702//------------------------------------------------------------------------------
703
704 template< uint N, uint C, uint E, uint T, uint F >
705 const Edge *
707 {
708
709 BELFEM_ASSERT( mHaveEdges, "Edges for element %lu have not been allocated",
710 ( long unsigned int ) this->id() );
711
712 // make sure that index is valid
713 BELFEM_ASSERT(aIndex < E,
714 "Tried to access edge %u of %u node element %lu",
715 ( unsigned int ) aIndex,
716 ( unsigned int ) E,
717 ( long unsigned int ) this->id() );
718
719 return mEdges[ aIndex ];
720 }
721
722//------------------------------------------------------------------------------
723
724 template< uint N, uint C, uint E, uint T, uint F >
725 Face *
727 {
728
729 BELFEM_ASSERT( mHaveFaces, "Faces for element %lu ( block %lu ) have not been allocated",
730 ( long unsigned int ) this->id(),
731 ( long unsigned int ) this->block_id() );
732
733 // make sure that index is valid
734 BELFEM_ASSERT(aIndex < F,
735 "Tried to access face %u of %u node element %lu",
736 ( unsigned int ) aIndex,
737 ( unsigned int ) F,
738 ( long unsigned int ) this->id() );
739
740 return mFaces[ aIndex ];
741 }
742
743//------------------------------------------------------------------------------
744
745 template< uint N, uint C, uint E, uint T, uint F >
746 const Face *
748 {
749
750 BELFEM_ASSERT( mHaveFaces, "Edges for element %lu have not been allocated",
751 ( long unsigned int ) this->id() );
752
753 // make sure that index is valid
754 BELFEM_ASSERT(aIndex < F,
755 "Tried to access face %u of %u node element %lu",
756 ( unsigned int ) aIndex,
757 ( unsigned int ) F,
758 ( long unsigned int ) this->id() );
759
760 return mFaces[ aIndex ];
761 }
762
763//------------------------------------------------------------------------------
764
765 template< uint N, uint C, uint E, uint T, uint F >
766 void
768 {
769 for( uint k=0; k<N; ++k )
770 {
771 mNodes[ k ]->unflag( aIndex );
772 }
773 }
774
775//------------------------------------------------------------------------------
776
777 template< uint N, uint C, uint E, uint T, uint F >
778 void
780 {
781 for( uint k=0; k<N; ++k )
782 {
783 mNodes[ k ]->flag( aIndex );
784 }
785 }
786
787//------------------------------------------------------------------------------
788
789 template< uint N, uint C, uint E, uint T, uint F >
790 void
792 {
793 for( uint k=0; k<C; ++k )
794 {
795 mNodes[ k ]->flag( aIndex );
796 }
797 }
798
799//------------------------------------------------------------------------------
800
801 template< uint N, uint C, uint E, uint T, uint F >
802 void
804 {
805 for( uint k=0; k<C; ++k )
806 {
807 mNodes[ k ]->unflag( aIndex );
808 }
809 }
810
811//------------------------------------------------------------------------------
812
813 template< uint N, uint C, uint E, uint T, uint F >
814 void
816 {
817 if( mHaveEdges )
818 {
819 for ( uint k = 0; k < E; ++k )
820 {
821 mEdges[ k ]->unflag();
822 }
823 }
824 }
825
826//------------------------------------------------------------------------------
827
828 template< uint N, uint C, uint E, uint T, uint F >
829 void
831 {
832 if( mHaveEdges )
833 {
834 for ( uint k = 0; k < E; ++k )
835 {
836 mEdges[ k ]->flag();
837 }
838 }
839 }
840
841//------------------------------------------------------------------------------
842
843 template< uint N, uint C, uint E, uint T, uint F >
844 void
846 {
847 if( mHaveFaces )
848 {
849 for ( uint k = 0; k < F; ++k )
850 {
851 mFaces[ k ]->unflag();
852 }
853 }
854 }
855
856//------------------------------------------------------------------------------
857
858 template< uint N, uint C, uint E, uint T, uint F >
859 void
861 {
862 if( mHaveFaces )
863 {
864 for ( uint k = 0; k < F; ++k )
865 {
866 mFaces[ k ]->flag();
867 }
868 }
869 }
870
871//------------------------------------------------------------------------------
872
873 template< uint N, uint C, uint E, uint T, uint F >
874 void
876 {
877 BELFEM_ERROR( false,
878 "Function get_nodes_of_facet() not implemented for element %lu",
879
880 ( long unsigned int ) this->id() );
881 }
882//------------------------------------------------------------------------------
883
884 template< uint N, uint C, uint E, uint T, uint F >
885 void
887 {
888 BELFEM_ERROR( false,
889 "Function get_corner_nodes_of_facet() not implemented for element %lu",
890 ( long unsigned int ) this->id() );
891 }
892
893//------------------------------------------------------------------------------
894
895 template< uint N, uint C, uint E, uint T, uint F >
896 void
898 {
899 BELFEM_ERROR( false,
900 "invalid call of base class function get_edges_of_facet() from element %lu",
901 ( long unsigned int ) this->id() );
902 }
903
904
905//------------------------------------------------------------------------------
906
907 template< uint N, uint C, uint E, uint T, uint F >
908 void
910 {
911 // unless this is a 3D element, this function is identical to get_nodes_of_facet
912 this->get_nodes_of_facet( aEdgeIndex, aNodes );
913 }
914
915//------------------------------------------------------------------------------
916
917 template< uint N, uint C, uint E, uint T, uint F >
918 void
919 ElementTemplate< N, C, E, T, F >::throw_facet_error( const uint aFacetIndex )
920 {
921 BELFEM_ERROR( aFacetIndex<T,
922 "invalid facet index %u for element %lu ( must be < %u )",
923 ( unsigned int ) aFacetIndex,
924 ( long unsigned int ) this->id(),
925 ( unsigned int ) T );
926 }
927
928//------------------------------------------------------------------------------
929
930 template< uint N, uint C, uint E, uint T, uint F >
931 void
932 ElementTemplate< N, C, E, T, F >::set_edge_direction( const uint aEdgeIndex, const bool aIsPlus )
933 {
934 BELFEM_ASSERT( mHaveEdges, "edges have not been allocated for element %lu",
935 ( long unsigned int ) this->id() );
936
937 BELFEM_ASSERT( aEdgeIndex<E,
938 "invalid edge index %u for element %lu ( must be < %u )",
939 ( unsigned int ) aEdgeIndex,
940 ( long unsigned int ) this->id(),
941 ( unsigned int ) E );
942
943 if( aIsPlus )
944 {
945 mEdgeOrientations.set( aEdgeIndex );
946 }
947 else
948 {
949 mEdgeOrientations.reset( aEdgeIndex );
950 }
951 }
952
953//------------------------------------------------------------------------------
954
955 template< uint N, uint C, uint E, uint T, uint F >
956 uint
958 {
959 BELFEM_ERROR( false, "no dimension implemented for this element" );
960 return BELFEM_UINT_MAX ;
961 }
962
963//------------------------------------------------------------------------------
964
965 template< uint N, uint C, uint E, uint T, uint F >
966 bool
968 {
969 BELFEM_ASSERT( mHaveEdges, "edges have not been allocated for element %lu",
970 ( long unsigned int ) this->id() );
971
972 BELFEM_ASSERT( aEdgeIndex<E,
973 "invalid edge index %u for element %lu ( must be < %u )",
974 ( unsigned int ) aEdgeIndex,
975 ( long unsigned int ) this->id(),
976 ( unsigned int ) E );
977
978 return mEdgeOrientations.test( aEdgeIndex );
979 }
980
981//------------------------------------------------------------------------------
982
983 template< uint N, uint C, uint E, uint T, uint F >
984 void
985 ElementTemplate< N, C, E, T, F >::throw_edge_error( const uint aEdgeIndex )
986 {
987 BELFEM_ERROR( aEdgeIndex<E,
988 "invalid edge index %u for element %lu ( must be < %u )",
989 ( unsigned int ) aEdgeIndex,
990 ( long unsigned int ) this->id(),
991 ( unsigned int ) E );
992 }
993
994//------------------------------------------------------------------------------
995
996 template <uint N, uint C, uint E, uint T, uint F>
998 {
999 return false ;
1000 }
1001
1002//------------------------------------------------------------------------------
1003
1004 template< uint N, uint C, uint E, uint T, uint F >
1005 void
1007 {
1008 std::cout << "Element " << this->id() << " of type " <<
1009 to_string( this->type() ) << std::endl << std::endl
1010
1011 << " Nodes : " << std::endl ;
1012
1013 for( uint k=0; k<N; ++k )
1014 {
1015 std::cout << " " << k << " " << mNodes[ k ]->id() << std::endl ;
1016 }
1017 }
1018
1019
1020//------------------------------------------------------------------------------
1021
1022 }
1023}
1024#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
A bounds-checked wrapper around std::vector.
Definition cl_Cell.hpp:45
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:909
size_t memory() const override
Definition cl_ElementTemplate.hpp:528
void get_nodes_of_facet(const uint aFacetIndex, Cell< Node * > &aNodes) override
Definition cl_ElementTemplate.hpp:875
void flag_faces() override
flag all faces of this element
Definition cl_ElementTemplate.hpp:860
void allocate_edge_container() override
Initialize the edge container.
Definition cl_ElementTemplate.hpp:401
void unflag_nodes(const uint8_t aIndex=0) override
unflag all nodes of this element
Definition cl_ElementTemplate.hpp:767
uint number_of_faces() const override
how faces can this element have
Definition cl_ElementTemplate.hpp:509
bool is_thinshell() const override
Definition cl_ElementTemplate.hpp:997
void unflag_faces() override
unflag all faces of this element
Definition cl_ElementTemplate.hpp:845
void flag_edges() override
flag all edges of this element
Definition cl_ElementTemplate.hpp:830
void flag_corner_nodes(const uint8_t aIndex=0) override
flag all corner nodes of this element
Definition cl_ElementTemplate.hpp:791
void print() const override
display some debug information
Definition cl_ElementTemplate.hpp:1006
uint number_of_edges() const override
how many edges this element has
Definition cl_ElementTemplate.hpp:519
void get_corner_nodes_of_facet(const uint aFacetIndex, Cell< Node * > &aNodes) override
Definition cl_ElementTemplate.hpp:886
void unflag_corner_nodes(const uint8_t aIndex=0) override
unflag all corner nodes of this element
Definition cl_ElementTemplate.hpp:803
Face * face(const uint aIndex) override
return the face pointer
Definition cl_ElementTemplate.hpp:726
void insert_edge(Edge *aEdge, const uint aIndex) override
Stores the pointer without taking ownership: the mesh owns the nodes, edges and faces,...
Definition cl_ElementTemplate.hpp:653
void reset_face_container() override
Delete the face container.
Definition cl_ElementTemplate.hpp:558
void flag_nodes(const uint8_t aIndex=0) override
flag all nodes of this element
Definition cl_ElementTemplate.hpp:779
void set_edge_direction(const uint aEdgeIndex, const bool aIsPlus) override
Definition cl_ElementTemplate.hpp:932
uint number_of_corner_nodes() const override
how many corner nodes does this element have ( for linear interpolation )
Definition cl_ElementTemplate.hpp:491
void reset_edge_container() override
Delete the edge container.
Definition cl_ElementTemplate.hpp:572
bool has_faces() const override
tells if the face container has been allocated
Definition cl_ElementTemplate.hpp:644
uint dimension() const override
Definition cl_ElementTemplate.hpp:957
Node * node(const uint aIndex) override
return the node pointer
Definition cl_ElementTemplate.hpp:602
void insert_face(Face *aFace, const uint aIndex) override
insert a face to a position in the member array
Definition cl_ElementTemplate.hpp:669
ElementType type() const override
return the type of the element
Definition cl_ElementTemplate.hpp:465
void unflag_edges() override
unflag all edges of this element
Definition cl_ElementTemplate.hpp:815
ElementTemplate(const id_t &aID)
Definition cl_ElementTemplate.hpp:440
bool has_edges() const override
tells if the edge container has been allocated
Definition cl_ElementTemplate.hpp:635
void get_edges_of_facet(const uint aFacetIndex, Cell< Edge * > &aEdges) override
Definition cl_ElementTemplate.hpp:897
void allocate_face_container() override
Initialize the face container.
Definition cl_ElementTemplate.hpp:421
uint number_of_facets() const override
how facets can this element have
Definition cl_ElementTemplate.hpp:500
~ElementTemplate() override
Definition cl_ElementTemplate.hpp:454
void insert_node(Node *aNode, const uint aIndex) override
insert a node to a position in the member array
Definition cl_ElementTemplate.hpp:586
Edge * edge(const uint aIndex) override
return the edge pointer
Definition cl_ElementTemplate.hpp:685
uint number_of_nodes() const override
how many nodes does this element have
Definition cl_ElementTemplate.hpp:482
bool edge_direction(const uint aEdgeIndex) const override
Definition cl_ElementTemplate.hpp:967
Definition cl_Face.hpp:29
Definition cl_Node.hpp:30
Definition cl_EF_EdgeFunction.hpp:24
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:79