Setting values to specific nodes

Discussion about coding and new developments
Post Reply
hisham.noaman
Posts: 4
Joined: 25 Sep 2020, 11:24
Antispam: Yes

Setting values to specific nodes

Post by hisham.noaman »

Hi all

I am writing a user defined solver and i am trying to set values to specific nodes on the boundary conditions, does a function similar to GetLocalScalarSolution where i can set values to a certain values inside the element, for example, i am looping over the boundary elements and for each boundary element i will pass an array containing the values of the variable. Or another try is to set the values of the nodes existing in a certain boundary by passing an array holding the values.

Regards
Hisham
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Setting values to specific nodes

Post by raback »

Hi Hisham,

Usually parameters are not allocated to full vectors. Hence there is no GetScalarLocalSolution. Instead we have GetBC & GetReal which evaluates the recipe for given element.

What kind of creature do you want to evalute? A constant or a function etc? Devil often lies in the detail.

-Peter
hisham.noaman
Posts: 4
Joined: 25 Sep 2020, 11:24
Antispam: Yes

Re: Setting values to specific nodes

Post by hisham.noaman »

Hi Peter

Actually i want to set the boundary values acquired from another solver provided the values of the nodes in an array but not to all boundaries but only to a certain edge, certain boundary condition defined in sif file to be specific.

Hisham
Post Reply