octree.h

Go to the documentation of this file.
**Definition:** octree.h:365
**Definition:** octree.h:61
**Definition:** octree.h:321
**Definition:** octree.h:818
**Definition:** oomph_utilities.cc:107
**Definition:** octree.cc:866
**Definition:** octree.cc:3167
**Definition:** octree.cc:289
**Definition:** octree.h:106
**Definition:** octree.h:59
**Definition:** octree.h:337
**Definition:** octree.h:57
**Definition:** tree.h:102
**Definition:** octree.h:124
**Definition:** octree.cc:245
**Definition:** octree.h:58
**Definition:** octree.h:575
**Definition:** octree.h:530
**Definition:** octree.h:61
**Definition:** octree.h:56
**Definition:** oomph_utilities.h:515
**Definition:** octree.h:769
**Definition:** octree.h:59
**Definition:** octree.h:58
**Definition:** octree.cc:3416
**Definition:** octree.cc:3832
**Definition:** tree.h:303
**Definition:** octree.h:548
**Definition:** tree.h:385
**Definition:** octree.cc:2591
**Definition:** oomph_definitions.h:225
**Definition:** octree.h:56
**Definition:** octree.h:610
**Definition:** octree.h:332
**Definition:** octree.h:61
**Definition:** octree.h:56
**Definition:** octree.h:701
**Definition:** octree.h:58
**Definition:** octree.h:59
**Definition:** octree.h:534
**Definition:** octree.cc:604
**Definition:** octree.h:887
**Definition:** octree.h:327
**Definition:** octree.h:57
**Definition:** Vector.h:307
**Definition:** octree.h:400
**Definition:** octree.h:555
**Definition:** octree.h:324
**Definition:** octree.h:57
**Definition:** octree.h:523
**Definition:** octree.h:59
**Definition:** octree.cc:4356
**Definition:** octree.h:342
**Definition:** octree.cc:433
**Definition:** octree.cc:4099
**Definition:** octree.h:563
**Definition:** octree.h:61
**Definition:** octree.h:60
**Definition:** octree.h:636
**Definition:** octree.h:583
**Definition:** octree.h:385
**Definition:** octree.h:629
**Definition:** octree.cc:533
**Definition:** octree.h:318
**Definition:** octree.h:57
**Definition:** octree.h:394
**Definition:** octree.h:949
**Definition:** tree.h:311
**Definition:** octree.h:791
**Definition:** oomph_utilities.cc:90
**Definition:** octree.h:56
**Definition:** octree.h:519
**Definition:** octree.h:972
**Definition:** octree.cc:375
**Definition:** octree.cc:4022
**Definition:** oomph_definitions.cc:278
**Definition:** octree.h:942
**Definition:** octree.h:621
**Definition:** octree.h:99
**Definition:** tree.h:79
**Definition:** octree.h:60
**Definition:** octree.h:61
**Definition:** octree.h:726
**Definition:** octree.h:60
**Definition:** octree.h:603
**Definition:** octree.h:60
**Definition:** octree.h:826
**Definition:** octree.h:571
**Definition:** octree.cc:509
**Definition:** octree.h:527
**Definition:** octree.h:58
**Definition:** octree.h:590
**Definition:** octree.h:61
**Definition:** octree.h:918
**Definition:** octree.cc:476
**Definition:** octree.h:674
**Definition:** octree.h:62
**Definition:** octree.h:802

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 Vector< int > Reflect_face

Get opposite face, e.g. Reflect_face[L]=R.

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...

void broken_copy(const std::string &class_name)

Issue error message and terminate execution.

static void setup_static_data()

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

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

Find (pointer to) `greater-or-equal-sized face neighbour' in given direction (L/R/U/D/F/B). Another way of interpreting this is that we're looking for the neighbour across the present element's face 'direction'. The various arguments return additional information about the size and relative orientation of the neighbouring octree. To interpret these we use the following General convention:

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...

virtual ~OcTree()

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

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)...

RefineableElement * object_pt() const

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

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 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 DenseMatrix< double > S_base_edge

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

static Vector< std::string > Colour

Colours for neighbours in various directions.

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

int up_equivalent(TreeRoot *tree_root_pt)

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

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...

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_steplo

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

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...

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 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...

unsigned nedge_neighbour(const unsigned &edge_direction)

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

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 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 > Reflect_vertex

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

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

Get the angle between two vector.

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< int > Reflect_edge

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

static DenseMatrix< int > Reflect

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

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. Output into neighbours_file which can be viewed from tecplot with OcTreeNeighbours.mcr Neighbour info and errors are displayed on neighbours_txt_file. Finally, compute the max. error between vertices when viewed from neighhbouring element. If the two filestreams are closed, output is suppressed.

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 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...

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. Output into neighbours_file which can be viewed from tecplot with OcTreeNeighbours.mcr Neighbour info and errors are displayed on neighbours_txt_file. Finally, compute the max. error between vertices when viewed from neighhbouring element. If the two filestreams are closed, output is suppressed.

static DenseMatrix< double > S_directlo

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

OcTreeRoot(RefineableElement *const &object_pt)

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

static DenseMatrix< double > S_step_edge

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

OcTree(RefineableElement *const &object_pt)

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

std::map< TreeRoot *, int > Right_equivalent

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

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 Vector< std::string > Direct_string

Translate (enumerated) directions into strings.

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 ...

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...

std::map< int, TreeRoot * > Neighbour_pt

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

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 broken_assign(const std::string &class_name)

Issue error message and terminate execution.

static DenseMatrix< bool > Is_adjacent

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

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 ...

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

Return the vertex [LDB,RDB,...] of local (vertex) node n.

unsigned self_test()

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

std::string string(const unsigned &i)

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

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)...

std::map< TreeRoot *, int > Up_equivalent

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

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 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/...

static DenseMatrix< double > S_directhi

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

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 DenseMatrix< int > Common_face

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

static DenseMatrix< double > S_direct_edge

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

virtual ~OcTreeForest()

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

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...

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

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

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...