28 #ifndef OOMPH_REFINEABLE_PML_HELMHOLTZ_ELEMENTS_HEADER
29 #define OOMPH_REFINEABLE_PML_HELMHOLTZ_ELEMENTS_HEADER
33 #include <oomph-lib-config.h>
38 #include "../generic/refineable_quad_element.h"
39 #include "../generic/refineable_brick_element.h"
40 #include "../generic/hp_refineable_elements.h"
41 #include "../generic/error_estimator.h"
55 template<
unsigned DIM>
95 for (
unsigned i = 0;
i < DIM;
i++)
97 flux[count] = complex_flux[
i].real();
99 flux[count] = complex_flux[
i].imag();
116 unsigned n_node =
nnode();
132 for (
unsigned l = 0; l < n_node; l++)
134 values[0] += this->
nodal_value(l, u_nodal_index.real()) * psi[l];
135 values[1] += this->
nodal_value(l, u_nodal_index.imag()) * psi[l];
151 "Time-dependent version of get_interpolated_values() ";
152 error_message +=
"not implemented for this element \n";
155 "RefineablePMLHelmholtzEquations::get_interpolated_values()",
156 OOMPH_EXCEPTION_LOCATION);
185 const unsigned& flag);
194 template<
unsigned DIM,
unsigned NNODE_1D>
244 return (NNODE_1D - 1);
265 template<
unsigned DIM,
unsigned NNODE_1D>
267 :
public virtual QElement<DIM - 1, NNODE_1D>
279 template<
unsigned NNODE_1D>
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
double nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n. Produces suitably interpolated values for hanging nodes...
virtual unsigned nvertex_node() const
Return the number of vertex nodes in this element. Broken virtual function in "pure" finite elements.
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
unsigned nnode() const
Return the number of nodes.
virtual Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element. Broken virtual function in "pure" finite elements.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
An OomphLibError object which should be thrown when an run-time error is encountered....
A class for all isoparametric elements that solve the Helmholtz equations with pml capabilities....
PMLHelmholtzSourceFctPt Source_fct_pt
Pointer to source function:
void get_flux(const Vector< double > &s, Vector< std::complex< double >> &flux) const
Get flux: flux[i] = du/dx_i for real and imag part.
PMLHelmholtzSourceFctPt & source_fct_pt()
Access function: Pointer to source function.
virtual std::complex< unsigned > u_index_helmholtz() const
Broken assignment operator.
PMLLayerElement()
Constructor: Call the constructor for the appropriate QElement.
General definition of policy class defining the elements to be used in the actual PML layers....
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
virtual RefineableElement * father_element_pt() const
Return a pointer to the father element.
////////////////////////////////////////////////////////////////////////
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 usu...
void further_build()
Further build: Copy source function pointer from father element.
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 usu...
unsigned num_Z2_flux_terms()
Broken assignment operator.
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery: Complex flux from PMLHelmholtz equations, strung together.
void fill_in_generic_residual_contribution_helmholtz(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Add element's contribution to elemental residual vector and/or Jacobian matrix flag=1: compute both f...
RefineablePMLHelmholtzEquations()
Constructor, simply call other constructors.
RefineablePMLHelmholtzEquations(const RefineablePMLHelmholtzEquations< DIM > &dummy)=delete
Broken copy constructor.
A class that is used to template the refineable Q elements by dimension. It's really nothing more tha...
Refineable version of QPMLHelmholtzElement elements.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
unsigned ncont_interpolated_values() const
Broken assignment operator.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
unsigned nvertex_node() const
Number of vertex nodes in the element.
RefineableQPMLHelmholtzElement()
Constructor, simply call the other constructors.
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: empty.
RefineableQPMLHelmholtzElement(const RefineableQPMLHelmholtzElement< DIM, NNODE_1D > &dummy)=delete
Broken copy constructor.
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes....
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...