Public Member Functions | Protected Member Functions | List of all members
oomph::ProjectableElement< ELEMENT > Class Template Reference

Wrapper class for projectable elements. Adds "projectability" to the underlying ELEMENT. More...

#include <projection.h>

Inheritance diagram for oomph::ProjectableElement< ELEMENT >:
oomph::ProjectableElementBase

Public Member Functions

 ProjectableElement ()
 Constructor [this was only required explicitly from gcc 4.5.2 onwards...]. More...
 
virtual void residual_for_projection (Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
 Residual for the projection step. Flag indicates if we want the Jacobian (1) or not (0). Virtual so it can be overloaded if necessary. More...
 
double zeta_nodal (const unsigned &n, const unsigned &k, const unsigned &i) const
 Use Eulerian coordinates for matching in locate_zeta when doing projection. More...
 
void enable_projection ()
 Backup the element's state and switch it to projection mode. More...
 
void disable_projection ()
 Helper function to restore the element to the state it was in before we entered the projection mode and switch off projection mode. More...
 
void set_project_coordinates ()
 Project (history values of) coordintes. More...
 
void set_project_values ()
 Project (history values of) values. More...
 
void set_project_lagrangian ()
 Project (current and only values of) lagrangian coordinates. More...
 
unsigned & projected_field ()
 Field that is currently being projected. More...
 
unsigned & time_level_for_projection ()
 Which history value are we projecting? More...
 
unsigned & projected_coordinate ()
 When projecting the history values of the nodal coordinates, this is the coordinate we're projecting. More...
 
unsigned & projected_lagrangian_coordinate ()
 When projecting the Lagrangian coordinates this is the coordinate that is being projected. More...
 
- Public Member Functions inherited from oomph::ProjectableElementBase
 ProjectableElementBase ()
 Constructor: Initialise data so that we don't project but solve the "normal" equations associated with the element. More...
 
virtual ~ProjectableElementBase ()
 Virtual destructor. More...
 
virtual Vector< std::pair< Data *, unsigned > > data_values_of_field (const unsigned &fld)=0
 Pure virtual function in which the element writer must specify the values associated with field fld. The information is returned in a vector of pairs which comprise the Data object and the value within it, that correspond to field fld. E.g. in Taylor Hood elements the fld-th velocities are stored at the fld-th value of the nodes; the pressures (the DIM-th field) are the DIM-th values at the vertex nodes etc. More...
 
virtual unsigned nfields_for_projection ()=0
 Number of fields of the problem, so e.g. for 2D Navier Stokes this would be 3 (for the two velocities and one pressure) More...
 
virtual unsigned nhistory_values_for_projection (const unsigned &fld)=0
 Number of history values to be stored for fld-th field (includes current value!) More...
 
virtual unsigned nhistory_values_for_coordinate_projection ()=0
 Number of history values to be stored when projecting the history values of the nodal coordinates (includes current value!) More...
 
virtual unsigned nvalue_of_field (const unsigned &fld)=0
 Return number of values (pinned or not) associated with field fld within the element. This must correspond to the number of shape functions returned in jacobian_and_shape_of_field(...). More...
 
virtual int local_equation (const unsigned &fld, const unsigned &ivalue)=0
 Return local equation numbers associated with value ivalue of field fld within the element. More...
 
virtual double jacobian_and_shape_of_field (const unsigned &fld, const Vector< double > &s, Shape &psi)=0
 Return Jacobian of mapping and the shape functions associated with field fld. The number of shape functions must match the number of values specified in nvalue_of_field(...). For Lagrange-type interpolations the shape functinos are simply the "normal" nodal shape functions; if the element contains internal Data that is not associated with shape functions, simply set the corresonding shape function to 1. More...
 
virtual double get_field (const unsigned &time, const unsigned &fld, const Vector< double > &s)=0
 Return the fld-th field at local coordinates s at time-level time (time=0: current value; time>0: history values) More...
 

Protected Member Functions

void fill_in_contribution_to_residuals (Vector< double > &residuals)
 Overloaded version of fill_in_contribution_to_residuals. More...
 
void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 Function to describe the local dofs of the element. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...) More...
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Overloaded version of fill_in_contribution_to_jacobian. More...
 

Additional Inherited Members

- Protected Types inherited from oomph::ProjectableElementBase
enum  Projection_Type { Coordinate , Lagrangian , Value }
 Enumerated collection to specify which projection problem is to be solved. More...
 
- Protected Attributes inherited from oomph::ProjectableElementBase
unsigned Projected_field
 Field that is currently being projected. More...
 
unsigned Time_level_for_projection
 Time level we are projecting (0=current values; >0: history values) More...
 
unsigned Projected_coordinate
 When projecting the history values of the nodal coordinates, this is the coordinate we're projecting. More...
 
unsigned Projected_lagrangian
 When projecting the Lagrangain coordinates indicate which coordiante is to be projected. More...
 
Projection_Type Projection_type
 Variable to indicate if we're projecting the history values of the nodal coordinates (Coordinate) the values themselves (Value), or the Lagrangian coordinates in Solid Mechanics problems (Lagrangian) More...
 
bool Do_projection
 Bool to know if we do projection or not. If false (the default) we solve the element's "real" equations rather than the projection equations. More...
 
unsigned Backup_ninteraction
 Store number of "external" interactions that were assigned to the element before doing the projection. More...
 
