Skip to content

Commit

Permalink
fix initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
lroberts36 committed Jul 10, 2024
1 parent 1398a5c commit a2c89bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/mesh/forest/forest_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace forest {
class Face;
class Node {
public:
Node(int id_in, std::array<Real, NDIM> pos) : id(id_in), x(pos) {}
Node(int id_in, std::array<Real, NDIM> pos) : id(id_in), x(pos), associated_faces{} {}

static std::shared_ptr<Node> create(int id, std::array<Real, NDIM> pos) {
return std::make_shared<Node>(id, pos);
Expand Down
8 changes: 1 addition & 7 deletions src/mesh/forest/forest_topology.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,9 @@ class Edge {
Edge(sptr_vec_t<Node, 2> nodes_in, const CellCentOffsets &ploc)
: nodes{nodes_in}, loc{ploc} {
PARTHENON_REQUIRE(loc->IsEdge(), "Trying to pass a non-edge location to an edge.");
auto dirs = loc->GetTangentDirections();
dir = dirs[0];
auto ndirs = loc->GetNormals();
normals = {ndirs[0], ndirs[1]};
}

sptr_vec_t<Node, 2> nodes;
CoordinateDirection dir;
std::array<std::pair<CoordinateDirection, Offset>, 2> normals;
std::optional<CellCentOffsets> loc{};

int RelativeOrientation(const Edge &e2) const {
Expand Down Expand Up @@ -116,7 +110,7 @@ class Face : public std::enable_shared_from_this<Face> {

std::shared_ptr<Face> getptr() { return shared_from_this(); }

std::int64_t my_id;
std::int64_t my_id{-1};

sptr_vec_t<Node, 4> nodes;
std::unordered_map<std::shared_ptr<Node>, int> face_index;
Expand Down

0 comments on commit a2c89bf

Please sign in to comment.