The object 'top' contains the following boundary ids that do no exist on the mesh: 1

372 views
Skip to first unread message

Estiivan

unread,
Oct 14, 2016, 8:42:27 AM10/14/16
to moose-users
Hello,

I run the first MOOSE example with a different mesh and got:

*** ERROR ***
The object 'top' contains the following boundary ids that do no exist on the mesh: 1


I tried to search and found here similar problems but did not quite get what is the answer. Could you give me a hint? I an just starting to use MOOSE.

I give below input file and mesh structure (mesh is almost 500 MB so I don't include it here) and a picture of mesh. Mesh is generated by GMSH.

Step 1. I modified ex01.i as follows:

[Mesh]
  file = cubicmesh.msh
[]

[Variables]
  [./diffused]
    order = FIRST
    family = LAGRANGE
  [../]
[]

[Kernels]
  [./diff]
    type = Diffusion
    variable = diffused
  [../]
[]

[BCs]
  [./top]
    type = DirichletBC
    variable = diffused
    boundary = 'top'
    value = 1
  [../]

  [./bottom]
    type = DirichletBC
    variable = diffused
    boundary = 'bottom'
    value = 0
  [../]
[]

[Executioner]
  type = Steady
  solve_type = 'PJFNK'
[]

[Outputs]
  execute_on = 'timestep_end'
  exodus = true
[]

Step 2. My mesh consists of little cubes:

$MeshFormat
2.2 0 8
$EndMeshFormat
$PhysicalNames
4
2 1 "top"
2 2 "bottom"
2 3 "sides"
3 4 "cube"
$EndPhysicalNames
$Nodes
58808
1 0 0 0
2 1 0 0
3 0 1 0
4 1 1 0
5 1 1 1
6 1 0 1
7 0 1 1
8 0 0 1
9 0 1 0.003929748982740822
10 0 1 0.008043323026352188
11 0 1 0.01234768685451231
12 0 1 0.01684990312067968
13 0 1 0.02155711370827905
...
58806 0 0.9876523131454185 0.003929748982741087
58807 0 0.9919566769736037 0.003929748982740995
58808 0 0.9960702510172382 0.003929748982740906
$EndNodes
$Elements
58806
1 3 2 3 14 2 597 1185 988
2 3 2 3 14 988 1185 1186 987
3 3 2 3 14 987 1186 1187 986
4 3 2 3 14 986 1187 1188 985
5 3 2 3 14 985 1188 1189 984
6 3 2 3 14 984 1189 1190 983
7 3 2 3 14 983 1190 1191 982
8 3 2 3 14 982 1191 1192 981
9 3 2 3 14 981 1192 1193 980
10 3 2 3 14 980 1193 1194 979
11 3 2 3 14 979 1194 1195 978
12 3 2 3 14 978 1195 1196 977
13 3 2 3 14 977 1196 1197 976
14 3 2 3 14 976 1197 1198 975
15 3 2 3 14 975 1198 1199 974
16 3 2 3 14 974 1199 1200 973
17 3 2 3 14 973 1200 1201 972
18 3 2 3 14 972 1201 1202 971
19 3 2 3 14 971 1202 1203 970
20 3 2 3 14 970 1203 1204 969
21 3 2 3 14 969 1204 1205 968
22 3 2 3 14 968 1205 1206 967
23 3 2 3 14 967 1206 1207 966
24 3 2 3 14 966 1207 1208 965
25 3 2 3 14 965 1208 1209 964
26 3 2 3 14 964 1209 1210 963
27 3 2 3 14 963 1210 1211 962
28 3 2 3 14 962 1211 1212 961
29 3 2 3 14 961 1212 1213 960
30 3 2 3 14 960 1213 1214 959
31 3 2 3 14 959 1214 1215 958
32 3 2 3 14 958 1215 1216 957
33 3 2 3 14 957 1216 1217 956
34 3 2 3 14 956 1217 1218 955
35 3 2 3 14 955 1218 1219 954
...
58797 3 2 3 24 58799 410 409 58800
58798 3 2 3 24 58800 409 408 58801
58799 3 2 3 24 58801 408 407 58802
58800 3 2 3 24 58802 407 406 58803
58801 3 2 3 24 58803 406 405 58804
58802 3 2 3 24 58804 405 404 58805
58803 3 2 3 24 58805 404 403 58806
58804 3 2 3 24 58806 403 402 58807
58805 3 2 3 24 58807 402 401 58808
58806 3 2 3 24 58808 401 3 9
$EndElements
Selection_004.png

Cody Permann

unread,
Oct 14, 2016, 9:41:31 AM10/14/16
to moose-users
I'm not sure if our reader current supports reading boundary (or block) names from the gmsh format. That could be added later. Try using the numeric boundary values in your input file instead and see if that gets you going.

Cody
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/6e9a3756-d2d1-4d64-9f73-bee2513d4b9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Estiivan

unread,
Oct 14, 2016, 10:29:54 AM10/14/16
to moose-users
Hi Cody, yoi mean that I should replace word top and bottom below with a numeric value?

[BCs]
  [./top]  <- here [./1]

    type = DirichletBC
    variable = diffused
    boundary = 'top' <- here 1
    value = 1
  [../]

  [./bottom] <- here [.2]

    type = DirichletBC
    variable = diffused
    boundary = 'bottom' <- here 2
    value = 0
  [../]

It did not work this way either but I think I might got your saying wrong. Erros message is now:

*** ERROR ***
The object '1' contains the following boundary ids that do no exist on the mesh: 1




 Should I also edit mesh file?



$PhysicalNames
4
2 1 "top"
2 2 "bottom"
2 3 "sides"
3 4 "cube"

I tried removing texts "top", "bottom", "sides", "cube" but it didn't help.

Cody Permann

unread,
Oct 14, 2016, 10:42:13 AM10/14/16
to moose...@googlegroups.com
The strings inside of brackets in your input file are the MOOSE object names that you can refer to in other places in the input file or in the simulation itself. Don't confuse that with the name/value pairs that make up the input parameters and values for those objects. 

So, to clarify you want to replace the values after "boundary =", NOT the names inside of the brackets. When you replaced the value inside of the bracket, MOOSE updated the error message to tell you the object "1" had a problem.

Explanation aside, I can see that changing both (which is also fine) didn't fix your problem because MOOSE is still telling you that boundary id "1" does not exist in the mesh. I'm not familiar enough with the Gmsh dump to see the issue. Somebody with a little more experience with that format may need to chime in. To be clear, your job is to make sure that you have numbered boundaries in your mesh file. I suggest you try using "peacock" to open your mesh. It should display your mesh and give you a drop down box with the available boundary names/numbers. If you don't see any boundaries in the drop down that either means that your original mesh doesn't contain them, or there's a problem with our gmsh reader.

Cody

Derek Gaston

unread,
Oct 14, 2016, 10:42:33 AM10/14/16
to moose-users
He's saying: you should use the boundary "ID" instead of the boundary "Name".  In Gmsh I'm sure the boundaries have an ID (like 1,2,3,4,etc.) use them like so:

  [./top]
    type = DirichletBC
    variable = diffused
    boundary = 2  # The ID "2" being used instead of the name "top"
    value = 1
  [../]


The "top" in [./top] is just the name of the boundary condition block.  That can be anything you want.  The important part is the "boundary = SOMETHING" part.  That "SOMETHING" is where you need to give an identifier from your mesh for a boundary.  For Gmsh I believe we only support the numeric IDs.

Derek

Alexander Lindsay

unread,
Oct 14, 2016, 10:58:54 AM10/14/16
to moose...@googlegroups.com

I can affirm that the MOOSE gmsh reader does support reading names.

Estiivan

unread,
Oct 17, 2016, 4:53:06 AM10/17/16
to moose-users
Hello,

yes, I was able to run earlier a mesh generated by GMSH with boundary names but now MOOSE gives me a very strange error message complaining about border id 9 although such is not in input file nor in mesh.I copy-paste input file below, test.msh is attached as file and error message is at the bottom.'

Should I just re-install MOOSE or can someone see where the problem is?

Thanks a lot for all who have already answered!

Input file ex01.i

[Mesh]
  file = test.msh

[]

[Variables]
  [./diffused]
    order = FIRST
    family = LAGRANGE
  [../]
[]

[Kernels]
  [./diff]
    type = Diffusion
    variable = diffused
  [../]
[]

[BCs]
  [./top]
    type = DirichletBC
    variable = diffused
    boundary = "top"
    value = 1
  [../]

  [./left]

    type = DirichletBC
    variable = diffused
    boundary = "left"

    value = 0
  [../]
[]

[Executioner]
  type = Steady
  solve_type = 'PJFNK'
[]

[Outputs]
  execute_on = 'timestep_end'
  exodus = true
[]

Running command:

estiivan@PC:~/projects/moose/examples/ex01_inputfile$ ./ex01-opt -i ex01.i


Error message:


*** ERROR ***
The object 'top' contains the following boundary ids that do no exist on the mesh: 9

Stack frames: 20
0: libMesh::print_trace(std::ostream&)
1: BoundaryRestrictable::initializeBoundaryRestrictable(InputParameters const&)
2: BoundaryRestrictable::BoundaryRestrictable(InputParameters const&, bool)
3: BoundaryRestrictableRequired::BoundaryRestrictableRequired(InputParameters const&, bool)
4: BoundaryCondition::BoundaryCondition(InputParameters const&, bool)
5: NodalBC::NodalBC(InputParameters const&)
6: DirichletBC::DirichletBC(InputParameters const&)
7: std::shared_ptr<MooseObject> buildObject<DirichletBC>(InputParameters const&)
8: Factory::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, InputParameters, unsigned int, bool)
9: std::shared_ptr<BoundaryCondition> Factory::create<BoundaryCondition>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, InputParameters, unsigned int)
10: NonlinearSystem::addBoundaryCondition(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, InputParameters)
11: FEProblem::addBoundaryCondition(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, InputParameters)
12: AddBCAction::act()
13: ActionWarehouse::executeActionsWithAction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
14: ActionWarehouse::executeAllActions()
15: MooseApp::runInputFile()
16: MooseApp::run()
17: ./ex01-opt() [0x403e39]
18: __libc_start_main
19: ./ex01-opt() [0x403fe9]
[0] /home/petri/projects/moose/framework/src/base/BoundaryRestrictable.C, line 130, compiled Oct  6 2016 at 12:26:01
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1
:
system msg for write_line failure : Bad file descriptor
test.msh

