39 std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list)
const
42 unsigned n_node = this->
nnode();
45 std::pair<unsigned, unsigned> dof_lookup;
48 unsigned n_node_1d = this->
nnode_1d();
55 std::ostringstream error_message_stream;
59 <<
"Can only deal with Navier-Stokes elements which "
60 <<
"use quadratic interpolation at the moment. Using " << n_node_1d
61 <<
" nodes in each direction" << std::endl;
65 OOMPH_CURRENT_FUNCTION,
66 OOMPH_EXCEPTION_LOCATION);
70 for (
unsigned j = 0; j < n_node; j++)
73 if (!(this->
node_pt(j)->is_a_copy()))
79 if (j < n_node_1d * n_node_1d)
86 else if (j < 2 * n_node_1d * n_node_1d)
93 else if (j < 3 * n_node_1d * n_node_1d)
102 std::ostringstream error_message_stream;
105 error_message_stream <<
"Looping over too many nodes!" << std::endl;
109 OOMPH_CURRENT_FUNCTION,
110 OOMPH_EXCEPTION_LOCATION);
117 for (
unsigned i = 0;
i < n_dof;
i++)
132 dof_lookup.first = this->
eqn_number(local_eqn_number);
143 std::ostringstream error_message_stream;
147 <<
"Don't know what to do when i=" <<
i
148 <<
". Can only handle when i is between 0 and 2!"
153 OOMPH_CURRENT_FUNCTION,
154 OOMPH_EXCEPTION_LOCATION);
158 dof_lookup.second = elemental_id_shift +
i;
161 else if (i_local == 1)
167 std::ostringstream error_message_stream;
171 <<
"Don't know what to do when i=" <<
i
172 <<
". Can only handle when i is either 0 or 1!" << std::endl;
176 OOMPH_CURRENT_FUNCTION,
177 OOMPH_EXCEPTION_LOCATION);
183 unsigned local_id_shift = 3;
186 dof_lookup.second = elemental_id_shift + local_id_shift +
i;
189 else if (i_local == 2)
195 std::ostringstream error_message_stream;
199 <<
"Don't know what to do when i=" <<
i
200 <<
". Can only handle when i is between 0 and 2!"
205 OOMPH_CURRENT_FUNCTION,
206 OOMPH_EXCEPTION_LOCATION);
212 unsigned local_id_shift = 5;
215 dof_lookup.second = elemental_id_shift + local_id_shift +
i;
219 dof_lookup_list.push_front(dof_lookup);
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Overload the pure virtual base class implementation. Create a list of pairs for all unknowns in this ...
int Time_slab_id
The time slice this element lies within.
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node.
unsigned nnode() const
Return the number of nodes.
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overload...
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number.
int local_eqn_number(const unsigned long &ieqn_global) const
Return the local equation number corresponding to the ieqn_global-th global equation number....
An OomphLibError object which should be thrown when an run-time error is encountered....
//////////////////////////////////////////////////////////////////// ////////////////////////////////...