oomph::SolidNode Class Reference

#include <nodes.h>

+ Inheritance diagram for oomph::SolidNode:

Public Member Functions

 SolidNode ()
 Default Constructor. More...
 
 SolidNode (const unsigned &n_lagrangian, const unsigned &n_lagrangian_type, const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_n_value)
 
 SolidNode (TimeStepper *const &time_stepper_pt, const unsigned &n_lagrangian, const unsigned &n_lagrangian_type, const unsigned &n_dim, const unsigned &Nposition_type, const unsigned &initial_n_value)
 
virtual ~SolidNode ()
 Destructor that cleans up the additional memory allocated in SolidNodes. More...
 
 SolidNode (const SolidNode &solid_node)=delete
 Broken copy constructor. More...
 
void operator= (const SolidNode &)=delete
 Broken assignment operator. More...
 
void copy (SolidNode *orig_node_pt)
 
void dump (std::ostream &dump_file) const
 Dump nodal positions and associated data to file for restart. More...
 
void read (std::ifstream &restart_file)
 Read nodal positions and associated data to file for restart. More...
 
const Datavariable_position () const
 Return the variable_position data (const version) More...
 
Data *const & variable_position_pt () const
 Pointer to variable_position data (const version) More...
 
void set_external_variable_position_pt (Data *const &data_pt)
 Set the variable position data from an external data object. More...
 
void set_position_time_stepper (TimeStepper *const &position_time_stepper_pt, const bool &preserve_existing_data)
 
bool does_pointer_correspond_to_position_data (double *const &parameter_pt)
 Check whether the pointer parameter_pt refers to positional data. More...
 
bool position_is_a_copy () const
 Return whether any position component has been copied. More...
 
bool position_is_a_copy (const unsigned &i) const
 Return whether the position coordinate i has been copied. More...
 
const long & position_eqn_number (const unsigned &k, const unsigned &i) const
 
bool position_is_pinned (const unsigned &i)
 Test whether the i-th coordinate is pinned, 0: false; 1: true. More...
 
bool position_is_pinned (const unsigned &k, const unsigned &i)
 
void pin_position (const unsigned &i)
 Pin the nodal position. More...
 
void pin_position (const unsigned &k, const unsigned &i)
 
void unpin_position (const unsigned &i)
 Unpin the nodal position. More...
 
void unpin_position (const unsigned &k, const unsigned &i)
 
void pin_all ()
 Pin all the stored variables (Overloaded) More...
 
void unpin_all ()
 Unpin all the stored variables (Overloaded) More...
 
void constrain_positions ()
 
void unconstrain_positions ()
 
unsigned nlagrangian () const
 Return number of lagrangian coordinates. More...
 
unsigned nlagrangian_type () const
 
doublexi (const unsigned &i)
 Reference to i-th Lagrangian position. More...
 
const doublexi (const unsigned &i) const
 Reference to i-th Lagrangian position (const version) More...
 
doublexi_gen (const unsigned &k, const unsigned &i)
 
const doublexi_gen (const unsigned &k, const unsigned &i) const
 
double lagrangian_position (const unsigned &i) const
 
double lagrangian_position_gen (const unsigned &k, const unsigned &i) const
 
void assign_eqn_numbers (unsigned long &global_number, Vector< double * > &dof_pt)
 Overload the assign equation numbers routine. More...
 
void describe_dofs (std::ostream &out, const std::string &current_string) const
 
void add_value_pt_to_map (std::map< unsigned, double * > &map_of_value_pt)
 
void node_update (const bool &update_all_time_levels_for_new_node=false)
 
- Public Member Functions inherited from oomph::Node
 Node ()
 Default constructor. More...
 
 Node (const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_n_value, const bool &allocate_x_position=true)
 
 Node (TimeStepper *const &time_stepper_pt, const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_n_value, const bool &allocate_x_position=true)
 
virtual ~Node ()
 Destructor: Clean up the memory allocated for nodal position. More...
 
 Node (const Node &node)=delete
 Broken copy constructor. More...
 
void operator= (const Node &)=delete
 Broken assignment operator. More...
 
unsigned nposition_type () const
 
TimeStepper *& position_time_stepper_pt ()
 Return a pointer to the position timestepper. More...
 
TimeStepper *const & position_time_stepper_pt () const
 Return a pointer to the position timestepper (const version). More...
 
unsigned ndim () const
 Return (Eulerian) spatial dimension of the node. More...
 
doublex (const unsigned &i)
 Return the i-th nodal coordinate. More...
 
const doublex (const unsigned &i) const
 Return the i-th nodal coordinate (const version). More...
 
doublex (const unsigned &t, const unsigned &i)
 
const doublex (const unsigned &t, const unsigned &i) const
 
double dx_dt (const unsigned &i) const
 Return the i-th component of nodal velocity: dx/dt. More...
 
double dx_dt (const unsigned &j, const unsigned &i) const
 
virtual Nodecopied_node_pt () const
 
doublex_gen (const unsigned &k, const unsigned &i)
 
const doublex_gen (const unsigned &k, const unsigned &i) const
 
doublex_gen (const unsigned &t, const unsigned &k, const unsigned &i)
 
const doublex_gen (const unsigned &t, const unsigned &k, const unsigned &i) const
 
double dx_gen_dt (const unsigned &k, const unsigned &i) const
 
double dx_gen_dt (const unsigned &j, const unsigned &k, const unsigned &i) const
 
doublex_pt (const unsigned &t, const unsigned &i)
 
void copy (Node *orig_node_pt)
 Copy all nodal data from specified Node object. More...
 
void read (std::ifstream &restart_file)
 Read nodal position and associated data from file for restart. More...
 
unsigned hang_code ()
 
HangInfo *const & hanging_pt () const
 
HangInfo *const & hanging_pt (const int &i) const
 Return pointer to hanging node data for value i (const version) More...
 
bool is_hanging () const
 Test whether the node is geometrically hanging. More...
 
bool is_hanging (const int &i) const
 Test whether the i-th value is hanging. More...
 
void set_hanging_pt (HangInfo *const &hang_pt, const int &i)
 Set the hanging data for the i-th value. (hang_pt=0 to make non-hanging) More...
 
