# Manually assign nodal/elemental values

**URL:** <https://community.freefem.org/t/manually-assign-nodal-elemental-values/1709>\
**Category:** General Discussion\
**Created:** [May 2, 2022, 6:11am UTC](https://community.freefem.org/t/manually-assign-nodal-elemental-values/1709 "2022-05-02T06:11:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manasnk](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@manasnk](https://community.freefem.org/u/manasnk)\
**Post date:** [May 2, 2022, 6:11am UTC](https://community.freefem.org/t/manually-assign-nodal-elemental-values/1709/1 "2022-05-02T06:11:57Z")

</div>

I am totally new to FreeFEM and I want to change some lines from a specific code. I need some help. Thank you in advance.

CASE-1

* * *

real L = 4;  
real W = 1;  
real v = 0.5;  
border b1(t = -0.025_W, 0.025_W){x = 0.5_L; y = t; label = loaded;}  
border b2(t = 0.025_W, 0.5_W){x = 0.5_L; y = t; label = free; }  
border b3(t = 0.5_L, -0.5_L){x = t; y = 0.5_W; label = free;}  
border b4(t = 0.5_W, -0.5_W){x = -0.5_L; y = t ; label = fixed;}  
border b5(t = -0.5_L, 0.5_L){x = t; y = -0.5_W; label = free;}  
border b6(t = -0.5_W, -0.025_W){x = 0.5_L; y = t; label = free; }  
// Mesh  
mesh th = buildmesh(b1(2_s) + b2(24_s) + b3  
(200_s) + b4 (50_s) + b5 (200_s) + b6 (24_s));

// Fespace  
fespace Vh(th, [P1, P1]);  
Vh [ux, uy], [vx, vy], [uxd, uyd], [uxa, uya],  
[vxa, vya], [uxn, uyn];  
fespace Vh1 (th, P1);  
Vh1 E, theta, thetaold, thetanew, dtheta, sens, sensn, sensv;  
// Make intial design  
theta = v;

* * *

I want to manually assign some initial design. I need some help to do that.  
I manually defined coordinates in a text file and as:

CASE-2:

* * *

mesh Thxy = triangulate(“coord.txt”);  
plot(Thxy);

* * *

I want to ask the following questions:  
(i) How to manually assign some boundary nodes as “loaded” and “fixed” as in the case-1.  
(ii) How to assign values of theta at some specific nodes/elements to be some specific value.
