30 #ifndef OOMPH_ELEMENT_WITH_MOVING_NODES
31 #define OOMPH_ELEMENT_WITH_MOVING_NODES
128 #ifdef RANGE_CHECKING
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",
169 std::set<Data*>& unique_geom_data_pt);
179 for (
unsigned n = 0;
n < n_geom_data;
n++)
221 const bool& i_know_what_i_am_doing =
false)
223 if (!i_know_what_i_am_doing)
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()",
246 const bool& i_know_what_i_am_doing =
false)
248 if (!i_know_what_i_am_doing)
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()",
307 const bool& store_local_dof_pt);
325 const unsigned n_dof =
ndof();
379 template<
class ELEMENT,
class NODE_TYPE>
395 ELEMENT::describe_local_dofs(
out, current_string);
404 const int& face_index)
416 ELEMENT::describe_local_dofs(
out, curr_str);
488 ELEMENT::complete_setup_of_dependencies();
500 ELEMENT::assign_all_generic_local_eqn_numbers(store_local_dof_pt);
509 ELEMENT::get_jacobian(residuals, jacobian);
521 ELEMENT::get_jacobian_and_mass_matrix(residuals, jacobian, mass_matrix);
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Definition: element_with_moving_nodes.h:65
unsigned ngeom_dof() const
Number of geometric dofs.
Definition: element_with_moving_nodes.h:119
Vector< Data * > Geom_data_pt
Definition: element_with_moving_nodes.h:340
int geometric_data_local_eqn(const unsigned &n, const unsigned &i)
Definition: element_with_moving_nodes.h:126
unsigned Ngeom_dof
Definition: element_with_moving_nodes.h:357
bool are_dresidual_dnodal_coordinates_always_evaluated_by_fd() const
Return whether shape derivatives are evaluated by fd.
Definition: element_with_moving_nodes.h:186
void operator=(const ElementWithMovingNodes &)=delete
Broken assignment operator.
virtual ~ElementWithMovingNodes()
Virtual destructor (clean up and allocated memory)
Definition: element_with_moving_nodes.h:109
bool Evaluate_dresidual_dnodal_coordinates_by_fd
Definition: element_with_moving_nodes.h:367
ElementWithMovingNodes()
Constructor.
Definition: element_with_moving_nodes.h:76
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.
Definition: element_with_moving_nodes.h:280
void enable_bypass_fill_in_jacobian_from_geometric_data()
Bypass the call to fill_in_jacobian_from_geometric_data.
Definition: element_with_moving_nodes.h:274
virtual void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Definition: element_with_moving_nodes.cc:197
int & method_for_shape_derivs()
Access to method (enumerated flag) for determination of shape derivs.
Definition: element_with_moving_nodes.h:268
virtual void get_dnodal_coordinates_dgeom_dofs(RankThreeTensor< double > &dnodal_coordinates_dgeom_dofs)
Definition: element_with_moving_nodes.cc:538
bool Bypass_fill_in_jacobian_from_geometric_data
Definition: element_with_moving_nodes.h:361
void complete_setup_of_dependencies()
Construct the vector of (unique) geometric data.
Definition: element_with_moving_nodes.cc:138
int Method_for_shape_derivs
Definition: element_with_moving_nodes.h:371
bool is_fill_in_jacobian_from_geometric_data_bypassed() const
Definition: element_with_moving_nodes.h:287
void evaluate_shape_derivs_by_direct_fd()
Evaluate shape derivatives by direct finite differencing.
Definition: element_with_moving_nodes.h:210
@ Shape_derivs_by_chain_rule
Definition: element_with_moving_nodes.h:70
@ Shape_derivs_by_fastest_method
Definition: element_with_moving_nodes.h:72
@ Shape_derivs_by_direct_fd
Definition: element_with_moving_nodes.h:71
void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Definition: element_with_moving_nodes.cc:170
void evaluate_shape_derivs_by_chain_rule(const bool &i_know_what_i_am_doing=false)
Definition: element_with_moving_nodes.h:220
void identify_geometric_data(std::set< Data * > &geometric_data_pt)
Definition: element_with_moving_nodes.h:175
void fill_in_jacobian_from_geometric_data(DenseMatrix< double > &jacobian)
Definition: element_with_moving_nodes.h:320
unsigned ngeom_data() const
Definition: element_with_moving_nodes.h:345
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.
Definition: element_with_moving_nodes.cc:43
void fill_in_jacobian_from_geometric_data(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: element_with_moving_nodes.cc:323
int ** Geometric_data_local_eqn
Definition: element_with_moving_nodes.h:353
void disable_always_evaluate_dresidual_dnodal_coordinates_by_fd()
Definition: element_with_moving_nodes.h:204
void evaluate_shape_derivs_by_fastest_method(const bool &i_know_what_i_am_doing=false)
Definition: element_with_moving_nodes.h:245
void enable_always_evaluate_dresidual_dnodal_coordinates_by_fd()
Definition: element_with_moving_nodes.h:194
Definition: element_with_moving_nodes.h:382
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.
Definition: element_with_moving_nodes.h:516
ElementWithSpecificMovingNodes(FiniteElement *const &element_pt, const int &face_index)
Constructor used for face elements.
Definition: element_with_moving_nodes.h:403
Node * construct_node(const unsigned &n)
Definition: element_with_moving_nodes.h:422
void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Definition: element_with_moving_nodes.h:497
void describe_local_dofs(std::ostream &out, std::string &curr_str)
Unique final overrider for describe_dofs.
Definition: element_with_moving_nodes.h:413
~ElementWithSpecificMovingNodes()
Empty Destructor,.
Definition: element_with_moving_nodes.h:410
Node * construct_boundary_node(const unsigned &n)
Overload the node assignment routine to assign boundary nodes.
Definition: element_with_moving_nodes.h:449
ElementWithSpecificMovingNodes()
Constructor, call the constructor of the base element.
Definition: element_with_moving_nodes.h:400
void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Definition: element_with_moving_nodes.h:392
void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute the element's residuals vector and jacobian matrix.
Definition: element_with_moving_nodes.h:506
Node * construct_boundary_node(const unsigned &n, TimeStepper *const &time_stepper_pt)
Overloaded boundary node allocation for unsteady problems.
Definition: element_with_moving_nodes.h:463
void complete_setup_of_dependencies()
Definition: element_with_moving_nodes.h:485
Node * construct_node(const unsigned &n, TimeStepper *const &time_stepper_pt)
Overloaded node allocation for unsteady problems.
Definition: element_with_moving_nodes.h:435
Definition: elements.h:1313
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
unsigned nnodal_position_type() const
Definition: elements.h:2463
virtual unsigned required_nvalue(const unsigned &n) const
Definition: elements.h:2455
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
Definition: elements.h:2484
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
virtual void get_residuals(Vector< double > &residuals)
Definition: elements.h:980
TimeStepper *& time_stepper_pt()
Definition: geom_objects.h:192
Definition: oomph_definitions.h:222
A Rank 3 Tensor class.
Definition: matrices.h:1370
Definition: timesteppers.h:231
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ofstream out("Result.txt")