No, FiPy doesn't presently have any ability to read 1D meshes. I do have some experimental code that supports this, but it needs a lot of work. I have no prognosis for when this will be made public.
- Jon > On Jul 12, 2018, at 1:21 PM, Drew Davidson <[email protected]> wrote: > > Hello, > > Can Gmsh2D read a 1D gmsh mesh? > > I have tried a similar script to the FiPy diffusion example circle.py: > > SCRIPT BEGINS > import fipy as fp > from IPython import embed > import sys > > #I created this gmsh .geo file in gmsh GUI, then copied and pasted here; I > cannot see a syntax error if it exists??? > > geo=""" > L_Sample=%(L_Sample)g; > L_Substrate=%(L_Substrate)g; > cellSize=%(cellSize)g; > Point(1) = {0, 0, 0, cellSize}; > Point(2) = {L_Substrate, 0, 0, cellSize}; > Point(3) = {L_Substrate+L_Sample, 0, 0, cellSize}; > Line(1) = {1, 2}; > Line(2) = {2, 3}; > Physical Point("SubstrateEnd") = {1}; > Physical Point("SampleEnd") = {3}; > Physical Point("ThermalContact") = {2}; > Physical Line("Substrate") = {1}; > Physical Line("Sample") = {2}; > """ % locals() > > #I am not having success with: > mesh = fp.Gmsh2D(geo,coordDimensions=1) #TODO throwing error about there > being no cells; is it a problem that mesh is 1D and Gmsh2D is called 2D? > mesh = fp.Gmsh2D(geo) #TODO throwing error about there being no cells > > #then I went into gmsh GUI and saved to .msh, but still no luck: > mesh = fp.Gmsh2D('OneDimensionalSampleAndSubstrate.msh') #TODO throwing error > about there being no cells > mesh = fp.Gmsh2D('OneDimensionalSampleAndSubstrate.msh',coordDimensions=1) > #TODO throwing error about there being no cells > SCRIPT ENDS > > > If coordDimensions=1 is unsupported or meaningless, it would be great if FiPy > printed a message saying so. > > I believe my FiPy installation is OK and was downloaded from github 6/30/2018 > (fipy-develop). I can run circle.py, although I have never gotten it to plot > the mesh. I can run anisotropy.py from diffusivity examples. Nearly all fipy > tests pass (setup.py). Can you please check if Gmsh2D is capable of reading > a 1D gmsh mesh? Or is there another FiPy class which can do it, and how? > > gmsh –version returns 3.0.6. Installation is system-wide via download method > in Ubuntu 16.04. > > If I cannot read in a parameterized 1D gmsh mesh using FiPy functionality, I > am at a loss as to how to have a single Python script that allows me to set > cellSize, L_Sample, and L_Substrate, produce a mesh, and efficiently conduct > a parameter study with FiPy. Gmsh is desirable because I want to go to a more > complicated nonuniform/graded mesh, and would rather not write code to make a > mesh myself. > > Thanks. > > > _______________________________________________ > fipy mailing list > [email protected] > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