void set_nonhanging ()
 Label node as non-hanging node by removing all hanging node data. More...
 
void resize (const unsigned &n_value)
 Resize the number of equations. More...
 
virtual void make_periodic (Node *const &node_pt)
 
virtual void make_periodic_nodes (const Vector< Node * > &periodic_nodes_pt)
 
virtual void get_boundaries_pt (std::set< unsigned > *&boundaries_pt)
 
virtual bool is_on_boundary () const
 
virtual bool is_on_boundary (const unsigned &b) const
 
virtual void add_to_boundary (const unsigned &b)
 
virtual void remove_from_boundary (const unsigned &b)
 
virtual unsigned ncoordinates_on_boundary (const unsigned &b)
 
virtual bool boundary_coordinates_have_been_set_up ()
 
virtual void get_coordinates_on_boundary (const unsigned &b, const unsigned &k, Vector< double > &boundary_zeta)
 
virtual void set_coordinates_on_boundary (const unsigned &b, const unsigned &k, const Vector< double > &boundary_zeta)
 
virtual void get_coordinates_on_boundary (const unsigned &b, Vector< double > &boundary_zeta)
 
virtual void set_coordinates_on_boundary (const unsigned &b, const Vector< double > &boundary_zeta)
 
void set_obsolete ()
 Mark node as obsolete. More...
 
void set_non_obsolete ()
 Mark node as non-obsolete. More...
 
bool is_obsolete ()
 Test whether node is obsolete. More...
 
double raw_value (const unsigned &i) const
 
double raw_value (const unsigned &t, const unsigned &i) const
 
double value (const unsigned &i) const
 
double value (const unsigned &t, const unsigned &i) const
 
void value (Vector< double > &values) const
 
Vector< doublevalue () const
 Return vector of values calculated using value(vector). More...
 
void value (const unsigned &t, Vector< double > &values) const
 
void position (Vector< double > &pos) const
 
Vector< doubleposition () const
 Return vector of position of node at current time. More...
 
void position (const unsigned &t, Vector< double > &pos) const
 
double position (const unsigned &i) const
 
double position (const unsigned &t, const unsigned &i) const
 
double position_gen (const unsigned &k, const unsigned &i) const
 
double position_gen (const unsigned &t, const unsigned &k, const unsigned &i) const
 
double dposition_dt (const unsigned &i) const
 
double dposition_dt (const unsigned &j, const unsigned &i) const
 
double dposition_gen_dt (const unsigned &k, const unsigned &i) const
 
double dposition_gen_dt (const unsigned &j, const unsigned &k, const unsigned &i) const
 
void set_auxiliary_node_update_fct_pt (AuxNodeUpdateFctPt aux_node_update_fct_pt)
 
bool has_auxiliary_node_update_fct_pt ()
 
void perform_auxiliary_node_update_fct ()
 
virtual unsigned ngeom_data () const
 
virtual Data ** all_geom_data_pt ()
 
virtual unsigned ngeom_object () const
 
virtual GeomObject ** all_geom_object_pt ()
 
void output (std::ostream &outfile)
 Output nodal position. More...
 
- Public Member Functions inherited from oomph::Data
virtual void clear_copied_pointers ()
 
 Data ()
 Default constructor. More...
 
 Data (const unsigned &initial_n_value)
 
 Data (TimeStepper *const &time_stepper_pt, const unsigned &initial_n_value, const bool &allocate_storage=true)
 
 Data (const Data &data)=delete
 Broken copy constructor. More...
 
void operator= (const Data &)=delete
 Broken assignment operator. More...
 
virtual ~Data ()
 Destructor, deallocates memory assigned for data. More...
 
void set_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
TimeStepper *& time_stepper_pt ()
 Return the pointer to the timestepper. More...
 
TimeStepper *const & time_stepper_pt () const
 Return the pointer to the timestepper (const version). More...
 
virtual bool is_a_copy () const
 
virtual bool is_a_copy (const unsigned &i) const
 
void set_value (const unsigned &i, const double &value_)
 
void set_value (const unsigned &t, const unsigned &i, const double &value_)
 
double value (const unsigned &i) const
 
double value (const unsigned &t, const unsigned &i) const
 
void value (Vector< double > &values) const
 Compute Vector of values for the Data value. More...
 
void value (const unsigned &t, Vector< double > &values) const
 
doublevalue_pt (const unsigned &i) const
 
doublevalue_pt (const unsigned &t, const unsigned &i) const
 
bool does_pointer_correspond_to_value (double *const &parameter_pt)
 Check whether the pointer parameter_pt addresses internal data values. More...
 
void copy (Data *orig_data_pt)
 Copy Data values from specified Data object. More...
 
void dump (std::ostream &dump_file) const
 Dump the data object to a file. More...
 
void read (std::ifstream &restart_file)
 Read data object from a file. More...
 
long * eqn_number_pt (const unsigned &i)
 Return the pointer to the equation number of the i-th stored variable. More...
 
long & eqn_number (const unsigned &i)
 Return the equation number of the i-th stored variable. More...
 
long eqn_number (const unsigned &i) const
 Return the equation number of the i-th stored variable. More...
 
void pin (const unsigned &i)
 Pin the i-th stored variable. More...
 
void unpin (const unsigned &i)
 Unpin the i-th stored variable. More...
 
void pin_all ()
 Pin all the stored variables. More...
 
void unpin_all ()
 Unpin all the stored variables. More...
 
bool is_pinned (const unsigned &i) const
 Test whether the i-th variable is pinned (1: true; 0: false). More...
 
bool is_segregated_solve_pinned (const unsigned &i)
 
void constrain (const unsigned &i)
 
void unconstrain (const unsigned &i)
 
void constrain_all ()
 Constrain all the stored variables when the data is made hanging. More...
 
void unconstrain_all ()
 Unconstrain all the stored variables when the data is made nonhanging. More...
 
bool is_constrained (const unsigned &i)
 
unsigned self_test ()
 
unsigned nvalue () const
 Return number of values stored in data object (incl pinned ones). More...
 
unsigned ntstorage () const
 

Protected Attributes

unsigned Nlagrangian
 Number of Lagrangian coordinates of the node. More...
 
unsigned Nlagrangian_type
 
DataVariable_position_pt
 Pointer to data that will hold variable positions in elastic nodes. More...
 
