Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
oomph::TopologicallyRectangularDomain Class Reference

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>

+ Inheritance diagram for oomph::TopologicallyRectangularDomain:

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 More...
 

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. More...
 
 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. More...
 
 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. More...
 
 TopologicallyRectangularDomain (const TopologicallyRectangularDomain &)
 Broken copy constructor. More...
 
void operator= (const TopologicallyRectangularDomain &)
 Broken assignment operator. More...
 
 ~TopologicallyRectangularDomain ()
 Destructor - deletes the underlying macro element. More...
 
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 More...
 
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 More...
 
void macro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
void dmacro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
void d2macro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
- Public Member Functions inherited from oomph::Domain
 Domain ()
 Constructor. More...
 
 Domain (const Domain &)
 Broken copy constructor. More...
 
void operator= (const Domain &)
 Broken assignment operator. More...
 
virtual ~Domain ()
 Virtual destructor: Empty. More...
 
MacroElementmacro_element_pt (const unsigned &i)
 Access to i-th macro element. More...
 
unsigned nmacro_element ()
 Number of macro elements in domain. More...
 
void output (const std::string &filename, const unsigned &nplot)
 Output macro elements. More...
 
void output (std::ostream &outfile, const unsigned &nplot)
 Output macro elements. More...
 
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). More...
 
void output_macro_element_boundaries (const std::string &filename, const unsigned &nplot)
 Output all macro element boundaries as tecplot zones. More...
 
void output_macro_element_boundaries (std::ostream &outfile, const unsigned &nplot)
 Output all macro element boundaries as tecplot zones. More...
 
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). More...
 
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). More...
 

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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 

Private Attributes

BoundaryFctPt North_boundary_fn_pt
 Function pointer to prescribe the north boundary of this topologically rectangular domain. More...
 
BoundaryFctPt East_boundary_fn_pt
 Function pointer to prescribe the east boundary of this topologically rectangular domain. More...
 
BoundaryFctPt South_boundary_fn_pt
 Function pointer to prescribe the north boundary of this topologically rectangular domain. More...
 
BoundaryFctPt West_boundary_fn_pt
 Function pointer to prescribe the west boundary of this topologically rectangular domain. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
Vector< double > x_south_west
 coordinate position of south west corner of domain (only used if boundary functions are not used) More...
 
Vector< double > x_north_east
 coordinate position of north east corner of domain (only used if boundary functions are not used) More...
 

Additional Inherited Members

- Protected Attributes inherited from oomph::Domain
Vector< MacroElement * > Macro_element_pt
 Vector of pointers to macro elements. More...
 

Detailed Description

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 56 of file topologically_rectangular_domain.h.

Member Typedef Documentation

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 66 of file topologically_rectangular_domain.h.

Constructor & Destructor Documentation

oomph::TopologicallyRectangularDomain::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.

Definition at line 43 of file topologically_rectangular_domain.cc.

oomph::TopologicallyRectangularDomain::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.

Definition at line 161 of file topologically_rectangular_domain.cc.

oomph::TopologicallyRectangularDomain::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.

Definition at line 205 of file topologically_rectangular_domain.cc.

oomph::TopologicallyRectangularDomain::TopologicallyRectangularDomain ( const TopologicallyRectangularDomain )
inline

Broken copy constructor.

Definition at line 89 of file topologically_rectangular_domain.h.

References oomph::BrokenCopy::broken_copy().

oomph::TopologicallyRectangularDomain::~TopologicallyRectangularDomain ( )
inline

Destructor - deletes the underlying macro element.

Definition at line 103 of file topologically_rectangular_domain.h.

References oomph::Domain::Macro_element_pt.

Member Function Documentation

void oomph::TopologicallyRectangularDomain::d2macro_element_boundary ( const unsigned &  t,
const unsigned &  i_macro,
const unsigned &  i_direct,
const Vector< double > &  s,
Vector< double > &  f 
)
virtual

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 363 of file topologically_rectangular_domain.cc.

References oomph::QuadTreeNames::E, oomph::QuadTreeNames::N, oomph::QuadTreeNames::S, and oomph::QuadTreeNames::W.

void oomph::TopologicallyRectangularDomain::d2r_E ( const Vector< double > &  s,
Vector< double > &  d2r 
)
private

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 667 of file topologically_rectangular_domain.cc.

