oomph::QuarterCircleSectorMesh< ELEMENT > Class Template Reference

#include <quarter_circle_sector_mesh.template.h>

+ Inheritance diagram for oomph::QuarterCircleSectorMesh< ELEMENT >:

Public Member Functions

 QuarterCircleSectorMesh (GeomObject *wall_pt, const double &xi_lo, const double &fract_mid, const double &xi_hi, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
 
virtual ~QuarterCircleSectorMesh ()
 Destructor: More...
 
GeomObject *& wall_pt ()
 Access function to GeomObject representing wall. More...
 
QuarterCircleSectorDomaindomain_pt ()
 Access function to domain. More...
 
QuarterCircleSectorDomain::BLSquashFctPtbl_squash_fct_pt ()
 
- Public Member Functions inherited from oomph::QuadMeshBase
 QuadMeshBase ()
 Constructor (empty) More...
 
 QuadMeshBase (const QuadMeshBase &node)=delete
 Broken copy constructor. More...
 
void operator= (const QuadMeshBase &)=delete
 Broken assignment operator. More...
 
virtual ~QuadMeshBase ()
 Destructor (empty) More...
 
void setup_boundary_element_info ()
 
void setup_boundary_element_info (std::ostream &outfile)
 
- Public Member Functions inherited from oomph::Mesh
 Mesh ()
 Default constructor. More...
 
 Mesh (const Vector< Mesh * > &sub_mesh_pt)
 
void merge_meshes (const Vector< Mesh * > &sub_mesh_pt)
 
virtual void reset_boundary_element_info (Vector< unsigned > &ntmp_boundary_elements, Vector< Vector< unsigned >> &ntmp_boundary_elements_in_region, Vector< FiniteElement * > &deleted_elements)
 Virtual function to perform the reset boundary elements info rutines. More...
 
template<class BULK_ELEMENT >
void doc_boundary_coordinates (const unsigned &b, std::ofstream &the_file)
 
virtual void scale_mesh (const double &factor)
 
 Mesh (const Mesh &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const Mesh &)=delete
 Broken assignment operator. More...
 
virtual ~Mesh ()
 Virtual Destructor to clean up all memory. More...
 
void flush_element_and_node_storage ()
 
void flush_element_storage ()
 
void flush_node_storage ()
 
Node *& node_pt (const unsigned long &n)
 Return pointer to global node n. More...
 
Nodenode_pt (const unsigned long &n) const
 Return pointer to global node n (const version) More...
 
GeneralisedElement *& element_pt (const unsigned long &e)
 Return pointer to element e. More...
 
GeneralisedElementelement_pt (const unsigned long &e) const
 Return pointer to element e (const version) More...
 
const Vector< GeneralisedElement * > & element_pt () const
 Return reference to the Vector of elements. More...
 
Vector< GeneralisedElement * > & element_pt ()
 Return reference to the Vector of elements. More...
 
FiniteElementfinite_element_pt (const unsigned &e) const
 
Node *& boundary_node_pt (const unsigned &b, const unsigned &n)
 Return pointer to node n on boundary b. More...
 
Nodeboundary_node_pt (const unsigned &b, const unsigned &n) const
 Return pointer to node n on boundary b. More...
 
void set_nboundary (const unsigned &nbound)
 Set the number of boundaries in the mesh. More...
 
void remove_boundary_nodes ()
 Clear all pointers to boundary nodes. More...
 
void remove_boundary_nodes (const unsigned &b)
 
void remove_boundary_node (const unsigned &b, Node *const &node_pt)
 Remove a node from the boundary b. More...
 
void add_boundary_node (const unsigned &b, Node *const &node_pt)
 Add a (pointer to) a node to the b-th boundary. More...
 
void copy_boundary_node_data_from_nodes ()
 
bool boundary_coordinate_exists (const unsigned &i) const
 Indicate whether the i-th boundary has an intrinsic coordinate. More...
 
unsigned long nelement () const
 Return number of elements in the mesh. More...
 
unsigned long nnode () const
 Return number of nodes in the mesh. More...
 
unsigned ndof_types () const
 Return number of dof types in mesh. More...
 
unsigned elemental_dimension () const
 Return number of elemental dimension in mesh. More...
 
unsigned nodal_dimension () const
 Return number of nodal dimension in mesh. More...
 
void add_node_pt (Node *const &node_pt)
 Add a (pointer to a) node to the mesh. More...
 
void add_element_pt (GeneralisedElement *const &element_pt)
 Add a (pointer to) an element to the mesh. More...
 
virtual void node_update (const bool &update_all_solid_nodes=false)
 
virtual void reorder_nodes (const bool &use_old_ordering=true)
 
virtual void get_node_reordering (Vector< Node * > &reordering, const bool &use_old_ordering=true) const
 
template<class BULK_ELEMENT , template< class > class FACE_ELEMENT>
void build_face_mesh (const unsigned &b, Mesh *const &face_mesh_pt)
 
unsigned self_test ()
 Self-test: Check elements and nodes. Return 0 for OK. More...
 
void max_and_min_element_size (double &max_size, double &min_size)
 
double total_size ()
 
void check_inverted_elements (bool &mesh_has_inverted_elements, std::ofstream &inverted_element_file)
 
void check_inverted_elements (bool &mesh_has_inverted_elements)
 
unsigned check_for_repeated_nodes (const double &epsilon=1.0e-12)
 
Vector< Node * > prune_dead_nodes ()
 
unsigned nboundary () const
 Return number of boundaries. More...
 
unsigned long nboundary_node (const unsigned &ibound) const
 Return number of nodes on a particular boundary. More...
 
FiniteElementboundary_element_pt (const unsigned &b, const unsigned &e) const
 Return pointer to e-th finite element on boundary b. More...
 
Nodeget_some_non_boundary_node () const
 
unsigned nboundary_element (const unsigned &b) const
 Return number of finite elements that are adjacent to boundary b. More...
 
int face_index_at_boundary (const unsigned &b, const unsigned &e) const
 
virtual void dump (std::ofstream &dump_file, const bool &use_old_ordering=true) const
 Dump the data in the mesh into a file for restart. More...
 
void dump (const std::string &dump_file_name, const bool &use_old_ordering=true) const
 Dump the data in the mesh into a file for restart. More...
 
virtual void read (std::ifstream &restart_file)
 Read solution from restart file. More...
 
void output_paraview (std::ofstream &file_out, const unsigned &nplot) const
 
void output_fct_paraview (std::ofstream &file_out, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
 
void output_fct_paraview (std::ofstream &file_out, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
void output (std::ostream &outfile)
 Output for all elements. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Output at f(n_plot) points in each element. More...
 
void output (FILE *file_pt)
 Output for all elements (C-style output) More...
 
void output (FILE *file_pt, const unsigned &nplot)
 Output at f(n_plot) points in each element (C-style output) More...
 
void output (const std::string &output_filename)
 Output for all elements. More...
 
void output (const std::string &output_filename, const unsigned &n_plot)
 Output at f(n_plot) points in each element. More...
 
void output_fct (std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt)
 Output a given Vector function at f(n_plot) points in each element. More...
 
void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt)
 
void output_boundaries (std::ostream &outfile)
 Output the nodes on the boundaries (into separate tecplot zones) More...
 
void output_boundaries (const std::string &output_filename)
 
void assign_initial_values_impulsive ()
 Assign initial values for an impulsive start. More...
 
void shift_time_values ()
 
void calculate_predictions ()
 
void set_nodal_and_elemental_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
virtual void set_mesh_level_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
void set_consistent_pinned_values_for_continuation (ContinuationStorageScheme *const &continuation_stepper_pt)
 Set consistent values for pinned data in continuation. More...
 
bool does_pointer_correspond_to_mesh_data (double *const &parameter_pt)
 Does the double pointer correspond to any mesh data. More...
 
void set_nodal_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 Set the timestepper associated with the nodal data in the mesh. More...
 
void set_elemental_internal_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
virtual void compute_norm (double &norm)
 
virtual void compute_norm (Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 Returns the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
bool is_mesh_distributed () const
 Boolean to indicate if Mesh has been distributed. More...
 
OomphCommunicatorcommunicator_pt () const
 
void delete_all_external_storage ()
 Wipe the storage for all externally-based elements. More...
 

Protected Attributes

QuarterCircleSectorDomainDomain_pt
 Pointer to Domain. More...
 
GeomObjectWall_pt
 
double Xi_lo
 Lower limit for the (1D) coordinates along the wall. More...
 
double Fract_mid
 Fraction along wall where outer ring is to be divided. More...
 
double Xi_hi
 Upper limit for the (1D) coordinates along the wall. More...
 
- Protected Attributes inherited from oomph::Mesh
Vector< Vector< Node * > > Boundary_node_pt
 
bool Lookup_for_elements_next_boundary_is_setup
 
Vector< Vector< FiniteElement * > > Boundary_element_pt
 
Vector< Vector< int > > Face_index_at_boundary
 
Vector< Node * > Node_pt
 Vector of pointers to nodes. More...
 
Vector< GeneralisedElement * > Element_pt
 Vector of pointers to generalised elements. More...
 
std::vector< boolBoundary_coordinate_exists
 

Additional Inherited Members

- Public Types inherited from oomph::Mesh
typedef void(FiniteElement::* SteadyExactSolutionFctPt) (const Vector< double > &x, Vector< double > &soln)
 
typedef void(FiniteElement::* UnsteadyExactSolutionFctPt) (const double &time, const Vector< double > &x, Vector< double > &soln)
 
- Static Public Attributes inherited from oomph::Mesh
static Steady< 0 > Default_TimeStepper
 The Steady Timestepper. More...
 
static bool Suppress_warning_about_empty_mesh_level_time_stepper_function
 Static boolean flag to control warning about mesh level timesteppers. More...
 
- Protected Member Functions inherited from oomph::Mesh
unsigned long assign_global_eqn_numbers (Vector< double * > &Dof_pt)
 Assign (global) equation numbers to the nodes. More...
 
void describe_dofs (std::ostream &out, const std::string &current_string) const
 
void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 
void assign_local_eqn_numbers (const bool &store_local_dof_pt)
 Assign local equation numbers in all elements. More...
 
void convert_to_boundary_node (Node *&node_pt, const Vector< FiniteElement * > &finite_element_pt)
 
void convert_to_boundary_node (Node *&node_pt)
 

Detailed Description

template<class ELEMENT>
class oomph::QuarterCircleSectorMesh< ELEMENT >

2D quarter ring mesh class. The domain is specified by the GeomObject that identifies boundary 1.

---___
| ---____
| - BOUNDARY 1
| /
| [2] / |
| / |
| N / |
| |_ E / |
BOUNDARY 2 |----------- |
| | [1] |
| [0] | | ^
| | | / \ direction of
| N | N | | Lagrangian
| |_ E | |_ E | | coordinate
|__________|___________| | along wall GeomObject
BOUNDARY 0
Within the elements (MacroElements), the local coordinates
are such that the (E)astern direction coincides with the positive
s_0 direction, while the (N)orther direction coincides with the positive
s_1 direction.
#define _(A, B)
Definition: cfortran.h:132
@ N
Definition: constructor.cpp:22
double E
Elastic modulus.
Definition: TwenteMeshGluing.cpp:68

Domain is parametrised by three macro elements as sketched. Nodal positions are determined via macro-element-based representation of the Domain (as a QuarterCircleSectorDomain).

Constructor & Destructor Documentation

◆ QuarterCircleSectorMesh()

template<class ELEMENT >
oomph::QuarterCircleSectorMesh< ELEMENT >::QuarterCircleSectorMesh ( GeomObject wall_pt,
const double xi_lo,
const double fract_mid,
const double xi_hi,
TimeStepper time_stepper_pt = &Mesh::Default_TimeStepper 
)

Constructor: Pass pointer to geometric object that specifies the wall, start and end coordinates on the geometric object, and the fraction along which the dividing line is to be placed, and the timestepper (defaults to (Steady) default timestepper defined in Mesh)

Constructor for deformable 2D Ring mesh class. Pass pointer to geometric object that specifies the wall, start and end coordinates on the geometric object, and the fraction along which the dividing line is to be placed, and the timestepper (defaults to (Steady) default timestepper defined in Mesh). Nodal positions are determined via macro-element-based representation of the Domain (as a QuarterCircleSectorDomain).

50  : Wall_pt(wall_pt), Xi_lo(xi_lo), Fract_mid(fract_mid), Xi_hi(xi_hi)
51  {
52  // Mesh can only be built with 2D Qelements.
53  MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
54 
55  // Build macro element-based domain
56  Domain_pt = new QuarterCircleSectorDomain(wall_pt, xi_lo, fract_mid, xi_hi);
57 
58  // Set the number of boundaries
59  set_nboundary(3);
60 
61  // We have only bothered to parametrise boundary 1
63 
64  // Allocate the store for the elements
65  Element_pt.resize(3);
66 
67  // Create first element
68  Element_pt[0] = new ELEMENT;
69 
70  // Read out the number of linear points in the element
71  unsigned n_p = dynamic_cast<ELEMENT*>(finite_element_pt(0))->nnode_1d();
72 
73  // Can now allocate the store for the nodes
74  Node_pt.resize(n_p * n_p + (n_p - 1) * n_p + (n_p - 1) * (n_p - 1));
75 
76 
77  Vector<double> s(2);
78  Vector<double> r(2);
79 
80  // Storage for the intrinsic boundary coordinate
81  Vector<double> zeta(1);
82 
83 
84  // Set up geometrical data
85  //------------------------
86 
87  // Initialise node counter
88  unsigned long node_count = 0;
89 
90 
91  // Now assign the topology
92  // Boundaries are numbered 0 1 2 from the bottom proceeding anticlockwise
93 
94 
95  // FIRST ELEMENT (lower left corner)
96  //
97 
98  // Set the corner node (on boundaries 0 and 2)
99  //-------------------------------------------
100 
101  // Create the ll node
102  Node_pt[node_count] =
103  finite_element_pt(0)->construct_boundary_node(0, time_stepper_pt);
104 
105  // Set the pointer from the element to the node
106  finite_element_pt(0)->node_pt(0) = Node_pt[node_count];
107 
108  // Set the position of the ll node
109  s[0] = -1.0;
110  s[1] = -1.0;
112  Node_pt[node_count]->x(0) = r[0];
113  Node_pt[node_count]->x(1) = r[1];
114 
115  // Add the node to the boundaries
116  add_boundary_node(0, Node_pt[node_count]);
117  add_boundary_node(2, Node_pt[node_count]);
118 
119  // Increment the node number
120  node_count++;
121 
122  // First row is on boundary 0:
123  //---------------------------
124  for (unsigned l1 = 1; l1 < n_p; l1++)
125  {
126  // Local node number
127  unsigned jnod_local = l1;
128 
129  // Create the node
131  jnod_local, time_stepper_pt);
132 
133  // Set the pointer from the element to the node
134  finite_element_pt(0)->node_pt(jnod_local) = Node_pt[node_count];
135 
136  // Set the position of the node
137  s[0] = -1.0 + 2.0 * double(l1) / double(n_p - 1);
138  s[1] = -1.0;
140  Node_pt[node_count]->x(0) = r[0];
141  Node_pt[node_count]->x(1) = r[1];
142 
143  // Add the node to the boundary
144  add_boundary_node(0, Node_pt[node_count]);
145 
146  // Increment the node number
147  node_count++;
148  }
149 
150 
151  // Loop over the other rows of nodes
152  //------------------------------------
153  for (unsigned l2 = 1; l2 < n_p; l2++)
154  {
155  // First node in this row is on boundary 2:
156  //-----------------------------------------
157 
158  // Local node number
159  unsigned jnod_local = n_p * l2;
160 
161  // Create the node
163  jnod_local, time_stepper_pt);
164 
165  // Set the pointer from the element to the node
166  finite_element_pt(0)->node_pt(jnod_local) = Node_pt[node_count];
167 
168 
169  // Set the position of the node
170  s[0] = -1.0;
171  s[1] = -1.0 + 2.0 * double(l2) / double(n_p - 1);
172  ;
174  Node_pt[node_count]->x(0) = r[0];
175  Node_pt[node_count]->x(1) = r[1];
176 
177  // Add the node to the boundary
178  add_boundary_node(2, Node_pt[node_count]);
179 
180  // Increment the node number
181  node_count++;
182 
183 
184  // The other nodes are in the interior
185  //------------------------------------
186  // Loop over the other node columns
187  for (unsigned l1 = 1; l1 < n_p; l1++)
188  {
189  // Local node number
190  unsigned jnod_local = l1 + n_p * l2;
191 
192  // Create the node
193  Node_pt[node_count] =
194  finite_element_pt(0)->construct_node(jnod_local, time_stepper_pt);
195 
196  // Set the pointer from the element to the node
197  finite_element_pt(0)->node_pt(jnod_local) = Node_pt[node_count];
198 
199  // Set the position of the node
200  s[0] = -1.0 + 2.0 * double(l1) / double(n_p - 1);
201  s[1] = -1.0 + 2.0 * double(l2) / double(n_p - 1);
203  Node_pt[node_count]->x(0) = r[0];
204  Node_pt[node_count]->x(1) = r[1];
205 
206  // Increment the node number
207  node_count++;
208  }
209  }
210 
211  // SECOND ELEMENT (lower right corner)
212  //
213  // Create element
214  Element_pt[1] = new ELEMENT;
215 
216  // Loop over the first column (already exists!)
217  //---------------------------------------------
218  for (unsigned l2 = 0; l2 < n_p; l2++)
219  {
220  // Node number in existing element
221  unsigned jnod_local_old = (n_p - 1) + l2 * n_p;
222 
223  // Set the pointer from the element to the node
224  finite_element_pt(1)->node_pt(l2 * n_p) =
225  finite_element_pt(0)->node_pt(jnod_local_old);
226  }
227 
228  // Loop over the other node columns (apart from last one)
229  //------------------------------------------------------
230  for (unsigned l1 = 1; l1 < n_p - 1; l1++)
231  {
232  // First node is at the bottom (on boundary 0)
233  //--------------------------------------------
234 
235  // Local node number
236  unsigned jnod_local = l1;
237 
238  // Create the node
240  jnod_local, time_stepper_pt);
241 
242  // Set the pointer from the element to the node
243  finite_element_pt(1)->node_pt(jnod_local) = Node_pt[node_count];
244 
245  // Set the position of the node
246  s[0] = -1.0 + 2.0 * double(l1) / double(n_p - 1);
247  s[1] = -1.0;
249  Node_pt[node_count]->x(0) = r[0];
250  Node_pt[node_count]->x(1) = r[1];
251 
252  // Add the node to the boundary
253  add_boundary_node(0, Node_pt[node_count]);
254 
255  // Increment the node number
256  node_count++;
257 
258  // Now loop over the interior nodes in this column
259  //-------------------------------------------------
260  for (unsigned l2 = 1; l2 < n_p; l2++)
261  {
262  // Local node number
263  unsigned jnod_local = l1 + l2 * n_p;
264 
265  // Create the node
266  Node_pt[node_count] =
267  finite_element_pt(1)->construct_node(jnod_local, time_stepper_pt);
268 
269  // Set the pointer from the element to the node
270  finite_element_pt(1)->node_pt(jnod_local) = Node_pt[node_count];
271 
272  // Set the position of the node
273  s[0] = -1.0 + 2.0 * double(l1) / double(n_p - 1);
274  s[1] = -1.0 + 2.0 * double(l2) / double(n_p - 1);
276  Node_pt[node_count]->x(0) = r[0];
277  Node_pt[node_count]->x(1) = r[1];
278 
279  // Increment the node number
280  node_count++;
281  }
282  }
283 
284  // Last column (on boundary 1)
285  //----------------------------
286 
287  // First node is at the bottom (and hence also on boundary 0)
288  //-----------------------------------------------------------
289 
290  // Local node number
291  unsigned jnod_local = n_p - 1;
292 
293  // Create the node
295  jnod_local, time_stepper_pt);
296 
297  // Set the pointer from the element to the node
298  finite_element_pt(1)->node_pt(jnod_local) = Node_pt[node_count];
299 
300  // Set the position of the node
301  s[0] = 1.0;
302  s[1] = -1.0;
304  Node_pt[node_count]->x(0) = r[0];
305  Node_pt[node_count]->x(1) = r[1];
306 
307  // Add the node to the boundaries
308  add_boundary_node(0, Node_pt[node_count]);
309  add_boundary_node(1, Node_pt[node_count]);
310 
311  // Set the intrinsic coordinate on the boundary 1
312  zeta[0] = Xi_lo + 0.5 * (1.0 + s[1]) * Fract_mid * (Xi_hi - Xi_lo);
313  Node_pt[node_count]->set_coordinates_on_boundary(1, zeta);
314 
315  // Increment the node number
316  node_count++;
317 
318  // Now do the remaining nodes in last column (only on boundary 1)
319  //---------------------------------------------------------------
320  for (unsigned l2 = 1; l2 < n_p; l2++)
321  {
322  // Local node number
323  unsigned jnod_local = (n_p - 1) + l2 * n_p;
324 
325  // Create the node
327  jnod_local, time_stepper_pt);
328 
329  // Set the pointer from the element to the node
330  finite_element_pt(1)->node_pt(jnod_local) = Node_pt[node_count];
331 
332  // Set the position of the node
333  s[0] = 1.0;
334  s[1] = -1.0 + 2.0 * double(l2) / double(n_p - 1);
336  Node_pt[node_count]->x(0) = r[0];
337  Node_pt[node_count]->x(1) = r[1];
338 
339  // Add the node to the boundary
340  add_boundary_node(1, Node_pt[node_count]);
341 
342  // Set the intrinsic coordinate on the boundary 1
343  zeta[0] = Xi_lo + 0.5 * (1.0 + s[1]) * Fract_mid * (Xi_hi - Xi_lo);
344  Node_pt[node_count]->set_coordinates_on_boundary(1, zeta);
345 
346 
347  // Increment the node number
348  node_count++;
349  }
350 
351 
352  // THIRD ELEMENT (upper left corner)
353  //
354  // Create element
355  Element_pt[2] = new ELEMENT;
356 
357  // Loop over the first row (has already been created via element 0)
358  //-----------------------------------------------------------------
359  for (unsigned l1 = 0; l1 < n_p; l1++)
360  {
361  // Node number in existing element
362  unsigned jnod_local_old = n_p * (n_p - 1) + l1;
363 
364  // Local node number here
365  unsigned jnod_local = l1;
366 
367  // Set the pointer from the element to the node
368  finite_element_pt(2)->node_pt(jnod_local) =
369  finite_element_pt(0)->node_pt(jnod_local_old);
370  }
371 
372 
373  // Loop over the remaining nodes in the last column (has already
374  //--------------------------------------------------------------
375  // been created via element 1)
376  //----------------------------
377  for (unsigned l2 = 1; l2 < n_p; l2++)
378  {
379  // Node number in existing element
380  unsigned jnod_local_old = n_p * (n_p - 1) + l2;
381 
382  // Local node number here
383  unsigned jnod_local = (n_p - 1) + l2 * n_p;
384 
385  // Set the pointer from the element to the node
386  finite_element_pt(2)->node_pt(jnod_local) =
387  finite_element_pt(1)->node_pt(jnod_local_old);
388  }
389 
390 
391  // Loop over the nodes in rows (apart from last one which is on boundary 1)
392  //-------------------------------------------------------------------------
393  for (unsigned l2 = 1; l2 < n_p - 1; l2++)
394  {
395  // First node in this row is on boundary 2:
396  //-----------------------------------------
397 
398  // Local node number
399  unsigned jnod_local = n_p * l2;
400 
401  // Create the node
403  jnod_local, time_stepper_pt);
404 
405  // Set the pointer from the element to the node
406  finite_element_pt(2)->node_pt(jnod_local) = Node_pt[node_count];
407 
408  // Set the position of the node
409  s[0] = -1.0;
410  s[1] = -1.0 + 2.0 * double(l2) / double(n_p - 1);
411  ;
413  Node_pt[node_count]->x(0) = r[0];
414  Node_pt[node_count]->x(1) = r[1];
415 
416  // Add the node to the boundary
417  add_boundary_node(2, Node_pt[node_count]);
418 
419  // Increment the node number
420  node_count++;
421 
422  // The other nodes are in the interior
423  //------------------------------------
424  // Loop over the other node columns
425  for (unsigned l1 = 1; l1 < n_p - 1; l1++)
426  {
427  // Local node number
428  unsigned jnod_local = l1 + n_p * l2;
429 
430  // Create the node
431  Node_pt[node_count] =
432  finite_element_pt(2)->construct_node(jnod_local, time_stepper_pt);
433 
434  // Set the pointer from the element to the node
435  finite_element_pt(2)->node_pt(jnod_local) = Node_pt[node_count];
436 
437  // Set the position of the node
438  s[0] = -1.0 + 2.0 * double(l1) / double(n_p - 1);
439  s[1] = -1.0 + 2.0 * double(l2) / double(n_p - 1);
441  Node_pt[node_count]->x(0) = r[0];
442  Node_pt[node_count]->x(1) = r[1];
443 
444  // Increment the node number
445  node_count++;
446  }
447  }
448 
449 
450  // Top left corner is on boundaries 1 and 2:
451  //------------------------------------------
452 
453  // Local node number
454  jnod_local = n_p * (n_p - 1);
455 
456  // Create the node
458  jnod_local, time_stepper_pt);
459 
460  // Set the pointer from the element to the node
461  finite_element_pt(2)->node_pt(jnod_local) = Node_pt[node_count];
462 
463  // Set the position of the node
464  s[0] = -1.0;
465  s[1] = 1.0;
467  Node_pt[node_count]->x(0) = r[0];
468  Node_pt[node_count]->x(1) = r[1];
469 
470  // Add the node to the boundaries
471  add_boundary_node(1, Node_pt[node_count]);
472  add_boundary_node(2, Node_pt[node_count]);
473 
474  // Set the intrinsic coordinate on the boundary 1
475  zeta[0] = Xi_hi + 0.5 * (s[0] + 1.0) * (1.0 - Fract_mid) * (Xi_lo - Xi_hi);
476  Node_pt[node_count]->set_coordinates_on_boundary(1, zeta);
477 
478 
479  // Increment the node number
480  node_count++;
481 
482  // Rest of top row is on boundary 1 only:
483  //---------------------------------------
484  for (unsigned l1 = 1; l1 < n_p - 1; l1++)
485  {
486  // Local node number
487  unsigned jnod_local = n_p * (n_p - 1) + l1;
488 
489  // Create the node
491  jnod_local, time_stepper_pt);
492 
493  // Set the pointer from the element to the node
494  finite_element_pt(2)->node_pt(jnod_local) = Node_pt[node_count];
495 
496  // Set the position of the node
497  s[0] = -1.0 + 2.0 * double(l1) / double(n_p - 1);
498  s[1] = 1.0;
500  Node_pt[node_count]->x(0) = r[0];
501  Node_pt[node_count]->x(1) = r[1];
502 
503  // Add the node to the boundary
504  add_boundary_node(1, Node_pt[node_count]);
505 
506  // Set the intrinsic coordinate on the boundary 1
507  zeta[0] =
508  Xi_hi + 0.5 * (s[0] + 1.0) * (1.0 - Fract_mid) * (Xi_lo - Xi_hi);
509  Node_pt[node_count]->set_coordinates_on_boundary(1, zeta);
510 
511  // Increment the node number
512  node_count++;
513  }
514 
515  // Loop over all elements and set macro element pointer
516  // to enable MacroElement-based node update
517  unsigned n_element = this->nelement();
518  for (unsigned e = 0; e < n_element; e++)
519  {
520  // Get pointer to full element type
521  ELEMENT* el_pt = dynamic_cast<ELEMENT*>(this->element_pt(e));
522 
523  // Set pointer to macro element
524  el_pt->set_macro_elem_pt(this->Domain_pt->macro_element_pt(e));
525  }
526 
527  // Setup boundary element lookup schemes
529  }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
MacroElement * macro_element_pt(const unsigned &i)
Access to i-th macro element.
Definition: domain.h:116
virtual Node * construct_node(const unsigned &n)
Definition: elements.h:2509
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
virtual Node * construct_boundary_node(const unsigned &n)
Definition: elements.h:2538
void macro_map(const Vector< double > &s, Vector< double > &r)
The mapping from local to global coordinates at the current time : r(s)
Definition: macro_element.h:126
void add_boundary_node(const unsigned &b, Node *const &node_pt)
Add a (pointer to) a node to the b-th boundary.
Definition: mesh.cc:243
Vector< Node * > Node_pt
Vector of pointers to nodes.
Definition: mesh.h:183
std::vector< bool > Boundary_coordinate_exists
Definition: mesh.h:190
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
void set_nboundary(const unsigned &nbound)
Set the number of boundaries in the mesh.
Definition: mesh.h:505
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
Definition: mesh.h:460
Vector< GeneralisedElement * > Element_pt
Vector of pointers to generalised elements.
Definition: mesh.h:186
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
void setup_boundary_element_info()
Definition: quad_mesh.h:73
GeomObject *& wall_pt()
Access function to GeomObject representing wall.
Definition: quarter_circle_sector_mesh.template.h:105
double Fract_mid
Fraction along wall where outer ring is to be divided.
Definition: quarter_circle_sector_mesh.template.h:138
double Xi_hi
Upper limit for the (1D) coordinates along the wall.
Definition: quarter_circle_sector_mesh.template.h:141
GeomObject * Wall_pt
Definition: quarter_circle_sector_mesh.template.h:132
QuarterCircleSectorDomain * Domain_pt
Pointer to Domain.
Definition: quarter_circle_sector_mesh.template.h:128
double Xi_lo
Lower limit for the (1D) coordinates along the wall.
Definition: quarter_circle_sector_mesh.template.h:135
RealScalar s
Definition: level1_cplx_impl.h:130
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
r
Definition: UniformPSDSelfTest.py:20

