add vertex to mesh

Asked by Chaffra Affouda

It looks like it is not possible to add a vertex or any other entities to a mesh without clearing it when using MeshEditor. Is there another way of doing it? I'd like to do something like:

m = UnitInterval(11)
me = MeshEditor()
me.open(m,....)
me.add_vertex(Point(0.5))

Thanks,
Chaffra

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Anders Logg
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Anders Logg (logg) said :
#1

On Mon, Apr 18, 2011 at 05:07:50PM -0000, Chaffra wrote:
> New question #153318 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/153318
>
> It looks like it is not possible to add a vertex or any other entities to a mesh without clearing it when using MeshEditor. Is there another way of doing it? I'd like to do something like:
>
> m = UnitInterval(11)
> me = MeshEditor()
> me.open(m,....)
> me.add_vertex(Point(0.5))

That's not possible. The Mesh data structure is static.

--
Anders

Revision history for this message
Chaffra Affouda (chaffra) said :
#2

Thanks Anders Logg, that solved my question.

Revision history for this message
Chaffra Affouda (chaffra) said :
#3

Is it possible to do this with some type of refine?

Revision history for this message
Anders Logg (logg) said :
#4

On Mon, Apr 18, 2011 at 05:54:06PM -0000, Chaffra wrote:
> Question #153318 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/153318
>
> Status: Solved => Open
>
> Chaffra is still having a problem:
> Is it possible to do this with some type of refine?

No.

All the refinement algorithms end up creating an entirely new mesh
(using the MeshEditor).

--
Anders

Revision history for this message
Chaffra Affouda (chaffra) said :
#5

yes I know. I was just wondering if there was a way to refine at the "vertex level" that is by adding specific points to the mesh.

Revision history for this message
Best Anders Logg (logg) said :
#6

On Mon, Apr 18, 2011 at 07:54:19PM -0000, Chaffra wrote:
> Question #153318 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/153318
>
> Status: Answered => Open
>
> Chaffra is still having a problem:
> yes I know. I was just wondering if there was a way to refine at the
> "vertex level" that is by adding specific points to the mesh.

No.

--
Anders

Revision history for this message
Chaffra Affouda (chaffra) said :
#7

Thanks Anders Logg, that solved my question.