[Gmsh] Apply background mesh to a portion of the geometry

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Nov 20 18:32:52 CET 2007


Hi - these should be fixed.

Thanks,

Ch.

Guangran Kevin Zhu wrote:
> Hi Mr.  Geuzaine,
> 
> Thank you for the response. I tried out the tar ball of the nightly build, but it does not appear clean. The following is the dump of "make". It looks for FourierModel/FM_Patch.h. I do  not know which package this  file belongs. Also, do you mind creating the tar ball without opencascade, whose installation is too big for my machine?
> 
> I am using finite element method to solve an eletromagnetic scatterring problem. The interior region is generated from a background mesh and the exterior will be the perfectly matched layer and does not have a background mesh. That's  how I run into this problem.
> 
> 
> Kevin
> 
> P.s. There are a couple of minor mistake in the makefile under Geo, Numeric, and Mesh directories, in which the path to gsl is set to  "/sw/include/gsl/...", (being machine dependent.).
> 
> 
> kzhu at kbt-symmetry:~/devcode/gmsh-2.1.0-nightly-20071112$ make
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Common'
> make[1]: `../lib/libGmshCommon.a' is up to date.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Common'
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/DataStr'
> make[1]: `../lib/libGmshDataStr.a' is up to date.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/DataStr'
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Geo'
> make[1]: *** No rule to make target `/usr/local/opencascade//inc/config.h', needed by `OCCVertex.o'.  Stop.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Geo'
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Mesh'
> make[1]: `../lib/libGmshMesh.a' is up to date.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Mesh'
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Post'
> make[1]: `../lib/libGmshPost.a' is up to date.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Post'
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Numeric'
> make[1]: `../lib/libGmshNumeric.a' is up to date.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Numeric'
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Parallel'
> make[1]: `../lib/libGmshParallel.a' is up to date.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Parallel'
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Parser'
> make[1]: `../lib/libGmshParser.a' is up to date.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Parser'
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Plugin'
> make[1]: `../lib/libGmshPlugin.a' is up to date.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Plugin'
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Graphics'
> make[1]: `../lib/libGmshGraphics.a' is up to date.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Graphics'
> make[1]: Entering directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Fltk'
> make[1]: *** No rule to make target `/Users/remacle/SOURCES/FourierModel/FM_Patch.h', needed by `GUI_Projection.o'.  Stop.
> make[1]: Leaving directory `/home/kzhu/devcode/gmsh-2.1.0-nightly-20071112/Fltk'
> make: *** [compile] Error 2
> kzhu at kbt-symmetry:~/devcode/gmsh-2.1.0-nightly-20071112$ 
> 
> 
> 
> On Nov 9, 2007 9:38 AM, Christophe Geuzaine <cgeuzaine at ulg.ac.be> wrote:
>> Guangran Kevin Zhu wrote:
>>> Hello Folks,
>>>
>>> I am working on a problem, in which I need to apply to apply a
>>> background mesh to a portion of a 2D geometry. GMSH could properly
>>> generate a non-uniform mesh over the region where the background mesh
>>> is applied. However, in the region which does not have a background
>>> mesh, triangular elements with accute angles are generated. These
>>> elements will introduce errors when I solve the wave equation.
>>>
>>> I also tried to insert some "dummy" geometrical entities over the
>>> regions without the background mesh. The problem is not alleviated. Is
>>> this a limitation of GMSH when handling this kind of problem? Is there
>>> a workaround?
>>>
>>> I have modified t7.geo from the tutorial to illustrate my point below.
>>> When you generate the mesh, you will see some ill-shaped elements in
>>> the outer layer.
>>>
>>
>> Hi - It's not documented yet, but with the latest nightly snapshot
>> (http://geuz.org/gmsh/src/) you can do the following:
>>
>>
>> // Merge the first tutorial
>> Merge "t1.geo";
>>
>> // Merge a post-processing view containing the target mesh sizes
>> Merge "bgmesh.pos";
>>
>> PostView Field(1) = 0; // first lc field is View[0]
>> Function Field(2) = "0.03"; // second field is constant
>> Characteristic Length Field {1,2}; // lc field is combination (min) of both
>>
>> ...
>>
>>
>> This will lead to much nicer meshes.
>>
>>
>>
>>
>>
>>
>>
>>> =================================================
>>> // Merge the first tutorial
>>> Merge "t1.geo";
>>>
>>> // Merge a post-processing view containing the target mesh sizes
>>> Merge "bgmesh.pos";
>>>
>>> // Apply the view as the current background mesh
>>> Background Mesh View[0];
>>>
>>> Point(5) = {-0.1,-0.1,0,0.01};
>>> Point(6) = {0.2,-0.1,0,0.01};
>>> Point(7) = {0.2,0.4,0,0.01};
>>> Point(8) = {-0.1,0.4,0,0.01};
>>> Line(101) = {8,5};
>>> Line(102) = {5,6};
>>> Line(103) = {6,7};
>>> Line(104) = {7,8};
>>> Line Loop(105) = {104,101,102,103};
>>> Plane Surface(106) = {105,5};
>>>
>>> Point(11) = {-0.2, -0.2,0, 0.03};
>>> Point(12) = {0.3, -0.2, 0, 0.03};
>>> Point(13) = {0.3, 0.5, 0, 0.03};
>>> Point(14) = {-0.2, 0.5, 0, 0.03};
>>>
>>>
>>> Line(107) = {14,13};
>>> Line(108) = {13,12};
>>> Line(109) = {12,11};
>>> Line(110) = {11,14};
>>> Line Loop(111) = {108,109,110,107};
>>> Plane Surface(112) = {105,111};
>>>
>>> ================================================
>>>
>>> _______________________________________________
>>> gmsh mailing list
>>> gmsh at geuz.org
>>> http://www.geuz.org/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 at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 
> 


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