12#ifndef BELFEM_CL_FEM_POSTPROCESSOR_HPP
13#define BELFEM_CL_FEM_POSTPROCESSOR_HPP
66 bool mIsInitialized = false ;
68 bool mHaveEdges = false ;
69 bool mHaveFaces = false ;
79 uint mNumCoefficients = 0 ;
175 create_target_fields();
178 check_if_we_have_edges_and_faces();
181 select_elements_and_owned_nodes();
184 select_all_relevant_nodes();
187 synch_node_indices(
const bool aOwnedOnly );
200 get_interpolation_order(
const Mesh * aMesh )
const;
203 compute_node_matrices();
206 compute_element_coeffs(
213 compute_element_coeffs(
222 synch_source_field(
const string & aField );
235 poly1_2d(
const real x,
const real y );
238 poly2_2d(
const real x,
const real y );
241 poly3_2d(
const real x,
const real y );
244 poly4_2d(
const real x,
const real y );
295 (this->*mFunComputePoly)( aX );
302 (this->*mFunPoly2D )( aX( 0 ), aX( 1 ) );
308 (this->*mFunPoly3D )( aX( 0 ), aX( 1 ), aX( 2 ) );
312 Postprocessor::poly1_2d(
const real x,
const real y )
314 mPoly( 0, 0 ) = 1.0 ;
320 Postprocessor::poly2_2d(
const real x,
const real y )
322 mPoly( 0, 0 ) = 1.0 ;
325 mPoly( 3, 0 ) =
x*
x ;
326 mPoly( 4, 0 ) =
x*y ;
327 mPoly( 5, 0 ) = y*y ;
331 Postprocessor::poly3_2d(
const real x,
const real y )
333 mPoly( 0, 0 ) = 1.0 ;
336 mPoly( 3, 0 ) =
x*
x ;
337 mPoly( 4, 0 ) =
x*y ;
338 mPoly( 5, 0 ) = y*y ;
339 mPoly( 6, 0 ) = mPoly( 3, 0 )*
x ;
340 mPoly( 7, 0 ) = mPoly( 3, 0 )*y ;
341 mPoly( 8, 0 ) =
x * mPoly( 5, 0 );
342 mPoly( 9, 0 ) = y * mPoly( 5, 0 );
346 Postprocessor::poly4_2d(
const real x,
const real y )
348 mPoly( 0, 0 ) = 1.0 ;
351 mPoly( 3, 0 ) =
x*
x ;
352 mPoly( 4, 0 ) =
x*y ;
353 mPoly( 5, 0 ) = y*y ;
354 mPoly( 6, 0 ) = mPoly( 3, 0 )*
x ;
355 mPoly( 7, 0 ) = mPoly( 3, 0 )*y ;
356 mPoly( 8, 0 ) =
x * mPoly( 5, 0 );
357 mPoly( 9, 0 ) = y * mPoly( 5, 0 );
358 mPoly( 10, 0 ) = mPoly( 3, 0 ) * mPoly( 3, 0 );
359 mPoly( 11, 0 ) = mPoly( 6, 0 ) * y ;
360 mPoly( 12, 0 ) = mPoly( 3, 0 ) * mPoly( 5, 0 ) ;
361 mPoly( 13, 0 ) =
x * mPoly( 9, 0 ) ;
362 mPoly( 14, 0 ) = mPoly( 5, 0 ) * mPoly( 5, 0 ) ;
366 Postprocessor::poly1_3d(
const real x,
const real y,
const real z )
368 mPoly( 0, 0 ) = 1.0 ;
375 Postprocessor::poly2_3d(
const real x,
const real y,
const real z )
377 mPoly( 0, 0 ) = 1.0 ;
381 mPoly( 4, 0 ) =
x*
x ;
382 mPoly( 5, 0 ) =
x*y ;
383 mPoly( 6, 0 ) = y*y ;
384 mPoly( 7, 0 ) = y*z ;
385 mPoly( 8, 0 ) = z*z ;
386 mPoly( 9, 0 ) = z*
x ;
390 Postprocessor::poly3_3d(
const real x,
const real y,
const real z )
392 mPoly( 0, 0 ) = 1.0 ;
396 mPoly( 4, 0 ) =
x*
x ;
397 mPoly( 5, 0 ) =
x*y ;
398 mPoly( 6, 0 ) = y*y ;
399 mPoly( 7, 0 ) = y*z ;
400 mPoly( 8, 0 ) = z*z ;
401 mPoly( 9, 0 ) = z*
x ;
402 mPoly( 10, 0 ) = mPoly( 4, 0 ) *
x ;
403 mPoly( 11, 0 ) = mPoly( 4, 0 ) * y ;
404 mPoly( 12, 0 ) =
x * mPoly( 6, 0 ) ;
405 mPoly( 13, 0 ) = y * mPoly( 6, 0 ) ;
406 mPoly( 14, 0 ) = z * mPoly( 6, 0 ) ;
407 mPoly( 15, 0 ) = y * mPoly( 8, 0 ) ;
408 mPoly( 16, 0 ) = z * mPoly( 8, 0 ) ;
409 mPoly( 17, 0 ) =
x * mPoly( 8, 0 ) ;
410 mPoly( 18, 0 ) = mPoly( 4, 0 ) * z ;
411 mPoly( 19, 0 ) =
x * y * z ;
415 Postprocessor::poly4_3d(
const real x,
const real y,
const real z )
417 mPoly( 0, 0 ) = 1.0 ;
421 mPoly( 4, 0 ) =
x*
x ;
422 mPoly( 5, 0 ) =
x*y ;
423 mPoly( 6, 0 ) = y*y ;
424 mPoly( 7, 0 ) = y*z ;
425 mPoly( 8, 0 ) = z*z ;
426 mPoly( 9, 0 ) = z*
x ;
427 mPoly( 10, 0 ) = mPoly( 4, 0 ) *
x ;
428 mPoly( 11, 0 ) = mPoly( 4, 0 ) * y ;
429 mPoly( 12, 0 ) =
x * mPoly( 6, 0 ) ;
430 mPoly( 13, 0 ) = y * mPoly( 6, 0 ) ;
431 mPoly( 14, 0 ) = z * mPoly( 6, 0 ) ;
432 mPoly( 15, 0 ) = y * mPoly( 8, 0 ) ;
433 mPoly( 16, 0 ) = z * mPoly( 8, 0 ) ;
434 mPoly( 17, 0 ) =
x * mPoly( 8, 0 ) ;
435 mPoly( 18, 0 ) = mPoly( 4, 0 ) * z ;
436 mPoly( 19, 0 ) =
x * y * z ;
437 mPoly( 20, 0 ) = mPoly( 4, 0 ) * mPoly( 4, 0 ) ;
438 mPoly( 21, 0 ) = mPoly( 4, 0 ) * mPoly( 5, 0 ) ;
439 mPoly( 22, 0 ) = mPoly( 4, 0 ) * mPoly( 6, 0 ) ;
440 mPoly( 23, 0 ) = mPoly( 5, 0 ) * mPoly( 6, 0 ) ;
441 mPoly( 24, 0 ) = mPoly( 6, 0 ) * mPoly( 6, 0 ) ;
442 mPoly( 25, 0 ) = mPoly( 6, 0 ) * mPoly( 7, 0 ) ;
443 mPoly( 26, 0 ) = mPoly( 6, 0 ) * mPoly( 8, 0 ) ;
444 mPoly( 27, 0 ) = mPoly( 7, 0 ) * mPoly( 8, 0 ) ;
445 mPoly( 28, 0 ) = mPoly( 8, 0 ) * mPoly( 8, 0 ) ;
446 mPoly( 29, 0 ) = mPoly( 9, 0 ) * mPoly( 8, 0 ) ;
447 mPoly( 30, 0 ) = mPoly( 4, 0 ) * mPoly( 8, 0 ) ;
448 mPoly( 31, 0 ) = mPoly( 9, 0 ) * mPoly( 4, 0 ) ;
449 mPoly( 32, 0 ) = mPoly( 4, 0 ) * mPoly( 7, 0 ) ;
450 mPoly( 33, 0 ) = mPoly( 6, 0 ) * mPoly( 9, 0 ) ;
451 mPoly( 34, 0 ) = mPoly( 5, 0 ) * mPoly( 8, 0 ) ;
454 inline const Cell< id_t > &
463 return mMyElementIndices ;
size_t size() const
return the size of the Cell
Definition cl_Cell.hpp:181
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:279
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
Definition cl_FEM_Block.hpp:35
Definition cl_FEM_Calculator.hpp:600
this class creates the DOFs based on the passed equation object.
Definition cl_FEM_DofManager.hpp:55
Definition cl_FEM_Element.hpp:41
Prototype for Integrator of Weak Form Governing Equation.
Definition cl_IWG.hpp:81
Top-level orchestrator; owns the mesh, materials, boundary conditions and DOF managers.
Definition cl_FEM_Kernel.hpp:50
void set_source_fields(const Cell< string > &aFields)
Definition cl_FEM_Postprocessor.hpp:267
Kernel * mKernel
Definition cl_FEM_Postprocessor.hpp:93
uint mNumSourceFields
Definition cl_FEM_Postprocessor.hpp:90
virtual void initialize()
Definition cl_FEM_Postprocessor.cpp:93
virtual void run()
Definition cl_FEM_Postprocessor.cpp:1171
void recover_fields()
Definition cl_FEM_Postprocessor.cpp:951
const Cell< index_t > & my_element_indices() const
Definition cl_FEM_Postprocessor.hpp:461
void set_block_ids(const Vector< id_t > &aBlockIDs)
Definition cl_FEM_Postprocessor.cpp:76
IWG * mEquation
Definition cl_FEM_Postprocessor.hpp:96
const Matrix< real > & compute_poly(const Vector< real > &aX)
Definition cl_FEM_Postprocessor.hpp:293
const Cell< string > & target_fields() const
Definition cl_FEM_Postprocessor.hpp:287
const uint mOrder
Definition cl_FEM_Postprocessor.hpp:30
DomainType mDomainType
Definition cl_FEM_Postprocessor.hpp:85
void synch_source_fields()
Definition cl_FEM_Postprocessor.cpp:137
Element * mElement
Definition cl_FEM_Postprocessor.hpp:98
DofManager * projector()
Definition cl_FEM_Postprocessor.hpp:261
void synch_target_fields(Matrix< real > &aData)
Definition cl_FEM_Postprocessor.cpp:146
DofManager * mField
Definition cl_FEM_Postprocessor.hpp:95
const proc_t mCommSize
Definition cl_FEM_Postprocessor.hpp:28
const Cell< string > & source_fields() const
Definition cl_FEM_Postprocessor.hpp:281
void set_target_fields(const Cell< string > &aFields)
Definition cl_FEM_Postprocessor.hpp:274
void set_field(DofManager *aField)
Definition cl_FEM_Postprocessor.cpp:63
uint mNumTargetFields
Definition cl_FEM_Postprocessor.hpp:91
const proc_t mCommRank
Definition cl_FEM_Postprocessor.hpp:27
Block * mBlock
Definition cl_FEM_Postprocessor.hpp:99
Cell< string > mSourceFields
Definition cl_FEM_Postprocessor.hpp:89
Mesh * mMesh
Definition cl_FEM_Postprocessor.hpp:94
const Cell< id_t > & block_ids() const
Definition cl_FEM_Postprocessor.hpp:455
virtual const Vector< real > & compute(const uint aK)
Definition cl_FEM_Postprocessor.cpp:635
Postprocessor(Kernel *aKernel, DofManager *aField=nullptr)
Definition cl_FEM_Postprocessor.cpp:20
const uint mNumDimensions
Definition cl_FEM_Postprocessor.hpp:29
virtual void update_element_dofs()
Definition cl_FEM_Postprocessor.cpp:642
Material * mMaterial
Definition cl_FEM_Postprocessor.hpp:97
Cell< string > mTargetFields
Definition cl_FEM_Postprocessor.hpp:88
Calculator * mCalculator
Definition cl_FEM_Postprocessor.hpp:100
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
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:28