Adaptmesh in 1D, for a segment

Hi,

Could you remind me how to adaptmesh for 1D mesh ?

Thank

No real way to day. Because it is trivial , Sorry

I try :

load “msh3”
meshL Th=segment(1000);
fespace Vh(Th, P2);
Vh u, v ;
solve Poisson ( u, v, solver = LU ) = int1d(Th) ( dx(u)dx(v) + uv )- int1d(Th) ( x*v )+
on ( 1, 2, u = 0.0 );
plot([xx,u],wait=1);
It works.

But not after:
meshL Th2 = adaptmesh(Th, u , err= 1E-5 )

The version is 4.11 and i have the following error message:
meshL Th2 = adaptmesh(Th, u , err= 1E-5 ) error operator ( ,
List of choices N5Fem2D4MeshE N5Fem2D4MeshE

Yes but they are no code after!

Ok je suis un peu long à la compréhension.
Il n’y a pas de fonction en 1D ? ou cela se fait de manière très simple ? ou c’est automatique ?
Désolé de vous faire revenir sur ce sujet.

IL n’y a pas le code associe,

but the code is simple for P1 approximation of u

  1. compute the metrix by regularization of de u'' in P1 ant than I call it m \sim 1/\varepsilon | u''|
    where \varepsilon is the level of error in norm L^\infty.

Now the problem is to build a mesh such that the length in m are content and equal to 1 the mesh size.

the length of seg [a,b[] = \int_a^b \sqrt{|m|},
so if we call M the primitive of \sqrt{|m|}, then the mesh is image by N of regular mesh of mesh size class to 1, and where N is the inverse function of M