oomph::TriangleMesh< ELEMENT > Class Template Reference

#include <triangle_mesh.template.h>

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

Classes

struct  Point
 

Public Member Functions

 TriangleMesh ()
 Empty constructor. More...
 
 TriangleMesh (const std::string &node_file_name, const std::string &element_file_name, const std::string &poly_file_name, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &allow_automatic_creation_of_vertices_on_boundaries=true)
 Constructor with the input files. More...
 
void output_boundary_coordinates (const unsigned &b, std::ostream &outfile)
 
- Public Member Functions inherited from oomph::TriangleMeshBase
 TriangleMeshBase ()
 Constructor. More...
 
 TriangleMeshBase (const TriangleMeshBase &node)=delete
 Broken copy constructor. More...
 
virtual ~TriangleMeshBase ()
 Broken assignment operator. More...
 
void setup_boundary_element_info ()
 
void setup_boundary_element_info (std::ostream &outfile)
 
virtual void load_balance (const Vector< unsigned > &target_domain_for_local_non_halo_element)
 Virtual function to perform the load balance rutines. More...
 
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...
 
- Public Member Functions inherited from oomph::UnstructuredTwoDMeshGeometryBase
 UnstructuredTwoDMeshGeometryBase ()
 Empty constructor. More...
 
 UnstructuredTwoDMeshGeometryBase (const UnstructuredTwoDMeshGeometryBase &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const UnstructuredTwoDMeshGeometryBase &)=delete
 Broken assignment operator. More...
 
 ~UnstructuredTwoDMeshGeometryBase ()
 Empty destructor. More...
 
unsigned nregion ()
 Return the number of regions specified by attributes. More...
 
unsigned nregion_element (const unsigned &i)
 Return the number of elements in the i-th region. More...
 
FiniteElementregion_element_pt (const unsigned &i, const unsigned &e)
 Return the e-th element in the i-th region. More...
 
unsigned nregion_attribute ()
 Return the number of attributes used in the mesh. More...
 
double region_attribute (const unsigned &i)
 Return the attribute associated with region i. More...
 
GeomObjectboundary_geom_object_pt (const unsigned &b)
 
std::map< unsigned, GeomObject * > & boundary_geom_object_pt ()
 Return direct access to the geometric object storage. More...
 
std::map< unsigned, Vector< double > > & boundary_coordinate_limits ()
 
Vector< double > & boundary_coordinate_limits (const unsigned &b)
 
unsigned nboundary_element_in_region (const unsigned &b, const unsigned &r) const
 Return the number of elements adjacent to boundary b in region r. More...
 
FiniteElementboundary_element_in_region_pt (const unsigned &b, const unsigned &r, const unsigned &e) const
 Return pointer to the e-th element adjacent to boundary b in region r. More...
 
int face_index_at_boundary_in_region (const unsigned &b, const unsigned &r, const unsigned &e) const
 Return face index of the e-th element adjacent to boundary b in region r. More...
 
TriangleMeshPolyLineboundary_polyline_pt (const unsigned &b)
 
std::map< unsigned, std::set< Node * > > & nodes_on_boundary_pt ()
 
const bool get_connected_vertex_number_on_destination_polyline (TriangleMeshPolyLine *dst_polyline_pt, Vector< double > &vertex_coordinates, unsigned &vertex_number)
 
void check_contiguousness_on_polylines_helper (Vector< TriangleMeshPolyLine * > &polylines_pt, unsigned &index)
 
void check_contiguousness_on_polylines_helper (Vector< TriangleMeshPolyLine * > &polylines_pt, unsigned &index_halo_start, unsigned &index_halo_end)
 
bool is_point_inside_polygon_helper (Vector< Vector< double >> polygon_vertices, Vector< double > point)
 Helper function that checks if a given point is inside a polygon. More...
 
void enable_automatic_creation_of_vertices_on_boundaries ()
 
void disable_automatic_creation_of_vertices_on_boundaries ()
 
bool is_automatic_creation_of_vertices_on_boundaries_allowed ()
 
template<class ELEMENT >
void setup_boundary_coordinates (const unsigned &b)
 
template<class ELEMENT >
void setup_boundary_coordinates (const unsigned &b, std::ofstream &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)
 
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)
 
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 Member Functions

 TriangleMesh (const TriangleMesh &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const TriangleMesh &)=delete
 Broken assignment operator. More...
 
virtual ~TriangleMesh ()
 Destructor. More...
 
void set_mesh_level_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
Vector< unsignedoomph_vertex_nodes_id ()
 
void build_from_scaffold (TimeStepper *time_stepper_pt, const bool &use_attributes)
 Build mesh from scaffold. More...
 
- Protected Member Functions inherited from oomph::UnstructuredTwoDMeshGeometryBase
void snap_nodes_onto_geometric_objects ()
 
void copy_connection_information (TriangleMeshCurveSection *input_curve_pt, TriangleMeshCurveSection *output_curve_pt)
 