doubleXi_position
 Storage for the Lagrangian positions. More...
 
- Protected Attributes inherited from oomph::Node
double ** X_position
 
TimeStepperPosition_time_stepper_pt
 Pointer to the timestepper associated with the position data. More...
 
HangInfo ** Hanging_pt
 
unsigned Ndim
 Eulerian dimension of the node. More...
 
unsigned Nposition_type
 
bool Obsolete
 
AuxNodeUpdateFctPt Aux_node_update_fct_pt
 
- Protected Attributes inherited from oomph::Data
Data ** Copy_of_data_pt
 
unsigned Ncopies
 

Private Member Functions

void xi_gen_range_check (const unsigned &k, const unsigned &i) const
 

Additional Inherited Members

- Public Types inherited from oomph::Node
typedef void(* AuxNodeUpdateFctPt) (Node *)
 Function pointer to auxiliary node update function. More...
 
- Static Public Attributes inherited from oomph::Node
static unsigned No_independent_position = 10
 
- Static Public Attributes inherited from oomph::Data
static long Is_pinned = -1
 Static "Magic number" to indicate pinned values. More...
 
static long Is_segregated_solve_pinned = -3
 
static long Is_unclassified = -10
 
static long Is_constrained = -2
 
- Protected Member Functions inherited from oomph::Node
void x_gen_range_check (const unsigned &t, const unsigned &k, const unsigned &i) const
 
doublex_position_pt (const unsigned &i)
 Direct access to the pointer to the i-th stored coordinate data. More...
 
- Protected Member Functions inherited from oomph::Data
virtual void reset_copied_pointers ()
 
- Static Protected Attributes inherited from oomph::Data
static TimeStepperDefault_static_time_stepper_pt = new Steady<0>()
 Default (static) timestepper used in steady problems. More...
 

Detailed Description

A Class for nodes that deform elastically (i.e. position is an unknown in the problem). The idea is that the Eulerian positions are stored in a Data object and the Lagrangian coordinates are stored in addition. The pointer that addresses the Eulerian positions is set to the pointer to Value in the Data object. Hence, SolidNode uses knowledge of the internal structure of Data and must be a friend of the Data class. In order to allow a mesh to deform via an elastic-style equation in deforming-domain problems, the positions are stored separately from the values, so that elastic problems may be combined with any other type of problem.

Constructor & Destructor Documentation

◆ SolidNode() [1/4]

oomph::SolidNode::SolidNode ( )
inline

Default Constructor.

1708 : Node() {}
Node()
Default constructor.
Definition: nodes.cc:1574

◆ SolidNode() [2/4]

oomph::SolidNode::SolidNode ( const unsigned n_lagrangian,
const unsigned n_lagrangian_type,
const unsigned n_dim,
const unsigned n_position_type,
const unsigned initial_n_value 
)

Steady constructor. The node has n_lagrangian Lagrangian coordinates of n_lagrangian_type types (1 for Lagrange elements, 2 for 1D Hermite etc.). The Eulerian dimension of the Node is n_dim and we have n_position_type (generalised) Eulerian coordinates. There are initial_n_value values stored at this node.

Steady constructor. The node has NLgrangian Lagrangian coordinates of n_lagrangian_type types (1 for Lagrange elements, 2 for 1D Hermite etc.). The Eulerian dimension of the Node is n_dim and we have n_position_type (generalised) Eulerian coordinates. There are initial_n_value values stored at this node and NAdditional_solid additional values associated with the solid equations are stored in a separate Data object at the node.

3353  : Node(n_dim, n_position_type, initial_n_value, false),
3354  Nlagrangian(n_lagrangian),
3355  Nlagrangian_type(n_lagrangian_type)
3356  {
3357  // Calculate the total storage required for positions
3358  const unsigned n_storage = Ndim * Nposition_type;
3359 
3360  // Allocate a data object with exactly the coorect number of coordinates
3361  Variable_position_pt = new Data(n_storage);
3362  // Set X_position to point to the data's positions
3364 
3365  // Setup the lagrangian storage
3366  const unsigned n_lagrangian_storage = n_lagrangian * n_lagrangian_type;
3367  Xi_position = new double[n_lagrangian_storage];
3368  // Initialise lagrangian positions to zero
3369  for (unsigned j = 0; j < n_lagrangian_storage; j++)
3370  {
3371  Xi_position[j] = 0.0;
3372  }
3373  }
double ** Value
Definition: nodes.h:112
Data()
Default constructor.
Definition: nodes.cc:237
double ** X_position
Definition: nodes.h:929
unsigned Nposition_type
Definition: nodes.h:951
unsigned Ndim
Eulerian dimension of the node.
Definition: nodes.h:945
unsigned Nlagrangian
Number of Lagrangian coordinates of the node.
Definition: nodes.h:1694
Data * Variable_position_pt
Pointer to data that will hold variable positions in elastic nodes.
Definition: nodes.h:1701
unsigned Nlagrangian_type
Definition: nodes.h:1698
double * Xi_position
Storage for the Lagrangian positions.
Definition: nodes.h:1704
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References oomph::Data::Data(), j, oomph::Node::Ndim, oomph::Node::Nposition_type, oomph::Data::Value, Variable_position_pt, oomph::Node::X_position, and Xi_position.

◆ SolidNode() [3/4]

oomph::SolidNode::SolidNode ( TimeStepper *const &  time_stepper_pt_,
const unsigned n_lagrangian,
const unsigned n_lagrangian_type,
const unsigned n_dim,
const unsigned n_position_type,
const unsigned initial_n_value 
)

Unsteady constructor. Allocates storage for initial_n_value nodal values with history values as required by timestepper. The node has n_lagrangian Lagrangian coordinates of n_lagrangian_type types (1 for Lagrange elements, 2 for 1D Hermite etc.)/ The Eulerian dimension of the Node is n_dim and we have n_position_type generalised Eulerian coordinates.

Unsteady constructor. Allocates storage for initial_n_value nodal values with history values as required by timestepper. The node has NLgrangian Lagrangian coordinates of n_lagrangian_type types (1 for Lagrange elements, 2 for 1D Hermite etc.)/ The Eulerian dimension of the Node is n_dim and we have n_position_type generalised Eulerian coordinates.

