本文整理汇总了C++中Traverse::construct_union_mesh方法的典型用法代码示例。如果您正苦于以下问题:C++ Traverse::construct_union_mesh方法的具体用法?C++ Traverse::construct_union_mesh怎么用?C++ Traverse::construct_union_mesh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Traverse
的用法示例。
在下文中一共展示了Traverse::construct_union_mesh方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void Filter::init() {
_F_
// construct the union mesh, if necessary
Mesh *meshes[4] = {
sln[0]->get_mesh(),
(num >= 2) ? sln[1]->get_mesh() : NULL,
(num >= 3) ? sln[2]->get_mesh() : NULL,
(num >= 4) ? sln[3]->get_mesh() : NULL
};
mesh = meshes[0];
unimesh = false;
// FIXME: better detection of same meshes
for (int i = 1; i < num; i++)
if (meshes[0] != meshes[1]) unimesh = true;
if (unimesh) {
Traverse trav;
trav.begin(num, meshes);
mesh = new Mesh;
MEM_CHECK(mesh);
unidata = trav.construct_union_mesh(mesh);
trav.finish();
}
refmap->set_mesh(mesh);
// misc init
num_components = 1;
memset(tables, 0, sizeof(tables));
memset(sln_sub, 0, sizeof(sln_sub));
}
示例2: memset
void Filter<Scalar>::init()
{
// construct the union mesh, if necessary
const Mesh* meshes[10];
for(int i = 0; i < this->num; i++)
meshes[i] = this->sln[i]->get_mesh();
this->mesh = meshes[0];
unimesh = false;
for (int i = 1; i < num; i++)
{
if(meshes[i] == NULL)
{
this->warn("You may be initializing a Filter with Solution that is missing a Mesh.");
throw Hermes::Exceptions::Exception("this->meshes[%d] is NULL in Filter<Scalar>::init().", i);
}
if(meshes[i]->get_seq() != this->mesh->get_seq())
{
unimesh = true;
break;
}
}
if(unimesh)
{
Traverse trav;
trav.begin(num, meshes);
this->mesh = new Mesh;
unidata = trav.construct_union_mesh(const_cast<Hermes2D::Mesh*>(this->mesh));
trav.finish();
}
// misc init
this->num_components = 1;
this->order = 0;
memset(sln_sub, 0, sizeof(sln_sub));
set_quad_2d(&g_quad_2d_std);
this->deleteSolutions = false;
}
示例3: init
void Filter::init()
{
// construct the union mesh, if necessary
Mesh* meshes[10];
for(int i = 0; i < this->num; i++)
meshes[i] = this->sln[i]->get_mesh();
mesh = meshes[0];
unimesh = false;
for (int i = 1; i < num; i++)
{
if (meshes[i] == NULL) {
warn("You may be initializing a Filter with Solution that is missing a Mesh.");
error("this->meshes[%d] is NULL in Filter::init().", i);
}
if (meshes[i]->get_seq() != mesh->get_seq())
{
unimesh = true;
break;
}
}
if (unimesh)
{
Traverse trav;
trav.begin(num, meshes);
mesh = new Mesh;
unidata = trav.construct_union_mesh(mesh);
trav.finish();
}
// misc init
num_components = 1;
order = 0;
for(int i = 0; i < 10; i++)
tables[i] = new LightArray<LightArray<Node*>*>;
memset(sln_sub, 0, sizeof(sln_sub));
set_quad_2d(&g_quad_2d_std);
}