References oomph::Mesh::add_boundary_node(), oomph::Mesh::Boundary_coordinate_exists, oomph::FiniteElement::construct_boundary_node(), oomph::FiniteElement::construct_node(), oomph::QuarterCircleSectorMesh< ELEMENT >::Domain_pt, e(), oomph::Mesh::Element_pt, oomph::Mesh::element_pt(), oomph::Mesh::finite_element_pt(), oomph::QuarterCircleSectorMesh< ELEMENT >::Fract_mid, oomph::Domain::macro_element_pt(), oomph::MacroElement::macro_map(), oomph::Mesh::nelement(), oomph::FiniteElement::node_pt(), oomph::Mesh::Node_pt, UniformPSDSelfTest::r, s, oomph::Mesh::set_nboundary(), oomph::QuadMeshBase::setup_boundary_element_info(), oomph::QuarterCircleSectorMesh< ELEMENT >::wall_pt(), oomph::QuarterCircleSectorMesh< ELEMENT >::Xi_hi, oomph::QuarterCircleSectorMesh< ELEMENT >::Xi_lo, and Eigen::zeta().

◆ ~QuarterCircleSectorMesh()

template<class ELEMENT >
virtual oomph::QuarterCircleSectorMesh< ELEMENT >::~QuarterCircleSectorMesh ( )
inlinevirtual

