30#ifndef OOMPH_ELEMENT_WITH_MOVING_NODES
31#define OOMPH_ELEMENT_WITH_MOVING_NODES
132 std::ostringstream error_message;
133 error_message <<
"Range Error: Data number " <<
n
134 <<
" is not in the range (0," <<
n_data - 1 <<
")";
144 std::ostringstream error_message;
145 error_message <<
"Range Error: value " <<
i <<
" at data " <<
n
146 <<
" is not in the range (0," <<
n_value - 1 <<
")";
158 "Geometric data local equation numbers have not been allocated",
225 std::ostringstream error_message;
227 <<
"Evaluation of shape derivatives by chain rule is currently \n"
228 <<
"disabled because it's broken, at least for refineable \n"
229 <<
"elements. This all needs to be checked again very carefully\n"
230 <<
"following the instructions in the commit log\n"
231 <<
"If you know what you're doing and want to force this "
233 <<
"call this function with the optional boolean set to true.\n";
236 "ElementWithMovingNodes::evaluate_shape_derivs_by_chain_rule()",
250 std::ostringstream error_message;
252 <<
"Evaluation of shape derivatives by fastest method is currently \n"
253 <<
"disabled because it's broken, at least for refineable \n"
254 <<
"elements. This all needs to be checked again very carefully\n"
255 <<
"following the instructions in the commit log\n"
256 <<
"If you know what you're doing and want to force this "
258 <<
"call this function with the optional boolean set to true.\n";
261 "ElementWithMovingNodes::evaluate_shape_derivs_by_fastest_method()",
379 template<
class ELEMENT,
class NODE_TYPE>
404 const int& face_index)
488 ELEMENT::complete_setup_of_dependencies();
509 ELEMENT::get_jacobian(
residuals, jacobian);
A policy class that serves to establish the common interfaces for elements that contain moving nodes....
unsigned ngeom_dof() const
Number of geometric dofs.
Vector< Data * > Geom_data_pt
Vector that stores pointers to all Data that affect the node update operations, i....
int geometric_data_local_eqn(const unsigned &n, const unsigned &i)
Return the local equation number corresponding to the i-th value at the n-th geometric data object.
unsigned Ngeom_dof
Number of geometric dofs (computed on the fly when equation numbers are set up)
bool are_dresidual_dnodal_coordinates_always_evaluated_by_fd() const
Return whether shape derivatives are evaluated by fd.
void operator=(const ElementWithMovingNodes &)=delete
Broken assignment operator.
virtual ~ElementWithMovingNodes()
Virtual destructor (clean up and allocated memory)
bool Evaluate_dresidual_dnodal_coordinates_by_fd
Boolean to decide if shape derivatives are to be evaluated by fd (using FiniteElement::get_dresidual_...
ElementWithMovingNodes()
Constructor.
ElementWithMovingNodes(const ElementWithMovingNodes &)=delete
Broken copy constructor.
void disable_bypass_fill_in_jacobian_from_geometric_data()
Do not bypass the call to fill_in_jacobian_from_geometric_data.
void enable_bypass_fill_in_jacobian_from_geometric_data()
Bypass the call to fill_in_jacobian_from_geometric_data.
virtual void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Assign local equation numbers for the geometric Data in the element If the boolean argument is true t...
virtual void get_dnodal_coordinates_dgeom_dofs(RankThreeTensor< double > &dnodal_coordinates_dgeom_dofs)
Compute derivatives of the nodal coordinates w.r.t. to the geometric dofs. Default implementation by ...
bool Bypass_fill_in_jacobian_from_geometric_data
Set flag to true to bypass calculation of Jacobain entries resulting from geometric data.
void complete_setup_of_dependencies()
Construct the vector of (unique) geometric data.
int Method_for_shape_derivs
Choose method for evaluation of shape derivatives (this takes one of the values in the enumeration)
@ Shape_derivs_by_chain_rule
@ Shape_derivs_by_fastest_method
@ Shape_derivs_by_direct_fd
bool is_fill_in_jacobian_from_geometric_data_bypassed() const
Test whether the call to fill_in_jacobian_from_geometric_data is bypassed.
int & method_for_shape_derivs()
Access to method (enumerated flag) for determination of shape derivs.
void evaluate_shape_derivs_by_direct_fd()
Evaluate shape derivatives by direct finite differencing.
void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the local dofs of the element. The ostream specifies the output stream to which ...
void evaluate_shape_derivs_by_chain_rule(const bool &i_know_what_i_am_doing=false)
Evaluate shape derivatives by chain rule. Currently disabled by default because it's broken; can re-e...
void identify_geometric_data(std::set< Data * > &geometric_data_pt)
Specify Data that affects the geometry of the element by adding the element's geometric Data to the s...
void fill_in_jacobian_from_geometric_data(DenseMatrix< double > &jacobian)
Calculate the contributions to the Jacobian matrix from the geometric data. This version computes the...
unsigned ngeom_data() const
Return the number of geometric data upon which the shape of the element depends.
void assemble_set_of_all_geometric_data(std::set< Data * > &unique_geom_data_pt)
Return a set of all geometric data associated with the element.
void fill_in_jacobian_from_geometric_data(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the contributions to the Jacobian matrix from the geometric data. This version assumes that...
int ** Geometric_data_local_eqn
Array to hold local eqn number information for the geometric Data variables.
void disable_always_evaluate_dresidual_dnodal_coordinates_by_fd()
Insist that shape derivatives are always evaluated using the overloaded version of this function that...
void evaluate_shape_derivs_by_fastest_method(const bool &i_know_what_i_am_doing=false)
Evaluate shape derivatives by (anticipated) fastest method. Currently disabled by default because it'...
void enable_always_evaluate_dresidual_dnodal_coordinates_by_fd()
Insist that shape derivatives are always evaluated by fd (using FiniteElement::get_dresidual_dnodal_c...
Specific implementation of the class for specified element and node type.
void get_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Compute the element's residuals vector and jacobian matrix.
Node * construct_node(const unsigned &n, TimeStepper *const &time_stepper_pt)
Overloaded node allocation for unsteady problems.
ElementWithSpecificMovingNodes(FiniteElement *const &element_pt, const int &face_index)
Constructor used for face elements.
Node * construct_node(const unsigned &n)
Overload the node assignment routine to assign nodes of the appropriate type.
Node * construct_boundary_node(const unsigned &n)
Overload the node assignment routine to assign boundary nodes.
Node * construct_boundary_node(const unsigned &n, TimeStepper *const &time_stepper_pt)
Overloaded boundary node allocation for unsteady problems.
void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Assign local equation numbers for the underlying element, then deal with the additional geometric dof...
void describe_local_dofs(std::ostream &out, std::string &curr_str)
Unique final overrider for describe_dofs.
~ElementWithSpecificMovingNodes()
Empty Destructor,.
ElementWithSpecificMovingNodes()
Constructor, call the constructor of the base element.
void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the local dofs of the element. The ostream specifies the output stream to which ...
void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute the element's residuals vector and jacobian matrix.
void complete_setup_of_dependencies()
Complete the setup of additional dependencies. Overloads empty virtual function in GeneralisedElement...
A general Finite Element class.
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
virtual unsigned required_nvalue(const unsigned &n) const
Number of values that must be stored at local node n by the element. The default is 0,...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
unsigned ndof() const
Return the number of equations/dofs in the element.
virtual void get_residuals(Vector< double > &residuals)
Calculate the vector of residuals of the equations in the element. By default initialise the vector t...
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
An OomphLibError object which should be thrown when an run-time error is encountered....
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).