sandialabs / omega_h

Simplex mesh adaptivity for HPC
Other
114 stars 53 forks source link

Add optional anisotropic scaling parameter upon reading the input mesh file #326

Open smelchio opened 5 years ago

smelchio commented 5 years ago

In our projects, we are implementing the scaling in the following way:

auto& coords = mesh.coords();
mesh.set_coords(osh::deep_copy(coords)*scale);
coords = mesh.coords();

but it would be nicer to have directly auto mesh = gmsh::read(filename.c_str(), library.world(), anisotropic_scale) where in the isotropic case anisotropic_scale = Few<Real, 3>(scale)

ibaned commented 4 years ago

From a design perspective, I don't think this belongs in the mesh reading API. There should be a separate helper function scale(Mesh*, Few<Real, 3>).