References d2East_boundary_fn_pt, dEast_boundary_fn_pt, e, and East_boundary_fn_pt.

void oomph::TopologicallyRectangularDomain::d2r_N ( const Vector< double > &  s,
Vector< double > &  d2r 
)
private

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 614 of file topologically_rectangular_domain.cc.

References d2North_boundary_fn_pt, dNorth_boundary_fn_pt, e, and North_boundary_fn_pt.

void oomph::TopologicallyRectangularDomain::d2r_S ( const Vector< double > &  s,
Vector< double > &  d2r 
)
private

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 720 of file topologically_rectangular_domain.cc.

References d2South_boundary_fn_pt, dSouth_boundary_fn_pt, e, and South_boundary_fn_pt.

void oomph::TopologicallyRectangularDomain::d2r_W ( const Vector< double > &  s,
Vector< double > &  d2r 
)
private

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 773 of file topologically_rectangular_domain.cc.

References d2West_boundary_fn_pt, dWest_boundary_fn_pt, e, and West_boundary_fn_pt.

void oomph::TopologicallyRectangularDomain::dmacro_element_boundary ( const unsigned &  t,
const unsigned &  i_macro,
const unsigned &  i_direct,
const Vector< double > &  s,
Vector< double > &  f 
)
virtual

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 329 of file topologically_rectangular_domain.cc.

References oomph::QuadTreeNames::E, oomph::QuadTreeNames::N, oomph::QuadTreeNames::S, and oomph::QuadTreeNames::W.

void oomph::TopologicallyRectangularDomain::dr_E ( const Vector< double > &  s,
Vector< double > &  dr 
)
private

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 506 of file topologically_rectangular_domain.cc.

References dEast_boundary_fn_pt, e, East_boundary_fn_pt, x_north_east, and x_south_west.

void oomph::TopologicallyRectangularDomain::dr_N ( const Vector< double > &  s,
Vector< double > &  dr 
)
private

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 470 of file topologically_rectangular_domain.cc.

References dNorth_boundary_fn_pt, e, North_boundary_fn_pt, x_north_east, and x_south_west.

void oomph::TopologicallyRectangularDomain::dr_S ( const Vector< double > &  s,
Vector< double > &  dr 
)
private

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 542 of file topologically_rectangular_domain.cc.

References dSouth_boundary_fn_pt, e, South_boundary_fn_pt, x_north_east, and x_south_west.

void oomph::TopologicallyRectangularDomain::dr_W ( const Vector< double > &  s,
Vector< double > &  dr 
)
private

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 578 of file topologically_rectangular_domain.cc.

References dWest_boundary_fn_pt, e, West_boundary_fn_pt, x_north_east, and x_south_west.

void oomph::TopologicallyRectangularDomain::macro_element_boundary ( const unsigned &  t,
const unsigned &  i_macro,
const unsigned &  i_direct,
const Vector< double > &  s,
Vector< double > &  f 
)
virtual

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 295 of file topologically_rectangular_domain.cc.

References oomph::QuadTreeNames::E, oomph::QuadTreeNames::N, oomph::QuadTreeNames::S, and oomph::QuadTreeNames::W.

void oomph::TopologicallyRectangularDomain::operator= ( const TopologicallyRectangularDomain )
inline

Broken assignment operator.

Definition at line 96 of file topologically_rectangular_domain.h.

References oomph::BrokenCopy::broken_assign().

void oomph::TopologicallyRectangularDomain::r_E ( const Vector< double > &  s,
Vector< double > &  f 
)
private

takes the macro element coordinate position along the east boundary and returns the global coordinate position along that boundary

Definition at line 414 of file topologically_rectangular_domain.cc.

References East_boundary_fn_pt, x_north_east, and x_south_west.

void oomph::TopologicallyRectangularDomain::r_N ( const Vector< double > &  s,
Vector< double > &  f 
)
private

takes the macro element coordinate position along the north boundary and returns the global coordinate position along that boundary

Definition at line 396 of file topologically_rectangular_domain.cc.

References North_boundary_fn_pt, x_north_east, and x_south_west.

void oomph::TopologicallyRectangularDomain::r_S ( const Vector< double > &  s,
Vector< double > &  f 
)
private

takes the macro element coordinate position along the south boundary and returns the global coordinate position along that boundary