void copy_connection_information_to_sub_polylines (TriangleMeshCurveSection *input_curve_pt, TriangleMeshCurveSection *output_curve_pt)
 
- 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)
 

Protected Attributes

TimeStepperTime_stepper_pt
 Timestepper used to build elements. More...
 
bool Use_attributes
 
std::map< unsigned, doubleRegions_areas
 
TriangleScaffoldMeshTmp_mesh_pt
 Temporary scaffold mesh. More...
 
Vector< unsignedOomph_vertex_nodes_id
 
- Protected Attributes inherited from oomph::UnstructuredTwoDMeshGeometryBase
bool Allow_automatic_creation_of_vertices_on_boundaries
 
std::map< unsigned, Vector< FiniteElement * > > Region_element_pt
 
Vector< doubleRegion_attribute
 Vector of attributes associated with the elements in each region. More...
 
std::map< unsigned, GeomObject * > Boundary_geom_object_pt
 Storage for the geometric objects associated with any boundaries. More...
 
std::map< unsigned, Vector< double > > Boundary_coordinate_limits
 
Vector< TriangleMeshPolygon * > Outer_boundary_pt
 Polygon that defines outer boundaries. More...
 
Vector< TriangleMeshPolygon * > Internal_polygon_pt
 Vector of polygons that define internal polygons. More...
 
Vector< TriangleMeshOpenCurve * > Internal_open_curve_pt
 Vector of open polylines that define internal curves. More...
 
Vector< Vector< double > > Extra_holes_coordinates
 Storage for extra coordinates for holes. More...
 
std::map< unsigned, Vector< double > > Regions_coordinates
 
std::map< unsigned, TriangleMeshCurveSection * > Boundary_curve_section_pt
 
Vector< std::map< unsigned, Vector< FiniteElement * > > > Boundary_region_element_pt
 Storage for elements adjacent to a boundary in a particular region. More...
 
Vector< std::map< unsigned, Vector< int > > > Face_index_region_at_boundary
 Storage for the face index adjacent to a boundary in a particular region. More...
 
std::map< unsigned, Vector< std::pair< double, double > > > Polygonal_vertex_arclength_info
 
std::map< unsigned, std::set< Node * > > Nodes_on_boundary_pt
 
std::set< TriangleMeshCurveSection * > Free_curve_section_pt
 
std::set< TriangleMeshPolygon * > Free_polygon_pt
 
std::set< TriangleMeshOpenCurve * > Free_open_curve_pt
 
- 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
 

Private Types

typedef double coord_t
 
typedef double coord2_t
 

Private Member Functions

coord2_t cross (const Point &O, const Point &A, const Point &B)
 
std::vector< Pointconvex_hull (std::vector< Point > P)
 

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::UnstructuredTwoDMeshGeometryBase
static bool Suppress_warning_about_regions_and_boundaries
 Public static flag to suppress warning; defaults to false. More...
 
- 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...
 

Detailed Description

template<class ELEMENT>
class oomph::TriangleMesh< ELEMENT >

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// Triangle mesh build with the help of the scaffold mesh coming from the triangle mesh generator Triangle. http://www.cs.cmu.edu/~quake/triangle.html

Member Typedef Documentation

◆ coord2_t

template<class ELEMENT >
typedef double oomph::TriangleMesh< ELEMENT >::coord2_t
private

◆ coord_t

template<class ELEMENT >
typedef double oomph::TriangleMesh< ELEMENT >::coord_t
private

Constructor & Destructor Documentation

◆ TriangleMesh() [1/3]

template<class ELEMENT >
oomph::TriangleMesh< ELEMENT >::TriangleMesh ( )
inline

Empty constructor.

428  {
429 #ifdef OOMPH_HAS_TRIANGLE_LIB
430  // Using this constructor no Triangulateio object is built
431  Triangulateio_exists = false;
432  // By default allow the automatic creation of vertices along the
433  // boundaries by Triangle
435 #ifdef OOMPH_HAS_MPI
436  // Initialize the flag to indicate this is the first time to
437  // compute the holes left by the halo elements
438  First_time_compute_holes_left_by_halo_elements = true;
439 #endif // #ifdef OOMPH_HAS_MPI
440 
441 #endif
442 
443  // Mesh can only be built with 2D Telements.
444  MeshChecker::assert_geometric_element<TElementGeometricBase, ELEMENT>(2);
445  }
bool Allow_automatic_creation_of_vertices_on_boundaries
Definition: unstructured_two_d_mesh_geometry_base.h:2575

References oomph::UnstructuredTwoDMeshGeometryBase::Allow_automatic_creation_of_vertices_on_boundaries.

◆ TriangleMesh() [2/3]

template<class ELEMENT >
oomph::TriangleMesh< ELEMENT >::TriangleMesh ( const std::string &  node_file_name,
const std::string &  element_file_name,
const std::string &  poly_file_name,
TimeStepper time_stepper_pt = &Mesh::Default_TimeStepper,
const bool allow_automatic_creation_of_vertices_on_boundaries = true 
)
inline

