# CGX "bad divisions in surf"

**URL:** <https://calculix.discourse.group/t/cgx-bad-divisions-in-surf/124>\
**Category:** CalculiX GraphiX\
**Created:** [August 13, 2020, 8:03am UTC](https://calculix.discourse.group/t/cgx-bad-divisions-in-surf/124 "2020-08-13T08:03:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![benzwick](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@benzwick](https://calculix.discourse.group/u/benzwick)\
**Post date:** [August 13, 2020, 8:03am UTC](https://calculix.discourse.group/t/cgx-bad-divisions-in-surf/124/1 "2020-08-13T08:03:27Z")

</div>

I am having some trouble generating the following mesh. If I replace `qu8e` with `qu4e` or divide the number of divisions by two it seems to work. Does anyone know what the problem might be?

```auto
pnt c 0.0 0.0 0.0
pnt p1 0.2 0.0 0.0
pnt p2 0.3 0.0 0.0
pnt p3 0.0 0.2 0.0
pnt p4 0.0 0.3 0.0
line L001 p1 p3 c 4
line L002 p2 p4 c 4
line L003 p1 p2 1
line L004 p3 p4 1
gsur A001 + BLEND - L001 + L003 + L002 - L004
seta inner l L001
seta inner p p1
seta inner p p3
seta outer l L002
seta outer p p2
seta outer p p4
seta ymin l L003
seta ymin p p1
seta ymin p p2
seta xmin l L004
seta xmin p p3
seta xmin p p4
div all mult 1
plot ld all k
del mesh
elty all qu8e
mesh all
plot mesh all
send all abq
send xmin abq raw
send ymin abq raw
send inner abq raw
send outer abq raw

```

When I try to run the file I get the following message:

```auto
 WARNING: bad divisions in surf:A001
 1 surfs are not meshed, check set -NOMESH

```

---

<div class="post-metadata">

**Author:** ![rafal.brzegowy](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@rafal.brzegowy](https://calculix.discourse.group/u/rafal.brzegowy)\
**Post date:** [August 13, 2020, 8:12am UTC](https://calculix.discourse.group/t/cgx-bad-divisions-in-surf/124/2 "2020-08-13T08:12:31Z")

</div>

For the qu8 element, the minimum division required is 2, you have a division of 1 on some lines:

 ![hcpy_1](https://global.discourse-cdn.com/free1/uploads/calculix/original/1X/114f05b1e230d3ad685c664befd199442f1bc865.png)

Please try add:

div all mult 1

# 

div L003 2  
div L004 2

# 

plot ld all k

---

<div class="post-metadata">

**Author:** ![benzwick](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@benzwick](https://calculix.discourse.group/u/benzwick)\
**Post date:** [August 13, 2020, 9:16am UTC](https://calculix.discourse.group/t/cgx-bad-divisions-in-surf/124/3 "2020-08-13T09:16:03Z")

</div>

Thanks @rafal.brzegowy for the quick response. I wanted as coarse a mesh as possible and I assumed that `div` determines the number of elements along the edge. Now I understand why it didn’t work.

Replacing

```auto
div all mult 1

```

with

```auto
div all mult 2

```

also works.

---

<div class="post-metadata">

**Author:** ![rafal.brzegowy](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@rafal.brzegowy](https://calculix.discourse.group/u/rafal.brzegowy)\
**Post date:** [August 13, 2020, 9:22am UTC](https://calculix.discourse.group/t/cgx-bad-divisions-in-surf/124/4 "2020-08-13T09:22:46Z")

</div>

Try:

> div all auto 0.01