Definition at line 432 of file topologically_rectangular_domain.cc.

References South_boundary_fn_pt, x_north_east, and x_south_west.

void oomph::TopologicallyRectangularDomain::r_W ( const Vector< double > &  s,
Vector< double > &  f 
)
private

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 451 of file topologically_rectangular_domain.cc.

References West_boundary_fn_pt, x_north_east, and x_south_west.

void oomph::TopologicallyRectangularDomain::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

Definition at line 255 of file topologically_rectangular_domain.cc.

void oomph::TopologicallyRectangularDomain::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

Definition at line 279 of file topologically_rectangular_domain.cc.

Member Data Documentation

BoundaryFctPt oomph::TopologicallyRectangularDomain::d2East_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 214 of file topologically_rectangular_domain.h.

Referenced by d2r_E().

BoundaryFctPt oomph::TopologicallyRectangularDomain::d2North_boundary_fn_pt
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 209 of file topologically_rectangular_domain.h.

Referenced by d2r_N().

BoundaryFctPt oomph::TopologicallyRectangularDomain::d2South_boundary_fn_pt
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 219 of file topologically_rectangular_domain.h.

Referenced by d2r_S().

BoundaryFctPt oomph::TopologicallyRectangularDomain::d2West_boundary_fn_pt
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 224 of file topologically_rectangular_domain.h.

Referenced by d2r_W().

BoundaryFctPt oomph::TopologicallyRectangularDomain::dEast_boundary_fn_pt
private

Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the east boundary.

Definition at line 195 of file topologically_rectangular_domain.h.

Referenced by d2r_E(), and dr_E().

BoundaryFctPt oomph::TopologicallyRectangularDomain::dNorth_boundary_fn_pt
private

Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the north boundary.

Definition at line 191 of file topologically_rectangular_domain.h.

Referenced by d2r_N(), and dr_N().

BoundaryFctPt oomph::TopologicallyRectangularDomain::dSouth_boundary_fn_pt
private

Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the south boundary.

Definition at line 199 of file topologically_rectangular_domain.h.

Referenced by d2r_S(), and dr_S().

BoundaryFctPt oomph::TopologicallyRectangularDomain::dWest_boundary_fn_pt
private

Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate tangential to the west boundary.

Definition at line 203 of file topologically_rectangular_domain.h.

Referenced by d2r_W(), and dr_W().

BoundaryFctPt oomph::TopologicallyRectangularDomain::East_boundary_fn_pt
private

Function pointer to prescribe the east boundary of this topologically rectangular domain.

Definition at line 178 of file topologically_rectangular_domain.h.

Referenced by d2r_E(), dr_E(), and r_E().

BoundaryFctPt oomph::TopologicallyRectangularDomain::North_boundary_fn_pt
private

Function pointer to prescribe the north boundary of this topologically rectangular domain.

Definition at line 174 of file topologically_rectangular_domain.h.

Referenced by d2r_N(), dr_N(), and r_N().

BoundaryFctPt oomph::TopologicallyRectangularDomain::South_boundary_fn_pt
private

Function pointer to prescribe the north boundary of this topologically rectangular domain.

Definition at line 182 of file topologically_rectangular_domain.h.

Referenced by d2r_S(), dr_S(), and r_S().

BoundaryFctPt oomph::TopologicallyRectangularDomain::West_boundary_fn_pt
private

Function pointer to prescribe the west boundary of this topologically rectangular domain.

Definition at line 186 of file topologically_rectangular_domain.h.

Referenced by d2r_W(), dr_W(), and r_W().

Vector<double> oomph::TopologicallyRectangularDomain::x_north_east
private

coordinate position of north east corner of domain (only used if boundary functions are not used)

Definition at line 233 of file topologically_rectangular_domain.h.

Referenced by dr_E(), dr_N(), dr_S(), dr_W(), r_E(), r_N(), r_S(), and r_W().

Vector<double> oomph::TopologicallyRectangularDomain::x_south_west
private

coordinate position of south west corner of domain (only used if boundary functions are not used)

Definition at line 229 of file topologically_rectangular_domain.h.

Referenced by dr_E(), dr_N(), dr_S(), dr_W(), r_E(), r_N(), r_S(), and r_W().


The documentation for this class was generated from the following files: