octree.h

Go to the documentation of this file.
**Definition:** oomph_utilities.h:499
**Definition:** octree.h:928
**Definition:** octree.h:1002
**Definition:** octree.h:982
**Definition:** octree.h:973
**Definition:** octree.h:950
**Definition:** octree.h:611
**Definition:** octree.h:627
**Definition:** octree.h:790
**Definition:** octree.h:641
**Definition:** octree.h:814
**Definition:** octree.h:635
**Definition:** octree.h:779
**Definition:** octree.h:716
**Definition:** octree.h:757
**Definition:** octree.h:806
**Definition:** octree.h:668
**Definition:** octree.h:693
**Definition:** octree.h:616
**Definition:** octree.h:593
**Definition:** octree.h:540
**Definition:** octree.h:544
**Definition:** octree.h:581
**Definition:** octree.h:529
**Definition:** octree.cc:750
**Definition:** octree.cc:268
**Definition:** octree.h:395
**Definition:** octree.h:329
**Definition:** octree.h:573
**Definition:** octree.h:129
**Definition:** octree.cc:491
**Definition:** octree.cc:687
**Definition:** octree.h:537
**Definition:** octree.h:118
**Definition:** octree.cc:1040
**Definition:** octree.cc:4200
**Definition:** octree.cc:3373
**Definition:** octree.cc:232
**Definition:** octree.cc:4552
**Definition:** octree.h:377
**Definition:** octree.h:585
**Definition:** octree.h:533
**Definition:** octree.cc:565
**Definition:** octree.cc:3618
**Definition:** octree.cc:2769
**Definition:** octree.cc:4015
**Definition:** octree.h:600
**Definition:** octree.h:338
**Definition:** octree.h:343
**Definition:** octree.cc:609
**Definition:** octree.cc:664
**Definition:** octree.h:412
**Definition:** octree.h:565
**Definition:** octree.h:353
**Definition:** octree.h:335
**Definition:** octree.h:348
**Definition:** octree.h:558
**Definition:** octree.cc:414
**Definition:** octree.h:404
**Definition:** octree.cc:4275
**Definition:** oomph_definitions.h:222
**Definition:** refineable_elements.h:97
**Definition:** tree.h:409
**Definition:** tree.h:324
**Definition:** tree.h:330
**Definition:** tree.h:74
**Definition:** tree.h:88
**Definition:** oomph_definitions.cc:286
**Definition:** Vector.h:309
**Definition:** advection_diffusion_elements.cc:30

76 };

Information for documentation of results: Directory and file number to enable output in the form RESL...

/////////////////////////////////////////////////////////////////////// /////////////////////////////...

OcTreeForest(const OcTreeForest &dummy)=delete

Broken copy constructor.

Vector< TreeRoot * > oc_edge_neigh_pt(const unsigned &i, const int &direction)

Given the number i of the root octree in this forest, return the vector of pointers to the true edge ...

OcTreeRoot * oc_face_neigh_pt(const unsigned &i, const int &direction)

Given the number i of the root octree in this forest, return pointer to its face neighbour in the spe...

OcTreeRoot * octree_pt(const unsigned &i) const

Return pointer to i-th OcTree in forest (Performs a dynamic cast from the TreeRoot to a OcTreeRoot).

virtual ~OcTreeForest()

Destructor: Delete the constituent octrees (and thus the associated objects!)

void operator=(const OcTreeForest &)=delete

Broken assignment operator.

OcTreeRoot is a OcTree that forms the root of a (recursive) octree. The "root node" is special as it ...

std::map< TreeRoot *, int > Up_equivalent

Map giving the Up equivalent of the neighbour specified by pointer: When viewed from the current octr...

int right_equivalent(TreeRoot *tree_root_pt)

The same thing as up_equivalent, but for the right direction: When viewed from the current octree nei...

OcTreeRoot(RefineableElement *const &object_pt)

Constructor for the root octree: Pass pointer to the RefineableQElement<3> that is represented by the...

int direction_of_neighbour(TreeRoot *octree_root_pt)

If octree_root_pt is a neighbour, return the direction [faces L/R/F/B/U/D or edges DB/UP/....

std::map< TreeRoot *, int > Right_equivalent

Map giving the Right equivalent of the neighbour specified by pointer: When viewed from the current o...

void set_up_equivalent(TreeRoot *tree_root_pt, const int &dir)

Set up equivalent of the neighbours specified by pointer: When viewed from the current octree's neigh...

void add_edge_neighbour_pt(TreeRoot *oc_tree_root_pt, const unsigned &edge_direction)

Add pointer to the edge-neighbouring [Oc]TreeRoot in the (enumerated) (edge) direction – maintains un...

int up_equivalent(TreeRoot *tree_root_pt)

Return up equivalent of the neighbours specified by pointer: When viewed from the current octree's ne...

void set_right_equivalent(TreeRoot *tree_root_pt, const int &dir)

The same thing as up_equivalent, but for the right direction: When viewed from the current octree nei...

Vector< TreeRoot * > edge_neighbour_pt(const unsigned &edge_direction)

Return vector of pointers to the edge-neighbouring TreeRoots in the (enumerated) (edge) direction.

unsigned nedge_neighbour(const unsigned &edge_direction)

Return number of edge-neighbouring OcTreeRoot in the (enumerated) (edge) direction.

std::map< int, Vector< TreeRoot * > > Edge_neighbour_pt

Map of pointers to the edge-neighbouring [Oc]TreeRoots: Edge_neighbour_pt[direction] is Vector to the...

static DenseMatrix< double > S_step_edge

Each edge of the RefineableQElement<3> that is represented by the octree is parametrised by one (of t...

static Vector< std::string > Colour

Colours for neighbours in various directions.

static DenseMatrix< double > S_base

s_base(i,direction): Initial value for coordinate s[i] on the face indicated by direction (L/R/U/D/F/...

static DenseMatrix< double > S_directhi

Relative to the left/down/back vertex in any (father) octree, the corresponding vertex in the son spe...

static DenseMatrix< bool > Is_adjacent

Array of direction/octant adjacency scheme: Is_adjacent(direction,octant): Is face/edge direction adj...

static Vector< int > rotate(const int &new_up, const int &new_right, const Vector< int > &dir)

If U[p] becomes new_up and R[ight] becomes new_right then the direction vector dir becomes rotate(new...

static Vector< int > faces_of_common_edge(const int &edge)

Function that, given an edge, returns the two faces on which it.

OcTree(RefineableElement *const &object_pt)

Constructor for empty (root) tree: no father, no sons; just pass a pointer to its object (a Refineabl...

static Vector< std::string > Direct_string

Translate (enumerated) directions into strings.

static DenseMatrix< double > S_directlo

Relative to the left/down/back vertex in any (father) octree, the corresponding vertex in the son spe...

Tree * construct_son(RefineableElement *const &object_pt, Tree *const &father_pt, const int &son_type)

Overload the function construct_son to ensure that the son is a specific OcTree and not a general Tre...

static int node_number_to_vertex(const unsigned &n, const unsigned &nnode1d)

Return the vertex [LDB,RDB,...] of local (vertex) node n in an element with nnode1d nodes in each coo...

static void mult_mat_vect(const DenseMatrix< int > &mat, const Vector< int > &vect1, Vector< int > &vect2)

Helper function: Performs the operation : vect2 = mat*vect1.

static DenseMatrix< int > Common_face

Determine common face of edges or octants. Slightly bizarre lookup scheme from Samet's book.

virtual ~OcTree()

Destructor. Note: Deleting a octree also deletes the objects associated with all non-leaf nodes!

static void setup_static_data()

Setup the static data, rotation and reflection schemes, etc.

unsigned self_test()

Self-test: Check all neighbours. Return success (0) if the max. distance between corresponding points...

OcTree * gteq_face_neighbour(const int &direction, Vector< unsigned > &translate_s, Vector< double > &s_sw, Vector< double > &s_ne, int &face, int &diff_level, bool &in_neighbouring_tree) const

Find (pointer to) ‘greater-or-equal-sized face neighbour’ in given direction (L/R/U/D/F/B)....

static Vector< int > vertex_node_to_vector(const unsigned &n, const unsigned &nnode1d)

Returns the vector of the coordinate directions of vertex node number n in an element with nnode1d el...

static void doc_true_edge_neighbours(Vector< Tree * > forest_nodes_pt, std::ofstream &neighbours_file, std::ofstream &no_true_edge_file, std::ofstream &neighbours_txt_file, double &max_error)

Doc/check all true edge neighbours of octree (nodes) contained in the Vector forest_node_pt....

static std::map< std::pair< std::pair< int, int >, std::pair< int, int > >, std::pair< int, int > > Up_and_right_equivalent_for_pairs_of_vertices

Storage for the up/right-equivalents corresponding to two pairs of vertices along an element edge:

static DenseMatrix< double > S_base_edge

S_base_edge(i,edge): Initial value for coordinate s[i] on the specified edge (LF/RF/....

static DenseMatrix< int > Reflect

Reflection scheme: Reflect(direction,octant): Get mirror of octant/edge in specified direction....

static int get_the_other_face(const unsigned &n1, const unsigned &n2, const unsigned &nnode1d, const int &face)

If an edge is bordered by the nodes whose local numbers are n1 and n2 in an element with nnode1d node...

OcTree * gteq_true_edge_neighbour(const int &direction, const unsigned &i_root_edge_neighbour, unsigned &nroot_edge_neighbour, Vector< unsigned > &translate_s, Vector< double > &s_lo, Vector< double > &s_hi, int &edge, int &diff_level) const

Find (pointer to) ‘greater-or-equal-sized true edge neighbour’ in the given direction (LB,...

bool edge_neighbour_is_face_neighbour(const int &edge, OcTree *edge_neighb_pt) const

Is the edge neighbour (for edge "edge") specified via the pointer also a face neighbour for one of th...

OcTree * gteq_edge_neighbour(const int &direction, const unsigned &i_root_edge_neighbour, unsigned &nroot_edge_neighbour, double &s_diff, int &diff_level, int max_level, OcTreeRoot *orig_root_pt) const

Find ‘greater-or-equal-sized edge neighbour’ in given direction (LB,RB,DB,UB [the back edges],...

static DenseMatrix< double > S_direct_edge

Relative to the left/down/back vertex in any (father) octree, the corresponding vertex in the son spe...

static Vector< int > Reflect_vertex

Get opposite vertex, e.g. Reflect_vertex[LDB]=RUF.

static Vector< Vector< int > > Vertex_at_end_of_edge

Vector of vectors containing the two vertices for each edge, e.g. Vertex_at_end_of_edge[LU][0]=LUB an...

static void construct_rotation_matrix(int &axis, int &angle, DenseMatrix< int > &mat)

This constructs the rotation matrix of the rotation around the axis axis with an angle of angle*90.

static void mult_mat_mat(const DenseMatrix< int > &mat1, const DenseMatrix< int > &mat2, DenseMatrix< int > &mat3)

Helper function: Performs the operation : mat3=mat1*mat2.

static bool Static_data_has_been_setup

Bool indicating that static member data has been setup.

static DenseMatrix< double > S_stephi

If we're located on face face [L/R/F/B/U/D], then an increase in s_hi from -1 to +1 corresponds to a ...

static Vector< Vector< int > > Direction_to_vector

For each direction, i.e. a son_type (vertex), a face or an edge, this defines a vector that indicates...

static Vector< int > Reflect_edge

Get opposite edge, e.g. Reflect_edge[DB]=UF.

static std::map< Vector< int >, int > Vector_to_direction

Each vector representing a direction can be translated into a direction, either a son type (vertex),...

static DenseMatrix< double > S_steplo

Each face of the RefineableQElement<3> that is represented by the octree is parametrised by two (of t...

static unsigned vertex_to_node_number(const int &vertex, const unsigned &nnode1d)

Return the local node number of given vertex [LDB,RDB,...] in an element with nnode1d nodes in each c...

OcTree(RefineableElement *const &object_pt, Tree *const &father_pt, const int &son_type)

Constructor for tree that has a father: Pass it the pointer to its object, the pointer to its father ...

static void doc_face_neighbours(Vector< Tree * > forest_nodes_pt, std::ofstream &neighbours_file, std::ofstream &neighbours_txt_file, double &max_error)

Doc/check all face neighbours of octree (nodes) contained in the Vector forest_node_pt....

An OomphLibError object which should be thrown when an run-time error is encountered....

RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...

A TreeForest consists of a collection of TreeRoots. Each member tree can have neighbours in various e...

TreeRoot is a Tree that forms the root of a (recursive) tree. The "root node" is special as it holds ...

std::map< int, TreeRoot * > Neighbour_pt

Map of pointers to the neighbouring TreeRoots: Neighbour_pt[direction] returns the pointer to the Tre...

A generalised tree base class that abstracts the common functionality between the quad- and octrees u...

RefineableElement * object_pt() const

Return the pointer to the object (RefineableElement) represented by the tree.

std::string string(const unsigned &i)

Return the i-th string or "" if the relevant string hasn't been defined.

double angle(const Vector< double > &a, const Vector< double > &b)

Get the angle between two vector.

//////////////////////////////////////////////////////////////////// ////////////////////////////////...