29#include "atomicBlock/blockLattice3D.h"
30#include "atomicBlock/blockLattice3D.hh"
49 std::vector<HemoCellParticle>& part,
const std::vector<int>
cell);
52 std::vector<HemoCellParticle>& part,
const std::vector<int>
cell);
56 std::vector<HemoCellParticle> & part,
const std::vector<int>
cell);
63 template<
template<
typename U>
class Descriptor>
64 void findInnerNodes(plb::BlockLattice3D<T,Descriptor> * fluid, std::vector<HemoCellParticle> & particles,
const std::vector<int> &
cell, std::vector<plb::Cell<T,Descriptor>*> & innerNodes) {
68 bbox[0] = bbox[0] < fluid->getLocation().x ? fluid->getLocation().x : bbox[0];
69 bbox[1] = bbox[1] > fluid->getLocation().x + fluid->getNx()-1 ? fluid->getLocation().x + fluid->getNx()-1: bbox[1];
70 bbox[2] = bbox[2] < fluid->getLocation().y ? fluid->getLocation().y : bbox[2];
71 bbox[3] = bbox[3] > fluid->getLocation().y + fluid->getNy()-1 ? fluid->getLocation().y + fluid->getNy()-1: bbox[3];
72 bbox[4] = bbox[4] < fluid->getLocation().z ? fluid->getLocation().z : bbox[4];
73 bbox[5] = bbox[5] > fluid->getLocation().z + fluid->getNz()-1 ? fluid->getLocation().z + fluid->getNz()-1: bbox[5];
76 for (
int x = (
int)bbox[0]; x <= (int)bbox[1]+0.5; x++) {
77 for (
int y = (
int)bbox[2]; y <= (int)bbox[3]+0.5; y++) {
78 for (
int z = (
int)bbox[4]; z <= (int)bbox[5]+0.5; z++) {
79 int crossedCounter = 0;
82 std::vector<hemo::Array<plint,3>> triangles_list;
95 if (crossedCounter%2) {
96 int x_l = x-fluid->getLocation().x;
97 int y_l = y-fluid->getLocation().y;
98 int z_l = z-fluid->getLocation().z;
99 innerNodes.push_back(&fluid->get(x_l,y_l,z_l));
106 template<
template<
typename U>
class Descriptor>
107 void findInnerNodes(plb::BlockLattice3D<T,Descriptor> * fluid, std::vector<HemoCellParticle> & particles,
const std::vector<int> &
cell, std::set<
Array<plint,3>> & innerNodes) {
111 bbox[0] = bbox[0] < fluid->getLocation().x ? fluid->getLocation().x : bbox[0];
112 bbox[1] = bbox[1] > fluid->getLocation().x + fluid->getNx()-1 ? fluid->getLocation().x + fluid->getNx()-1: bbox[1];
113 bbox[2] = bbox[2] < fluid->getLocation().y ? fluid->getLocation().y : bbox[2];
114 bbox[3] = bbox[3] > fluid->getLocation().y + fluid->getNy()-1 ? fluid->getLocation().y + fluid->getNy()-1: bbox[3];
115 bbox[4] = bbox[4] < fluid->getLocation().z ? fluid->getLocation().z : bbox[4];
116 bbox[5] = bbox[5] > fluid->getLocation().z + fluid->getNz()-1 ? fluid->getLocation().z + fluid->getNz()-1: bbox[5];
119 for (
int x = (
int)bbox[0]; x <= (int)bbox[1]+0.5; x++) {
120 for (
int y = (
int)bbox[2]; y <= (int)bbox[3]+0.5; y++) {
121 for (
int z = (
int)bbox[4]; z <= (int)bbox[5]+0.5; z++) {
122 int crossedCounter = 0;
125 std::vector<hemo::Array<plint,3>> triangles_list;
138 if (crossedCounter%2) {
139 int x_l = x-fluid->getLocation().x;
140 int y_l = y-fluid->getLocation().y;
141 int z_l = z-fluid->getLocation().z;
142 innerNodes.insert({x_l,y_l,z_l});
hemo::Array< T, 6 > bBox
Definition octree.h:37
OctreeStructCell(plint divis, plint l, unsigned int lim, hemo::Array< double, 6 > bbox, std::vector< hemo::Array< plint, 3 > > triangle_list_, std::vector< HemoCellParticle > &part, const std::vector< int > cell)
void constructTree(std::vector< HemoCellParticle > &part, std::vector< int > cell, std::vector< hemo::Array< plint, 3 > > triangle_list_)
Definition octree.cpp:106
void findInnerNodes(plb::BlockLattice3D< T, Descriptor > *fluid, std::vector< HemoCellParticle > &particles, const std::vector< int > &cell, std::set< Array< plint, 3 > > &innerNodes)
Definition octree.h:107
OctreeStructCell(plint divis, plint l, unsigned int lim, std::vector< hemo::Array< plint, 3 > > triangle_list_, std::vector< HemoCellParticle > &part, const std::vector< int > cell)
plint limit
Definition octree.h:44
void findInnerNodes(plb::BlockLattice3D< T, Descriptor > *fluid, std::vector< HemoCellParticle > &particles, const std::vector< int > &cell, std::vector< plb::Cell< T, Descriptor > * > &innerNodes)
Definition octree.h:64
OctreeStructCell * nodes[8]
Definition octree.h:39
~OctreeStructCell()
Definition octree.cpp:83
bool finalNode
Definition octree.h:43
std::vector< hemo::Array< plint, 3 > > triangle_list
Definition octree.h:38
void findCrossings(hemo::Array< plint, 3 > latticeSite, std::vector< hemo::Array< plint, 3 > > &)
Definition octree.cpp:163
plint maxDivisions
Definition octree.h:41
plint level
Definition octree.h:42
int returnTrianglesAmount()
Definition octree.cpp:92
void sharedConstructor(plint divis, plint l, unsigned int lim, std::vector< hemo::Array< plint, 3 > > triangle_list_, std::vector< HemoCellParticle > &part, const std::vector< int > cell)
Definition octree.cpp:66
long int plint
Definition constant_defaults.h:127
int MollerTrumbore(const hemo::Array< T, 3 > &v0, const hemo::Array< T, 3 > &v1, const hemo::Array< T, 3 > &v2, hemo::Array< plint, 3 > &rayPoint)
Definition mollerTrumbore.h:30