Topologically Rectangular Domain - a domain dexcribing a topologically rectangular problem - primarily contains functions to access the position of the global boundary relative to the macro element boundary, as well as first and second derivates of the global boundary wrt the macro element boundary NOTE : suitable for HermiteElementQuadMesh. More...
#include <topologically_rectangular_domain.h>
Public Types | |
typedef void(* | BoundaryFctPt) (const double &s, Vector< double > &r) |
boundary function pointer - for a given boundary takes the macro element coordinate position on that boundary and for that position returns the global coordinates (x) coordinates, or derivatives - dx_i/dm_t or second derivatives d2x_i/dm_t^2 | |
Public Member Functions | |
TopologicallyRectangularDomain (BoundaryFctPt north_pt, BoundaryFctPt east_pt, BoundaryFctPt south_pt, BoundaryFctPt west_pt) | |
Constructor - domain boundaries are described with four boundary function pointers describing the topology of the north, east, south, and west boundaries. | |
TopologicallyRectangularDomain (const double &l_x, const double &l_y) | |
Constructor - takes length of domain in x and y direction as arguements. Assumes domain is rectangular, and the south west (lower left) corner is at 0,0. | |
TopologicallyRectangularDomain (const double &x_min, const double &x_max, const double &y_min, const double &y_max) | |
Constructor - takes the minimum and maximum coordinates of the of an assumed rectanguler domain in the x and y direction. | |
TopologicallyRectangularDomain (const TopologicallyRectangularDomain &)=delete | |
Broken copy constructor. | |
void | operator= (const TopologicallyRectangularDomain &)=delete |
Broken assignment operator. | |
~TopologicallyRectangularDomain () | |
Destructor - empty; clean up done in base class. | |
void | set_boundary_derivative_functions (BoundaryFctPt d_north_pt, BoundaryFctPt d_east_pt, BoundaryFctPt d_south_pt, BoundaryFctPt d_west_pt) |
allows the boundary derivate function pointers to be set. To compute the derivatives of the problem domain global coordinates (x_i) wrt the macro element coordinates (m_i), dx_i/dm_t is required along the domain boundaries (where dm_t is the macro element coordinate tangential to the domain boundary). The derivatives dx_i/dm_t can either be prescribed with function pointers, or if the function pointers are not provided then dx_i/dm_t is computed with finite differencing. Note - these functions are only required for domains contructed with boundary function pointers | |
void | set_boundary_second_derivative_functions (BoundaryFctPt d2_north_pt, BoundaryFctPt d2_east_pt, BoundaryFctPt d2_south_pt, BoundaryFctPt d2_west_pt) |
allows the boundary second derivate function pointers to be set. To compute the second derivatives of the problem domain global coordinates (x_i) wrt the macro element coordinates (m_i), d2x_i/dm_t^2 is required along the domain boundaries (where dm_t is the macro element coordinate tangential to the domain boundary). The derivatives d2x_i/dm_t^2 can either be prescribed with function pointers, or if the function pointers are not provided then dx_i/dm_t is computed with finite differencing. Note - these functions are only required for domains contructed with boundary function pointers | |
void | macro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f) |
returns the global coordinate position (f) of macro element position s on boundary i_direct (e.g. N/S/W/E in 2D) at time t (no time dependence) | |
void | dmacro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f) |
returns the derivates of the global coordinate position (f) wrt to the macro element coordinate at macro macro element position s on boundary i_direct (e.g. N/S/W/E in 2D) at time t (no time dependence) | |
void | d2macro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f) |
returns the second derivates of the global coordinate position (f) wrt to the macro element coordinate at macro macro element position s on boundary i_direct (e.g. N/S/W/E in 2D) at time t (no time dependence) | |
![]() | |
Domain () | |
Constructor. | |
Domain (const Domain &)=delete | |
Broken copy constructor. | |
void | operator= (const Domain &)=delete |
Broken assignment operator. | |
virtual | ~Domain () |
Destructor: Strictly speaking, whoever creates an object dynamically should be responsible for the cleanup of said object but it makes sense here for the Domain to generically kill any MacroElements left over in the MacroElement container (if it hasn't already been done in the derived class) to avoid memory leaks. | |
MacroElement * | macro_element_pt (const unsigned &i) |
Access to i-th macro element. | |
unsigned | nmacro_element () |
Number of macro elements in domain. | |
void | output (const std::string &filename, const unsigned &nplot) |
Output macro elements. | |
void | output (std::ostream &outfile, const unsigned &nplot) |
Output macro elements. | |
virtual void | macro_element_boundary (const double &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f) |
Vector representation of the i_macro-th macro element boundary i_direct (e.g. N/S/W/E in 2D) at continuous time, t. | |
void | macro_element_boundary (const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f) |
Vector representation of the i_macro-th macro element boundary i_direct (e.g. N/S/W/E in 2D) at current time: f(s). | |
void | output_macro_element_boundaries (const std::string &filename, const unsigned &nplot) |
Output all macro element boundaries as tecplot zones. | |
void | output_macro_element_boundaries (std::ostream &outfile, const unsigned &nplot) |
Output all macro element boundaries as tecplot zones. | |
virtual void | dmacro_element_boundary (const double &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f) |
Vector representation of the i_macro-th macro element boundary derivatives i_direct (e.g. N/S/W/E in 2D) at continuous time level t. Broken virtual. | |
void | dmacro_element_boundary (const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f) |
Vector representation of the i_macro-th macro element boundary derivatives i_direct (e.g. N/S/W/E in 2D) at current time: f(s). | |
virtual void | d2macro_element_boundary (const double &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f) |
Vector representation of the i_macro-th macro element boundary seocond derivatives i_direct (e.g. N/S/W/E in 2D) at continuous time level t. Broken virtual. | |
void | d2macro_element_boundary (const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f) |
Vector representation of the i_macro-th macro element boundary second derivatives i_direct (e.g. N/S/W/E in 2D) at current time: f(s). | |
Private Member Functions | |
void | r_N (const Vector< double > &s, Vector< double > &f) |
takes the macro element coordinate position along the north boundary and returns the global coordinate position along that boundary | |
void | r_E (const Vector< double > &s, Vector< double > &f) |
takes the macro element coordinate position along the east boundary and returns the global coordinate position along that boundary | |
void | r_S (const Vector< double > &s, Vector< double > &f) |
takes the macro element coordinate position along the south boundary and returns the global coordinate position along that boundary | |
void | r_W (const Vector< double > &s, Vector< double > &f) |
takes the macro element coordinate position along the west boundary and returns the global coordinate position along that boundary access down boundary function pointer | |
void | dr_N (const Vector< double > &s, Vector< double > &dr) |
takes the macro element coordinate position along the north boundary and returns the derivates of the global coordinates with respect to the boundary | |
void | dr_E (const Vector< double > &s, Vector< double > &dr) |
takes the macro element coordinate position along the E boundary and returns the derivates of the global coordinates with respect to the boundary | |
void | dr_S (const Vector< double > &s, Vector< double > &dr) |
takes the macro element coordinate position along the south boundary and returns the derivates of the global coordinates with respect to the boundary | |
void | dr_W (const Vector< double > &s, Vector< double > &dr) |
takes the macro element coordinate position along the W boundary and returns the derivates of the global coordinates with respect to the boundary | |
void | d2r_N (const Vector< double > &s, Vector< double > &d2r) |
takes the macro element coordinate position along the north boundary and returns the second derivates of the global coordinates with respect to the boundary | |
void | d2r_E (const Vector< double > &s, Vector< double > &d2r) |
takes the macro element coordinate position along the east boundary and returns the second derivates of the global coordinates with respect to the boundary | |
void | d2r_S (const Vector< double > &s, Vector< double > &d2r) |
takes the macro element coordinate position along the south boundary and returns the second derivates of the global coordinates with respect to the boundary | |
void | d2r_W (const Vector< double > &s, Vector< double > &d2r) |
takes the macro element coordinate position along the west boundary and returns the second derivates of the global coordinates with respect to the boundary | |
Private Attributes | |
BoundaryFctPt | North_boundary_fn_pt |
Function pointer to prescribe the north boundary of this topologically rectangular domain. | |
BoundaryFctPt | East_boundary_fn_pt |
Function pointer to prescribe the east boundary of this topologically rectangular domain. | |
BoundaryFctPt | South_boundary_fn_pt |
Function pointer to prescribe the north boundary of this topologically rectangular domain. | |
BoundaryFctPt | West_boundary_fn_pt |
Function pointer to prescribe the west boundary of this topologically rectangular domain. | |
BoundaryFctPt | dNorth_boundary_fn_pt |
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the north boundary. | |
BoundaryFctPt | dEast_boundary_fn_pt |
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the east boundary. | |
BoundaryFctPt | dSouth_boundary_fn_pt |
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the south boundary. | |
BoundaryFctPt | dWest_boundary_fn_pt |
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the west boundary. | |
BoundaryFctPt | d2North_boundary_fn_pt |
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coordinate tangential to the north boundary. | |
BoundaryFctPt | d2East_boundary_fn_pt |
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coordinate tangential to the east boundary. | |
BoundaryFctPt | d2South_boundary_fn_pt |
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coordinate tangential to the south boundary. | |
BoundaryFctPt | d2West_boundary_fn_pt |
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coordinate tangential to the west boundary. | |
Vector< double > | x_south_west |
coordinate position of south west corner of domain (only used if boundary functions are not used) | |
Vector< double > | x_north_east |
coordinate position of north east corner of domain (only used if boundary functions are not used) | |
Additional Inherited Members | |
![]() | |
Vector< MacroElement * > | Macro_element_pt |
Vector of pointers to macro elements. | |
Topologically Rectangular Domain - a domain dexcribing a topologically rectangular problem - primarily contains functions to access the position of the global boundary relative to the macro element boundary, as well as first and second derivates of the global boundary wrt the macro element boundary NOTE : suitable for HermiteElementQuadMesh.
Definition at line 47 of file topologically_rectangular_domain.h.
typedef void(* oomph::TopologicallyRectangularDomain::BoundaryFctPt) (const double &s, Vector< double > &r) |
boundary function pointer - for a given boundary takes the macro element coordinate position on that boundary and for that position returns the global coordinates (x) coordinates, or derivatives - dx_i/dm_t or second derivatives d2x_i/dm_t^2
Definition at line 54 of file topologically_rectangular_domain.h.
|
inline |
Constructor - domain boundaries are described with four boundary function pointers describing the topology of the north, east, south, and west boundaries.
Definition at line 275 of file topologically_rectangular_domain.h.
References d2East_boundary_fn_pt, d2North_boundary_fn_pt, d2South_boundary_fn_pt, d2West_boundary_fn_pt, dEast_boundary_fn_pt, dNorth_boundary_fn_pt, dSouth_boundary_fn_pt, dWest_boundary_fn_pt, East_boundary_fn_pt, oomph::Domain::Macro_element_pt, North_boundary_fn_pt, South_boundary_fn_pt, and West_boundary_fn_pt.
|
inline |
Constructor - takes length of domain in x and y direction as arguements. Assumes domain is rectangular, and the south west (lower left) corner is at 0,0.
Definition at line 391 of file topologically_rectangular_domain.h.
References d2East_boundary_fn_pt, d2North_boundary_fn_pt, d2South_boundary_fn_pt, d2West_boundary_fn_pt, dEast_boundary_fn_pt, dNorth_boundary_fn_pt, dSouth_boundary_fn_pt, dWest_boundary_fn_pt, East_boundary_fn_pt, oomph::Domain::Macro_element_pt, North_boundary_fn_pt, South_boundary_fn_pt, West_boundary_fn_pt, x_north_east, and x_south_west.
|
inline |
Constructor - takes the minimum and maximum coordinates of the of an assumed rectanguler domain in the x and y direction.
Definition at line 435 of file topologically_rectangular_domain.h.
References d2East_boundary_fn_pt, d2North_boundary_fn_pt, d2South_boundary_fn_pt, d2West_boundary_fn_pt, dEast_boundary_fn_pt, dNorth_boundary_fn_pt, dSouth_boundary_fn_pt, dWest_boundary_fn_pt, East_boundary_fn_pt, oomph::Domain::Macro_element_pt, North_boundary_fn_pt, South_boundary_fn_pt, West_boundary_fn_pt, x_north_east, and x_south_west.
|
delete |
Broken copy constructor.
|
inline |
Destructor - empty; clean up done in base class.
Definition at line 87 of file topologically_rectangular_domain.h.
|
inlinevirtual |
returns the second derivates of the global coordinate position (f) wrt to the macro element coordinate at macro macro element position s on boundary i_direct (e.g. N/S/W/E in 2D) at time t (no time dependence)
Reimplemented from oomph::Domain.
Definition at line 601 of file topologically_rectangular_domain.h.
|
inlineprivate |
takes the macro element coordinate position along the east boundary and returns the second derivates of the global coordinates with respect to the boundary
Definition at line 911 of file topologically_rectangular_domain.h.
References d2East_boundary_fn_pt, dEast_boundary_fn_pt, e, East_boundary_fn_pt, and s.
Referenced by d2macro_element_boundary().
|
inlineprivate |
takes the macro element coordinate position along the north boundary and returns the second derivates of the global coordinates with respect to the boundary
Definition at line 858 of file topologically_rectangular_domain.h.
References d2North_boundary_fn_pt, dNorth_boundary_fn_pt, e, North_boundary_fn_pt, and s.
Referenced by d2macro_element_boundary().
|
inlineprivate |
takes the macro element coordinate position along the south boundary and returns the second derivates of the global coordinates with respect to the boundary
Definition at line 964 of file topologically_rectangular_domain.h.
References d2South_boundary_fn_pt, dSouth_boundary_fn_pt, e, s, and South_boundary_fn_pt.
Referenced by d2macro_element_boundary().
|
inlineprivate |
takes the macro element coordinate position along the west boundary and returns the second derivates of the global coordinates with respect to the boundary
Definition at line 1017 of file topologically_rectangular_domain.h.
References d2West_boundary_fn_pt, dWest_boundary_fn_pt, e, s, and West_boundary_fn_pt.
Referenced by d2macro_element_boundary().
|
inlinevirtual |
returns the derivates of the global coordinate position (f) wrt to the macro element coordinate at macro macro element position s on boundary i_direct (e.g. N/S/W/E in 2D) at time t (no time dependence)
Reimplemented from oomph::Domain.
Definition at line 565 of file topologically_rectangular_domain.h.
|
inlineprivate |
takes the macro element coordinate position along the E boundary and returns the derivates of the global coordinates with respect to the boundary
Definition at line 750 of file topologically_rectangular_domain.h.
References dEast_boundary_fn_pt, e, East_boundary_fn_pt, s, x_north_east, and x_south_west.
Referenced by dmacro_element_boundary().
|
inlineprivate |
takes the macro element coordinate position along the north boundary and returns the derivates of the global coordinates with respect to the boundary
Definition at line 714 of file topologically_rectangular_domain.h.
References dNorth_boundary_fn_pt, e, North_boundary_fn_pt, s, x_north_east, and x_south_west.
Referenced by dmacro_element_boundary().
|
inlineprivate |
takes the macro element coordinate position along the south boundary and returns the derivates of the global coordinates with respect to the boundary
Definition at line 786 of file topologically_rectangular_domain.h.
References dSouth_boundary_fn_pt, e, s, South_boundary_fn_pt, x_north_east, and x_south_west.
Referenced by dmacro_element_boundary().
|
inlineprivate |
takes the macro element coordinate position along the W boundary and returns the derivates of the global coordinates with respect to the boundary
Definition at line 822 of file topologically_rectangular_domain.h.
References dWest_boundary_fn_pt, e, s, West_boundary_fn_pt, x_north_east, and x_south_west.
Referenced by dmacro_element_boundary().
|
inlinevirtual |
returns the global coordinate position (f) of macro element position s on boundary i_direct (e.g. N/S/W/E in 2D) at time t (no time dependence)
Implements oomph::Domain.
Definition at line 529 of file topologically_rectangular_domain.h.
|
delete |
Broken assignment operator.
|
inlineprivate |
takes the macro element coordinate position along the east boundary and returns the global coordinate position along that boundary
Definition at line 655 of file topologically_rectangular_domain.h.
References East_boundary_fn_pt, s, x_north_east, and x_south_west.
Referenced by macro_element_boundary().
|
inlineprivate |
takes the macro element coordinate position along the north boundary and returns the global coordinate position along that boundary
Definition at line 636 of file topologically_rectangular_domain.h.
References North_boundary_fn_pt, s, x_north_east, and x_south_west.
Referenced by macro_element_boundary().
|
inlineprivate |
takes the macro element coordinate position along the south boundary and returns the global coordinate position along that boundary
Definition at line 674 of file topologically_rectangular_domain.h.
References s, South_boundary_fn_pt, x_north_east, and x_south_west.
Referenced by macro_element_boundary().
|
inlineprivate |
takes the macro element coordinate position along the west boundary and returns the global coordinate position along that boundary access down boundary function pointer
Definition at line 694 of file topologically_rectangular_domain.h.
References s, West_boundary_fn_pt, x_north_east, and x_south_west.
Referenced by macro_element_boundary().
|
inline |
allows the boundary derivate function pointers to be set. To compute the derivatives of the problem domain global coordinates (x_i) wrt the macro element coordinates (m_i), dx_i/dm_t is required along the domain boundaries (where dm_t is the macro element coordinate tangential to the domain boundary). The derivatives dx_i/dm_t can either be prescribed with function pointers, or if the function pointers are not provided then dx_i/dm_t is computed with finite differencing. Note - these functions are only required for domains contructed with boundary function pointers
Definition at line 487 of file topologically_rectangular_domain.h.
References dEast_boundary_fn_pt, dNorth_boundary_fn_pt, dSouth_boundary_fn_pt, and dWest_boundary_fn_pt.
|
inline |
allows the boundary second derivate function pointers to be set. To compute the second derivatives of the problem domain global coordinates (x_i) wrt the macro element coordinates (m_i), d2x_i/dm_t^2 is required along the domain boundaries (where dm_t is the macro element coordinate tangential to the domain boundary). The derivatives d2x_i/dm_t^2 can either be prescribed with function pointers, or if the function pointers are not provided then dx_i/dm_t is computed with finite differencing. Note - these functions are only required for domains contructed with boundary function pointers
Definition at line 512 of file topologically_rectangular_domain.h.
References d2East_boundary_fn_pt, d2North_boundary_fn_pt, d2South_boundary_fn_pt, and d2West_boundary_fn_pt.
|
private |
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coordinate tangential to the east boundary.
Definition at line 188 of file topologically_rectangular_domain.h.
Referenced by d2r_E(), set_boundary_second_derivative_functions(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coordinate tangential to the north boundary.
Definition at line 183 of file topologically_rectangular_domain.h.
Referenced by d2r_N(), set_boundary_second_derivative_functions(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coordinate tangential to the south boundary.
Definition at line 193 of file topologically_rectangular_domain.h.
Referenced by d2r_S(), set_boundary_second_derivative_functions(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coordinate tangential to the west boundary.
Definition at line 198 of file topologically_rectangular_domain.h.
Referenced by d2r_W(), set_boundary_second_derivative_functions(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the east boundary.
Definition at line 169 of file topologically_rectangular_domain.h.
Referenced by d2r_E(), dr_E(), set_boundary_derivative_functions(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the north boundary.
Definition at line 165 of file topologically_rectangular_domain.h.
Referenced by d2r_N(), dr_N(), set_boundary_derivative_functions(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the south boundary.
Definition at line 173 of file topologically_rectangular_domain.h.
Referenced by d2r_S(), dr_S(), set_boundary_derivative_functions(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the west boundary.
Definition at line 177 of file topologically_rectangular_domain.h.
Referenced by d2r_W(), dr_W(), set_boundary_derivative_functions(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the east boundary of this topologically rectangular domain.
Definition at line 152 of file topologically_rectangular_domain.h.
Referenced by d2r_E(), dr_E(), r_E(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the north boundary of this topologically rectangular domain.
Definition at line 148 of file topologically_rectangular_domain.h.
Referenced by d2r_N(), dr_N(), r_N(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the north boundary of this topologically rectangular domain.
Definition at line 156 of file topologically_rectangular_domain.h.
Referenced by d2r_S(), dr_S(), r_S(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
|
private |
Function pointer to prescribe the west boundary of this topologically rectangular domain.
Definition at line 160 of file topologically_rectangular_domain.h.
Referenced by d2r_W(), dr_W(), r_W(), TopologicallyRectangularDomain(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
coordinate position of north east corner of domain (only used if boundary functions are not used)
Definition at line 207 of file topologically_rectangular_domain.h.
Referenced by dr_E(), dr_N(), dr_S(), dr_W(), r_E(), r_N(), r_S(), r_W(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().
coordinate position of south west corner of domain (only used if boundary functions are not used)
Definition at line 203 of file topologically_rectangular_domain.h.
Referenced by dr_E(), dr_N(), dr_S(), dr_W(), r_E(), r_N(), r_S(), r_W(), TopologicallyRectangularDomain(), and TopologicallyRectangularDomain().