52#include "BoundaryConditions.h"
134 if (bcArray->isFluid(ix1, ix2, ix3)) {
136 bcArray->setSolid(ix1, ix2, ix3);
143 if (bcArray->isFluid(ix1, ix2, ix3)) {
145 bcArray->setSolid(ix1, ix2, ix3);
163 if (!this->
grid.lock())
179 <<
"WARNING - D3Q27TriFaceMeshInteractor::initInteractor Warning - no nodeAdapter available for "
228 std::vector<real>
distNeigh(d3q27_system::FENDDIR + 1, 0.0);
232 for (
int fdir = d3q27_system::FSTARTDIR;
fdir <= d3q27_system::FENDDIR;
fdir++) {
252 std::vector<GbTriFaceMesh3D::TriFace> &triangles = *mesh->
getTriangles();
253 std::vector<GbTriFaceMesh3D::Vertex> &nodes = *mesh->
getNodes();
261 UBLOG(
logDEBUG3,
" - setQs for " << (
int)triangles.size() <<
" triangles");
266 for (
size_t t = 0;
t < triangles.size();
t++) {
296 double minX1 =
triangle.getMinX(nodes);
297 double maxX1 =
triangle.getMaxX(nodes);
298 double minX2 =
triangle.getMinY(nodes);
299 double maxX2 =
triangle.getMaxY(nodes);
300 double minX3 =
triangle.getMinZ(nodes);
301 double maxX3 =
triangle.getMaxZ(nodes);
306 double e1x1,
e1x2,
e1x3,
e2x1,
e2x2,
e2x3,
px1,
px2,
px3, a, f,
sx1,
sx2,
sx3,
u,
qx1,
qx2,
qx3, v;
396 if (
bcMatrix->isSolid(ix1, ix2, ix3) ||
bcMatrix->isUndefined(ix1, ix2, ix3)) {
448 for (
int fdir = d3q27_system::FSTARTDIR;
fdir <= d3q27_system::FENDDIR;
fdir++) {
456 if (
fabs(a) < 1.E-10)
472 if (v < -1.E-10 || (
u + v) > c1o1 + 1.E-10)
525 bc =
bcMatrix->getBC(ix1, ix2, ix3);
543 bc->setBoundaryVelocityX1(
vx1);
544 bc->setBoundaryVelocityX2(
vx2);
545 bc->setBoundaryVelocityX3(
vx3);
547 for (
int index = (
int)this->
BCs.size() - 1; index >= 0; --index)
554 d3q27_system::FENDDIR + 1 + 3, -1.0f);
567 std::vector<int>
p(3);
573 for (
int index = (
int)this->
BCs.size() - 1; index >= 0; --index)
606 UBLOG(
logDEBUG1,
"D3Q27TriFaceMeshInteractor::refineBlockGridToLevel - start");
622 std::vector<GbTriFaceMesh3D::TriFace> &triangles = *mesh.
getTriangles();
623 std::vector<GbTriFaceMesh3D::Vertex> &nodes = *mesh.
getNodes();
625 double minX1, minX2, minX3, maxX1, maxX2, maxX3;
695 if (block->getLevel() >= level)
728 if (
true &&
flag != 255) {
775 bgrid->expandBlock(block->getX1(), block->getX2(), block->getX3(), block->getLevel());
787 const short &
zs,
const FLAGS &type)
811 const short &
zs,
const FLAGS &type)
813 std::stack<UbTupleInt3>
stck;
818 while (!
stck.empty()) {
849 ss <<
"D3Q27TriFaceMeshInteractor[label=D3Q27TriFaceMeshInteractor";
853 ss <<
", inversesolid";
855 ss <<
", timedependent";
857 ss <<
", D3Q27TriFaceMeshInteractor: " <<
geoObject3D->toString();
874 std::map<SPtr<Block3D>, std::set<UbTupleInt3>>::iterator
it1;
888 std::map<SPtr<Block3D>, std::map<UbTupleInt3, std::vector<float>>>::iterator
it;
894 std::map<UbTupleInt3, std::vector<float>>::iterator
it2;
895 for (
it2 =
it->second.begin();
it2 !=
it->second.end(); ++
it2) {
897 std::vector<float> qs =
it2->second;
909 double x1w = qs[d3q27_system::FENDDIR + 1 + 0];
910 double x2w = qs[d3q27_system::FENDDIR + 1 + 1];
911 double x3w = qs[d3q27_system::FENDDIR + 1 + 2];
917 bc->setBoundaryVelocityX1(c0o1);
918 bc->setBoundaryVelocityX2(c0o1);
919 bc->setBoundaryVelocityX3(c0o1);
923 for (
int fdir = d3q27_system::FSTARTDIR;
fdir <= d3q27_system::FENDDIR;
fdir++) {
926 for (
size_t index = 0; index < this->
BCs.size(); index++)
932 for (
size_t index = 0; index < this->
BCs.size(); index++)
Abstract class of baundary conditions adapter.
Definition of boundary conditions in grid generation.
A specialized class for grid generation.
real rayX3[d3q27_system::FENDDIR+1]
std::vector< SPtr< BC > > BCs
SolidNodeIndicesMap solidNodeIndicesMap
BcNodeIndicesMap bcNodeIndicesMap
real rayX2[d3q27_system::FENDDIR+1]
real rayX1[d3q27_system::FENDDIR+1]
bool reinitWithStoredQsFlag
std::map< SPtr< Block3D >, std::map< UbTupleInt3, std::vector< float > > > bcNodeIndicesAndQsMap
This Class provides basic 3D box objects.
This Class provides basic 3D vector objects.
SPtr< GbObject3D > geoObject3D
std::vector< SPtr< Block3D > > solidBlocks
virtual std::vector< SPtr< Block3D > > & getSolidBlockSet()
void unsetTimeDependent()
std::shared_ptr< T > SPtr
void initInteractor(const real &timeStep=0) override
bool setDifferencesToGbObject3D(const SPtr< Block3D > block) override
void iterativeGridFill(CbArray3D< FLAGS > &flagfield, const short &xs, const short &ys, const short &zs, const FLAGS &type)
void refineBlockGridToLevel(int level, real startDistance, real stopDistance)
virtual std::string toString()
void reinitWithStoredQs(const real &timeStep)
void updateInteractor(const real ×tep=0) override
void recursiveGridFill(CbArray3D< FLAGS > &flagfield, const short &xs, const short &ys, const short &zs, const FLAGS &type)
~D3Q27TriFaceMeshInteractor() override
void updateMovedGeometry(const real &timeStep=0)
void updateInteractor(const real ×tep=0) override
D3Q27TriFaceMeshInteractor()
void setQs(const real &timeStep)
std::vector< Vertex > * getNodes()
std::vector< TriFace > * getTriangles()
#define UBLOG(level, logtext)
UbTuple< int, int, int > UbTupleInt3
#define UBLOGML(level, multiline)
int integerRounding(const T &value)
bool lessEqual(const T1 &value, const T2 &reference)
bool equal(const T1 &value, const T2 &reference)
const T & max(const T &a1, const T &a2)
bool greater(const T1 &value, const T2 &reference)
bool inClosedInterval(const T1 &value, const T2 &threshold1, const T3 &threshold2)
bool zero(const T &value)
bool less(const T1 &value, const T2 &reference)