Constructor with the input files.

454  {
455  // Mesh can only be built with 2D Telements.
456  MeshChecker::assert_geometric_element<TElementGeometricBase, ELEMENT>(2);
457 
458  // Initialize the value for allowing creation of points on boundaries
460  allow_automatic_creation_of_vertices_on_boundaries;
461 
462 #ifdef OOMPH_HAS_MPI
463  // Initialize the flag to indicate this is the first time to
464  // compute the holes left by the halo elements
465  First_time_compute_holes_left_by_halo_elements = true;
466 #endif // #ifdef OOMPH_HAS_MPI
467 
468  // Store Timestepper used to build elements
469  Time_stepper_pt = time_stepper_pt;
470 
471  // Check if we should use attributes. This is set to true if the .poly
472  // file specifies regions
473  bool should_use_attributes = false;
474 
475 #ifdef OOMPH_HAS_TRIANGLE_LIB
476  // Using this constructor build the triangulatio
477  TriangleHelper::create_triangulateio_from_polyfiles(
478  node_file_name,
479  element_file_name,
480  poly_file_name,
481  Triangulateio,
482  should_use_attributes);
483 
484  // Record that the triangulateio object has been created
485  Triangulateio_exists = true;
486 #endif
487 
488  // Store the attributes
489  Use_attributes = should_use_attributes;
490 
491  // Build scaffold
492  this->Tmp_mesh_pt = new TriangleScaffoldMesh(
493  node_file_name, element_file_name, poly_file_name);
494 
495  // Convert mesh from scaffold to actual mesh
496  build_from_scaffold(time_stepper_pt, should_use_attributes);
497 
498  // kill the scaffold
499  delete this->Tmp_mesh_pt;
500  this->Tmp_mesh_pt = 0;
501 
502  // Setup boundary coordinates for boundaries
503  unsigned nb = nboundary();
504  for (unsigned b = 0; b < nb; b++)
505  {
506  this->template setup_boundary_coordinates<ELEMENT>(b);
507  }
508  }
Scalar * b
Definition: benchVecAdd.cpp:17
unsigned nboundary() const
Return number of boundaries.
Definition: mesh.h:827
TimeStepper * Time_stepper_pt
Timestepper used to build elements.
Definition: triangle_mesh.template.h:1179
TriangleScaffoldMesh * Tmp_mesh_pt
Temporary scaffold mesh.
Definition: triangle_mesh.template.h:1354
bool Use_attributes
Definition: triangle_mesh.template.h:1183
void build_from_scaffold(TimeStepper *time_stepper_pt, const bool &use_attributes)
Build mesh from scaffold.
Definition: triangle_mesh.template.cc:44
int nb
Definition: level2_impl.h:286

References oomph::UnstructuredTwoDMeshGeometryBase::Allow_automatic_creation_of_vertices_on_boundaries, b, oomph::TriangleMesh< ELEMENT >::build_from_scaffold(), nb, oomph::Mesh::nboundary(), oomph::TriangleMesh< ELEMENT >::Time_stepper_pt, oomph::TriangleMesh< ELEMENT >::Tmp_mesh_pt, and oomph::TriangleMesh< ELEMENT >::Use_attributes.

◆ TriangleMesh() [3/3]

template<class ELEMENT >
oomph::TriangleMesh< ELEMENT >::TriangleMesh ( const TriangleMesh< ELEMENT > &  dummy)
protecteddelete

Broken copy constructor.

◆ ~TriangleMesh()

template<class ELEMENT >
virtual oomph::TriangleMesh< ELEMENT >::~TriangleMesh ( )
inlineprotectedvirtual

Destructor.

855  {
856 #ifdef OOMPH_HAS_TRIANGLE_LIB
857  if (Triangulateio_exists)
858  {
859  TriangleHelper::clear_triangulateio(Triangulateio);
860  }
861 
862  std::set<TriangleMeshCurveSection*>::iterator it_polyline;
863  for (it_polyline = Free_curve_section_pt.begin();
864  it_polyline != Free_curve_section_pt.end();
865  it_polyline++)
866  {
867  delete (*it_polyline);
868  }
869 
870  std::set<TriangleMeshPolygon*>::iterator it_polygon;
871  for (it_polygon = Free_polygon_pt.begin();
872  it_polygon != Free_polygon_pt.end();
873  it_polygon++)
874  {
875  delete (*it_polygon);
876  }
877 
878  std::set<TriangleMeshOpenCurve*>::iterator it_open_polyline;
879  for (it_open_polyline = Free_open_curve_pt.begin();
880  it_open_polyline != Free_open_curve_pt.end();
881  it_open_polyline++)
882  {
883  delete (*it_open_polyline);
884  }
885 
886 #endif
887  }
std::set< TriangleMeshOpenCurve * > Free_open_curve_pt
Definition: unstructured_two_d_mesh_geometry_base.h:2646
std::set< TriangleMeshCurveSection * > Free_curve_section_pt
Definition: unstructured_two_d_mesh_geometry_base.h:2638
std::set< TriangleMeshPolygon * > Free_polygon_pt
Definition: unstructured_two_d_mesh_geometry_base.h:2642

