#include <vorticity_smoother.h>
Public Types | |
typedef void(* | ExactVorticityFctPt) (const Vector< double > &x, Vector< Vector< double > > &vort_and_derivs) |
Public Member Functions | |
VorticitySmootherElement () | |
Constructor. More... | |
Vector< Vector< double > > | create_container_for_vorticity_and_derivatives () const |
Helper function to create a container for the vorticity and its partial derivatives. If the user wishes to output everything then this also creates space for the velocity derivatives too. This function has been written to allow for generalisation of the storage without (hopefully!) affecting too much. More... | |
std::pair< unsigned, unsigned > | vorticity_dof_to_container_id (const unsigned &i) const |
Helper function that, given the local dof number of the i-th vorticity or velocity derivative, returns the index in the container that stores the corresponding value. Note 1: this function goes hand-in-hand with create_container_for_vorticity_and_derivatives() Note 2: i=0: vorticity itself; i>0: vorticity derivatives. More... | |
std::pair< unsigned, unsigned > | recovered_dof_to_container_id (const unsigned &i) const |
Helper function that, given the local dof number of the i-th vorticity or velocity derivative, returns the index in the container that stores the corresponding value. Note 1: this function goes hand-in-hand with create_container_for_vorticity_and_derivatives() Note 2: The input to this function is the i associated with the STORED nodal dof value. For example, if we're only recovering the velocity derivatives then i=0 is associated with du/dx. More... | |
unsigned | stored_dof_to_recoverable_dof (const unsigned &i) const |
Given the STORED dof number, this function returns the global recovered number. For example, if we only want to recover the velocity derivatives then the stored dof number of du/dy is 1 (as 0 is associated with du/dx). The global recovered number is 11 (as there are currently 10 vorticity derivatives that can be recovered and du/dy is the second velocity derivative we can recover). More... | |
unsigned | get_maximum_order_of_recoverable_vorticity_derivative () const |
The maximum order of vorticity derivative that can be recovered. This is set in the constructor and should NOT be changed during the running of the code. As such, a set...() function is not provided. DRAIG: Leave get_ prefix? More... | |
unsigned | get_maximum_order_of_recoverable_velocity_derivative () const |
The maximum order of velocity derivative that can be recovered. This is set in the constructor and should NOT be changed during the running of the code. As such, a set...() function is not provided. DRAIG: Leave get_ prefix? More... | |
int | get_maximum_order_of_vorticity_derivative () const |
The maximum order of derivatives calculated in the vorticity recovery. Note, this value can only be set through the namespace VorticityRecoveryHelpers. DRAIG: Leave get_ prefix? More... | |
int | get_maximum_order_of_velocity_derivative () const |
The maximum order of derivatives calculated in the velocity recovery. Note, this value can only be set through the namespace VorticityRecoveryHelpers. DRAIG: Leave get_ prefix? More... | |
unsigned | nvorticity_derivatives_to_recover () const |
The number of terms calculated in the vorticity recovery. Also includes the zeroth derivative, i.e. the vorticity itself. More... | |
unsigned | nvelocity_derivatives_to_recover () const |
unsigned | npartial_derivative (const unsigned &n) const |
Call the function written in VorticityRecoveryHelpers. More... | |
ExactVorticityFctPt & | exact_vorticity_fct_pt () |
Access function: Pointer to function that specifies exact vorticity and derivatives (for validation). More... | |
ExactVorticityFctPt | exact_vorticity_fct_pt () const |
Access function: Pointer to function that specifies exact vorticity and derivatives (for validation) – const version. More... | |
unsigned | smoothed_vorticity_index () const |
Index of smoothed vorticity – followed by derivatives. More... | |
unsigned | required_nvalue (const unsigned &n) const |
Number of values required at local node n. In order to simplify matters, we allocate storage for pressure variables at all the nodes and then pin those that are not used. More... | |
unsigned | ncont_interpolated_values () const |
Number of continuously interpolated values: More... | |
void | get_interpolated_values (const Vector< double > &s, Vector< double > &values) |
Get the function value u in Vector. Note: Given the generality of the interface (this function is usually called from black-box documentation or interpolation routines), the values Vector sets its own size in here. More... | |
void | get_interpolated_values (const unsigned &t, const Vector< double > &s, Vector< double > &values) |
Get the function value u in Vector. Note: Given the generality of the interface (this function is usually called from black-box documentation or interpolation routines), the values Vector sets its own size in here. More... | |
void | pin_smoothed_vorticity () |
Pin all smoothed vorticity quantities. More... | |
void | output_analytical_veloc_and_vorticity (std::ostream &outfile, const unsigned &nplot) |
Output exact velocity, vorticity, derivatives and indicator based on functions specified by two function pointers. More... | |
void | output_smoothed_vorticity (std::ostream &outfile, const unsigned &nplot) |
Output the velocity, smoothed vorticity and derivatives. More... | |
unsigned | nscalar_paraview () const |
Number of scalars/fields output by this element. Re-implements broken virtual function in base class. More... | |
void | scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const |
Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type. More... | |
std::string | scalar_name_paraview (const unsigned &i) const |
Name of the i-th scalar field. Default implementation returns V1 for the first one, V2 for the second etc. Can (should!) be overloaded with more meaningful names in specific elements. More... | |
void | output (std::ostream &outfile, const unsigned &nplot) |
Overloaded output function: Output velocity, pressure and the smoothed vorticity. More... | |
void | get_raw_velocity_deriv (const Vector< double > &s, Vector< double > &dveloc_dx) const |
Get raw derivative of velocity. More... | |
void | get_raw_velocity_deriv (const Vector< double > &s, double &dveloc_dx, const unsigned &index) const |
Get raw derivative of velocity. More... | |
void | get_raw_vorticity_deriv (const Vector< double > &s, Vector< double > &dvorticity_dx) const |
Get raw derivative of smoothed vorticity. More... | |
void | get_raw_vorticity_deriv (const Vector< double > &s, double &dvorticity_dx, const unsigned &index) const |
Get raw derivative of smoothed vorticity. More... | |
void | get_raw_vorticity_second_deriv (const Vector< double > &s, Vector< double > &dvorticity_dxdy) const |
Get raw derivative of smoothed derivative vorticity. More... | |
void | get_raw_vorticity_second_deriv (const Vector< double > &s, double &dvorticity_dxdy, const unsigned &index) const |
void | get_raw_vorticity_third_deriv (const Vector< double > &s, Vector< double > &dvorticity_dxdxdy) const |
void | get_raw_vorticity_third_deriv (const Vector< double > &s, double &dvorticity_dxdxdy, const unsigned &index) const |
double | vorticity_error_squared (const unsigned &i) |
Compute the element's contribution to the (squared) L2 norm of the difference between exact and smoothed vorticity. The input i corresponds to the i-th dof stored at each node (excluding the velocities and pressure). More... | |
void | vorticity_and_its_derivs (const Vector< double > &s, Vector< Vector< double > > &vort_and_derivs) const |
Compute smoothed vorticity and its derivatives. More... | |
Private Attributes | |
unsigned | N_dim |
Number of dimensions in the element. More... | |
unsigned | Smoothed_vorticity_index |
Index of smoothed vorticity – followed by derivatives; in 2D this has value 3. More... | |
unsigned | Maximum_order_of_recoverable_vorticity_derivatives |
The current maximum order of vorticity derivatives that can be recovered. Currently, we can recover up to the third derivative: omega,d/dx,d/dy, d^2/dx^2,d^2/dxdy,d^2/dy^2, d^3/dx^3,d^3/dx^2dy,d^3/dxdy^2,d^3/dy^3. More... | |
unsigned | Maximum_order_of_recoverable_velocity_derivatives |
The current maximum order of velocity derivatives that can be recovered. Currently, we can recover the first derivatives: du/dx,du/dy,dv/dx,dv/dy. More... | |
unsigned | Number_of_values_per_field |
Number of values per field; how many of the following do we want: u,v,p,omega,d/dx,d/dy, d^2/dx^2,d^2/dxdy,d^2/dy^2, d^3/dx^3,d^3/dx^2dy,d^3/dxdy^2,d^3/dy^3, du/dx,du/dy,dv/dx,dv/dy. More... | |
int | Maximum_order_of_vorticity_derivative |
Maximum number of derivatives to retain in the vorticity recovery. Note, the value -1 means we ONLY output u,v[,w],p. More... | |
int | Maximum_order_of_velocity_derivative |
Maximum number of derivatives to retain in the velocity recovery. Note, the value 0 means we don't calculate the derivatives of the velocity. More... | |
ExactVorticityFctPt | Exact_vorticity_fct_pt |
Pointer to function that specifies exact vorticity and derivs (for validation). More... | |
Overloaded element that allows projection of vorticity.
Definition at line 230 of file vorticity_smoother.h.
typedef void(* oomph::VorticitySmootherElement< ELEMENT >::ExactVorticityFctPt) (const Vector< double > &x, Vector< Vector< double > > &vort_and_derivs) |
Typedef for pointer to function that specifies the exact vorticity and derivatives (for validation)
Definition at line 274 of file vorticity_smoother.h.
|
inline |
Constructor.
Definition at line 235 of file vorticity_smoother.h.
References VorticityRecoveryHelpers::RecoveryHelper::maximum_order_of_velocity_derivative(), VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_velocity_derivative, VorticityRecoveryHelpers::RecoveryHelper::maximum_order_of_vorticity_derivative(), VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_vorticity_derivative, VorticityRecoveryHelpers::RecoveryHelper::ncont_interpolated_values(), VorticityRecoveryHelpers::RecoveryHelper::Number_of_values_per_field, and VorticityRecoveryHelpers::Recovery_helper.
|
inline |
Helper function to create a container for the vorticity and its partial derivatives. If the user wishes to output everything then this also creates space for the velocity derivatives too. This function has been written to allow for generalisation of the storage without (hopefully!) affecting too much.
Definition at line 282 of file vorticity_smoother.h.
References i, VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_velocity_derivative, VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_vorticity_derivative, and VorticityRecoveryHelpers::RecoveryHelper::npartial_derivative().
|
inline |
Access function: Pointer to function that specifies exact vorticity and derivatives (for validation).
Definition at line 705 of file vorticity_smoother.h.
|
inline |
Access function: Pointer to function that specifies exact vorticity and derivatives (for validation) – const version.
Definition at line 713 of file vorticity_smoother.h.
|
inline |
Get the function value u in Vector. Note: Given the generality of the interface (this function is usually called from black-box documentation or interpolation routines), the values Vector sets its own size in here.
Definition at line 746 of file vorticity_smoother.h.
References t.
|
inline |
Get the function value u in Vector. Note: Given the generality of the interface (this function is usually called from black-box documentation or interpolation routines), the values Vector sets its own size in here.
Definition at line 759 of file vorticity_smoother.h.
References i, VorticityRecoveryHelpers::RecoveryHelper::Number_of_values_per_field, and oomph::OneDimLagrange::shape().
|
inline |
The maximum order of velocity derivative that can be recovered. This is set in the constructor and should NOT be changed during the running of the code. As such, a set...() function is not provided. DRAIG: Leave get_ prefix?
Definition at line 634 of file vorticity_smoother.h.
|
inline |
The maximum order of vorticity derivative that can be recovered. This is set in the constructor and should NOT be changed during the running of the code. As such, a set...() function is not provided. DRAIG: Leave get_ prefix?
Definition at line 624 of file vorticity_smoother.h.
|
inline |
The maximum order of derivatives calculated in the velocity recovery. Note, this value can only be set through the namespace VorticityRecoveryHelpers. DRAIG: Leave get_ prefix?
Definition at line 654 of file vorticity_smoother.h.
References VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_velocity_derivative.
|
inline |
The maximum order of derivatives calculated in the vorticity recovery. Note, this value can only be set through the namespace VorticityRecoveryHelpers. DRAIG: Leave get_ prefix?
Definition at line 644 of file vorticity_smoother.h.
References VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_vorticity_derivative.
|
inline |
Get raw derivative of velocity.
Definition at line 1232 of file vorticity_smoother.h.
References oomph::Vector< _Tp >::initialise().
|
inline |
Get raw derivative of velocity.
Definition at line 1266 of file vorticity_smoother.h.
References oomph::oomph_info.
|
inline |
Get raw derivative of smoothed vorticity.
Definition at line 1327 of file vorticity_smoother.h.
References oomph::Vector< _Tp >::initialise().
|
inline |
Get raw derivative of smoothed vorticity.
Definition at line 1359 of file vorticity_smoother.h.
References oomph::oomph_info.
|
inline |
Get raw derivative of smoothed derivative vorticity.
Definition at line 1404 of file vorticity_smoother.h.
References oomph::Vector< _Tp >::initialise().
|
inline |
Get raw derivative of smoothed derivative vorticity [0]: d^2/dx^2, [1]: d^2/dxdy, [2]: d^2/dy^2
Definition at line 1442 of file vorticity_smoother.h.
References oomph::oomph_info.
|
inline |
Get raw derivative of smoothed derivative vorticity [0]: d^3/dx^3, [1]: d^3/dx^2dy, [2]: d^3/dxdy^2, [3]: d^3/dy^3
Definition at line 1499 of file vorticity_smoother.h.
References oomph::Vector< _Tp >::initialise().
|
inline |
Get raw derivative of smoothed derivative vorticity [0]: d^3/dx^3, [1]: d^3/dx^2dy, [2]: d^3/dxdy^2, [3]: d^3/dy^3,
Definition at line 1541 of file vorticity_smoother.h.
References oomph::oomph_info.
|
inline |
Number of continuously interpolated values:
Definition at line 736 of file vorticity_smoother.h.
References VorticityRecoveryHelpers::RecoveryHelper::Number_of_values_per_field.
|
inline |
Call the function written in VorticityRecoveryHelpers.
Definition at line 697 of file vorticity_smoother.h.
References VorticityRecoveryHelpers::RecoveryHelper::npartial_derivative(), and VorticityRecoveryHelpers::Recovery_helper.
|
inline |
Number of scalars/fields output by this element. Re-implements broken virtual function in base class.
Definition at line 978 of file vorticity_smoother.h.
References VorticityRecoveryHelpers::RecoveryHelper::ncont_interpolated_values().
|
inline |
The number of derivatives calculated in the velocity recovery. This does NOT include the zeroth derivatives as they are not "recovered"
Definition at line 680 of file vorticity_smoother.h.
References i, VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_velocity_derivative, and VorticityRecoveryHelpers::RecoveryHelper::npartial_derivative().
|
inline |
The number of terms calculated in the vorticity recovery. Also includes the zeroth derivative, i.e. the vorticity itself.
Definition at line 662 of file vorticity_smoother.h.
References i, VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_vorticity_derivative, and VorticityRecoveryHelpers::RecoveryHelper::npartial_derivative().
|
inline |
Overloaded output function: Output velocity, pressure and the smoothed vorticity.
Definition at line 1149 of file vorticity_smoother.h.
References i, s, and oomph::OneDimLagrange::shape().
|
inline |
Output exact velocity, vorticity, derivatives and indicator based on functions specified by two function pointers.
Definition at line 816 of file vorticity_smoother.h.
|
inline |
Output the velocity, smoothed vorticity and derivatives.
Definition at line 890 of file vorticity_smoother.h.
|
inline |
Pin all smoothed vorticity quantities.
Definition at line 794 of file vorticity_smoother.h.
References i, VorticityRecoveryHelpers::RecoveryHelper::Number_of_values_per_field, and oomph::Data::pin().
|
inline |
Helper function that, given the local dof number of the i-th vorticity or velocity derivative, returns the index in the container that stores the corresponding value. Note 1: this function goes hand-in-hand with create_container_for_vorticity_and_derivatives() Note 2: The input to this function is the i associated with the STORED nodal dof value. For example, if we're only recovering the velocity derivatives then i=0 is associated with du/dx.
Definition at line 462 of file vorticity_smoother.h.
References i, VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_velocity_derivative, VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_vorticity_derivative, and VorticityRecoveryHelpers::RecoveryHelper::npartial_derivative().
|
inline |
Number of values required at local node n. In order to simplify matters, we allocate storage for pressure variables at all the nodes and then pin those that are not used.
Definition at line 729 of file vorticity_smoother.h.
References VorticityRecoveryHelpers::RecoveryHelper::Number_of_values_per_field.
|
inline |
Name of the i-th scalar field. Default implementation returns V1 for the first one, V2 for the second etc. Can (should!) be overloaded with more meaningful names in specific elements.
Definition at line 1054 of file vorticity_smoother.h.
References oomph::oomph_info, and oomph::StringConversion::to_string().
|
inline |
Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.
Definition at line 986 of file vorticity_smoother.h.
References VorticityRecoveryHelpers::RecoveryHelper::ncont_interpolated_values(), and s.
|
inline |
Index of smoothed vorticity – followed by derivatives.
Definition at line 720 of file vorticity_smoother.h.
|
inline |
Given the STORED dof number, this function returns the global recovered number. For example, if we only want to recover the velocity derivatives then the stored dof number of du/dy is 1 (as 0 is associated with du/dx). The global recovered number is 11 (as there are currently 10 vorticity derivatives that can be recovered and du/dy is the second velocity derivative we can recover).
Definition at line 556 of file vorticity_smoother.h.
References VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_vorticity_derivative, and VorticityRecoveryHelpers::RecoveryHelper::npartial_derivative().
|
inline |
Compute smoothed vorticity and its derivatives.
Definition at line 1719 of file vorticity_smoother.h.
References i, and oomph::OneDimLagrange::shape().
|
inline |
Helper function that, given the local dof number of the i-th vorticity or velocity derivative, returns the index in the container that stores the corresponding value. Note 1: this function goes hand-in-hand with create_container_for_vorticity_and_derivatives() Note 2: i=0: vorticity itself; i>0: vorticity derivatives.
Definition at line 322 of file vorticity_smoother.h.
References VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_velocity_derivative, VorticityRecoveryHelpers::RecoveryHelper::Maximum_order_of_vorticity_derivative, and VorticityRecoveryHelpers::RecoveryHelper::npartial_derivative().
|
inline |
Compute the element's contribution to the (squared) L2 norm of the difference between exact and smoothed vorticity. The input i corresponds to the i-th dof stored at each node (excluding the velocities and pressure).
Definition at line 1609 of file vorticity_smoother.h.
References oomph::Vector< _Tp >::initialise(), s, and oomph::QuadTreeNames::W.
|
private |
Pointer to function that specifies exact vorticity and derivs (for validation).
Definition at line 1802 of file vorticity_smoother.h.
|
private |
The current maximum order of velocity derivatives that can be recovered. Currently, we can recover the first derivatives: du/dx,du/dy,dv/dx,dv/dy.
Definition at line 1782 of file vorticity_smoother.h.
|
private |
The current maximum order of vorticity derivatives that can be recovered. Currently, we can recover up to the third derivative: omega,d/dx,d/dy, d^2/dx^2,d^2/dxdy,d^2/dy^2, d^3/dx^3,d^3/dx^2dy,d^3/dxdy^2,d^3/dy^3.
Definition at line 1777 of file vorticity_smoother.h.
|
private |
Maximum number of derivatives to retain in the velocity recovery. Note, the value 0 means we don't calculate the derivatives of the velocity.
Definition at line 1798 of file vorticity_smoother.h.
|
private |
Maximum number of derivatives to retain in the vorticity recovery. Note, the value -1 means we ONLY output u,v[,w],p.
Definition at line 1793 of file vorticity_smoother.h.
|
private |
Number of dimensions in the element.
Definition at line 1766 of file vorticity_smoother.h.
|
private |
Number of values per field; how many of the following do we want: u,v,p,omega,d/dx,d/dy, d^2/dx^2,d^2/dxdy,d^2/dy^2, d^3/dx^3,d^3/dx^2dy,d^3/dxdy^2,d^3/dy^3, du/dx,du/dy,dv/dx,dv/dy.
Definition at line 1789 of file vorticity_smoother.h.
|
private |
Index of smoothed vorticity – followed by derivatives; in 2D this has value 3.
Definition at line 1770 of file vorticity_smoother.h.