FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Assembly::VelocityInfo< DataType_, dim_ > Struct Template Reference

Velocity field information structure. More...

#include <velocity_analyser.hpp>

Public Member Functions

 VelocityInfo ()
 default CTOR More...
 
String format_string (int precision=0, std::size_t pad_size=10u, char pad_char='.') const
 Formats the velocity information as a string. More...
 
void synchronize (const Dist::Comm &comm)
 Synchronizes the velocity information over a communicator. More...
 

Public Attributes

DataType_ divergence
 Velocity field divergence H0-norm. More...
 
DataType_ norm_h0
 Velocity field H0-norm. More...
 
Tiny::Vector< DataType_, dim_ > norm_h0_comp
 Velocity field components H0-norm. More...
 
DataType_ norm_h1
 Velocity field H1-semi-norm. More...
 
Tiny::Vector< DataType_, dim_ > norm_h1_comp
 Velocity field components H1-semi-norm. More...
 
DataType_ vorticity
 Velocity field vorticity H0-norm. More...
 

Static Public Attributes

static constexpr int dim = dim_
 The dimension of the analysed velocity field. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const VelocityInfo &vi)
 prints the info to an output stream More...
 

Detailed Description

template<typename DataType_, int dim_>
struct FEAT::Assembly::VelocityInfo< DataType_, dim_ >

Velocity field information structure.

This structure encapsulates various information which is computed and returned by the VelocityAnalser class.

Author
Peter Zajac

Definition at line 36 of file velocity_analyser.hpp.

Constructor & Destructor Documentation

◆ VelocityInfo()

template<typename DataType_ , int dim_>
FEAT::Assembly::VelocityInfo< DataType_, dim_ >::VelocityInfo ( )
inline

default CTOR

Definition at line 88 of file velocity_analyser.hpp.

Member Function Documentation

◆ format_string()

template<typename DataType_ , int dim_>
String FEAT::Assembly::VelocityInfo< DataType_, dim_ >::format_string ( int  precision = 0,
std::size_t  pad_size = 10u,
char  pad_char = '.' 
) const
inline

Formats the velocity information as a string.

Parameters
[in]precisionThe precision for floating point values.
[in]pad_sizeThe leading string padding size. Should be >= 10 to achieve vertical alignment.
[in]pad_charThe leading string padding character.
Returns
A string containing the formatted velocity field info.

Definition at line 151 of file velocity_analyser.hpp.

References FEAT::Assembly::VelocityInfo< DataType_, dim_ >::divergence, FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h0, FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h0_comp, FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h1, FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h1_comp, FEAT::String::pad_back(), FEAT::stringify_fp_sci(), and FEAT::Assembly::VelocityInfo< DataType_, dim_ >::vorticity.

◆ synchronize()

template<typename DataType_ , int dim_>
void FEAT::Assembly::VelocityInfo< DataType_, dim_ >::synchronize ( const Dist::Comm comm)
inline

Synchronizes the velocity information over a communicator.

This function sums up the velocity information of all patches in a parallel simulation to obtain the information for the global mesh.

Parameters
[in]commThe transient communicator over which to synchronize.

Definition at line 107 of file velocity_analyser.hpp.

References FEAT::Dist::Comm::allreduce(), FEAT::Assembly::VelocityInfo< DataType_, dim_ >::divergence, FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h0, FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h0_comp, FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h1, FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h1_comp, FEAT::Dist::op_sum, FEAT::Math::sqr(), FEAT::Math::sqrt(), and FEAT::Assembly::VelocityInfo< DataType_, dim_ >::vorticity.

Friends And Related Function Documentation

◆ operator<<

template<typename DataType_ , int dim_>
std::ostream & operator<< ( std::ostream &  os,
const VelocityInfo< DataType_, dim_ > &  vi 
)
friend

prints the info to an output stream

Definition at line 168 of file velocity_analyser.hpp.

Member Data Documentation

◆ dim

template<typename DataType_ , int dim_>
constexpr int FEAT::Assembly::VelocityInfo< DataType_, dim_ >::dim = dim_
staticconstexpr

