UserData Class Template Reference
[Utilities]
#include <UserData.h>
Detailed Description
template<class T_>
class OFELI::UserData< T_ >
Abstract class to define by user various problem data.
The user has to implement a class that derives from the present one where the virtual functions are implemented.
Template Argument:
- T_ data type (double, float, ...)
Public Member Functions | |
| virtual T_ | BodyForce (const Point< double > &x, double time=0., size_t dof=1) |
| Define body force to impose at point of coordinate x, with code code at time time, for DOF dof. | |
| virtual T_ | BoundaryCondition (const Point< double > &x, int code, double time=0., size_t dof=1) |
| Define boundary condition to impose at point of coordinate x, with code code at time time, for DOF dof. | |
| virtual T_ | InitialData (const Point< double > &x, size_t dof=1) |
| Define initial data to impose at point of coordinate x, for DOF dof. | |
| void | setBodyForce (ElementVect< T_ > &b) |
| Set Elementwise Body Force using an ElementVect instance. | |
| void | setBodyForce (NodeVect< T_ > &b) |
| Set Nodewise Body Force using a NodeVect instance. | |
| void | setBodyForce (Vect< T_ > &b) |
| Set Nodewise Body Force using a Vect instance. | |
| void | setDBC (Vect< T_ > &b) |
| Set Dirichlet Boundary Conditions. | |
| void | setInitialData (Vect< T_ > &b) |
| Set initial data. | |
| void | setSurfaceForce (Vect< T_ > &b) |
| Set Surface Force. | |
| void | setTime (double time) |
| Set time value. | |
| virtual T_ | SurfaceForce (const Point< double > &x, int code, double time=0., size_t dof=1) |
| Define surface force to impose at point of coordinate x, with code code at time time, for DOF dof. | |
| UserData (const class Mesh &mesh) | |
| Constructor using mesh instance. | |
| UserData () | |
| Default Constructor. | |
| virtual | ~UserData () |
| Destructor. | |
Member Function Documentation
| virtual T_ BodyForce | ( | const Point< double > & | x, | |
| double | time = 0., |
|||
| size_t | dof = 1 | |||
| ) | [virtual] |
Define body force to impose at point of coordinate x, with code code at time time, for DOF dof.
Function to implement by user
Referenced by UserData::setBodyForce().
| virtual T_ BoundaryCondition | ( | const Point< double > & | x, | |
| int | code, | |||
| double | time = 0., |
|||
| size_t | dof = 1 | |||
| ) | [virtual] |
Define boundary condition to impose at point of coordinate x, with code code at time time, for DOF dof.
Function to implement by user
Referenced by UserData::setDBC().
| virtual T_ InitialData | ( | const Point< double > & | x, | |
| size_t | dof = 1 | |||
| ) | [virtual] |
Define initial data to impose at point of coordinate x, for DOF dof.
Function to implement by user
Referenced by UserData::setInitialData().
| void setBodyForce | ( | ElementVect< T_ > & | b | ) |
Set Elementwise Body Force using an ElementVect instance.
- Parameters:
-
b [in] Vector containing body forces at elements to impose. Forces are hence constant by element
References UserData::BodyForce(), Triang3::getCenter(), FEShape::getCenter(), Element::getLabel(), Element::getShape(), Mesh::HEXAHEDRON, Mesh::LINE, Mesh::QUADRILATERAL, Mesh::TETRAHEDRON, and Mesh::TRIANGLE.
| void setBodyForce | ( | NodeVect< T_ > & | b | ) |
Set Nodewise Body Force using a NodeVect instance.
- Parameters:
-
b [in] Vector containing body forces at nodes to impose
References UserData::BodyForce(), Node::getCoord(), Node::getDOF(), and Node::getNbDOF().
| void setBodyForce | ( | Vect< T_ > & | b | ) |
Set Nodewise Body Force using a Vect instance.
- Parameters:
-
b [in] Vector containing body forces at nodes to impose
References UserData::BodyForce(), Node::getCoord(), Node::getDOF(), and Node::getNbDOF().
| virtual T_ SurfaceForce | ( | const Point< double > & | x, | |
| int | code, | |||
| double | time = 0., |
|||
| size_t | dof = 1 | |||
| ) | [virtual] |
Define surface force to impose at point of coordinate x, with code code at time time, for DOF dof.
Function to implement by user
Referenced by UserData::setSurfaceForce().