References oomph::UnstructuredTwoDMeshGeometryBase::Free_curve_section_pt, oomph::UnstructuredTwoDMeshGeometryBase::Free_open_curve_pt, and oomph::UnstructuredTwoDMeshGeometryBase::Free_polygon_pt.

Member Function Documentation

◆ build_from_scaffold()

template<class ELEMENT >
void TriangleMesh::build_from_scaffold ( TimeStepper time_stepper_pt,
const bool use_attributes 
)
protected

Build mesh from scaffold.

Build with the help of the scaffold mesh coming from the triangle mesh generator Triangle.

46  {
47  // Mesh can only be built with 2D Telements.
48  MeshChecker::assert_geometric_element<TElementGeometricBase, ELEMENT>(2);
49 
50  // Create space for elements
51  unsigned nelem = Tmp_mesh_pt->nelement();
52  Element_pt.resize(nelem);
53 
54  // Create space for nodes
55  unsigned nnode_scaffold = Tmp_mesh_pt->nnode();
56 
57  // Create a map storing the node_id of the mesh used to update the
58  // node position in the update_triangulateio function
59  std::map<Node*, unsigned> old_global_number;
60 
61  // Store the TriangulateIO node id
62  for (unsigned inod = 0; inod < nnode_scaffold; inod++)
63  {
64  Node* old_node_pt = Tmp_mesh_pt->node_pt(inod);
65  old_global_number[old_node_pt] = inod;
66  }
67 
68  // Initialize the old node id vector
69  Oomph_vertex_nodes_id.resize(nnode_scaffold);
70 
71  // Create space for nodes
72  Node_pt.resize(nnode_scaffold, 0);
73 
74  // Set number of boundaries
75  unsigned nbound = Tmp_mesh_pt->nboundary();
76 
77  // Resize the boundary information
78  set_nboundary(nbound);
79  Boundary_element_pt.resize(nbound);
80  Face_index_at_boundary.resize(nbound);
81 
82  // If we have different regions, then resize the region
83  // information
84  if (use_attributes)
85  {
86  Boundary_region_element_pt.resize(nbound);
87  Face_index_region_at_boundary.resize(nbound);
88  }
89 
90  // Loop over elements in scaffold mesh, visit their nodes
91  for (unsigned e = 0; e < nelem; e++)
92  {
93  Element_pt[e] = new ELEMENT;
94  }
95 
96  // Number of nodes per element from the scaffold mesh
97  unsigned nnod_el = Tmp_mesh_pt->finite_element_pt(0)->nnode();
98 
99  // Setup map to check the (pseudo-)global node number
100  // Nodes whose number is zero haven't been copied across
101  // into the mesh yet.
102  std::map<Node*, unsigned> global_number;
103  unsigned global_count = 0;
104 
105  // Map of Element attribute pairs
106  std::map<double, Vector<FiniteElement*>> element_attribute_map;
107 
108  // If we're using attributes
109  if (use_attributes)
110  {
111  // If we're using attributes then we need attribute 0 which will
112  // be associated with region 0
113  element_attribute_map[0].resize(0);
114  }
115 
116  // Loop over elements in scaffold mesh, visit their nodes
117  for (unsigned e = 0; e < nelem; e++)
118  {
119  // Loop over all nodes in element
120  for (unsigned j = 0; j < nnod_el; j++)
121  {
122  // Pointer to node in the scaffold mesh
123  Node* scaffold_node_pt = Tmp_mesh_pt->finite_element_pt(e)->node_pt(j);
124 
125  // Get the (pseudo-)global node number in scaffold mesh
126  // (It's zero [=default] if not visited this one yet)
127  unsigned j_global = global_number[scaffold_node_pt];
128 
129  // Haven't done this one yet
130  if (j_global == 0)
131  {
132  // Find and store the node_id in the old nodes map
133  Oomph_vertex_nodes_id[global_count] =
134  old_global_number[scaffold_node_pt];
135 
136  // Get pointer to set of mesh boundaries that this
137  // scaffold node occupies; NULL if the node is not on any boundary
138  std::set<unsigned>* boundaries_pt;
139  scaffold_node_pt->get_boundaries_pt(boundaries_pt);
140 
141  // Storage for the new node
142  Node* new_node_pt = 0;
143 
144  // Is it on boundaries
145  if (boundaries_pt != 0)
146  {
147  // Create new boundary node
148  new_node_pt =
149  finite_element_pt(e)->construct_boundary_node(j, time_stepper_pt);
150 
151  // Add to boundaries
152  for (std::set<unsigned>::iterator it = boundaries_pt->begin();
153  it != boundaries_pt->end();
154  ++it)
155  {
156  add_boundary_node(*it, new_node_pt);
157  }
158  }
159  // Build normal node
160  else
161  {
162  // Create new normal node
163  new_node_pt =
164  finite_element_pt(e)->construct_node(j, time_stepper_pt);
165  }
166 
167  // Give it a number (not necessarily the global node
168  // number in the scaffold mesh -- we just need something
169  // to keep track...)
170  global_count++;
171  global_number[scaffold_node_pt] = global_count;
172 
173  // Copy new node, created using the NEW element's construct_node
174  // function into global storage, using the same global
175  // node number that we've just associated with the
176  // corresponding node in the scaffold mesh
177  Node_pt[global_count - 1] = new_node_pt;
178 
179  // Assign coordinates
180  for (unsigned i = 0; i < finite_element_pt(e)->dim(); i++)
181  {
182  new_node_pt->x(i) = scaffold_node_pt->x(i);
183  }
184  }
185  // This one has already been done: Copy accross
186  else
187  {
188  finite_element_pt(e)->node_pt(j) = Node_pt[j_global - 1];
189  }
190  }
191 
192  // If we're using attributes
193  if (use_attributes)
194  {
195  element_attribute_map[Tmp_mesh_pt->element_attribute(e)].push_back(
197  }
198  }
199 
200  // Now let's construct lists
201  // Find the number of attributes
202  if (use_attributes)
203  {
204  unsigned n_attribute = element_attribute_map.size();
205 
206  // There are n_attribute different regions
207  this->Region_attribute.resize(n_attribute);
208 
209  // Copy the vectors in the map over to our internal storage
210  unsigned count = 0;
211  for (std::map<double, Vector<FiniteElement*>>::iterator it =
212  element_attribute_map.begin();
213  it != element_attribute_map.end();
214  ++it)
215  {
216  this->Region_attribute[count] = it->first;
217  Region_element_pt[static_cast<unsigned>(Region_attribute[count])] =
218  it->second;
219  ++count;
220  }
221  }
222 
223  // At this point we've created all the elements and
224  // created their vertex nodes. Now we need to create
225  // the additional (midside and internal) nodes!
226 
227  unsigned boundary_id = 0;
228 
229  // Get number of nodes along element edge and dimension of element (2)
230  // from first element
231  unsigned n_node_1d = finite_element_pt(0)->nnode_1d();
232  unsigned dim = finite_element_pt(0)->dim();
233 
234  // Storage for the local coordinate of the new node
235  Vector<double> s(dim);
236 
237  // Get number of nodes in the element from first element
238  unsigned n_node = finite_element_pt(0)->nnode();
239 
240  // Storage for each global edge of the mesh
241  unsigned n_global_edge = Tmp_mesh_pt->nglobal_edge();
242  Vector<Vector<Node*>> nodes_on_global_edge(n_global_edge);
243 
244  // Loop over elements
245  for (unsigned e = 0; e < nelem; e++)
246  {
247  // Cache pointers to the elements
248  FiniteElement* const elem_pt = finite_element_pt(e);
249  FiniteElement* const tmp_elem_pt = Tmp_mesh_pt->finite_element_pt(e);
250 
251  // The number of edge nodes is 3*(nnode_1d-1)
252  unsigned n_edge_node = 3 * (n_node_1d - 1);
253 
254  // If there are any more nodes, these are internal and can be
255  // constructed and added directly to the mesh
256  for (unsigned n = n_edge_node; n < n_node; ++n)
257  {
258  // Create new node (it can never be a boundary node)
259  Node* new_node_pt = elem_pt->construct_node(n, time_stepper_pt);
260 
261  // What are the node's local coordinates?
262  elem_pt->local_coordinate_of_node(n, s);
263 
264  // Find the coordinates of the new node from the existing
265  // and fully-functional element in the scaffold mesh
266  for (unsigned i = 0; i < dim; i++)
267  {
268  new_node_pt->x(i) = tmp_elem_pt->interpolated_x(s, i);
269  }
270 
271  // Add the node to the mesh's global look-up scheme
272  Node_pt.push_back(new_node_pt);
273  }
274 
275  // Now loop over the mid-side edge nodes
276  // Start from node number 3
277  unsigned n = 3;
278 
279  // Loop over edges
280  for (unsigned j = 0; j < 3; j++)
281  {
282  // Find the boundary id of the edge
283  boundary_id = Tmp_mesh_pt->edge_boundary(e, j);
284 
285  // Find the global edge index
286  unsigned edge_index = Tmp_mesh_pt->edge_index(e, j);
287 
288  // If the nodes on the edge have not been allocated, construct them
289  if (nodes_on_global_edge[edge_index].size() == 0)
290  {
291  // Loop over the nodes on the edge excluding the ends
292  for (unsigned j2 = 0; j2 < n_node_1d - 2; ++j2)
293  {
294  // Storage for the new node
295  Node* new_node_pt = 0;
296 
297  // If the edge is on a boundary, construct a boundary node
298  if (boundary_id > 0)
299  {
300  new_node_pt =
301  elem_pt->construct_boundary_node(n, time_stepper_pt);
302  // Add it to the boundary
303  this->add_boundary_node(boundary_id - 1, new_node_pt);
304  }
305  // Otherwise construct a normal node
306  else
307  {
308  new_node_pt = elem_pt->construct_node(n, time_stepper_pt);
309  }
310 
311  // What are the node's local coordinates?
312  elem_pt->local_coordinate_of_node(n, s);
313 
314  // Find the coordinates of the new node from the existing
315  // and fully-functional element in the scaffold mesh
316  for (unsigned i = 0; i < dim; i++)
317  {
318  new_node_pt->x(i) = tmp_elem_pt->interpolated_x(s, i);
319  }
320 
321  // Add to the global node list
322  Node_pt.push_back(new_node_pt);
323 
324  // Add to the edge index
325  nodes_on_global_edge[edge_index].push_back(new_node_pt);
326  // Increment the node number
327  ++n;
328  }
329  }
330  // Otherwise just set the pointers
331  // using the fact that the next time the edge is visited
332  // the nodes must be arranged in the other order because all
333  // triangles have the same orientation
334  else
335  {
336  // Loop over the nodes on the edge excluding the ends
337  for (unsigned j2 = 0; j2 < n_node_1d - 2; ++j2)
338  {
339  // Set the local node from the edge but indexed the other
340  // way around
341  elem_pt->node_pt(n) =
342  nodes_on_global_edge[edge_index][n_node_1d - 3 - j2];
343  ++n;
344  }
345  }
346 
347  // Set the elements adjacent to the boundary from the
348  // boundary id information
349  if (boundary_id > 0)
350  {
351  Boundary_element_pt[boundary_id - 1].push_back(elem_pt);
352  // Need to put a shift in here because of an inconsistent naming
353  // convention between triangle and face elements
354  Face_index_at_boundary[boundary_id - 1].push_back((j + 2) % 3);
355 
356  // If using regions set up the boundary information
357  if (use_attributes)
358  {
359  unsigned tmp_region =
360  static_cast<unsigned>(Tmp_mesh_pt->element_attribute(e));
361  // Element adjacent to boundary
362  Boundary_region_element_pt[boundary_id - 1][tmp_region].push_back(
363  elem_pt);
364  // Need to put a shift in here because of an inconsistent naming
365  // convention between triangle and face elements
366  Face_index_region_at_boundary[boundary_id - 1][tmp_region]
367  .push_back((j + 2) % 3);
368  }
369  }
370 
371  } // end of loop over edges
372  } // end of loop over elements
373 
374 
375  // Lookup scheme has now been setup
377  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
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
unsigned dim() const
Definition: elements.h:2611
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
virtual unsigned nnode_1d() const
Definition: elements.h:2218
virtual Node * construct_boundary_node(const unsigned &n)
Definition: elements.h:2538
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
Vector< Vector< FiniteElement * > > Boundary_element_pt
Definition: mesh.h:91
bool Lookup_for_elements_next_boundary_is_setup
Definition: mesh.h:87
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
Vector< Vector< int > > Face_index_at_boundary
Definition: mesh.h:95
void set_nboundary(const unsigned &nbound)
Set the number of boundaries in the mesh.
Definition: mesh.h:505
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
Definition: mesh.h:436
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
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
Vector< unsigned > Oomph_vertex_nodes_id
Definition: triangle_mesh.template.h:1358
unsigned edge_index(const unsigned &e, const unsigned &i) const
Definition: triangle_scaffold_mesh.h:102
double element_attribute(const unsigned &e) const
Return the attribute of the element e.
Definition: triangle_scaffold_mesh.h:108
unsigned edge_boundary(const unsigned &e, const unsigned &i) const
Definition: triangle_scaffold_mesh.h:89
unsigned nglobal_edge()
Return the number of internal edges.
Definition: triangle_scaffold_mesh.h:95
Vector< std::map< unsigned, Vector< FiniteElement * > > > Boundary_region_element_pt
Storage for elements adjacent to a boundary in a particular region.
Definition: unstructured_two_d_mesh_geometry_base.h:2617
Vector< double > Region_attribute
Vector of attributes associated with the elements in each region.
Definition: unstructured_two_d_mesh_geometry_base.h:2586
Vector< std::map< unsigned, Vector< int > > > Face_index_region_at_boundary
Storage for the face index adjacent to a boundary in a particular region.
Definition: unstructured_two_d_mesh_geometry_base.h:2620
std::map< unsigned, Vector< FiniteElement * > > Region_element_pt
Definition: unstructured_two_d_mesh_geometry_base.h:2583
RealScalar s
Definition: level1_cplx_impl.h:130
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References oomph::FiniteElement::construct_boundary_node(), oomph::FiniteElement::construct_node(), e(), oomph::Node::get_boundaries_pt(), i, oomph::FiniteElement::interpolated_x(), j, oomph::FiniteElement::local_coordinate_of_node(), n, oomph::FiniteElement::node_pt(), oomph::Node::resize(), s, size, and oomph::Node::x().

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

◆ convex_hull()

template<class ELEMENT >
std::vector<Point> oomph::TriangleMesh< ELEMENT >::convex_hull ( std::vector< Point P)
inlineprivate

Returns a list of points on the convex hull in counter-clockwise order. Note: the last point in the returned list is the same as the first one.

2208  {
2209  int n = P.size(), k = 0;
2210  std::vector<Point> H(2 * n);
2211 
2212  // Sort points lexicographically
2213  std::sort(P.begin(), P.end());
2214 
2215  // Build lower hull
2216  for (int i = 0; i < n; ++i)
2217  {
2218  while (k >= 2 && cross(H[k - 2], H[k - 1], P[i]) <= 0) k--;
2219  H[k++] = P[i];
2220  }
2221 
2222  // Build upper hull
2223  for (int i = n - 2, t = k + 1; i >= 0; i--)
2224  {
2225  while (k >= t && cross(H[k - 2], H[k - 1], P[i]) <= 0) k--;
2226  H[k++] = P[i];
2227  }
2228 
2229  H.resize(k);
2230  return H;
2231  }
MatrixXf H
Definition: HessenbergDecomposition_matrixH.cpp:4
coord2_t cross(const Point &O, const Point &A, const Point &B)
Definition: triangle_mesh.template.h:2199
char char char int int * k
Definition: level2_impl.h:374
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
t
Definition: plotPSD.py:36

References oomph::TriangleMesh< ELEMENT >::cross(), H, i, k, n, Global_Physical_Variables::P, and plotPSD::t.

◆ cross()

template<class ELEMENT >
coord2_t oomph::TriangleMesh< ELEMENT >::cross ( const Point O,
const Point A,
const Point B 
)
inlineprivate

2D cross product of OA and OB vectors, i.e. z-component of their 3D cross product. Returns a positive value, if OAB makes a counter-clockwise turn, negative for clockwise turn, and zero if the points are collinear.

2200  {
2201  return (A.x - O.x) * (B.y - O.y) - (A.y - O.y) * (B.x - O.x);
2202  }
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
Definition: matrices.h:74

Referenced by oomph::TriangleMesh< ELEMENT >::convex_hull().

◆ oomph_vertex_nodes_id()

template<class ELEMENT >
Vector<unsigned> oomph::TriangleMesh< ELEMENT >::oomph_vertex_nodes_id ( )
inlineprotected

Return the vector that contains the oomph-lib node number for all vertex nodes in the TriangulateIO representation of the mesh

1174  {
1175  return Oomph_vertex_nodes_id;
1176  }

References oomph::TriangleMesh< ELEMENT >::Oomph_vertex_nodes_id.

◆ operator=()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::operator= ( const TriangleMesh< ELEMENT > &  )
protecteddelete

Broken assignment operator.

◆ output_boundary_coordinates()

template<class ELEMENT >
void TriangleMesh::output_boundary_coordinates ( const unsigned b,
std::ostream &  outfile 
)

Output the nodes on the boundary and their respective boundary coordinates(into separate tecplot zones)

8016  {
8017  // First get all the elements adjacent to the given boundary, then
8018  // the face elements and extract the nodes on the boundaries using
8019  // the face elements. We can not use the data structure
8020  // Boundary_node_pt since the multi_domain functions add nodes there
8021  // without assigning the required boundary coordinate
8022 
8023  // Store the nodes in a set so we do not have repeated nodes
8024  std::set<Node*> boundary_nodes_pt;
8025  const unsigned n_boundary_ele = this->nboundary_element(b);
8026  for (unsigned e = 0; e < n_boundary_ele; e++)
8027  {
8028  // Get the boundary bulk element
8029  FiniteElement* bulk_ele_pt = this->boundary_element_pt(b, e);
8030 #ifdef OOMPH_HAS_MPI
8031  // Only work with nonhalo elements if the mesh is distributed
8032  if (!bulk_ele_pt->is_halo())
8033  {
8034 #endif
8035  // Get the face index
8036  int face_index = this->face_index_at_boundary(b, e);
8037  // Create the face element
8038  FiniteElement* face_ele_pt =
8039  new DummyFaceElement<ELEMENT>(bulk_ele_pt, face_index);
8040 
8041  // Get the number of nodes on the face element
8042  const unsigned n_nodes = face_ele_pt->nnode();
8043  for (unsigned i = 0; i < n_nodes; i++)
8044  {
8045  // Get the nodes in the face elements
8046  Node* tmp_node_pt = face_ele_pt->node_pt(i);
8047  // Add the nodes to the set of boundary nodes
8048  boundary_nodes_pt.insert(tmp_node_pt);
8049  } // for (i < n_nodes)
8050 
8051  // Free the memory allocated for the face element
8052  delete face_ele_pt;
8053  face_ele_pt = 0;
8054 #ifdef OOMPH_HAS_MPI
8055  } // if (!bulk_ele_pt->is_halo())
8056 #endif
8057 
8058  } // for (e < n_boundary_ele)
8059 
8060  outfile << "ZONE T=\"Boundary nodes" << b << "\"\n";
8061  // Set to store the boundary nodes in order
8062  std::set<Vector<double>> set_node_coord;
8063  // Loop over the nodes on the boundary and store them in the set
8064  for (std::set<Node*>::iterator it = boundary_nodes_pt.begin();
8065  it != boundary_nodes_pt.end();
8066  it++)
8067  {
8068  Node* inode_pt = (*it);
8069 
8070  // Get the node coordinates
8071  const unsigned n_dim = inode_pt->ndim();
8072  Vector<double> node_coord(n_dim + 1);
8073 
8074  // Get the boundary coordinate
8075  Vector<double> zeta(1);
8076  inode_pt->get_coordinates_on_boundary(b, zeta);
8077  node_coord[0] = zeta[0];
8078  for (unsigned j = 0; j < n_dim; j++)
8079  {
8080  node_coord[j + 1] = inode_pt->x(j);
8081  }
8082  set_node_coord.insert(node_coord);
8083  }
8084 
8085  for (std::set<Vector<double>>::iterator it = set_node_coord.begin();
8086  it != set_node_coord.end();
8087  it++)
8088  {
8089  // Get the node coordinates
8090  Vector<double> node_coord = (*it);
8091 
8092  // Output the node coordinates
8093  const unsigned n_dim = node_coord.size() - 1;
8094  for (unsigned j = 0; j < n_dim; j++)
8095  {
8096  outfile << node_coord[j + 1] << " ";
8097  }
8098  // ... add an extra coordinate to avoid error with tecplot
8099  outfile << "0.0" << std::endl;
8100  }
8101 
8102  // ... loop again to plot the bound coordinates
8103  outfile << "ZONE T=\"Boundary coordinates " << b << "\"\n";
8104  for (std::set<Vector<double>>::iterator it = set_node_coord.begin();
8105  it != set_node_coord.end();
8106  it++)
8107  {
8108  // Get the node coordinates
8109  Vector<double> node_coord = (*it);
8110 
8111  // Output the node coordinates
8112  const unsigned n_dim = node_coord.size() - 1;
8113  for (unsigned j = 0; j < n_dim; j++)
8114  {
8115  outfile << node_coord[j + 1] << " ";
8116  }
8117 
8118  // Output the boundary coordinate
8119  outfile << node_coord[0] << std::endl;
8120  }
8121  }
int face_index_at_boundary(const unsigned &b, const unsigned &e) const
Definition: mesh.h:896
unsigned nboundary_element(const unsigned &b) const
Return number of finite elements that are adjacent to boundary b.
Definition: mesh.h:878
FiniteElement * boundary_element_pt(const unsigned &b, const unsigned &e) const
Return pointer to e-th finite element on boundary b.
Definition: mesh.h:840
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
void set(Container &c, Position position, const Value &value)
Definition: stdlist_overload.cpp:36

References b, e(), oomph::Node::get_coordinates_on_boundary(), i, j, oomph::Node::ndim(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), set(), oomph::Node::x(), and Eigen::zeta().

◆ set_mesh_level_time_stepper()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::set_mesh_level_time_stepper ( TimeStepper *const &  time_stepper_pt,
const bool preserve_existing_data 
)
inlineprotectedvirtual

Overload set_mesh_level_time_stepper so that the stored time stepper now corresponds to the new timestepper

Reimplemented from oomph::Mesh.

893  {
894  this->Time_stepper_pt = time_stepper_pt;
895  }

References oomph::TriangleMesh< ELEMENT >::Time_stepper_pt.

Member Data Documentation

◆ Oomph_vertex_nodes_id

template<class ELEMENT >
Vector<unsigned> oomph::TriangleMesh< ELEMENT >::Oomph_vertex_nodes_id
protected

Vector storing oomph-lib node number for all vertex nodes in the TriangulateIO representation of the mesh

Referenced by oomph::TriangleMesh< ELEMENT >::oomph_vertex_nodes_id().

◆ Regions_areas

template<class ELEMENT >
std::map<unsigned, double> oomph::TriangleMesh< ELEMENT >::Regions_areas
protected

Target areas for regions; defaults to 0.0 which (luckily) implies "no specific target area" for triangle!

◆ Time_stepper_pt

template<class ELEMENT >
TimeStepper* oomph::TriangleMesh< ELEMENT >::Time_stepper_pt
protected

◆ Tmp_mesh_pt

template<class ELEMENT >
TriangleScaffoldMesh* oomph::TriangleMesh< ELEMENT >::Tmp_mesh_pt
protected

Temporary scaffold mesh.

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

◆ Use_attributes

template<class ELEMENT >
bool oomph::TriangleMesh< ELEMENT >::Use_attributes
protected

Boolean flag to indicate whether to use attributes or not (required for multidomain meshes)

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


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