3390  : Node(time_stepper_pt_, n_dim, n_position_type, initial_n_value, false),
3391  Nlagrangian(n_lagrangian),
3392  Nlagrangian_type(n_lagrangian_type)
3393  {
3394  // Calculate the total storage required for positions
3395  const unsigned n_storage = n_dim * n_position_type;
3396 
3397  // Allocate a Data value to each element of the Vector
3398  Variable_position_pt = new Data(time_stepper_pt_, n_storage);
3399  // Set the pointer
3401 
3402  // Setup the lagrangian storage
3403  const unsigned n_lagrangian_storage = n_lagrangian * n_lagrangian_type;
3404  Xi_position = new double[n_lagrangian_storage];
3405  // Initialise lagrangian positions to zero
3406  for (unsigned j = 0; j < n_lagrangian_storage; j++)
3407  {
3408  Xi_position[j] = 0.0;
3409  }
3410  }

References oomph::Data::Data(), j, oomph::Data::Value, Variable_position_pt, oomph::Node::X_position, and Xi_position.

◆ ~SolidNode()

oomph::SolidNode::~SolidNode ( )
virtual

Destructor that cleans up the additional memory allocated in SolidNodes.

Destructor to clean up the memory allocated for nodal positions and additional solid variables

3417  {
3418  // Null out X_position so that the Node destructor doesn't delete it
3419  X_position = 0;
3420  // Delete the position data
3421  delete Variable_position_pt;
3423  // Now clean up lagrangian position data
3424  delete[] Xi_position;
3425  Xi_position = 0;
3426  }

References Variable_position_pt, oomph::Node::X_position, and Xi_position.

◆ SolidNode() [4/4]

oomph::SolidNode::SolidNode ( const SolidNode solid_node)
delete

Broken copy constructor.

Member Function Documentation

◆ add_value_pt_to_map()

void oomph::SolidNode::add_value_pt_to_map ( std::map< unsigned, double * > &  map_of_value_pt)
virtual

Overload the function add_values_to_map so that it also adds the variable position data

Add pointers to all data values (including position data) to a map

Reimplemented from oomph::Data.

3695  {
3696  // Add the position values first
3697  Variable_position_pt->add_value_pt_to_map(map_of_value_pt);
3698  // Then call standard Data values
3699  Data::add_value_pt_to_map(map_of_value_pt);
3700  }
virtual void add_value_pt_to_map(std::map< unsigned, double * > &map_of_value_pt)
Definition: nodes.cc:1089

References oomph::Data::add_value_pt_to_map(), and Variable_position_pt.

◆ assign_eqn_numbers()

void oomph::SolidNode::assign_eqn_numbers ( unsigned long &  global_number,
Vector< double * > &  dof_pt 
)
virtual

Overload the assign equation numbers routine.

Assign (global) equation number, for SolidNodes.

Reimplemented from oomph::Node.

3654  {
3655  // Let's call position equations first
3656  Variable_position_pt->assign_eqn_numbers(global_number, dof_pt);
3657  // Then call standard Data assign_eqn_numbers
3658  Data::assign_eqn_numbers(global_number, dof_pt);
3659  }
virtual void assign_eqn_numbers(unsigned long &global_ndof, Vector< double * > &dof_pt)
Definition: nodes.cc:896

References oomph::Data::assign_eqn_numbers(), and Variable_position_pt.

◆ constrain_positions()

void oomph::SolidNode::constrain_positions ( )
inlinevirtual

Overload the constrain positions function to constrain all position values

Reimplemented from oomph::Node.

1858  {
1860  }
void constrain_all()
Constrain all the stored variables when the data is made hanging.
Definition: nodes.h:451

References oomph::Data::constrain_all(), and Variable_position_pt.

◆ copy()

void oomph::SolidNode::copy ( SolidNode orig_node_pt)

Copy nodal positions and associated data from specified node object

3434  {
3435  // Eulerian positions are stored as Data, so copy the data values
3436  // from one data to another
3437  Variable_position_pt->copy(orig_node_pt->variable_position_pt());
3438 
3439  // Copy the Lagrangian coordinates
3440  const unsigned nlagrangian_storage = Nlagrangian * Nlagrangian_type;
3441 
3442  // Check # of values:
3443  const unsigned long nlagrangian_storage_orig =
3444  orig_node_pt->nlagrangian() * orig_node_pt->nlagrangian_type();
3445  if (nlagrangian_storage != nlagrangian_storage_orig)
3446  {
3447  std::ostringstream error_stream;
3448  error_stream << "The allocated lagrangian storage " << nlagrangian_storage
3449  << " is not the same as the original Solid Node "
3450  << nlagrangian_storage_orig << std::endl;
3451 
3452  throw OomphLibError(
3453  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
3454  }
3455 
3456  // Copy lagrangian positions
3457  for (unsigned j = 0; j < nlagrangian_storage; j++)
3458  {
3459  Xi_position[j] = orig_node_pt->Xi_position[j];
3460  }
3461 
3462  // Copy the associated data
3463  Data::copy(orig_node_pt);
3464  }
void copy(Data *orig_data_pt)
Copy Data values from specified Data object.
Definition: nodes.cc:601
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References oomph::Data::copy(), j, Nlagrangian, nlagrangian(), Nlagrangian_type, nlagrangian_type(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, Variable_position_pt, variable_position_pt(), and Xi_position.

Referenced by oomph::Mesh::convert_to_boundary_node(), and oomph::Problem::copy().

◆ describe_dofs()

void oomph::SolidNode::describe_dofs ( std::ostream &  out,
const std::string &  current_string 
) const
virtual

Function to describe the dofs of the Node. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...)

Function to describe the dofs of the SolidNode. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...)

Reimplemented from oomph::Data.

3673  {
3674  // Let's call position equations first
3675  {
3676  std::stringstream conversion;
3677  conversion << " of Solid Node Position" << current_string;
3678  std::string in(conversion.str());
3680  } // Let conversion go out of scope.
3681 
3682  // Then call standard Data version
3683  std::stringstream conversion;
3684  conversion << " of Data" << current_string;
3685  std::string in(conversion.str());
3686  Data::describe_dofs(out, in);
3687  }
virtual void describe_dofs(std::ostream &out, const std::string &current_string) const
Definition: nodes.cc:939
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
std::ofstream out("Result.txt")

