Here

From KratosWiki
Revision as of 14:40, 27 November 2007 by 147.83.143.248 (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

1.Adding & Registeration: In the application's .cpp file add new element (i.e. linear_element) as below

mLinearElement2D3N(0, Element::GeometryType::Pointer(new Triangle2D<Node<3>  >
(Element::GeometryType::PointsArrayType(3, Node<3>())))),

2D represents for 2 dimensional and 3N for three-nodded element. In the register section:

KRATOS_REGISTER_ELEMENT("LinearElement2D3N", mLinearElement2D3N)

2.Including: In the application's .h file simply include header file,

#include "custom_elements/linear_element.h"

add the element as the member variable of the application's class

...class KratosR1StructuralApplication : public KratosApplication
...Private:
const LinearElement  mLinearElement2D3N;

Trivially, if you are working in Linux there would be a jamfile, in application folder, needed the .cpp file to be added inside

...list of files to be build 
   linear_element.cpp
Personal tools
Categories