Destructor:

102 {}

Member Function Documentation

◆ bl_squash_fct_pt()

template<class ELEMENT >
QuarterCircleSectorDomain::BLSquashFctPt& oomph::QuarterCircleSectorMesh< ELEMENT >::bl_squash_fct_pt ( )
inline

Function pointer for function that squashes the outer two macro elements towards the wall by mapping the input value of the "radial" macro element coordinate to the return value (defined in the underlying Domain object)

121  {
122  return Domain_pt->bl_squash_fct_pt();
123  }
BLSquashFctPt & bl_squash_fct_pt()
Definition: quarter_circle_sector_domain.h:91

References oomph::QuarterCircleSectorDomain::bl_squash_fct_pt(), and oomph::QuarterCircleSectorMesh< ELEMENT >::Domain_pt.

◆ domain_pt()

◆ wall_pt()

Member Data Documentation

◆ Domain_pt

◆ Fract_mid

template<class ELEMENT >
double oomph::QuarterCircleSectorMesh< ELEMENT >::Fract_mid
protected

Fraction along wall where outer ring is to be divided.

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

◆ Wall_pt

template<class ELEMENT >
GeomObject* oomph::QuarterCircleSectorMesh< ELEMENT >::Wall_pt
protected

◆ Xi_hi

template<class ELEMENT >
double oomph::QuarterCircleSectorMesh< ELEMENT >::Xi_hi
protected

Upper limit for the (1D) coordinates along the wall.

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

◆ Xi_lo

template<class ELEMENT >
double oomph::QuarterCircleSectorMesh< ELEMENT >::Xi_lo
protected

Lower limit for the (1D) coordinates along the wall.

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


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