bool Backup_external_geometric_data
 Remember if the element includes external geometric data when used in non-projection mode (this is temporarily disabled during the projection) More...
 
bool Backup_external_interaction_data
 Remember if the element includes external data when used in non-projection mode (this is temporarily disabled during the projection) More...
 

Detailed Description

template<class ELEMENT>
class oomph::ProjectableElement< ELEMENT >

Wrapper class for projectable elements. Adds "projectability" to the underlying ELEMENT.

Definition at line 180 of file projection.h.

Constructor & Destructor Documentation

◆ ProjectableElement()

template<class ELEMENT >
oomph::ProjectableElement< ELEMENT >::ProjectableElement ( )
inline

Constructor [this was only required explicitly from gcc 4.5.2 onwards...].

Definition at line 235 of file projection.h.

Member Function Documentation

◆ describe_local_dofs()

template<class ELEMENT >
void oomph::ProjectableElement< ELEMENT >::describe_local_dofs ( std::ostream &  out,
const std::string &  current_string 
) const
inlineprotected

Function to describe the local dofs of the element. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...)

Definition at line 209 of file projection.h.

◆ disable_projection()

template<class ELEMENT >
void oomph::ProjectableElement< ELEMENT >::disable_projection ( )
inline

Helper function to restore the element to the state it was in before we entered the projection mode and switch off projection mode.

Definition at line 583 of file projection.h.

References oomph::ProjectableElementBase::Backup_external_geometric_data, oomph::ProjectableElementBase::Backup_external_interaction_data, oomph::ProjectableElementBase::Backup_ninteraction, and oomph::ProjectableElementBase::Do_projection.

◆ enable_projection()

template<class ELEMENT >
void oomph::ProjectableElement< ELEMENT >::enable_projection ( )
inline

◆ fill_in_contribution_to_jacobian()

template<class ELEMENT >
void oomph::ProjectableElement< ELEMENT >::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlineprotected

Overloaded version of fill_in_contribution_to_jacobian.

Definition at line 217 of file projection.h.

References oomph::ProjectableElementBase::Do_projection, and oomph::ProjectableElement< ELEMENT >::residual_for_projection().

◆ fill_in_contribution_to_residuals()

template<class ELEMENT >
void oomph::ProjectableElement< ELEMENT >::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inlineprotected

Overloaded version of fill_in_contribution_to_residuals.

Definition at line 186 of file projection.h.

References oomph::ProjectableElementBase::Do_projection, and oomph::ProjectableElement< ELEMENT >::residual_for_projection().

◆ projected_coordinate()

template<class ELEMENT >
unsigned& oomph::ProjectableElement< ELEMENT >::projected_coordinate ( )
inline

When projecting the history values of the nodal coordinates, this is the coordinate we're projecting.

Definition at line 645 of file projection.h.

References oomph::ProjectableElementBase::Projected_coordinate.

◆ projected_field()

template<class ELEMENT >
unsigned& oomph::ProjectableElement< ELEMENT >::projected_field ( )
inline

Field that is currently being projected.

Definition at line 632 of file projection.h.

References oomph::ProjectableElementBase::Projected_field.

◆ projected_lagrangian_coordinate()

template<class ELEMENT >
unsigned& oomph::ProjectableElement< ELEMENT >::projected_lagrangian_coordinate ( )
inline

When projecting the Lagrangian coordinates this is the coordinate that is being projected.

Definition at line 652 of file projection.h.

References oomph::ProjectableElementBase::Projected_lagrangian.

◆ residual_for_projection()

template<class ELEMENT >
virtual void oomph::ProjectableElement< ELEMENT >::residual_for_projection ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
const unsigned &  flag 
)
inlinevirtual

◆ set_project_coordinates()

template<class ELEMENT >
void oomph::ProjectableElement< ELEMENT >::set_project_coordinates ( )
inline

Project (history values of) coordintes.

Definition at line 613 of file projection.h.

References oomph::ProjectableElementBase::Coordinate, and oomph::ProjectableElementBase::Projection_type.

◆ set_project_lagrangian()

template<class ELEMENT >
void oomph::ProjectableElement< ELEMENT >::set_project_lagrangian ( )
inline

Project (current and only values of) lagrangian coordinates.

Definition at line 625 of file projection.h.

References oomph::ProjectableElementBase::Lagrangian, and oomph::ProjectableElementBase::Projection_type.

◆ set_project_values()

template<class ELEMENT >
void oomph::ProjectableElement< ELEMENT >::set_project_values ( )
inline

Project (history values of) values.

Definition at line 619 of file projection.h.

References oomph::ProjectableElementBase::Projection_type, and oomph::ProjectableElementBase::Value.

◆ time_level_for_projection()

template<class ELEMENT >
unsigned& oomph::ProjectableElement< ELEMENT >::time_level_for_projection ( )
inline

Which history value are we projecting?

Definition at line 638 of file projection.h.

References oomph::ProjectableElementBase::Time_level_for_projection.

◆ zeta_nodal()

template<class ELEMENT >
double oomph::ProjectableElement< ELEMENT >::zeta_nodal ( const unsigned &  n,
const unsigned &  k,
const unsigned &  i 
) const
inline

Use Eulerian coordinates for matching in locate_zeta when doing projection.

Definition at line 531 of file projection.h.

References oomph::ProjectableElementBase::Do_projection.


The documentation for this class was generated from the following file: