How to Add a New Variable

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
Line 13: Line 13:
 
  KRATOS_CREATE_VARIABLE(double, DIVPROJ)
 
  KRATOS_CREATE_VARIABLE(double, DIVPROJ)
  
  KRATOS_REGISTER_VARIABLE(double, DIVPROJ)
+
  KRATOS_REGISTER_VARIABLE( DIVPROJ)
  
  

Revision as of 13:59, 5 December 2008

If you need to add a new variable to Kratos which doesn`t exist 3 passes are needed

IN KRATOS

1. define the variable it is done in .../kratos/includes/variables.h

KRATOS_DEFINE_VARIABLE(double, DIVPROJ)

2. Create & Register it is done in '.../kratos/sources/variables.cpp

KRATOS_CREATE_VARIABLE(double, DIVPROJ)
KRATOS_REGISTER_VARIABLE( DIVPROJ)


IN FAVORITE APPLICATION

3.If you want to use it in python file, it is also necessery to introduse it to python in favorite application for example : ../kratosR1/applications/incompressible_fluid_applications/kratos_incompressible_fluid_python_applications.cpp

KRATOS_REGISTER_IN_PYTHON_VARIABLE( DIVPROJ)
Personal tools
Categories