In the case of dkt2d, I added two rectangular solid regions and gave the overall rebound boundary conditions, but in the final calculation, why do particles still fall in, because the three rectangular regions overlap?
void prepareGeometry(UnitConverter<T,DESCRIPTOR> const& converter, //几何图形数据
SuperGeometry<T, 2>& superGeometry)
{
OstreamManager clout(std::cout, “prepareGeometry”);
clout << “Prepare Geometry …” << std::endl;
//superGeometry.rename(0, 2); //将超级几何体中的材料编号 0 重命名为 2。这可能是为了指定一种材料类型。
//superGeometry.rename(2, 1, {1, 1}); //将超级几何体中的材料编号 2 重命名为 1,只有边界既是{1,1}命名为材料2
//第一个建筑
std::vector<T> extend1(2, T());
extend1[0] = lengthX1;
extend1[1] = lengthY1;
std::vector<T> origin1(2, T()); //圆心
origin1[0] = 0.02;
origin1[1] = 0;
IndicatorCuboid2D<T> cuboid1(extend1, origin1); //创建长方体
//superGeometry.rename(1, 2,cuboid1);//命名2
//第二个建筑
std::vector<T> extend2(2, T());
extend2[0] = lengthX1;
extend2[1] = lengthY1;
std::vector<T> origin2(2, T()); //圆心
origin2[0] = 0.06;
origin2[1] = 0;
IndicatorCuboid2D<T> cuboid2(extend2, origin2); //创建长方体
superGeometry.rename( 0, 2); //将超级几何体中的材料编号 0 重命名为 2。这可能是为了指定一种材料类型。
superGeometry.rename( 2, 1, {1, 1}); //将超级几何体中的材料编号 2 重命名为 1,只有边界既是{1,1}命名为材料2
superGeometry.rename(1, 2, cuboid1); //命名2
superGeometry.rename(1, 2, cuboid2); //命名2
superGeometry.clean();
superGeometry.innerClean();
superGeometry.checkForErrors();
superGeometry.getStatistics().print();
clout << “Prepare Geometry … OK” << std::endl;
}