Skip to content

[Hot to get coordinates] #25301

Discussion options

You must be logged in to vote

Hi moose users,

I would like to know how to get the exact coordinates of nodes or elements.

I tried ParsedFunctions 'x' to get the x coordinate.

But, the return values are not what I expected.

The following figure is plotted from x = 0 to x = 0.515.

So, in the figure, I expected to see a linear graph 0 to 0.515 values.

However, it shows weird results.

Is there any other method to get the exact coordinate?

In my model, I call the function in this way (auxkernel):

Real AuxTestRad::computeValue() {

       return _xcoord.value(_t,_q_point[_qp]);

}

I figured out the problem.

I set the variable as a nodal value, but it has to be an element value.

Now it worked.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by coskrrb2002
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant