9#include <Eigen/Eigenvalues>
22 if (
nodes.size() != 8) {
28 Vector3d v1 =
nodes[1]->getCoordinates() -
nodes[0]->getCoordinates();
29 Vector3d v2 =
nodes[2]->getCoordinates() -
nodes[0]->getCoordinates();
30 Vector3d v3 =
nodes[4]->getCoordinates() -
nodes[0]->getCoordinates();
33 volume = std::abs(v1.cross(v2).dot(v3));
36 this->
id =
nodes[0]->getId();
double getVolume() const
Definition Cell.h:39
int id
Definition Cell.h:47
Cell()
Definition Cell.h:18
double volume
Definition Cell.h:46
std::vector< Node * > nodes
Definition Cell.h:45
void setNodes(const std::vector< Node * > &nodes)
Definition Cell.h:42
void computeVolume()
Definition Cell.h:20
int getId() const
Definition Cell.h:40
std::vector< Node * > getNodes() const
Definition Cell.h:41