Abstract class to define by user various problem data. More...
Public Member Functions | |
UserData () | |
Default Constructor. | |
UserData (const class Mesh &mesh) | |
Constructor using mesh instance. More... | |
virtual | ~UserData () |
Destructor. | |
void | setTime (real_t time) |
Set time value. | |
void | setDBC (Vect< T_ > &b) |
Set Dirichlet Boundary Conditions. More... | |
void | setInitialData (Vect< T_ > &b) |
Set initial data. More... | |
void | setBodyForce (Vect< T_ > &b) |
Set Nodewise Body Force using a Vect instance. More... | |
void | setSurfaceForce (Vect< T_ > &b) |
Set Surface Force. More... | |
virtual T_ | BoundaryCondition (Point< real_t > x, int code, real_t time=0., size_t dof=1) |
Define boundary condition to impose at point of coordinates x , with code code at time time , for DOF dof More... | |
virtual T_ | BodyForce (Point< real_t > x, real_t time=0., size_t dof=1) |
Define body force to impose at point of coordinates x , with code code at time time , for DOF dof More... | |
virtual T_ | SurfaceForce (Point< real_t > x, int code, real_t time=0., size_t dof=1) |
Define surface force to impose at point of coordinates x , with code code at time time , for DOF dof More... | |
virtual T_ | InitialData (Point< real_t > x, size_t dof=1) |
Define initial data to impose at point of coordinates x , for DOF dof More... | |
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 inherits from the present one where the virtual functions are implemented.
- Template Parameters
-
<T_> Data type (real_t, float, complex<real_t>, ...)
Constructor & Destructor Documentation
Constructor using mesh instance.
- Parameters
-
mesh Reference to Mesh instance
Member Function Documentation
void setDBC | ( | Vect< T_ > & | b | ) |
Set Dirichlet Boundary Conditions.
This function loops over all nodes and calls for each node the member function BoundaryCondition to assign the value defined by it
- Parameters
-
[out] b Vector that contains boundary conditions at nodes This vector must be sized before invoking this function
void setInitialData | ( | Vect< T_ > & | b | ) |
Set initial data.
This function loops over all nodes and calls for each node the member function InitialData to assign the value defined by it
- Parameters
-
[out] b Vector that contains initial data at nodes This vector must be sized before invoking this function
void setBodyForce | ( | Vect< T_ > & | b | ) |
Set Nodewise Body Force using a Vect instance.
- Parameters
-
[in] b Vector containing body forces at nodes to impose
This function loops over all nodes and calls for each node the member function BodyForce to assign the value defined by it
- Parameters
-
[out] b Vector that contains body forces at nodes This vector must be sized before invoking this function
void setSurfaceForce | ( | Vect< T_ > & | b | ) |
Set Surface Force.
- Parameters
-
[in] b Vector containing surface forces at nodes to impose
This function loops over all nodes and calls for each node the member function SurfaceForce to assign the value defined by it
- Parameters
-
[out] b Vector that contains body forces at nodes This vector must be sized before invoking this function
|
virtual |
Define boundary condition to impose at point of coordinates x
, with code code
at time time
, for DOF dof
Function to implement by user
- Parameters
-
[in] x Coordinates of point at which the value is to be prescribed [in] code Code of node for which the value is to be prescribed [in] time Value of time [Default: 0.
][in] dof Corresponding degree of freedom [Default: 1
]
- Returns
- Value of boundary condition to prescribe corresponding to these parameters
Define body force to impose at point of coordinates x
, with code code
at time time
, for DOF dof
Function to implement by user
- Parameters
-
[in] x Coordinates of point at which the body force is given [in] time Value of time [Default: 0.
][in] dof Corresponding degree of freedom [Default: 1
]
- Returns
- Value of body force corresponding to these parameters
Define surface force to impose at point of coordinates x
, with code code
at time time
, for DOF dof
Function to implement by user
- Parameters
-
[in] x Coordinates of point at which the surface force is given [in] code Code of node for which the surface force is given [in] time Value of time [Default: 0.
][in] dof Corresponding degree of freedom [Default: 1
]
- Returns
- Value of surface force corresponding to these parameters
Define initial data to impose at point of coordinates x
, for DOF dof
Function to implement by user
- Parameters
-
[in] x Coordinates of point at which the surface force is given [in] dof Corresponding degree of freedom [Default: 1
]
- Returns
- Value of initial data corresponding to these parameters