oomph::Spine Class Reference

#include <spines.h>

Public Member Functions

 Spine ()
 
 Spine (const double &height)
 
 Spine (const double &height, const Vector< Data * > &geom_data_pt)
 
 Spine (const double &height, const Vector< Data * > &geom_data_pt, const Vector< GeomObject * > &geom_object_pt)
 
 ~Spine ()
 
doubleheight ()
 Access function to spine height. More...
 
Data *& spine_height_pt ()
 Access function to Data object that stores the spine height. More...
 
Dataspine_height_pt () const
 
unsigned ngeom_data ()
 
void set_geom_data_pt (const Vector< Data * > &geom_data_pt)
 
void add_geom_data_pt (Data *geom_data_pt)
 
Data *& geom_data_pt (const unsigned &i)
 
Datageom_data_pt (const unsigned &i) const
 
Vector< Data * > & vector_geom_data_pt ()
 Return the vector of geometric data. More...
 
unsigned ngeom_object ()
 
void set_geom_object_pt (const Vector< GeomObject * > &geom_object_pt)
 
void add_geom_object_pt (GeomObject *geom_object_pt)
 
GeomObject *& geom_object_pt (const unsigned &i)
 
GeomObjectgeom_object_pt (const unsigned &i) const
 
Vector< GeomObject * > & vector_geom_object_pt ()
 
unsigned ngeom_parameter ()
 
void set_geom_parameter (const Vector< double > &geom_parameter)
 
void add_geom_parameter (const double &geom_parameter)
 
doublegeom_parameter (const unsigned &i)
 
const doublegeom_parameter (const unsigned &i) const
 

Private Attributes

Vector< Data * > Geom_data_pt
 Data that stores the spine height. More...
 
Vector< GeomObject * > Geom_object_pt
 
Vector< doubleGeom_parameter
 Vector that stores doubles that are used in the geometric updates. More...
 

Detailed Description

Spines are used for algebraic node update operations in free-surface fluid problems: They form the back-bones along which nodes in a a free-surface mesh are located. Typically, the free surface is located at the "end" of the spine; the nodes in the interior of the mesh are located at fixed fractions along the spine. The key Data member of the Spine object is its "height" – usually an unknown in the problem – which is used by the SpineNode's node update function to update the SpineNode's position.

In more complex problems (such as the case where a fluid layer is deposited on an elastic body), the node update function can depend on additional information, such as the GeomObject representation of the elastic body, and additional Data objects wich specify the position on the GeomObject from which the Spine emanates. The Spine class therefore provides storage for pointers to GeomObjects and storage for any additional geometric Data that may be required during node update operations.

Constructor & Destructor Documentation

◆ Spine() [1/4]

oomph::Spine::Spine ( )
inline

Default constructor: Create the Spine and initialise its height to zero.

69  {
70  Geom_data_pt.resize(1);
71  // Create Data for height. By default it's free
72  Geom_data_pt[0] = new Data(1);
73  }
Vector< Data * > Geom_data_pt
Data that stores the spine height.
Definition: spines.h:305

References Geom_data_pt.

◆ Spine() [2/4]

oomph::Spine::Spine ( const double height)
inline

Constructor: Create the Spine and initialise its height to the specified value

78  {
79  Geom_data_pt.resize(1);
80  // Create Data for height. By default it's free
81  Geom_data_pt[0] = new Data(1);
82  // Set value
83  Geom_data_pt[0]->set_value(0, height);
84  }
double & height()
Access function to spine height.
Definition: spines.h:150

References Geom_data_pt, and height().

◆ Spine() [3/4]

oomph::Spine::Spine ( const double height,
const Vector< Data * > &  geom_data_pt 
)
inline

Constructor: Create the Spine and initialise its height to the specified value. Store the vector of (pointers to) the additional geometric Data that is required during the node update operation for this Spine.

91  {
92  // Find the number of geometric data passed
93  const unsigned n_geom_data = geom_data_pt.size();
94  // Now allocate enough storage for the spine height and additional
95  // geometric data
96  Geom_data_pt.resize(n_geom_data + 1);
97 
98  // Create Data for height. By default it's free
99  Geom_data_pt[0] = new Data(1);
100  // Set value
101  Geom_data_pt[0]->set_value(0, height);
102  // Add the additional geometric data
103  for (unsigned i = 0; i < n_geom_data; i++)
104  {
105  Geom_data_pt[i + 1] = geom_data_pt[i];
106  }
107  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Data *& geom_data_pt(const unsigned &i)
Definition: spines.h:198

References geom_data_pt(), Geom_data_pt, height(), and i.

◆ Spine() [4/4]

oomph::Spine::Spine ( const double height,
const Vector< Data * > &  geom_data_pt,
const Vector< GeomObject * > &  geom_object_pt 
)
inline

Constructor: Create the Spine and initialise its height to the specified value. Store the vector of (pointers to) the additional geometric Data that is required during the node update operation; also store vector of (pointers to) GeomObjects that is required during the node update operation for this Spine

119  {
120  // Find the number of geometric data passed
121  const unsigned n_geom_data = geom_data_pt.size();
122  // Now allocate enough storage for the spine height and additional
123  // geometric data
124  Geom_data_pt.resize(n_geom_data + 1);
125 
126  // Create Data for height. By default it's free
127  Geom_data_pt[0] = new Data(1);
128  // Set value
129  Geom_data_pt[0]->set_value(0, height);
130  // Add the additional geometric data
131  for (unsigned i = 0; i < n_geom_data; i++)
132  {
133  Geom_data_pt[i + 1] = geom_data_pt[i];
134  }
135  }
GeomObject *& geom_object_pt(const unsigned &i)
Definition: spines.h:244
Vector< GeomObject * > Geom_object_pt
Definition: spines.h:309

References geom_data_pt(), Geom_data_pt, height(), and i.

◆ ~Spine()

oomph::Spine::~Spine ( )
inline

Destructor: Wipe Data object that stores the Spine height. All other objects (geometric Data and geometric objects) were created outside the Spine and must be deleted there.

143  {
144  // Kill spine height
145  delete Geom_data_pt[0];
146  }

References Geom_data_pt.

Member Function Documentation

◆ add_geom_data_pt()

void oomph::Spine::add_geom_data_pt ( Data geom_data_pt)
inline

Add (pointer to) geometric Data that is involved in the node update operations for this Spine

192  {
193  Geom_data_pt.push_back(geom_data_pt);
194  }

References geom_data_pt(), and Geom_data_pt.

◆ add_geom_object_pt()

void oomph::Spine::add_geom_object_pt ( GeomObject geom_object_pt)
inline

Add (pointer to) geometric object that is involved in the node update operations for this Spine

238  {
239  Geom_object_pt.push_back(geom_object_pt);
240  }

References geom_object_pt(), and Geom_object_pt.

◆ add_geom_parameter()

void oomph::Spine::add_geom_parameter ( const double geom_parameter)
inline

Add geometric parameter involved in the node update operations for this Spine

281  {
282  Geom_parameter.push_back(geom_parameter);
283  }
double & geom_parameter(const unsigned &i)
Definition: spines.h:287
Vector< double > Geom_parameter
Vector that stores doubles that are used in the geometric updates.
Definition: spines.h:312

References geom_parameter(), and Geom_parameter.

Referenced by oomph::AnnularSpineMesh< ELEMENT >::AnnularSpineMesh().

◆ geom_data_pt() [1/2]

Data*& oomph::Spine::geom_data_pt ( const unsigned i)
inline

Return i-th geometric Data that is involved in the node update operations for this Spine

199  {
200  return Geom_data_pt[i];
201  }

References Geom_data_pt, and i.

Referenced by add_geom_data_pt(), oomph::SpineNode::all_geom_data_pt(), set_geom_data_pt(), and Spine().

◆ geom_data_pt() [2/2]

Data* oomph::Spine::geom_data_pt ( const unsigned i) const
inline

Return i-th geometric Data that is involved in the node update operations for this Spine. Const version

206  {
207  return Geom_data_pt[i];
208  }

References Geom_data_pt, and i.

◆ geom_object_pt() [1/2]

◆ geom_object_pt() [2/2]

GeomObject* oomph::Spine::geom_object_pt ( const unsigned i) const
inline

Return i-th geometric object that is involved in the node update operations for this Spine. Const version

252  {
253  return Geom_object_pt[i];
254  }

References Geom_object_pt, and i.

◆ geom_parameter() [1/2]

double& oomph::Spine::geom_parameter ( const unsigned i)
inline

Return i-th geometric parameter that is involved in the node update operations for this Spine

288  {
289  return Geom_parameter[i];
290  }

References Geom_parameter, and i.

Referenced by add_geom_parameter(), CombCanSpineMesh< ELEMENT, INTERFACE_ELEMENT >::build_single_layer_mesh(), CombTipSpineMesh< ELEMENT, INTERFACE_ELEMENT >::build_single_layer_mesh(), ThreeDimBethertonProblem< ELEMENT >::multiply_aspect_ratio(), No_Slip::no_slip_condition_first(), No_Slip::no_slip_condition_second(), CombCanSpineMesh< ELEMENT, INTERFACE_ELEMENT >::rotate_90(), CombTipSpineMesh< ELEMENT, INTERFACE_ELEMENT >::rotate_90_zeq1_xeq0(), CombTipSpineMesh< ELEMENT, INTERFACE_ELEMENT >::rotate_90_zeq1_yeq0(), set_geom_parameter(), oomph::AnnularSpineMesh< ELEMENT >::spine_node_update(), SimpleSpineMesh< ELEMENT >::spine_node_update(), MyCanyonMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update(), CombCanSpineMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update(), CombTipSpineMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update(), STSpineMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update(), MyTipMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update(), oomph::ChannelSpineMesh< ELEMENT >::spine_node_update(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update_channel(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update_film_lower(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update_film_upper(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update_horizontal_transition_lower(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update_horizontal_transition_upper(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update_vertical_transition_lower(), and oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::spine_node_update_vertical_transition_upper().

◆ geom_parameter() [2/2]

const double& oomph::Spine::geom_parameter ( const unsigned i) const
inline

Return i-th geometric parameter that is involved in the node update operations for this Spine. Const version

295  {
296  return Geom_parameter[i];
297  }

References Geom_parameter, and i.

◆ height()

◆ ngeom_data()

unsigned oomph::Spine::ngeom_data ( )
inline

Number of geometric Data that is involved in the node update operations for this Spine

172  {
173  return Geom_data_pt.size();
174  }

References Geom_data_pt.

Referenced by oomph::SpineNode::ngeom_data().

◆ ngeom_object()

unsigned oomph::Spine::ngeom_object ( )
inline

Number of geometric objects that is involved in the node update operations for this Spine

219  {
220  return Geom_object_pt.size();
221  }

References Geom_object_pt.

Referenced by oomph::SpineNode::ngeom_object().

◆ ngeom_parameter()

unsigned oomph::Spine::ngeom_parameter ( )
inline

Number of geometric parameters that are involved in the node update operations for this Spine

266  {
267  return Geom_parameter.size();
268  }

References Geom_parameter.

Referenced by oomph::AnnularSpineMesh< ELEMENT >::AnnularSpineMesh().

◆ set_geom_data_pt()

void oomph::Spine::set_geom_data_pt ( const Vector< Data * > &  geom_data_pt)
inline

Set vector of (pointers to) geometric Data that is involved in the node update operations for this Spine. Wipes any previously existing geometric Data.

180  {
181  unsigned n_geom_data = geom_data_pt.size();
182  Geom_data_pt.resize(n_geom_data + 1);
183  for (unsigned i = 1; i < n_geom_data; i++)
184  {
185  Geom_data_pt[i + 1] = geom_data_pt[i];
186  }
187  }

References geom_data_pt(), Geom_data_pt, and i.

◆ set_geom_object_pt()

void oomph::Spine::set_geom_object_pt ( const Vector< GeomObject * > &  geom_object_pt)
inline

Set vector of (pointers to) geometric objects that is involved in the node update operations for this Spine

226  {
227  unsigned n_geom_object = geom_object_pt.size();
228  Geom_object_pt.resize(n_geom_object);
229  for (unsigned i = 0; i < n_geom_object; i++)
230  {
232  }
233  }

References geom_object_pt(), Geom_object_pt, and i.

Referenced by oomph::ChannelSpineMesh< ELEMENT >::build_channel_spine_mesh(), oomph::BrethertonSpineMesh< ELEMENT, SpineLineFluidInterfaceElement< ELEMENT > >::initial_element_reorder(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::reposition_spines(), and SimpleSpineMesh< ELEMENT >::SimpleSpineMesh().

◆ set_geom_parameter()

◆ spine_height_pt() [1/2]

◆ spine_height_pt() [2/2]

Data* oomph::Spine::spine_height_pt ( ) const
inline

Access function to Data object that stores the spine height (const version)

164  {
165  return Geom_data_pt[0];
166  }

References Geom_data_pt.

◆ vector_geom_data_pt()

Vector<Data*>& oomph::Spine::vector_geom_data_pt ( )
inline

Return the vector of geometric data.

212  {
213  return Geom_data_pt;
214  }

References Geom_data_pt.

◆ vector_geom_object_pt()

Vector<GeomObject*>& oomph::Spine::vector_geom_object_pt ( )
inline

Return the vector of all geometric objects that affect this spine

259  {
260  return Geom_object_pt;
261  }

References Geom_object_pt.

Member Data Documentation

◆ Geom_data_pt

Vector<Data*> oomph::Spine::Geom_data_pt
private

Data that stores the spine height.

Vector that stores the pointers to additional geometric Data

Referenced by add_geom_data_pt(), geom_data_pt(), height(), ngeom_data(), set_geom_data_pt(), Spine(), spine_height_pt(), vector_geom_data_pt(), and ~Spine().

◆ Geom_object_pt

Vector<GeomObject*> oomph::Spine::Geom_object_pt
private

Vector that stores the pointers to geometric objects that is involved in the node update operation

Referenced by add_geom_object_pt(), geom_object_pt(), ngeom_object(), set_geom_object_pt(), and vector_geom_object_pt().

◆ Geom_parameter

Vector<double> oomph::Spine::Geom_parameter
private

Vector that stores doubles that are used in the geometric updates.

Referenced by add_geom_parameter(), geom_parameter(), ngeom_parameter(), and set_geom_parameter().


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