Hi, everyone,
I am trying to construct the finite element function through a loop since the function is split into parts according to the number of elements.
In the attachment I define uh(x) as the approximating function which follows:
for each element,
uh(x)=a*N1(xi)+b*N2(xi)+c*N3(xi),
where a, b, c are the nodal values read from the u vector constructed.
N(xi) is the defined function where xi ranges from -1 to 1.
A mapping from x to xi is also defined in the loop (xi=2*x*NumELE-(2*i-1)), as xi is for each local domain and x is for the global.
When I test the function with a value of x, Mathcad suggests that it can only be performed on an array,
is there a way to construct such kind of piece-wise function through for-loop?
Looking forward to your help!
Thank you
Shawn