Estiivan

unread,
Oct 17, 2016, 5:07:24 AM10/17/16
to moose-users

I still include a picture of this mesh and result that previous MOOSE run gave me. Result as seen in Paraview. But not the same problem does not work as I give an error message about boundary ID's as described in message above...
Selection_001.png
Selection_003.png

Estiivan

unread,
Oct 17, 2016, 5:08:29 AM10/17/16
to moose-users
But now the same problem does not work ...

Alexander Lindsay

unread,
Oct 17, 2016, 2:55:46 PM10/17/16
to moose...@googlegroups.com
Estiivan, just remove the double quotes around top and left. Or you can change the double quotes to single quotes.


On 10/17/2016 04:07 AM, Estiivan wrote:

I still include a picture of this mesh and result that previous MOOSE run gave me. Result as seen in Paraview. But not the same problem does not work as I give an error message about boundary ID's as described in message above...
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.

Estiivan

unread,
Oct 18, 2016, 3:56:03 AM10/18/16
to moose-users
Ok, thanx. 2D mesh from GMSH works again. But I still don't get 3D GMSH working... regardless of single quotes/double quotes/no quotes (I tried them all).

If somebody has energy and interest enough, he could take a look... I include input file and (dimishned) cubic mesh. As can be seen from Peacock screencapture, at least it recognizes blocks top, bottom and sides. But when trying to actually run the simulation, I got following error message.