References oomph::Data::describe_dofs(), out(), oomph::Global_string_for_annotation::string(), and Variable_position_pt.

Referenced by oomph::SolidFiniteElement::describe_solid_local_dofs().

◆ does_pointer_correspond_to_position_data()

bool oomph::SolidNode::does_pointer_correspond_to_position_data ( double *const &  parameter_pt)
virtual

Check whether the pointer parameter_pt refers to positional data.

Overload the check whether the pointer parameter_pt addresses position data values

Reimplemented from oomph::Node.

3575  {
3576  // Simply pass the test through to the data of the Variabl position pointer
3578  parameter_pt));
3579  }
bool does_pointer_correspond_to_value(double *const &parameter_pt)
Check whether the pointer parameter_pt addresses internal data values.
Definition: nodes.cc:568

References oomph::Data::does_pointer_correspond_to_value(), and Variable_position_pt.

◆ dump()

void oomph::SolidNode::dump ( std::ostream &  dump_file) const
virtual

Dump nodal positions and associated data to file for restart.

Dump nodal positions (variable and fixed) and associated data to file for restart

Reimplemented from oomph::Node.

3471  {
3472  // Dump out the Lagrangian coordinates
3473  // Number of lagrangian values
3474  const unsigned nlagrangian_storage = Nlagrangian * Nlagrangian_type;
3475  dump_file << nlagrangian_storage
3476  << " # number of Lagrangian position variables" << std::endl;
3477 
3478  for (unsigned j = 0; j < nlagrangian_storage; j++)
3479  {
3480  dump_file << Xi_position[j] << std::endl;
3481  }
3482 
3483  // Dump out Eulerian positions and nodal data
3484  Node::dump(dump_file);
3485  }
virtual void dump(std::ostream &dump_file) const
Dump nodal position and associated data to file for restart.
Definition: nodes.cc:1969

References oomph::Node::dump(), j, Nlagrangian, Nlagrangian_type, and Xi_position.

◆ lagrangian_position()

double oomph::SolidNode::lagrangian_position ( const unsigned i) const

Return lagrangian coordinate either directly or via hanging node representation

Return lagrangian coordinate either directly or via hanging node representation.

