www.mooseframework.org
EFAFragment2D.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "EFAFragment.h"
13 
14 #include <limits>
15 
16 class EFAEdge;
17 class EFAFace;
18 class EFAElement2D;
19 
20 class EFAFragment2D : public EFAFragment
21 {
22 public:
24  bool create_boundary_edges,
25  const EFAElement2D * from_host,
26  unsigned int frag_id = std::numeric_limits<unsigned int>::max());
27  EFAFragment2D(EFAElement2D * host, const EFAFace * from_face);
29 
30 private:
32  std::vector<EFAEdge *> _boundary_edges;
33 
34 public:
35  // override pure virtual methods
36  virtual void switchNode(EFANode * new_node, EFANode * old_node);
37  virtual bool containsNode(EFANode * node) const;
38  virtual unsigned int getNumCuts() const;
39  virtual unsigned int getNumCutNodes() const;
40  virtual std::set<EFANode *> getAllNodes() const;
41  virtual bool isConnected(EFAFragment * other_fragment) const;
42  virtual void removeInvalidEmbeddedNodes(std::map<unsigned int, EFANode *> & EmbeddedNodes);
43 
44  // EFAfragment2D specific methods
45  void combineTipEdges();
46  bool isEdgeInterior(unsigned int edge_id) const;
47  std::vector<unsigned int> getInteriorEdgeID() const;
48  bool isSecondaryInteriorEdge(unsigned int edge_id) const;
49  unsigned int numEdges() const;
50  EFAEdge * getEdge(unsigned int edge_id) const;
51  void addEdge(EFAEdge * new_edge);
52  std::set<EFANode *> getEdgeNodes(unsigned int edge_id) const;
53  EFAElement2D * getHostElement() const;
54  std::vector<EFAFragment2D *> split();
55 };
virtual unsigned int getNumCuts() const
Definition: EFAFragment2D.C:88
void combineTipEdges()
EFAElement2D * getHostElement() const
bool isSecondaryInteriorEdge(unsigned int edge_id) const
std::set< EFANode * > getEdgeNodes(unsigned int edge_id) const
unsigned int numEdges() const
void addEdge(EFAEdge *new_edge)
bool isEdgeInterior(unsigned int edge_id) const
std::vector< unsigned int > getInteriorEdgeID() const
std::vector< EFAFragment2D * > split()
virtual std::set< EFANode * > getAllNodes() const
virtual unsigned int getNumCutNodes() const
virtual bool isConnected(EFAFragment *other_fragment) const
std::vector< EFAEdge * > _boundary_edges
Definition: EFAFragment2D.h:32
virtual void removeInvalidEmbeddedNodes(std::map< unsigned int, EFANode *> &EmbeddedNodes)
virtual void switchNode(EFANode *new_node, EFANode *old_node)
Definition: EFAFragment2D.C:66
EFAEdge * getEdge(unsigned int edge_id) const
EFAFragment2D(EFAElement2D *host, bool create_boundary_edges, const EFAElement2D *from_host, unsigned int frag_id=std::numeric_limits< unsigned int >::max())
Definition: EFAFragment2D.C:21
EFAElement2D * _host_elem
Definition: EFAFragment2D.h:31
virtual bool containsNode(EFANode *node) const
Definition: EFAFragment2D.C:73