VariableAddVector - elmental variable

Numerical methods and mathematical models of Elmer
Post Reply
gagliar
Posts: 80
Joined: 04 Sep 2009, 16:34
Location: LGGE - Grenoble
Contact:

VariableAddVector - elmental variable

Post by gagliar »

Hi,

When creating a variable from a solver, one can use the VariableAddVector subroutine:

Code: Select all

SUBROUTINE VariableAddVector( Variables,Mesh,Solver,Name,DOFs,Values,&
      Perm,Output,Secondary,VarType,Global,InitValue,IpPoints)
By default it will create a nodal value. Which value should be given to VarType (Integer) to declare an elemental variable?

Thanks,
Olivier
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: VariableAddVector - elmental variable

Post by raback »

Hi

In Types.F90 you can find the definitions

Code: Select all

   INTEGER, PARAMETER :: Variable_on_nodes  = 0
   INTEGER, PARAMETER :: Variable_on_edges  = 1
   INTEGER, PARAMETER :: Variable_on_faces  = 2
   INTEGER, PARAMETER :: Variable_on_nodes_on_elements = 3
   INTEGER, PARAMETER :: Variable_on_gauss_points = 4
   INTEGER, PARAMETER :: Variable_on_elements = 5
   INTEGER, PARAMETER :: Variable_global = 6
so the correct value would be

Code: Select all

VarType = Variable_on_elements
-Peter
gagliar
Posts: 80
Joined: 04 Sep 2009, 16:34
Location: LGGE - Grenoble
Contact:

Re: VariableAddVector - elmental variable

Post by gagliar »

Thanks Peter!

One more question regarding elemental variable. Are they supported for Restart procedure (writing and reading in .result)?

Thanks again
Olivier
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: VariableAddVector - elmental variable

Post by raback »

Hi

I checked this and it seems that elemental variables get correctly treated.

IP variables had some issues. There is now a version that can deal also with those once you say "Output IP Variables = Logical True". This is in devel branch. I don't yet know whether to make it a default.

-Peter
Post Reply