3587  {
3588  double posn = 0.0;
3589 
3590  // Non-hanging node: just return value
3591  if (!is_hanging())
3592  {
3593  posn = xi(i);
3594  }
3595  // Hanging node: Use hanging node representation
3596  else
3597  {
3598  // Initialise
3599  double lagn_position = 0.0;
3600 
3601  // Add contribution from master nodes
3602  const unsigned nmaster = hanging_pt()->nmaster();
3603  for (unsigned imaster = 0; imaster < nmaster; imaster++)
3604  {
3605  lagn_position +=
3606  static_cast<SolidNode*>(hanging_pt()->master_node_pt(imaster))
3607  ->xi(i) *
3608  hanging_pt()->master_weight(imaster);
3609  }
3610  posn = lagn_position;
3611  }
3612  return posn;
3613  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
double const & master_weight(const unsigned &i) const
Return weight for dofs on i-th master node.
Definition: nodes.h:808
Node *const & master_node_pt(const unsigned &i) const
Return a pointer to the i-th master node.
Definition: nodes.h:791
unsigned nmaster() const
Return the number of master nodes.
Definition: nodes.h:785
HangInfo *const & hanging_pt() const
Definition: nodes.h:1228
bool is_hanging() const
Test whether the node is geometrically hanging.
Definition: nodes.h:1285
SolidNode()
Default Constructor.
Definition: nodes.h:1708
double & xi(const unsigned &i)
Reference to i-th Lagrangian position.
Definition: nodes.h:1883

References oomph::Node::hanging_pt(), i, oomph::Node::is_hanging(), oomph::HangInfo::master_node_pt(), oomph::HangInfo::master_weight(), oomph::HangInfo::nmaster(), and xi().

Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::Mesh::delete_all_external_storage(), and oomph::TreeBasedRefineableMeshBase::p_adapt_mesh().

◆ lagrangian_position_gen()

double oomph::SolidNode::lagrangian_position_gen ( const unsigned k,
const unsigned i 
) const

Return generalised lagrangian coordinate either directly or via hanging node representation

Return generalised lagrangian coordinate either directly or via hanging node representation.

3621  {
3622  double posn = 0.0;
3623 
3624  // Non-hanging node: just return value
3625  if (!is_hanging())
3626  {
3627  posn = xi_gen(k, i);
3628  }
3629  // Hanging node: Use hanging node representation
3630  else
3631  {
3632  // Initialise
3633  double lagn_position = 0.0;
3634 
3635  // Add contribution from master nodes
3636  const unsigned nmaster = hanging_pt()->nmaster();
3637  for (unsigned imaster = 0; imaster < nmaster; imaster++)
3638  {
3639  lagn_position +=
3640  static_cast<SolidNode*>(hanging_pt()->master_node_pt(imaster))
3641  ->xi_gen(k, i) *
3642  hanging_pt()->master_weight(imaster);
3643  }
3644  posn = lagn_position;
3645  }
3646  return posn;
3647  }
double & xi_gen(const unsigned &k, const unsigned &i)
Definition: nodes.h:1902
char char char int int * k
Definition: level2_impl.h:374

References oomph::Node::hanging_pt(), i, oomph::Node::is_hanging(), k, oomph::HangInfo::master_node_pt(), oomph::HangInfo::master_weight(), oomph::HangInfo::nmaster(), and xi_gen().

◆ nlagrangian()

◆ nlagrangian_type()

unsigned oomph::SolidNode::nlagrangian_type ( ) const
inline

Number of types of Lagrangian coordinates used to interpolate the Lagrangian coordinates within the element

1878  {
1879  return Nlagrangian_type;
1880  }

References Nlagrangian_type.

Referenced by oomph::RefineableSolidQElement< 3 >::build(), oomph::RefineableSolidQElement< 2 >::build(), copy(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), and oomph::SolidMesh::set_lagrangian_nodal_coordinates().

◆ node_update()

void oomph::SolidNode::node_update ( const bool update_all_time_levels_for_new_node = false)
inlinevirtual

Overload node update function: Since the position of SolidNodes is determined by unknowns, there's nothing to be done apart from performing the auxiliary node update function (if any)

Reimplemented from oomph::Node.

1982  {
1984  }
void perform_auxiliary_node_update_fct()
Definition: nodes.h:1615

References oomph::Node::perform_auxiliary_node_update_fct().

◆ operator=()

void oomph::SolidNode::operator= ( const SolidNode )
delete

Broken assignment operator.

◆ pin_all()

void oomph::SolidNode::pin_all ( )
inlinevirtual

Pin all the stored variables (Overloaded)

Reimplemented from oomph::Node.

1843  {
1844  Node::pin_all();
1846  }
void pin_all()
Pin all the stored variables.
Definition: nodes.h:397
virtual void pin_all()
Definition: nodes.h:1197

References oomph::Data::pin_all(), oomph::Node::pin_all(), and Variable_position_pt.

◆ pin_position() [1/2]

void oomph::SolidNode::pin_position ( const unsigned i)
inline

Pin the nodal position.

1817  {
1819  }
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385

References i, oomph::Node::Nposition_type, oomph::Data::pin(), and Variable_position_pt.

Referenced by PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_adapt(), UnstructuredFSIProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_adapt(), UnstructuredSolidProblem< ELEMENT, MESH >::actions_after_adapt(), SurfactantProblem< ELEMENT, INTERFACE_ELEMENT >::actions_after_adapt(), BendingCantileverProblem< ELEMENT >::apply_boundary_conditions(), oomph::RefineableQElement< 3 >::build(), oomph::RefineableQElement< 2 >::build(), CantileverProblem< ELEMENT >::CantileverProblem(), AxisymmetricVibratingShellProblem< ELEMENT >::complete_problem_setup(), VibratingShellProblem< ELEMENT >::complete_problem_setup(), MeltContactProblem< ELEMENT >::complete_problem_setup(), SolarRadiationProblem< ELEMENT >::complete_problem_setup(), ContactProblem< ELEMENT >::complete_problem_setup(), UnsteadyHeatMeltProblem< ELEMENT >::complete_problem_setup(), UnstructuredImmersedEllipseProblem< ELEMENT >::complete_problem_setup(), TwoLayerInterfaceProblem< ELEMENT >::complete_problem_setup(), UnstructuredFluidProblem< ELEMENT >::complete_problem_setup(), BubbleInChannelProblem< ELEMENT >::complete_problem_setup(), DropInChannelProblem< ELEMENT >::complete_problem_setup(), StefanBoltzmannProblem< ELEMENT >::create_melt_elements(), ElasticInterfaceProblem< ELEMENT, TIMESTEPPER >::ElasticInterfaceProblem(), FSIChannelWithLeafletProblem< ELEMENT >::FSIChannelWithLeafletProblem(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::p_refine(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::p_refine(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_all(), MortaringValidationProblem< ELEMENT, NON_MORTAR_ELEMENT >::pin_dofs(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_dofs_of_coordinate(), PlateProblem< ELEMENT >::PlateProblem(), SolidProblem< ELEMENT_TYPE >::prepareForSolve(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::PseudoElasticCollapsibleChannelProblem(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::rebuild_from_sons(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::rebuild_from_sons(), oomph::RefineableQSpectralElement< 3 >::rebuild_from_sons(), oomph::RefineableQSpectralElement< 2 >::rebuild_from_sons(), oomph::SolidICProblem::reset_original_state(), UnstructuredFluidProblem< ELEMENT >::set_boundary_conditions(), SheetGlueProblem< ELEMENT >::SheetGlueProblem(), SurfactantProblem< ELEMENT, INTERFACE_ELEMENT >::SurfactantProblem(), TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem(), and UnstructuredFSIProblem< FLUID_ELEMENT, SOLID_ELEMENT >::UnstructuredFSIProblem().

◆ pin_position() [2/2]

void oomph::SolidNode::pin_position ( const unsigned k,
const unsigned i 
)
inline

Pin the generalised nodal position. ‘Type’: k; Coordinate direction: i.

1824  {
1825  return Variable_position_pt->pin(Nposition_type * i + k);
1826  }

References i, k, oomph::Node::Nposition_type, oomph::Data::pin(), and Variable_position_pt.

◆ position_eqn_number()

const long& oomph::SolidNode::position_eqn_number ( const unsigned k,
const unsigned i 
) const
inline

Return the equation number for generalised Eulerian coordinate: type of coordinate: k, coordinate direction: i.

1798  {
1800  }
long & eqn_number(const unsigned &i)
Return the equation number of the i-th stored variable.
Definition: nodes.h:367

References oomph::Data::eqn_number(), i, k, oomph::Node::Nposition_type, and Variable_position_pt.

Referenced by oomph::SolidFiniteElement::assign_solid_local_eqn_numbers().

◆ position_is_a_copy() [1/2]

bool oomph::SolidNode::position_is_a_copy ( ) const
inlinevirtual

Return whether any position component has been copied.

Reimplemented from oomph::Node.

1785  {
1786  return Variable_position_pt->is_a_copy();
1787  }
virtual bool is_a_copy() const
Definition: nodes.h:253

References oomph::Data::is_a_copy(), and Variable_position_pt.

◆ position_is_a_copy() [2/2]

bool oomph::SolidNode::position_is_a_copy ( const unsigned i) const
inlinevirtual

Return whether the position coordinate i has been copied.

Reimplemented from oomph::Node.

1791  {
1793  }

References i, oomph::Data::is_a_copy(), oomph::Node::Nposition_type, and Variable_position_pt.

◆ position_is_pinned() [1/2]

bool oomph::SolidNode::position_is_pinned ( const unsigned i)
inline

Test whether the i-th coordinate is pinned, 0: false; 1: true.

1804  {
1806  }
bool is_pinned(const unsigned &i) const
Test whether the i-th variable is pinned (1: true; 0: false).
Definition: nodes.h:417

References i, oomph::Data::is_pinned(), oomph::Node::Nposition_type, and Variable_position_pt.

Referenced by SolidBag::actionsBeforeOomphTimeStep(), oomph::SolidICProblem::backup_original_state(), oomph::RefineableSolidQElement< 2 >::get_edge_solid_bcs(), oomph::RefineableSolidQElement< 3 >::get_face_solid_bcs(), and oomph::Problem::set_pinned_values_to_zero().

◆ position_is_pinned() [2/2]

bool oomph::SolidNode::position_is_pinned ( const unsigned k,
const unsigned i 
)
inline

Test whether the k-th type of the i-th coordinate is pinned 0: false; 1: true

1811  {
1813  }

References i, oomph::Data::is_pinned(), k, oomph::Node::Nposition_type, and Variable_position_pt.

◆ read()

void oomph::SolidNode::read ( std::ifstream &  restart_file)

Read nodal positions and associated data to file for restart.

Read nodal positions (variable and fixed) and associated data from file for restart

3491  {
3492  std::string input_string;
3493 
3494  // Number of lagrangian values
3495  const unsigned nlagrangian_storage = Nlagrangian * Nlagrangian_type;
3496 
3497  // Read line up to termination sign
3498  getline(restart_file, input_string, '#');
3499  // Ignore rest of line
3500  restart_file.ignore(80, '\n');
3501  // Check # of values:
3502  const unsigned long check_nlagrangian_storage = atoi(input_string.c_str());
3503  if (check_nlagrangian_storage != nlagrangian_storage)
3504  {
3505  std::ostringstream error_stream;
3506  error_stream << "The allocated Lagrangian storage " << nlagrangian_storage
3507  << " is not the same as that in the input file"
3508  << check_nlagrangian_storage << std::endl;
3509 
3510  throw OomphLibError(
3511  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
3512  }
3513 
3514  // Read Lagrangian positions
3515  for (unsigned j = 0; j < nlagrangian_storage; j++)
3516  {
3517  // Read line
3518  getline(restart_file, input_string);
3519 
3520  // Transform to double
3521  Xi_position[j] = atof(input_string.c_str());
3522  }
3523 
3524  // Read Eulerian positions and nodal data
3525  Node::read(restart_file);
3526  }
void read(std::ifstream &restart_file)
Read nodal position and associated data from file for restart.
Definition: nodes.cc:1996

References j, Nlagrangian, Nlagrangian_type, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::Node::read(), oomph::Global_string_for_annotation::string(), and Xi_position.

Referenced by oomph::Mesh::read().

◆ set_external_variable_position_pt()

void oomph::SolidNode::set_external_variable_position_pt ( Data *const &  data_pt)

Set the variable position data from an external data object.

Set the variable position data from an external source. This is mainly used when setting periodic solid problems.

3533  {
3534  // Wipe the existing value
3535  delete Variable_position_pt;
3536  // Set the new value
3537  Variable_position_pt = new CopiedData(data_pt);
3538  // Set the new value of x
3540  }
friend class CopiedData
Definition: nodes.h:94

References oomph::Data::CopiedData, oomph::Data::Value, Variable_position_pt, and oomph::Node::X_position.

◆ set_position_time_stepper()

void oomph::SolidNode::set_position_time_stepper ( TimeStepper *const &  position_time_stepper_pt,
const bool preserve_existing_data 
)
virtual

Set a new position timestepper be resizing the appropriate storage Overloaded from the basic implementation to take into account the fact that position is now Data

Set a new position TimeStepper be resizing the appropriate storage. The current (zero) values will be unaffected, but all other entries will be set to zero.

Reimplemented from oomph::Node.

3551  {
3552  // If the timestepper is unchanged do nothing
3554  {
3555  return;
3556  }
3557 
3558  // Set the new time stepper
3560 
3561  // Now simply set the time stepper of the variable position data
3563  preserve_existing_data);
3564  // Need to reset the X_position to point to the variable positions data
3565  // values which have been reassigned
3567  }
void set_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Definition: nodes.cc:406
TimeStepper * Position_time_stepper_pt
Pointer to the timestepper associated with the position data.
Definition: nodes.h:932
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Definition: nodes.h:1022

References oomph::Node::Position_time_stepper_pt, oomph::Node::position_time_stepper_pt(), oomph::Data::set_time_stepper(), oomph::Data::Value, Variable_position_pt, and oomph::Node::X_position.

◆ unconstrain_positions()

void oomph::SolidNode::unconstrain_positions ( )
inlinevirtual

Overload the unconstrain positions function to unconstrain all position values

Reimplemented from oomph::Node.

1865  {
1867  }
void unconstrain_all()
Unconstrain all the stored variables when the data is made nonhanging.
Definition: nodes.h:461

References oomph::Data::unconstrain_all(), and Variable_position_pt.

◆ unpin_all()

void oomph::SolidNode::unpin_all ( )
inlinevirtual

Unpin all the stored variables (Overloaded)

Reimplemented from oomph::Node.

1850  {
1851  Node::unpin_all();
1853  }
void unpin_all()
Unpin all the stored variables.
Definition: nodes.h:407
virtual void unpin_all()
Definition: nodes.h:1204

References oomph::Data::unpin_all(), oomph::Node::unpin_all(), and Variable_position_pt.

◆ unpin_position() [1/2]

◆ unpin_position() [2/2]

void oomph::SolidNode::unpin_position ( const unsigned k,
const unsigned i 
)
inline

Unpin the generalised nodal position. ‘Type’: k; Coordinate direction: i.

1837  {
1839  }

References i, k, oomph::Node::Nposition_type, oomph::Data::unpin(), and Variable_position_pt.

◆ variable_position()

const Data& oomph::SolidNode::variable_position ( ) const
inline

Return the variable_position data (const version)

1760  {
1761  return *Variable_position_pt;
1762  }

References Variable_position_pt.

◆ variable_position_pt()

Data* const& oomph::SolidNode::variable_position_pt ( ) const
inline

Pointer to variable_position data (const version)

1766  {
1767  return Variable_position_pt;
1768  }

References Variable_position_pt.

Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), oomph::StefanBoltzmannRadiationBase::add_stefan_boltzmann_illumination_info(), oomph::BoundaryNode< NODE_TYPE >::assign_eqn_numbers(), oomph::ElementWithExternalElement::assign_external_interaction_data_local_eqn_numbers(), oomph::GeneralisedElement::assign_local_eqn_numbers(), oomph::NodeNodeMortaringElement::construct_lagrange_multipliers(), copy(), DependentPositionPointElement::DependentPositionPointElement(), oomph::DisplacementControlElement::DisplacementControlElement(), oomph::FSI_functions::doc_fsi(), oomph::NodeNodeMortaringElement::fill_in_contribution_to_jacobian_mortared_nodes(), oomph::Hijacked< ELEMENT >::hijack_nodal_position_value(), oomph::NodeElementSolidOnlyMortaringElement::node_and_vector_to_data_pt(), oomph::NodeNodeConstraintElement::NodeNodeConstraintElement(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::pin_all_non_pressure_dofs(), oomph::NavierStokesEquations< DIM >::pin_all_non_pressure_dofs(), oomph::SpaceTimeNavierStokesEquations< DIM >::pin_all_non_pressure_dofs(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::pin_all_non_pressure_dofs(), oomph::NavierStokesSchurComplementPreconditioner::reset_pin_status(), HeatedCircularPenetratorElement::set_contact_element_mesh_pt(), and SlavePositionPointElement::SlavePositionPointElement().

◆ xi() [1/2]

double& oomph::SolidNode::xi ( const unsigned i)
inline

Reference to i-th Lagrangian position.

1884  {
1885 #ifdef RANGE_CHECKING
1886  xi_gen_range_check(0, i);
1887 #endif
1888  return Xi_position[Nlagrangian_type * i];
1889  }
void xi_gen_range_check(const unsigned &k, const unsigned &i) const
Definition: nodes.cc:3312

References i, Nlagrangian_type, xi_gen_range_check(), and Xi_position.

Referenced by ElasticInclinedPlaneProblem< ELEMENT, TIMESTEPPER >::actions_after_implicit_timestep(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::actions_before_newton_solve(), oomph::TreeBasedRefineableMeshBase::adapt_mesh(), SimpleShearProblem< ELEMENT >::apply_boundary_conditions(), SolidBag::bendBag(), oomph::RefineableSolidQElement< 3 >::build(), oomph::RefineableSolidQElement< 2 >::build(), oomph::CircularCylindricalShellMesh< ELEMENT >::build_mesh(), CylinderAndInterfaceMesh< ELEMENT >::CylinderAndInterfaceMesh(), oomph::Mesh::delete_all_external_storage(), oomph::DummyErrorEstimator::DummyErrorEstimator(), oomph::ElasticRefineableRectangularQuadMesh< ELEMENT >::ElasticRefineableRectangularQuadMesh(), FlatPlateMesh< ELEMENT >::FlatPlateMesh(), oomph::DummyErrorEstimator::get_element_errors(), ElementAnalysis::getXiCenter(), lagrangian_position(), oomph::LinearElasticitySmoothMesh< LINEAR_ELASTICITY_ELEMENT >::operator()(), oomph::PoissonSmoothMesh< POISSON_ELEMENT >::operator()(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), SolidFreeSurfaceRotationProblem< ELEMENT >::set_positions_from_lagrangian_coordinates(), MortaringHelpers::setup_constraint_elements_at_nodes(), ShellMesh< ELEMENT >::ShellMesh(), and RefineableRotatingCylinderProblem< ELEMENT >::solve().

◆ xi() [2/2]

const double& oomph::SolidNode::xi ( const unsigned i) const
inline

Reference to i-th Lagrangian position (const version)

1893  {
1894 #ifdef RANGE_CHECKING
1895  xi_gen_range_check(0, i);
1896 #endif
1897  return Xi_position[Nlagrangian_type * i];
1898  }

References i, Nlagrangian_type, xi_gen_range_check(), and Xi_position.

◆ xi_gen() [1/2]

double& oomph::SolidNode::xi_gen ( const unsigned k,
const unsigned i 
)
inline

◆ xi_gen() [2/2]

const double& oomph::SolidNode::xi_gen ( const unsigned k,
const unsigned i 
) const
inline

Reference to the generalised Lagrangian position. ‘Type’: k; 'Coordinate direction: i. (const version

1913  {
1914 #ifdef RANGE_CHECKING
1916 #endif
1917  return Xi_position[Nlagrangian_type * i + k];
1918  }

References i, k, Nlagrangian_type, xi_gen_range_check(), and Xi_position.

◆ xi_gen_range_check()

void oomph::SolidNode::xi_gen_range_check ( const unsigned k,
const unsigned i 
) const
private

Private function to check that the arguments to the position functions are in range

//////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// Private function to check that the argument is within the range of stored Lagrangain coordinates and position types.

3313  {
3314  // If either the coordinate or type are out of range
3315  if ((i >= Nlagrangian) || (k >= Nlagrangian_type))
3316  {
3317  std::ostringstream error_message;
3318  // If it's the lagrangian coordinate
3319  if (i >= Nlagrangian)
3320  {
3321  error_message << "Range Error: Xi coordinate " << i
3322  << " is not in the range (0," << Nlagrangian - 1 << ")";
3323  }
3324  // If it's the position type
3325  if (k >= Nlagrangian_type)
3326  {
3327  error_message << "Range Error: Lagrangian type " << k
3328  << " is not in the range (0," << Nlagrangian_type - 1
3329  << ")";
3330  }
3331 
3332  throw OomphLibError(
3333  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
3334  }
3335  }

References i, k, Nlagrangian, Nlagrangian_type, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by xi(), and xi_gen().

Member Data Documentation

◆ Nlagrangian

unsigned oomph::SolidNode::Nlagrangian
protected

Number of Lagrangian coordinates of the node.

Referenced by copy(), dump(), nlagrangian(), read(), and xi_gen_range_check().

◆ Nlagrangian_type

unsigned oomph::SolidNode::Nlagrangian_type
protected

Number of types of Lagrangian coordinates used to interpolate the Lagrangian coordinates within the element

Referenced by copy(), dump(), nlagrangian_type(), read(), xi(), xi_gen(), and xi_gen_range_check().

◆ Variable_position_pt

◆ Xi_position

double* oomph::SolidNode::Xi_position
protected

Storage for the Lagrangian positions.

Referenced by copy(), dump(), read(), SolidNode(), xi(), xi_gen(), and ~SolidNode().


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