Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
userfunctions [2012/11/13 23:31]
gag created
userfunctions [2012/12/03 17:06]
gag
Line 1: Line 1:
 ====== User Functions ====== ====== User Functions ======
- 
 This Section presents the various **user functions** developed to solve glaciological applications using the finite element code Elmer. User functions are used to define boundary conditions, initial conditions or any material parameter which depends on other variables.  This Section presents the various **user functions** developed to solve glaciological applications using the finite element code Elmer. User functions are used to define boundary conditions, initial conditions or any material parameter which depends on other variables. 
  
-Instead of using a fortran user function, one can write directly in the SIF file a MATC function, as explained [[:tips:matc|here]]. However, MATC functions present some limit and cannot be used in any cases.  Moreover, MATC functions are less computationally efficient, and should be avoided for very large problems.        +User functions in the Elmer/Ice package are automatically compiled and can be called using the object file name //ElmerIceUSF//: 
 +<code> 
 +Temperature = Variable Coordinate 3  
 + Real Procedure =  File "ElmerIceUSF" "NameUSF" 
 +</code>  
 +where ''NameUSF'' is the name of the user function you want to execute.  
 +The source code of the user functions of the Elmer/Ice package can be obtained from the Elmer svn in ''/trunk/elmerice/Userfunctions/''
 + 
 +A non-distributed user function has to be link to Elmer: 
 +<code> 
 +elmerf90 MyUSF.f90 -o MyUSF 
 +</code> 
 + 
 +In the SIF file, the call to the user function is done by pointing on the object file ''MyUSF'', like this 
 +<code> 
 +Temperature = Variable Coordinate 3  
 + Real Procedure "MyUSF" "NameUSF" 
 +</code> 
 +where ''NameUSF'' is the name of the fortran function in the file ''MyUSF.f90''
 + 
 +Instead of using a fortran user function, one can write directly in the SIF file a MATC function, as explained [[:tips:matc|here]]. However, MATC functions present some limit and cannot be used in any cases.  Moreover, MATC functions are less computationally efficient, and should be avoided for very large problems. 
userfunctions.txt · Last modified: 2012/12/03 17:44 by gag
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0