Is the conclusion that MOOSE does not support 3D GMSH meshes? 2D seems to work.




Error message:

*** ERROR ***

The object 'top' contains the following boundary ids that do no exist on the mesh: 1

Stack frames: 20

0: libMesh::print_trace(std::ostream&)

1: BoundaryRestrictable::initializeBoundaryRestrictable(InputParameters const&)

2: BoundaryRestrictable::BoundaryRestrictable(InputParameters const&, bool)

3: BoundaryRestrictableRequired::BoundaryRestrictableRequired(InputParameters const&, bool)

4: BoundaryCondition::BoundaryCondition(InputParameters const&, bool)

5: NodalBC::NodalBC(InputParameters const&)

6: DirichletBC::DirichletBC(InputParameters const&)

7: std::shared_ptr<MooseObject> buildObject<DirichletBC>(InputParameters const&)

8: Factory::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, InputParameters, unsigned int, bool)

9: std::shared_ptr<BoundaryCondition> Factory::create<BoundaryCondition>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, InputParameters, unsigned int)

10: NonlinearSystem::addBoundaryCondition(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, InputParameters)

11: FEProblem::addBoundaryCondition(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, InputParameters)

12: AddBCAction::act()

13: ActionWarehouse::executeActionsWithAction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)

14: ActionWarehouse::executeAllActions()

15: MooseApp::runInputFile()

16: MooseApp::run()

17: /home/petri/projects/moose/examples/ex01_inputfile/ex01-opt() [0x403e39]

18: __libc_start_main