The dimension of the analysed velocity field.

Definition at line 39 of file velocity_analyser.hpp.

◆ divergence

template<typename DataType_ , int dim_>
DataType_ FEAT::Assembly::VelocityInfo< DataType_, dim_ >::divergence

Velocity field divergence H0-norm.

This entry contains the H0-norm of the divergence of the velocity field:

\[ \| \nabla \cdot u\|_{\mathcal{H}^0} = \Big(\int_\Omega \big(\sum_{i=1}^d \partial_i u_i\big)^2\Big)^{\frac{1}{2}}\]

Definition at line 63 of file velocity_analyser.hpp.

Referenced by FEAT::Assembly::VelocityAnalyser::compute(), FEAT::Assembly::VelocityInfo< DataType_, dim_ >::format_string(), and FEAT::Assembly::VelocityInfo< DataType_, dim_ >::synchronize().

◆ norm_h0

template<typename DataType_ , int dim_>
DataType_ FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h0

Velocity field H0-norm.

This entry contains the H0-norm of the velocity field:

\[ \|u\|_{\mathcal{H}^0} = \Big(\int_\Omega \sum_{i=1}^d (u_i)^2\Big)^{\frac{1}{2}}\]

Definition at line 47 of file velocity_analyser.hpp.

Referenced by FEAT::Assembly::VelocityAnalyser::compute(), FEAT::Assembly::VelocityInfo< DataType_, dim_ >::format_string(), and FEAT::Assembly::VelocityInfo< DataType_, dim_ >::synchronize().

◆ norm_h0_comp

template<typename DataType_ , int dim_>
Tiny::Vector<DataType_, dim_> FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h0_comp

Velocity field components H0-norm.

This entry contains the H0-norms of all components of the velocity field.

Definition at line 78 of file velocity_analyser.hpp.

Referenced by FEAT::Assembly::VelocityAnalyser::compute(), FEAT::Assembly::VelocityInfo< DataType_, dim_ >::format_string(), and FEAT::Assembly::VelocityInfo< DataType_, dim_ >::synchronize().

◆ norm_h1

template<typename DataType_ , int dim_>
DataType_ FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h1

Velocity field H1-semi-norm.

This entry contains the H1-semi-norm of the velocity field:

\[ |u|_{\mathcal{H}^1} = \Big(\int_\Omega \sum_{i=1}^d (\nabla u_i)^2\Big)^{\frac{1}{2}}\]

Definition at line 55 of file velocity_analyser.hpp.

Referenced by FEAT::Assembly::VelocityAnalyser::compute(), FEAT::Assembly::VelocityInfo< DataType_, dim_ >::format_string(), and FEAT::Assembly::VelocityInfo< DataType_, dim_ >::synchronize().

◆ norm_h1_comp

template<typename DataType_ , int dim_>
Tiny::Vector<DataType_, dim_> FEAT::Assembly::VelocityInfo< DataType_, dim_ >::norm_h1_comp

Velocity field components H1-semi-norm.

This entry contains the H1-semi-norms of all components of the velocity field.

Definition at line 85 of file velocity_analyser.hpp.

Referenced by FEAT::Assembly::VelocityAnalyser::compute(), FEAT::Assembly::VelocityInfo< DataType_, dim_ >::format_string(), and FEAT::Assembly::VelocityInfo< DataType_, dim_ >::synchronize().

◆ vorticity

template<typename DataType_ , int dim_>
DataType_ FEAT::Assembly::VelocityInfo< DataType_, dim_ >::vorticity

Velocity field vorticity H0-norm.

This entry contains the H0-norm of the curl of the velocity field:

\[ \| \nabla \times u\|_{\mathcal{H}^0} \]

Definition at line 71 of file velocity_analyser.hpp.

Referenced by FEAT::Assembly::VelocityAnalyser::compute(), FEAT::Assembly::VelocityInfo< DataType_, dim_ >::format_string(), and FEAT::Assembly::VelocityInfo< DataType_, dim_ >::synchronize().


The documentation for this struct was generated from the following file: