12#ifndef BELFEM_CL_FEM_POSTPROCESSOR_HPP
13#define BELFEM_CL_FEM_POSTPROCESSOR_HPP
68 bool mIsInitialized = false ;
70 bool mHaveEdges = false ;
71 bool mHaveFaces = false ;
88 real Origin[ 3 ] = { 0.0, 0.0, 0.0 };
89 real Normal[ 3 ] = { 0.0, 0.0, 0.0 };
90 real T1[ 3 ] = { 0.0, 0.0, 0.0 };
91 real T2[ 3 ] = { 0.0, 0.0, 0.0 };
99 static_assert( std::is_trivially_copyable< NodeFrame >::value,
100 "NodeFrame must stay plain data" );
104 uint mNumCoefficients = 0 ;
108 bool mShellLocal = false ;
119 real mElementThickness = 1.0 ;
242 create_target_fields();
245 check_if_we_have_edges_and_faces();
248 select_elements_and_owned_nodes();
251 select_all_relevant_nodes();
254 synch_node_indices(
const bool aOwnedOnly );
267 get_interpolation_order(
const Mesh * aMesh )
const;
270 compute_node_matrices();
273 select_recovery_mode();
282 shell_offset(
const uint aLocalNode,
const uint aK )
const ;
285 compute_node_frame(
mesh::Node * aNode, NodeFrame & aFrame );
288 add_node_gram(
mesh::Node * aNode,
const NodeFrame & aFrame );
291 compute_local_poly(
const NodeFrame & aFrame,
const uint aLocalNode,
const uint aK );
297 delete_node_matrices();
302 const uint aLocalNode,
307 synch_source_field(
const string & aField );
320 poly1_2d(
const real x,
const real y );
323 poly2_2d(
const real x,
const real y );
326 poly3_2d(
const real x,
const real y );
329 poly4_2d(
const real x,
const real y );
354 return mNumTruncated ;
386 (this->*mFunComputePoly)( aX );
393 (this->*mFunPoly2D )( aX( 0 ), aX( 1 ) );
399 (this->*mFunPoly3D )( aX( 0 ), aX( 1 ), aX( 2 ) );
403 Postprocessor::poly1_2d(
const real x,
const real y )
405 mPoly( 0, 0 ) = 1.0 ;
411 Postprocessor::poly2_2d(
const real x,
const real y )
413 mPoly( 0, 0 ) = 1.0 ;
416 mPoly( 3, 0 ) =
x*
x ;
417 mPoly( 4, 0 ) =
x*
y ;
418 mPoly( 5, 0 ) =
y*
y ;
422 Postprocessor::poly3_2d(
const real x,
const real y )
424 mPoly( 0, 0 ) = 1.0 ;
427 mPoly( 3, 0 ) =
x*
x ;
428 mPoly( 4, 0 ) =
x*
y ;
429 mPoly( 5, 0 ) =
y*
y ;
430 mPoly( 6, 0 ) = mPoly( 3, 0 )*
x ;
431 mPoly( 7, 0 ) = mPoly( 3, 0 )*
y ;
432 mPoly( 8, 0 ) =
x * mPoly( 5, 0 );
433 mPoly( 9, 0 ) =
y * mPoly( 5, 0 );
437 Postprocessor::poly4_2d(
const real x,
const real y )
439 mPoly( 0, 0 ) = 1.0 ;
442 mPoly( 3, 0 ) =
x*
x ;
443 mPoly( 4, 0 ) =
x*
y ;
444 mPoly( 5, 0 ) =
y*
y ;
445 mPoly( 6, 0 ) = mPoly( 3, 0 )*
x ;
446 mPoly( 7, 0 ) = mPoly( 3, 0 )*
y ;
447 mPoly( 8, 0 ) =
x * mPoly( 5, 0 );
448 mPoly( 9, 0 ) =
y * mPoly( 5, 0 );
449 mPoly( 10, 0 ) = mPoly( 3, 0 ) * mPoly( 3, 0 );
450 mPoly( 11, 0 ) = mPoly( 6, 0 ) *
y ;
451 mPoly( 12, 0 ) = mPoly( 3, 0 ) * mPoly( 5, 0 ) ;
452 mPoly( 13, 0 ) =
x * mPoly( 9, 0 ) ;
453 mPoly( 14, 0 ) = mPoly( 5, 0 ) * mPoly( 5, 0 ) ;
457 Postprocessor::poly1_3d(
const real x,
const real y,
const real z )
459 mPoly( 0, 0 ) = 1.0 ;
466 Postprocessor::poly2_3d(
const real x,
const real y,
const real z )
468 mPoly( 0, 0 ) = 1.0 ;
472 mPoly( 4, 0 ) =
x*
x ;
473 mPoly( 5, 0 ) =
x*
y ;
474 mPoly( 6, 0 ) =
y*
y ;
475 mPoly( 7, 0 ) =
y*z ;
476 mPoly( 8, 0 ) = z*z ;
477 mPoly( 9, 0 ) = z*
x ;
481 Postprocessor::poly3_3d(
const real x,
const real y,
const real z )
483 mPoly( 0, 0 ) = 1.0 ;
487 mPoly( 4, 0 ) =
x*
x ;
488 mPoly( 5, 0 ) =
x*
y ;
489 mPoly( 6, 0 ) =
y*
y ;
490 mPoly( 7, 0 ) =
y*z ;
491 mPoly( 8, 0 ) = z*z ;
492 mPoly( 9, 0 ) = z*
x ;
493 mPoly( 10, 0 ) = mPoly( 4, 0 ) *
x ;
494 mPoly( 11, 0 ) = mPoly( 4, 0 ) *
y ;
495 mPoly( 12, 0 ) =
x * mPoly( 6, 0 ) ;
496 mPoly( 13, 0 ) =
y * mPoly( 6, 0 ) ;
497 mPoly( 14, 0 ) = z * mPoly( 6, 0 ) ;
498 mPoly( 15, 0 ) =
y * mPoly( 8, 0 ) ;
499 mPoly( 16, 0 ) = z * mPoly( 8, 0 ) ;
500 mPoly( 17, 0 ) =
x * mPoly( 8, 0 ) ;
501 mPoly( 18, 0 ) = mPoly( 4, 0 ) * z ;
502 mPoly( 19, 0 ) =
x *
y * z ;
506 Postprocessor::poly4_3d(
const real x,
const real y,
const real z )
508 mPoly( 0, 0 ) = 1.0 ;
512 mPoly( 4, 0 ) =
x*
x ;
513 mPoly( 5, 0 ) =
x*
y ;
514 mPoly( 6, 0 ) =
y*
y ;
515 mPoly( 7, 0 ) =
y*z ;
516 mPoly( 8, 0 ) = z*z ;
517 mPoly( 9, 0 ) = z*
x ;
518 mPoly( 10, 0 ) = mPoly( 4, 0 ) *
x ;
519 mPoly( 11, 0 ) = mPoly( 4, 0 ) *
y ;
520 mPoly( 12, 0 ) =
x * mPoly( 6, 0 ) ;
521 mPoly( 13, 0 ) =
y * mPoly( 6, 0 ) ;
522 mPoly( 14, 0 ) = z * mPoly( 6, 0 ) ;
523 mPoly( 15, 0 ) =
y * mPoly( 8, 0 ) ;
524 mPoly( 16, 0 ) = z * mPoly( 8, 0 ) ;
525 mPoly( 17, 0 ) =
x * mPoly( 8, 0 ) ;
526 mPoly( 18, 0 ) = mPoly( 4, 0 ) * z ;
527 mPoly( 19, 0 ) =
x *
y * z ;
528 mPoly( 20, 0 ) = mPoly( 4, 0 ) * mPoly( 4, 0 ) ;
529 mPoly( 21, 0 ) = mPoly( 4, 0 ) * mPoly( 5, 0 ) ;
530 mPoly( 22, 0 ) = mPoly( 4, 0 ) * mPoly( 6, 0 ) ;
531 mPoly( 23, 0 ) = mPoly( 5, 0 ) * mPoly( 6, 0 ) ;
532 mPoly( 24, 0 ) = mPoly( 6, 0 ) * mPoly( 6, 0 ) ;
533 mPoly( 25, 0 ) = mPoly( 6, 0 ) * mPoly( 7, 0 ) ;
534 mPoly( 26, 0 ) = mPoly( 6, 0 ) * mPoly( 8, 0 ) ;
535 mPoly( 27, 0 ) = mPoly( 7, 0 ) * mPoly( 8, 0 ) ;
536 mPoly( 28, 0 ) = mPoly( 8, 0 ) * mPoly( 8, 0 ) ;
537 mPoly( 29, 0 ) = mPoly( 9, 0 ) * mPoly( 8, 0 ) ;
538 mPoly( 30, 0 ) = mPoly( 4, 0 ) * mPoly( 8, 0 ) ;
539 mPoly( 31, 0 ) = mPoly( 9, 0 ) * mPoly( 4, 0 ) ;
540 mPoly( 32, 0 ) = mPoly( 4, 0 ) * mPoly( 7, 0 ) ;
541 mPoly( 33, 0 ) = mPoly( 6, 0 ) * mPoly( 9, 0 ) ;
542 mPoly( 34, 0 ) = mPoly( 5, 0 ) * mPoly( 8, 0 ) ;
545 inline const Cell< id_t > &
554 return mMyElementIndices ;
size_t size() const
Definition cl_Cell.hpp:189
Runtime-sized bitset; one bit per flag, packed into 64-bit words.
Definition cl_DynamicBitset.hpp:33
Hash map (unordered key-value).
Definition cl_Map.hpp:75
Base class for all materials in BELFEM.
Definition cl_Material.hpp:270
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
Definition cl_FEM_Block.hpp:35
Definition cl_FEM_Calculator.hpp:596
Main workhorse: DOF management, assembly coordination and the solver interface.
Definition cl_FEM_DofManager.hpp:52
Definition cl_FEM_Element.hpp:41
Prototype for Integrator of Weak Form Governing Equation.
Definition cl_IWG.hpp:81
Top-level orchestrator.
Definition cl_FEM_Kernel.hpp:56
void set_source_fields(const Cell< string > &aFields)
Definition cl_FEM_Postprocessor.hpp:358
Kernel * mKernel
Definition cl_FEM_Postprocessor.hpp:151
uint mNumSourceFields
Definition cl_FEM_Postprocessor.hpp:148
virtual void initialize()
Definition cl_FEM_Postprocessor.cpp:97
virtual void run()
Definition cl_FEM_Postprocessor.cpp:1416
void recover_fields()
Definition cl_FEM_Postprocessor.cpp:1262
const Cell< index_t > & my_element_indices() const
Definition cl_FEM_Postprocessor.hpp:552
void set_block_ids(const Vector< id_t > &aBlockIDs)
Definition cl_FEM_Postprocessor.cpp:80
IWG * mEquation
Definition cl_FEM_Postprocessor.hpp:154
const Matrix< real > & compute_poly(const Vector< real > &aX)
Definition cl_FEM_Postprocessor.hpp:384
const Cell< string > & target_fields() const
Definition cl_FEM_Postprocessor.hpp:378
const uint mOrder
Definition cl_FEM_Postprocessor.hpp:32
DomainType mDomainType
Definition cl_FEM_Postprocessor.hpp:143
void synch_source_fields()
Definition cl_FEM_Postprocessor.cpp:140
Element * mElement
Definition cl_FEM_Postprocessor.hpp:156
DofManager * projector()
Definition cl_FEM_Postprocessor.hpp:346
void synch_target_fields(Matrix< real > &aData)
Definition cl_FEM_Postprocessor.cpp:149
DofManager * mField
Definition cl_FEM_Postprocessor.hpp:153
const proc_t mCommSize
Definition cl_FEM_Postprocessor.hpp:30
const Cell< string > & source_fields() const
Definition cl_FEM_Postprocessor.hpp:372
void set_target_fields(const Cell< string > &aFields)
Definition cl_FEM_Postprocessor.hpp:365
void set_field(DofManager *aField)
Definition cl_FEM_Postprocessor.cpp:67
uint mNumTargetFields
Definition cl_FEM_Postprocessor.hpp:149
const proc_t mCommRank
Definition cl_FEM_Postprocessor.hpp:29
Block * mBlock
Definition cl_FEM_Postprocessor.hpp:157
Cell< string > mSourceFields
Definition cl_FEM_Postprocessor.hpp:147
Mesh * mMesh
Definition cl_FEM_Postprocessor.hpp:152
const Cell< id_t > & block_ids() const
Definition cl_FEM_Postprocessor.hpp:546
virtual const Vector< real > & compute(const uint aK)
Definition cl_FEM_Postprocessor.cpp:638
index_t number_of_truncated_patches() const
node fits of this rank in which the inversion dropped a direction; set by initialize()
Definition cl_FEM_Postprocessor.hpp:352
Postprocessor(Kernel *aKernel, DofManager *aField=nullptr)
Collective.
Definition cl_FEM_Postprocessor.cpp:27
const uint mNumDimensions
Definition cl_FEM_Postprocessor.hpp:31
virtual void update_element_dofs()
Definition cl_FEM_Postprocessor.cpp:645
Material * mMaterial
Definition cl_FEM_Postprocessor.hpp:155
Cell< string > mTargetFields
Definition cl_FEM_Postprocessor.hpp:146
Calculator * mCalculator
Definition cl_FEM_Postprocessor.hpp:158
Definition cl_IFB_LINE3.hpp:21
USER GUIDES:
Definition cl_Capacitor.cpp:16
constexpr id_t gNoID
Definition typedefs.hpp:58
unsigned int uint
Definition typedefs.hpp:30
unsigned int id_t
Definition typedefs.hpp:41
int proc_t
Definition commtypes.hpp:29
ElementType
Element types.
Definition Mesh_Enums.hpp:27
@ EMPTY
Definition Mesh_Enums.hpp:28
uint32_t index_t
Definition typedefs.hpp:52
double real
Definition typedefs.hpp:36
DomainType
Definition en_DomainType.hpp:20
@ Default
Definition en_DomainType.hpp:21
float x
Definition test_curve_frame.py:37
y
Definition test_stadium.py:44