![]() |
|
#include <poisson_elements_with_singularity.h>
Public Types | |
typedef double(* | PoissonSingularFctPt) (const Vector< double > &x) |
Function pointer to the singular function: More... | |
typedef Vector< double >(* | PoissonGradSingularFctPt) (const Vector< double > &x) |
Function pointer to the gradient of the singular function: More... | |
Public Member Functions | |
SingularPoissonSolutionElement () | |
Constructor. More... | |
bool & | singular_function_satisfies_laplace_equation () |
double | c () const |
Find the value of the unknown C. More... | |
void | set_wrapped_poisson_element_pt (WRAPPED_POISSON_ELEMENT *wrapped_poisson_el_pt, const Vector< double > &s, unsigned *direction_pt) |
PoissonSingularFctPt & | singular_fct_pt () |
Access function to pointer to singular function. More... | |
double | singular_function (const Vector< double > &x) const |
Evaluate singular function at Eulerian position x. More... | |
double | u_bar (const Vector< double > &x) |
PoissonGradSingularFctPt & | grad_singular_fct_pt () |
Access function to pointer to the gradient of sing function. More... | |
Vector< double > | grad_singular_function (const Vector< double > &x) const |
Evaluate the gradient of the sing function at Eulerian position x. More... | |
Vector< double > | grad_u_bar (const Vector< double > &x) |
Gradient of ubar (including the constant!) More... | |
void | fill_in_contribution_to_residuals (Vector< double > &residual) |
void | fill_in_contribution_to_jacobian (Vector< double > &residual, DenseMatrix< double > &jacobian) |
Private Member Functions | |
void | fill_in_generic_contribution_to_residuals (Vector< double > &residual, DenseMatrix< double > &jacobian, const unsigned &flag) |
Compute local residual, and, if flag=1, local jacobian matrix. More... | |
Private Attributes | |
WRAPPED_POISSON_ELEMENT * | Wrapped_poisson_el_pt |
Pointer to Poisson element that contains the singularity. More... | |
PoissonSingularFctPt | Singular_fct_pt |
Pointer to singular function. More... | |
PoissonGradSingularFctPt | Grad_singular_fct_pt |
Pointer to the gradient of the singular function. More... | |
Vector< double > | S_in_wrapped_poisson_element |
Local coordinates of singularity in the wrapped Poisson element. More... | |
unsigned * | Direction_pt |
Direction of the derivative used for the residual of the element. More... | |
bool | Singular_function_satisfies_laplace_equation |
Does singular fct satisfy Laplace's eqn? More... | |
//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// We consider a singularity in the solution at the point O.
This class defines the functions u_sing and u_bar = C*u_sing and their gradients.
The class also defines the function that computes the residual associated with C. R_C = \frac{\partial u_FE}{\partial x_d}(O) where u_FE is : \sum_{i} U_i \Psi_i. This sets the derivative of the finite-element part of the solution to zero in the specified direction (d) and thus imposes regularity on that part.
typedef Vector<double>(* SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::PoissonGradSingularFctPt) (const Vector< double > &x) |
Function pointer to the gradient of the singular function:
typedef double(* SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::PoissonSingularFctPt) (const Vector< double > &x) |
Function pointer to the singular function:
|
inline |
Constructor.
References SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Direction_pt, SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Grad_singular_fct_pt, SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Singular_fct_pt, SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Singular_function_satisfies_laplace_equation, and SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Wrapped_poisson_el_pt.
|
inline |
Find the value of the unknown C.
Referenced by SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::grad_u_bar(), and SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::u_bar().
|
inline |
References SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::fill_in_generic_contribution_to_residuals().
|
inline |
|
inlineprivate |
Compute local residual, and, if flag=1, local jacobian matrix.
References SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Direction_pt, ProblemParameters::flux(), j, SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::S_in_wrapped_poisson_element, and SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Wrapped_poisson_el_pt.
Referenced by SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::fill_in_contribution_to_jacobian(), and SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::fill_in_contribution_to_residuals().
|
inline |
Access function to pointer to the gradient of sing function.
References SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Grad_singular_fct_pt.
|
inline |
Evaluate the gradient of the sing function at Eulerian position x.
References SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Grad_singular_fct_pt, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Wrapped_poisson_el_pt, and plotDoE::x.
Referenced by SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::grad_u_bar().
|
inline |
Gradient of ubar (including the constant!)
References SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::c(), SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::grad_singular_function(), i, SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Wrapped_poisson_el_pt, and plotDoE::x.
|
inline |
Set pointer to associated wrapped Poisson element which contains the singularity (at local coordinate s). Also specify the direction in which the slope of the FE part of the solution is set to zero
References SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Direction_pt, j, s, SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::S_in_wrapped_poisson_element, and SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Wrapped_poisson_el_pt.
|
inline |
Access function to pointer to singular function.
References SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Singular_fct_pt.
|
inline |
Evaluate singular function at Eulerian position x.
References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Singular_fct_pt, and plotDoE::x.
Referenced by SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::u_bar().
|
inline |
Does the singular fct satisfy Laplace's eqn? Default assumption is that it doesn't; user can overwrite this here to avoid unnecessary computation of integrals in residual
References SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::Singular_function_satisfies_laplace_equation.
|
inline |
The singular function (including its amplitude): ubar = C * sing where sing is defined via the function pointer.
References SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::c(), SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::singular_function(), and plotDoE::x.
|
private |
Direction of the derivative used for the residual of the element.
Referenced by SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::fill_in_generic_contribution_to_residuals(), SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::set_wrapped_poisson_element_pt(), and SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::SingularPoissonSolutionElement().
|
private |
Pointer to the gradient of the singular function.
Referenced by SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::grad_singular_fct_pt(), SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::grad_singular_function(), and SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::SingularPoissonSolutionElement().
|
private |
Local coordinates of singularity in the wrapped Poisson element.
Referenced by SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::fill_in_generic_contribution_to_residuals(), and SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::set_wrapped_poisson_element_pt().
|
private |
|
private |
Does singular fct satisfy Laplace's eqn?
Referenced by SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::singular_function_satisfies_laplace_equation(), and SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::SingularPoissonSolutionElement().
|
private |
Pointer to Poisson element that contains the singularity.
Referenced by SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::fill_in_generic_contribution_to_residuals(), SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::grad_singular_function(), SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::grad_u_bar(), SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::set_wrapped_poisson_element_pt(), and SingularPoissonSolutionElement< WRAPPED_POISSON_ELEMENT >::SingularPoissonSolutionElement().