Sear Walter,

Indeed, good idea. This has been merged, but with a different implementation 
for the Netgen interface, directly calling the overall mesh size evaluation.

Let me know if it behaves as expected.

Christophe

> On 20 Sep 2020, at 17:37, walter steffe <walter.steffe...@gmail.com> wrote:
> 
> In order to better support my application (see 
> hierarchical-electromagnetics.com) I made the following small changes to gmsh 
> sources (version 4.6.0):
> 
> 1) File GRegion.h : Added a "double meshSize" field into the 
> "GRegion:meshAttributes"
> 
>  class GRegion : public GEntity {
>   ........
>   struct {    ......
>    double meshSize;
>   } meshAttributes;
>   ...
>  }
> 
> 
> 2) File GRegion.cpp: added "meshAttributes.meshSize = MAX_LC;" into the 
> function "void GRegion::resetMeshAttributes()"
> 
> void GRegion::resetMeshAttributes()
> {
>   ...
>   meshAttributes.QuadTri = NO_QUADTRI;
>   meshAttributes.meshSize = MAX_LC;
> }
> 
> 3) File meshGRegionNetgen.cpp: changed following lines:
> 
>   line 320:
>     --  Ng_GenerateVolumeMesh(ngmesh, CTX::instance()->mesh.lcMax);
>     ++  Ng_GenerateVolumeMesh(ngmesh, std::min(gr->meshAttributes.meshSize, 
> CTX::instance()->mesh.lcMax));
>   line 345:
>     --  Ng_OptimizeVolumeMesh(ngmesh, CTX::instance()->mesh.lcMax);
>     ++  Ng_GenerateVolumeMesh(ngmesh, std::min(gr->meshAttributes.meshSize, 
> CTX::instance()->mesh.lcMax));
> 
> 
> 
> 
> I would like to ask, if possible, to accept these changes in the official 
> gmsh sources.
> 
> The motivation is that, in an electromagnetic simulation, the mesh size need 
> to be more refined in regions where the dielectric permittivity is high.
> The mesh refinemnet applied on the boundary of these regions may not be 
> sufficient because the mesh size of tetrahedrons which are distant from the 
> boundary is
> defined by the global lcMax.
> 
> 
> Thanks
> Walter
> 
> 
> 
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




_______________________________________________
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh

Reply via email to