本文整理汇总了C++中Mesh::AddLockedPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ Mesh::AddLockedPoint方法的具体用法?C++ Mesh::AddLockedPoint怎么用?C++ Mesh::AddLockedPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mesh
的用法示例。
在下文中一共展示了Mesh::AddLockedPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GenerateBoundaryLayer
//.........这里部分代码省略.........
el.SetIndex(1);
el.Invert();
mesh.AddVolumeElement(el);
numprisms++;
}
}
// Finally switch the point indices of the surface elements
// to the newly added ones
cout << "Transferring boundary layer surface elements to new vertex references...." << endl;
for (i = 1; i <= nse; i++)
{
Element2d & sel = mesh.SurfaceElement(i);
if(surfid.Contains(sel.GetIndex()))
{
for (j = 1; j <= sel.GetNP(); j++)
{
// Check (Doublecheck) if the corresponding point has a
// copy available for remapping
if (mapto.Get(sel.PNum(j)))
{
// Map the surface elements to the new points
sel.PNum(j) = mapto.Get(sel.PNum(j));
}
}
}
}
// Lock all the prism points so that the rest of the mesh can be
// optimised without invalidating the entire mesh
for (PointIndex pi = mesh.Points().Begin(); pi < mesh.Points().End(); pi++)
{
if(bndnodes.Test(i)) mesh.AddLockedPoint(pi);
}
// Now, actually pull back the old surface points to create
// the actual boundary layers
cout << "Moving and optimising boundary layer points...." << endl;
for (i = 1; i <= np; i++)
{
Array<ElementIndex> vertelems;
if(bndnodes.Test(i))
{
MeshPoint pointtomove;
pointtomove = mesh.Point(i);
if(layer == prismlayers)
{
mesh.Point(i).SetPoint(pointtomove + layerht * growthvectors.Elem(i));
meshtopo.GetVertexElements(i,vertelems);
for(j = 1; j <= vertelems.Size(); j++)
{
// double sfact = 0.9;
Element volel = mesh.VolumeElement(vertelems.Elem(j));
if(((volel.GetType() == TET) || (volel.GetType() == TET10)) && (!volel.IsDeleted()))
{
//while((volel.Volume(mesh.Points()) <= 0.0) && (sfact >= 0.0))
//{
// mesh.Point(i).SetPoint(pointtomove + (sfact * layerht * growthvectors.Elem(i)));
// mesh.ImproveMesh();