![]() |
|
#include <poisson_elements_with_singularity.h>
Public Member Functions | |
PoissonElementWithSingularity () | |
Constructor. More... | |
void | impose_dirichlet_bc_on_node (const unsigned &j) |
void | undo_dirichlet_bc_on_node (const unsigned &j) |
Undo Dirichlet BCs on jth node. More... | |
void | undo_dirichlet_bc_on_all_nodes () |
Undo Dirichlet BCs on all nodes. More... | |
void | set_dirichlet_value_on_node (const unsigned &j, const double &value) |
Specify Dirichlet boundary value for j-th local node. More... | |
Vector< SingularPoissonSolutionElement< PoissonElementWithSingularity< BASIC_POISSON_ELEMENT > > * > | c_equation_elements_pt () |
void | add_c_equation_element_pt (SingularPoissonSolutionElement< PoissonElementWithSingularity< BASIC_POISSON_ELEMENT > > *c_pt) |
double | u_bar (const unsigned &i, const Vector< double > &x) const |
double | singular_function (const unsigned &i, const Vector< double > &x) const |
Evaluate i-th "raw" singular function at Eulerian position x. More... | |
Vector< double > | grad_u_bar (const unsigned i, const Vector< double > &x) const |
Vector< double > | grad_singular_function (const unsigned &i, const Vector< double > &x) const |
Evaluate the gradient of the i-th "raw" singular at Eulerian position x. More... | |
double | interpolated_u_poisson_fe_only (const Vector< double > &s) const |
double | interpolated_u_poisson (const Vector< double > &s) const |
Overloaded version including the singular contributions. More... | |
void | fill_in_contribution_to_residuals (Vector< double > &residuals) |
Add the element's contribution to its residual vector (wrapper) More... | |
void | fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian) |
void | output (std::ostream &outfile, const unsigned &nplot) |
Overloaded output fct: x, y [,z], u, u_fe_only, u-u_fe_only. More... | |
void | compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm) |
Compute error. More... | |
Private Member Functions | |
void | fill_in_generic_residual_contribution_wrapped_poisson (Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag) |
Overloaded fill-in function. More... | |
Private Attributes | |
Vector< SingularPoissonSolutionElement< PoissonElementWithSingularity< BASIC_POISSON_ELEMENT > > * > | C_equation_elements_pt |
Vector of pointers to SingularPoissonSolutionElement objects. More... | |
vector< bool > | Node_is_subject_to_dirichlet_bc |
Vector< double > | Imposed_value_at_node |
///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// Templated wrapper to add handling of singularities to the underlying Poisson element (specified via the template argument). Slightly inefficient because the integration loop is repeated here. The only alternative is to add the additional functionality into the Poisson elements. Not pretty either!
Dirichlet BCs are applied in hijacking manner and must be imposed from each element that shares a boundary node that is subject to a Dirichlet condition.
|
inline |
Constructor.
References PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::Imposed_value_at_node, j, and PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::Node_is_subject_to_dirichlet_bc.
|
inline |
Add pointer to associated SingularPoissonSolutionElement that determines the value of the amplitude of the singular function (and gives access to the singular function). The unknown amplitude becomes external Data for this element so assign_eqn_numbers() must be called after this function has been called.
References PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::C_equation_elements_pt.
|
inline |
Access function to pointer of vector of SingularPoissonSolutionElements. These specify the singular functions that are added to the (regular) FE solution
References PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::C_equation_elements_pt.
|
inline |
Compute error.
References calibrate::error, ProblemParameters::exact_soln(), i, PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::interpolated_u_poisson(), J, s, w, oomph::QuadTreeNames::W, and plotDoE::x.
|
inline |
Add the element's contribution to its residual vector and element Jacobian matrix (wrapper)
|
inline |
Add the element's contribution to its residual vector (wrapper)
|
inlineprivate |
Overloaded fill-in function.
References PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::C_equation_elements_pt, PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::grad_singular_function(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::grad_u_bar(), i, PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::Imposed_value_at_node, J, j, k, PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::Node_is_subject_to_dirichlet_bc, PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::singular_function(), Eigen::test, PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::u_bar(), w, and oomph::QuadTreeNames::W.
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::fill_in_contribution_to_jacobian(), and PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::fill_in_contribution_to_residuals().
|
inline |
Evaluate the gradient of the i-th "raw" singular at Eulerian position x.
References PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::C_equation_elements_pt, i, and plotDoE::x.
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::fill_in_generic_residual_contribution_wrapped_poisson().
|
inline |
Evaluate the gradient the i-th singular (incl. the amplitude ) at Eulerian position x
References PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::C_equation_elements_pt, i, and plotDoE::x.
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::fill_in_generic_residual_contribution_wrapped_poisson().
|
inline |
Impose Dirichlet BC on sum of FE solution and u_bar on j-th local node
References j, and PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::Node_is_subject_to_dirichlet_bc.
|
inline |
Overloaded version including the singular contributions.
References PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::C_equation_elements_pt, i, oomph::OneDimLagrange::shape(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::u_bar(), and plotDoE::x.
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::compute_error(), and PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::output().
|
inline |
Return FE representation of solution WITHOUT singular contributions at local coordinate s
References oomph::OneDimLagrange::shape().
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::output().
|
inline |
Overloaded output fct: x, y [,z], u, u_fe_only, u-u_fe_only.
References i, PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::interpolated_u_poisson(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::interpolated_u_poisson_fe_only(), s, and plotDoE::x.
|
inline |
Specify Dirichlet boundary value for j-th local node.
References PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::Imposed_value_at_node, j, and Eigen::value.
|
inline |
Evaluate i-th "raw" singular function at Eulerian position x.
References PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::C_equation_elements_pt, i, and plotDoE::x.
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::fill_in_generic_residual_contribution_wrapped_poisson().
|
inline |
Evaluate i-th u_bar function (i.e. i-th singular incl. the amplitude) function at Eulerian position x
References PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::C_equation_elements_pt, i, and plotDoE::x.
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::fill_in_generic_residual_contribution_wrapped_poisson(), and PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::interpolated_u_poisson().
|
inline |
Undo Dirichlet BCs on all nodes.
References j, and PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::undo_dirichlet_bc_on_node().
|
inline |
Undo Dirichlet BCs on jth node.
References j, and PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::Node_is_subject_to_dirichlet_bc.
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::undo_dirichlet_bc_on_all_nodes().
|
private |
Vector of pointers to SingularPoissonSolutionElement objects.
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::add_c_equation_element_pt(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::c_equation_elements_pt(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::fill_in_generic_residual_contribution_wrapped_poisson(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::grad_singular_function(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::grad_u_bar(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::interpolated_u_poisson(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::singular_function(), and PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::u_bar().
|
private |
Imposed value at nodes that are subject to Dirichlet BC [size = number of nodes; initialised to zero]
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::fill_in_generic_residual_contribution_wrapped_poisson(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::PoissonElementWithSingularity(), and PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::set_dirichlet_value_on_node().
|
private |
Boolean indicating which node is subject to Dirichlet BC [size = number of nodes; initialised to false]
Referenced by PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::fill_in_generic_residual_contribution_wrapped_poisson(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::impose_dirichlet_bc_on_node(), PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::PoissonElementWithSingularity(), and PoissonElementWithSingularity< BASIC_POISSON_ELEMENT >::undo_dirichlet_bc_on_node().