19: /home/petri/projects/moose/examples/ex01_inputfile/ex01-opt() [0x403fe9]

[0] /home/petri/projects/moose/framework/src/base/BoundaryRestrictable.C, line 130, compiled Oct 17 2016 at 16:48:54

application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1

:

system msg for write_line failure : Bad file descriptor







Selection_005.png
ex01.i
cubicmesh.msh

Alexander Lindsay

unread,
Oct 18, 2016, 7:00:46 AM10/18/16
to moose...@googlegroups.com
I will take a look later at your files; I use gmsh for 3D meshes in Moose routinely.

For more options, visit https://groups.google.com/d/optout.
<Selection_005.png>
<ex01.i>
<cubicmesh.msh>

Alexander Lindsay

unread,
Oct 18, 2016, 7:03:27 AM10/18/16
to moose...@googlegroups.com
It may also help if you share your geo file. 

Estiivan

unread,
Oct 18, 2016, 7:45:25 AM10/18/16
to moose-users
Thanx Alexander (and others who have answered)!

Would be very nice to get 3D GMSH meshes working as it is so far only mesh generator I have available. If there is some cheap and MOOSE friendly 3D mesh generator, suggestions are welcome.

Here is .geo file (I will attach it as well). It is taken with slight modification (regarding number and size of cube elements) from http://matveichev.blogspot.fi/2013/12/building-hexagonal-meshes-with-gmsh.html

// Syntax.: Point(n) = {x, y, z, hs};
// As we'll use transfinite algorithm hs can be arbitrary
// or even omitted from mesh description
Point(1) = {0, 0, 0, 1.0};
Point(2) = {1, 0, 0, 1.0};
Point(3) = {0, 1, 0, 1.0};
Point(4) = {1, 1, 0, 1.0};
Point(5) = {1, 1, 1, 1.0};
Point(6) = {1, 0, 1, 1.0};
Point(7) = {0, 1, 1, 1.0};
Point(8) = {0, 0, 1, 1.0};

Line(1) = {3, 7};
Line(2) = {7, 5};
Line(3) = {5, 4};
Line(4) = {4, 3};
Line(5) = {3, 1};
Line(6) = {2, 4};
Line(7) = {2, 6};
Line(8) = {6, 8};
Line(9) = {8, 1};
Line(10) = {1, 2};
Line(11) = {8, 7};
Line(12) = {6, 5};

Line Loop(13) = {7, 8, 9, 10};
Plane Surface(14) = {13};
Line Loop(15) = {6, 4, 5, 10};
Plane Surface(16) = {15};
Line Loop(17) = {3, 4, 1, 2};
Plane Surface(18) = {17};
Line Loop(19) = {12, -2, -11, -8};
Plane Surface(20) = {19};
Line Loop(21) = {7, 12, 3, -6};
Plane Surface(22) = {21};
Line Loop(23) = {9, -5, 1, -11};
Plane Surface(24) = {23};
Surface Loop(25) = {14, 22, 20, 18, 16,

Volume(26) = {25};

Transfinite Line "*" = 10 Using Bump 1.0;
Transfinite Surface "*";
Recombine Surface "*";
Transfinite Volume "*";

Physical Surface("top") = {20};
Physical Surface("bottom") = {16};
Physical Surface("sides") = {14, 24, 18, 22};
Physical Volume("cube") = {26}
cubicmesh.geo

Alexander Lindsay

unread,
Oct 18, 2016, 8:24:34 AM10/18/16
to moose...@googlegroups.com

You had syntax errors in your geo file on lines 38 and 50. When you ran gmsh -3 cubicmesh.geo you should have seen meshing errors. A .msh file is still produced which is perhaps what mislead you. The corrected lines look like this:

Line 38 (incomplete surface list originally):

  • Surface Loop(25) = {14, 22, 20, 18, 16, 24};

Line 50 (just add semicolon):

  • Physical Volume(“cube”) = {26};

If you create your msh with these changes, you should be able to successfully run your application. I was able to on my end.

Estiivan

unread,
Oct 18, 2016, 8:50:12 AM10/18/16
to moose-users
Ah! Thanx Alexander! I had no idea of error messages as I have been using only GUI of GMSH.

Sorry to suspect MOOSE here... as it was my own sloppiness! :(

Yes, it works perfectly now... thanx again Alexander!
Selection_007.png

Alexander Lindsay

unread,
Oct 18, 2016, 8:56:26 AM10/18/16
to moose...@googlegroups.com
No problem. Glad it's working!

Estiivan

unread,
Oct 18, 2016, 10:26:32 AM10/18/16
to moose-users

I still have actually a general question which is related to this same mesh so I don't start a new topic. If I want to make some of the hexahedras in the mesh to have material properties in MOOSE, should I define these hexahedras as different physical volumes (in GMSH) and then I can assign material properties to them in MOOSE? Or how should it be done? 

I think it is done so in example 8 with physical volumes 'fuel' and 'deflector'.

[Mesh]
file = reactor.e
# Let's assign human friendly names to the blocks on the fly
block_id = '1 2'
block_name = 'fuel deflector'
boundary_id = '4 5'
boundary_name = 'bottom top'
[]

Peterson, JW

unread,
Oct 18, 2016, 10:37:51 AM10/18/16
to moose-users
On Tue, Oct 18, 2016 at 6:56 AM, Alexander Lindsay <adli...@ncsu.edu> wrote:
No problem. Glad it's working!

Thanks for helping out with this issue, Alex.

--
John

Alexander Lindsay

unread,
Oct 18, 2016, 11:22:58 AM10/18/16
to moose...@googlegroups.com
Yes your intuition is correct. Just define different physical volumes in your geo file and then you can reference those names in your input file material block. 

Alexander Lindsay

unread,
Oct 18, 2016, 11:24:33 AM10/18/16
to moose...@googlegroups.com
I should say you can reference those names anywhere in your input file where it's appropriate. 

Estiivan

unread,
Oct 19, 2016, 7:14:09 AM10/19/16
to moose-users
Can defining physical volumes be made by editing directly .msh file or must it be done in .geo file in GMSH? I am asking this as I think one can only address directly elements in .msh file but not in .geo file.

What I mean is that if I have a mesh, I looked at it and deciced that I wanted to to assign elements, let's say, 771, 801 and 1000 as with a material property, I could define these as a physical volume. But .geo file that generated that mesh and defines physical volumes does not know anything about elements 771, 801 and 1000. So, I guess I would want to add a row to .msh file

$PhysicalNames
5

2 1 "top"
2 2 "bottom"
2 3 "sides"
3 4 "cube"
3 5 "material"

and then change

771 5 2 4 26 717 709 645 653 718 710 646 654
801 5 2 4 26 744 736 672 680 272 271 279 280
1000 5 2 4 26 156 155 147 148 897 889 825 833

to

771 5 2 5 26 717 709 645 653 718 710 646 654
801 5 2 5 26 744 736 672 680 272 271 279 280
1000 5 2 5 26 156 155 147 148 897 889 825 833
 
so that elements 771, 801 and 1000 are now in physical volume called 'material' and I could address that in MOOSE. BUT by doing so, I destroyed original information that elements 771, 801 and 1000 belong to physical group 4 ('cube')... Can an element belong to both and if so, how is it manifested .msh file?

Summa summarum. Shortly: in GMSH, is only way to make physical volumes through .geo files or is it possibly to make them through .msh file?

Just trying to understand how I should work through here. :)

Cody Permann

unread,
Oct 19, 2016, 8:45:31 AM10/19/16
to moose-users
If all this mapping gets too complicated in the mesh file you can always deal with it on the MOOSE side instead. There's nothing preventing a material from using mesh information or some external map information to make decisions about how to populate properties throughout the domain.

Estiivan

unread,
Oct 19, 2016, 9:08:43 AM10/19/16
to moose-users
Hi Cody, thanx. Good to know this. Sorry to ask, but might you be able to offer some example code or link suggestion (how to define physical volumes from mesh elements in MOOSE)?

Cody Permann

unread,
Oct 19, 2016, 10:18:40 AM10/19/16
to moose-users
What I mean is that you have access to a whole plethora of data that you can inspect to make decisions about how to generate properties. Take a look at the Doxygen page for "Material". 

However before you go down that path, you might just want to think about a different approach to your problem. You were trying to figure out how to get an element into multiple blocks. That isn't possible, or if it is, it's not supported by libMesh so don't do that. You never need that capability though. In MOOSE, you can assign multiple materials per block which means you can always accomplish the same thing you are trying to do here. You just need a sufficient a sufficient number of unique IDs to indicate all of the various different combinations of of overlapping block IDs.

Cody

Alexander Lindsay

unread,
Oct 19, 2016, 10:36:09 AM10/19/16
to moose...@googlegroups.com
You can also ask some of these questions on the gmsh mailing list: gm...@onelab.info

You may have to subscribe to the list first: http://onelab.info/mailman/listinfo/gmsh/
Reply all
Reply to author
Forward
0 new messages