oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID > Class Template Reference

Refineable version of the PseudoSolidNodeUpdateELement. More...

#include <pseudosolid_node_update_elements.h>

+ Inheritance diagram for oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >:

Public Member Functions

 RefineablePseudoSolidNodeUpdateElement ()
 
void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 
unsigned required_nvalue (const unsigned &n) const
 The required number of values is the sum of the two. More...
 
unsigned ncont_interpolated_values () const
 
int solid_p_nodal_index () const
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
void fill_in_shape_derivatives_by_fd (DenseMatrix< double > &jacobian)
 
void identify_geometric_data (std::set< Data * > &geometric_data_pt)
 
void assign_additional_local_eqn_numbers ()
 
void rebuild_from_sons (Mesh *&mesh_pt)
 Call rebuild_from_sons() for both of the underlying element types. More...
 
void get_interpolated_values (const unsigned &t, const Vector< double > &s, Vector< double > &values)
 
void get_interpolated_values (const Vector< double > &s, Vector< double > &values)
 
Nodeinterpolating_node_pt (const unsigned &n, const int &value_id)
 
double local_one_d_fraction_of_interpolating_node (const unsigned &n1d, const unsigned &i, const int &value_id)
 
Nodeget_interpolating_node_at_local_coordinate (const Vector< double > &s, const int &value_id)
 
unsigned ninterpolating_node_1d (const int &value_id)
 
unsigned ninterpolating_node (const int &value_id)
 
void interpolating_basis (const Vector< double > &s, Shape &psi, const int &value_id) const
 
unsigned num_Z2_flux_terms ()
 
void get_Z2_flux (const Vector< double > &s, Vector< double > &flux)
 
void further_setup_hanging_nodes ()
 
void build (Mesh *&mesh_pt, Vector< Node * > &new_node_pt, bool &was_already_built, std::ofstream &new_nodes_file)
 
void build (Mesh *&mesh_pt, Vector< Node * > &new_node_pt, bool &was_already_built)
 
void further_build ()
 
unsigned nvertex_node () const
 Number of vertex nodes in the element. More...
 
Nodevertex_node_pt (const unsigned &j) const
 Pointer to the j-th vertex node in the element. More...
 
void compute_norm (double &norm)
 Compute norm of solution. Use version in BASIC element. More...
 
void compute_exact_Z2_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_flux_pt, double &error, double &norm)
 
unsigned nrecovery_order ()
 
void output (std::ostream &outfile)
 Overload the output function: Use that of the BASIC element. More...
 
void output (std::ostream &outfile, const unsigned &n_p)
 Output function, plotting at n_p points: Use that of the BASIC element. More...
 
void output (FILE *file_pt)
 Overload the output function: Use that of the BASIC element. More...
 
void output (FILE *file_pt, const unsigned &n_p)
 Output function: Use that of the BASIC element. More...
 
unsigned ndof_types () const
 
unsigned nbasic_dof_types () const
 
unsigned nsolid_dof_types () const
 
void get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
 

Detailed Description

template<class BASIC, class SOLID>
class oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >

Refineable version of the PseudoSolidNodeUpdateELement.

Constructor & Destructor Documentation

◆ RefineablePseudoSolidNodeUpdateElement()

Constructor, call the BASIC and SOLID elements' constructors and set the "density" parameter for solid element to zero

590  : RefineableElement(), BASIC(), SOLID()
591  {
592  SOLID::lambda_sq_pt() = &PseudoSolidHelper::Zero;
593  }
double Zero
Definition: pseudosolid_node_update_elements.cc:35

References oomph::PseudoSolidHelper::Zero.

Member Function Documentation

◆ assign_additional_local_eqn_numbers()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::assign_additional_local_eqn_numbers ( )
inline

Final override for the assign__additional_local_eqn_numbers(): Call the version for the BASIC element

1094  {
1095  BASIC::assign_additional_local_eqn_numbers();
1096  SOLID::assign_additional_local_eqn_numbers();
1097  }

◆ build() [1/2]

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::build ( Mesh *&  mesh_pt,
Vector< Node * > &  new_node_pt,
bool was_already_built 
)
inline

Build function: Call the one for the SOLID element since it calls the one basic build function automatically.

1326  {
1327  SOLID::build(mesh_pt, new_node_pt, was_already_built);
1328  }

◆ build() [2/2]

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::build ( Mesh *&  mesh_pt,
Vector< Node * > &  new_node_pt,
bool was_already_built,
std::ofstream &  new_nodes_file 
)
inline

Build function: Call the one for the SOLID element since it calls the one basic build function automatically.

1316  {
1317  SOLID::build(mesh_pt, new_node_pt, was_already_built, new_nodes_file);
1318  }

◆ compute_exact_Z2_error()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::compute_exact_Z2_error ( std::ostream &  outfile,
FiniteElement::SteadyExactSolutionFctPt  exact_flux_pt,
double error,
double norm 
)
inline

Plot the error when compared against a given exact flux. Also calculates the norm of the error and that of the exact flux. Use version in BASIC element

1365  {
1366  BASIC::compute_exact_Z2_error(outfile, exact_flux_pt, error, norm);
1367  }
int error
Definition: calibrate.py:297

References calibrate::error.

◆ compute_norm()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::compute_norm ( double norm)
inline

Compute norm of solution. Use version in BASIC element.

1353  {
1354  BASIC::compute_norm(norm);
1355  }

◆ describe_local_dofs()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::describe_local_dofs ( std::ostream &  out,
const std::string &  current_string 
) const
inline

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(...)

605  {
606  BASIC::describe_local_dofs(out, current_string);
607  SOLID::describe_local_dofs(out, current_string);
608  }
std::ofstream out("Result.txt")

References out().

◆ fill_in_contribution_to_jacobian()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inline

Final override for jacobian function: Calls get_jacobian() for both of the underlying element types

658  {
659  // Call the basic equations first
660  BASIC::fill_in_contribution_to_jacobian(residuals, jacobian);
661 
662  // Call the solid equations
663  SOLID::fill_in_contribution_to_jacobian(residuals, jacobian);
664 
665  // Now fill in the off-diagonal entries (the shape derivatives),
667  }
void fill_in_shape_derivatives_by_fd(DenseMatrix< double > &jacobian)
Definition: pseudosolid_node_update_elements.h:691
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: gen_axisym_advection_diffusion_elements.h:536

References oomph::fill_in_contribution_to_jacobian(), and oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::fill_in_shape_derivatives_by_fd().

◆ fill_in_contribution_to_jacobian_and_mass_matrix()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::fill_in_contribution_to_jacobian_and_mass_matrix ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix 
)
inline

Final override for mass matrix function: contributions are included from both the underlying element types

675  {
676  // Call the basic equations first
678  residuals, jacobian, mass_matrix);
679  // Call the solid equations
681  residuals, jacobian, mass_matrix);
682 
683  // Now fill in the off-diagonal entries (the shape derivatives),
685  }
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: gen_axisym_advection_diffusion_elements.h:547

References oomph::fill_in_contribution_to_jacobian_and_mass_matrix(), and oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::fill_in_shape_derivatives_by_fd().

◆ fill_in_contribution_to_residuals()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inline

Final override for residuals function: adds contributions from both underlying element types

647  {
648  // Call the basic equations first
650  // Call the solid equations
652  }
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector (wrapper)
Definition: gen_axisym_advection_diffusion_elements.h:522

References oomph::fill_in_contribution_to_residuals().

◆ fill_in_shape_derivatives_by_fd()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::fill_in_shape_derivatives_by_fd ( DenseMatrix< double > &  jacobian)
inline

Fill in the derivatives of the BASIC equations w.r.t. to the solid position dofs, taking hanging nodes into account

692  {
693  // Find the number of nodes
694  const unsigned n_node = this->nnode();
695 
696  // If there are no nodes, return straight away
697  if (n_node == 0)
698  {
699  return;
700  }
701 
702  // Call the update function to ensure that the element is in
703  // a consistent state before finite differencing starts
704  this->update_before_solid_position_fd();
705 
706  // bool use_first_order_fd=false;
707 
708  // Find the number of positional dofs and nodal dimension
709  const unsigned n_position_type = this->nnodal_position_type();
710  const unsigned nodal_dim = this->nodal_dimension();
711 
712  // Find the number of dofs in the element
713  const unsigned n_dof = this->ndof();
714 
715  // Create residual newres vectors
716  Vector<double> residuals(n_dof);
717  Vector<double> newres(n_dof);
718  // Vector<double> newres_minus(n_dof);
719 
720  // Calculate the residuals (for the BASIC) equations
721  // Need to do this using fill_in because get_residuals will
722  // compute all residuals for the problem, which is
723  // a little ineffecient
724  for (unsigned m = 0; m < n_dof; m++)
725  {
726  residuals[m] = 0.0;
727  }
729 
730  // Need to determine which degrees of freedom are solid degrees of
731  // freedom
732  // A vector of booleans that will be true if the dof is associated
733  // with the solid equations
734  std::vector<bool> dof_is_solid(n_dof, false);
735 
736  // Now set all solid positional dofs in the vector
737  // This is a bit more involved because we need to take account of
738  // any hanging nodes
739  for (unsigned n = 0; n < n_node; n++)
740  {
741  // Get pointer to the local node
742  Node* const local_node_pt = this->node_pt(n);
743 
744  // If the node is not a hanging node
745  if (local_node_pt->is_hanging() == false)
746  {
747  for (unsigned k = 0; k < n_position_type; k++)
748  {
749  for (unsigned i = 0; i < nodal_dim; i++)
750  {
751  int local_dof = this->position_local_eqn(n, k, i);
752  if (local_dof >= 0)
753  {
754  dof_is_solid[local_dof] = true;
755  }
756  }
757  }
758  }
759  // Otherwise the node is hanging
760  else
761  {
762  // Find the local hanging object
763  HangInfo* hang_info_pt = local_node_pt->hanging_pt();
764  // Loop over the master nodes
765  const unsigned n_master = hang_info_pt->nmaster();
766  for (unsigned m = 0; m < n_master; m++)
767  {
768  // Get the local equation numbers for the master node
769  DenseMatrix<int> Position_local_eqn_at_node =
770  this->local_position_hang_eqn(hang_info_pt->master_node_pt(m));
771 
772  // Loop over position dofs
773  for (unsigned k = 0; k < n_position_type; k++)
774  {
775  // Loop over dimension
776  for (unsigned i = 0; i < nodal_dim; i++)
777  {
778  int local_dof = Position_local_eqn_at_node(k, i);
779  if (local_dof >= 0)
780  {
781  dof_is_solid[local_dof] = true;
782  }
783  }
784  }
785  }
786  }
787  } // End of loop over nodes
788 
789  // Add the solid pressures (in solid elements without
790  // solid pressure the number will be zero).
791  unsigned n_solid_pres = this->npres_solid();
792  // Now is the solid pressure hanging
793  const int solid_p_index = this->solid_p_nodal_index();
794  // Find out whether the solid node is hanging
795  std::vector<bool> solid_p_is_hanging(n_solid_pres);
796  // If we have nodal solid pressures then read out the hanging status
797  if (solid_p_index >= 0)
798  {
799  // Loop over the solid dofs
800  for (unsigned l = 0; l < n_solid_pres; l++)
801  {
802  solid_p_is_hanging[l] =
803  this->solid_pressure_node_pt(l)->is_hanging(solid_p_index);
804  }
805  }
806  // Otherwise the pressure is not nodal, so cannot hang
807  else
808  {
809  for (unsigned l = 0; l < n_solid_pres; l++)
810  {
811  solid_p_is_hanging[l] = false;
812  }
813  }
814 
815  // Now we can loop of the dofs again to actually set that the appropriate
816  // dofs are solid
817  for (unsigned l = 0; l < n_solid_pres; l++)
818  {
819  // If the solid pressure is not hanging
820  // we just read out the local equation numbers directly
821  if (solid_p_is_hanging[l] == false)
822  {
823  int local_dof = this->solid_p_local_eqn(l);
824  if (local_dof >= 0)
825  {
826  dof_is_solid[local_dof] = true;
827  }
828  }
829  // Otherwise solid pressure is hanging and we need to take
830  // care of the master nodes
831  else
832  {
833  // Find the local hanging object
834  HangInfo* hang_info_pt =
835  this->solid_pressure_node_pt(l)->hanging_pt(solid_p_index);
836  // Loop over the master nodes
837  const unsigned n_master = hang_info_pt->nmaster();
838  for (unsigned m = 0; m < n_master; m++)
839  {
840  // Get the local dof
841  int local_dof = this->local_hang_eqn(
842  hang_info_pt->master_node_pt(m), solid_p_index);
843 
844  if (local_dof >= 0)
845  {
846  dof_is_solid[local_dof] = true;
847  }
848  }
849  }
850  } // end of loop over solid pressure dofs
851 
852 
853  // Used default value defined in GeneralisedElement
854  const double fd_step = this->Default_fd_jacobian_step;
855 
856  // Integer storage for local unknowns
857  int local_unknown = 0;
858 
859  // Loop over the nodes
860  for (unsigned l = 0; l < n_node; l++)
861  {
862  // Get the pointer to the node
863  Node* const local_node_pt = this->node_pt(l);
864 
865  // If the node is not a hanging node
866  if (local_node_pt->is_hanging() == false)
867  {
868  // Loop over position dofs
869  for (unsigned k = 0; k < n_position_type; k++)
870  {
871  // Loop over dimension
872  for (unsigned i = 0; i < nodal_dim; i++)
873  {
874  local_unknown = this->position_local_eqn(l, k, i);
875  // If the variable is free
876  if (local_unknown >= 0)
877  {
878  // Store a pointer to the (generalised) Eulerian nodal position
879  double* const value_pt = &(local_node_pt->x_gen(k, i));
880 
881  // Save the old value of the (generalised) Eulerian nodal
882  // position
883  const double old_var = *value_pt;
884 
885  // Increment the (generalised) Eulerian nodal position
886  *value_pt += fd_step;
887 
888  // Perform any auxialiary node updates
889  local_node_pt->perform_auxiliary_node_update_fct();
890 
891  // Calculate the new residuals
892  // Need to do this using fill_in because get_residuals will
893  // compute all residuals for the problem, which is
894  // a little ineffecient
895  for (unsigned m = 0; m < n_dof; m++)
896  {
897  newres[m] = 0.0;
898  }
900 
901 
902  // if (use_first_order_fd)
903  {
904  // Do forward finite differences
905  for (unsigned m = 0; m < n_dof; m++)
906  {
907  // Stick the entry into the Jacobian matrix
908  // But only if it's not a solid dof
909  if (dof_is_solid[m] == false)
910  {
911  jacobian(m, local_unknown) =
912  (newres[m] - residuals[m]) / fd_step;
913  }
914  }
915  }
916  // else
917  // {
918  // //Take backwards step for the (generalised)
919  // Eulerian nodal
920  // // position
921  // node_pt(l)->x_gen(k,i) = old_var-fd_step;
922 
923  // //Calculate the new residuals at backward
924  // position BASIC::get_residuals(newres_minus);
925 
926  // //Do central finite differences
927  // for(unsigned m=0;m<n_dof;m++)
928  // {
929  // //Stick the entry into the Jacobian matrix
930  // jacobian(m,local_unknown) =
931  // (newres[m] - newres_minus[m])/(2.0*fd_step);
932  // }
933  // }
934 
935  // Reset the (generalised) Eulerian nodal position
936  *value_pt = old_var;
937 
938  // Perform any auxialiary node updates
939  local_node_pt->perform_auxiliary_node_update_fct();
940  }
941  }
942  }
943  }
944  // Otherwise it's a hanging node
945  else
946  {
947  // Find the local hanging object
948  HangInfo* hang_info_pt = local_node_pt->hanging_pt();
949  // Loop over the master nodes
950  const unsigned n_master = hang_info_pt->nmaster();
951  for (unsigned m = 0; m < n_master; m++)
952  {
953  // Get the pointer to the master node
954  Node* const master_node_pt = hang_info_pt->master_node_pt(m);
955 
956  // Get the local equation numbers for the master node
957  DenseMatrix<int> Position_local_eqn_at_node =
958  this->local_position_hang_eqn(master_node_pt);
959 
960  // Loop over position dofs
961  for (unsigned k = 0; k < n_position_type; k++)
962  {
963  // Loop over dimension
964  for (unsigned i = 0; i < nodal_dim; i++)
965  {
966  local_unknown = Position_local_eqn_at_node(k, i);
967  // If the variable is free
968  if (local_unknown >= 0)
969  {
970  // Store a pointer to the (generalised) Eulerian nodal
971  // position
972  double* const value_pt = &(master_node_pt->x_gen(k, i));
973 
974  // Save the old value of the (generalised) Eulerian nodal
975  // position
976  const double old_var = *value_pt;
977 
978  // Increment the (generalised) Eulerian nodal position
979  *value_pt += fd_step;
980 
981  // Perform any auxialiary node updates
982  master_node_pt->perform_auxiliary_node_update_fct();
983 
984  // Calculate the new residuals
985  // Need to do this using fill_in because get_residuals will
986  // compute all residuals for the problem, which is
987  // a little ineffecient
988  for (unsigned m = 0; m < n_dof; m++)
989  {
990  newres[m] = 0.0;
991  }
993 
994  // if (use_first_order_fd)
995  {
996  // Do forward finite differences
997  for (unsigned m = 0; m < n_dof; m++)
998  {
999  // Stick the entry into the Jacobian matrix
1000  // But only if it's not a solid dof
1001  if (dof_is_solid[m] == false)
1002  {
1003  jacobian(m, local_unknown) =
1004  (newres[m] - residuals[m]) / fd_step;
1005  }
1006  }
1007  }
1008  // else
1009  // {
1010  // //Take backwards step for the (generalised)
1011  // Eulerian nodal
1012  // // position
1013  // master_node_pt->x_gen(k,i) =
1014  // old_var-fd_step;
1015 
1016  // //Calculate the new residuals at backward
1017  // position
1018  // BASIC::get_residuals(newres_minus);
1019 
1020  // //Do central finite differences
1021  // for(unsigned m=0;m<n_dof;m++)
1022  // {
1023  // //Stick the entry into the Jacobian
1024  // matrix jacobian(m,local_unknown) =
1025  // (newres[m] -
1026  // newres_minus[m])/(2.0*fd_step);
1027  // }
1028  // }
1029 
1030  // Reset the (generalised) Eulerian nodal position
1031  *value_pt = old_var;
1032 
1033  // Perform any auxialiary node updates
1034  master_node_pt->perform_auxiliary_node_update_fct();
1035  }
1036  }
1037  }
1038  }
1039  } // End of hanging node case
1040 
1041  } // End of loop over nodes
1042 
1043  // End of finite difference loop
1044 
1045  // Final reset of any dependent data
1046  this->reset_after_solid_position_fd();
1047  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
int solid_p_nodal_index() const
Definition: pseudosolid_node_update_elements.h:627
int * m
Definition: level2_cplx_impl.h:294
char char char int int * k
Definition: level2_impl.h:374

References oomph::fill_in_contribution_to_residuals(), oomph::Node::hanging_pt(), i, oomph::Node::is_hanging(), k, m, oomph::HangInfo::master_node_pt(), n, oomph::HangInfo::nmaster(), oomph::Node::perform_auxiliary_node_update_fct(), oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::solid_p_nodal_index(), and oomph::Node::x_gen().

Referenced by oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::fill_in_contribution_to_jacobian(), and oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::fill_in_contribution_to_jacobian_and_mass_matrix().

◆ further_build()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::further_build ( )
inline

Further build: Done for both of the underlying element types.

1333  {
1334  BASIC::further_build();
1335  SOLID::further_build();
1336  }

◆ further_setup_hanging_nodes()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::further_setup_hanging_nodes ( )
inline

Perform additional hanging node procedures for variables that are not interpolated by all nodes. Done for both of the underlying element types.

1304  {
1305  BASIC::further_setup_hanging_nodes();
1306  SOLID::further_setup_hanging_nodes();
1307  }

◆ get_dof_numbers_for_unknowns()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::get_dof_numbers_for_unknowns ( std::list< std::pair< unsigned long, unsigned >> &  dof_lookup_list) const
inline

Create a list of pairs for all unknowns in this element, so that the first entry in each pair contains the global equation number of the unknown, while the second one contains the number of the "DOF type" that this unknown is associated with. This method combines the get_dof_numbers_for_unknowns(...) method for the BASIC and SOLID elements. The basic elements retain their DOF type numbering and the SOLID elements DOF type numbers are incremented by nbasic_dof_types().

1431  {
1432  // get the solid list
1433  std::list<std::pair<unsigned long, unsigned>> solid_list;
1434  SOLID::get_dof_numbers_for_unknowns(solid_list);
1435 
1436  // get the basic list
1437  BASIC::get_dof_numbers_for_unknowns(dof_lookup_list);
1438 
1439  // get the number of basic dof types
1440  unsigned nbasic_dof_types = BASIC::ndof_types();
1441 
1442  // add the solid lookup list to the basic lookup list
1443  // incrementing the solid dof numbers by nbasic_dof_types
1444  typedef std::list<std::pair<unsigned long, unsigned>>::iterator IT;
1445  for (IT it = solid_list.begin(); it != solid_list.end(); it++)
1446  {
1447  std::pair<unsigned long, unsigned> new_pair;
1448  new_pair.first = it->first;
1449  new_pair.second = it->second + nbasic_dof_types;
1450  dof_lookup_list.push_front(new_pair);
1451  }
1452  }
unsigned nbasic_dof_types() const
Definition: pseudosolid_node_update_elements.h:1409

References oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::nbasic_dof_types().

◆ get_interpolated_values() [1/2]

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::get_interpolated_values ( const unsigned t,
const Vector< double > &  s,
Vector< double > &  values 
)
inline

Call get_interpolated_values(...) for both of the underlying element types

1111  {
1112  Vector<double> basic_values;
1113  BASIC::get_interpolated_values(t, s, basic_values);
1114  Vector<double> solid_values;
1115  SOLID::get_interpolated_values(t, s, solid_values);
1116 
1117  // Now add the basic value first
1118  for (Vector<double>::iterator it = basic_values.begin();
1119  it != basic_values.end();
1120  ++it)
1121  {
1122  values.push_back(*it);
1123  }
1124  // Then the solid
1125  for (Vector<double>::iterator it = solid_values.begin();
1126  it != solid_values.end();
1127  ++it)
1128  {
1129  values.push_back(*it);
1130  }
1131  }
RealScalar s
Definition: level1_cplx_impl.h:130
t
Definition: plotPSD.py:36

References s, and plotPSD::t.

◆ get_interpolated_values() [2/2]

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::get_interpolated_values ( const Vector< double > &  s,
Vector< double > &  values 
)
inline

Call get_interpolated_values(...) for both of the underlying element types

1138  {
1139  Vector<double> basic_values;
1140  BASIC::get_interpolated_values(s, basic_values);
1141  Vector<double> solid_values;
1142  SOLID::get_interpolated_values(s, solid_values);
1143 
1144  // Now add the basic value first
1145  for (Vector<double>::iterator it = basic_values.begin();
1146  it != basic_values.end();
1147  ++it)
1148  {
1149  values.push_back(*it);
1150  }
1151  // Then the solid
1152  for (Vector<double>::iterator it = solid_values.begin();
1153  it != solid_values.end();
1154  ++it)
1155  {
1156  values.push_back(*it);
1157  }
1158  }

References s.

◆ get_interpolating_node_at_local_coordinate()

template<class BASIC , class SOLID >
Node* oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::get_interpolating_node_at_local_coordinate ( const Vector< double > &  s,
const int value_id 
)
inline

The velocity nodes are the same as the geometric nodes. The pressure nodes must be calculated by using the same methods as the geometric nodes, but by recalling that there are only two pressure nodes per edge.

1209  {
1210  // Find the number of interpolated values in the BASIC equations
1211  int n_basic_values = BASIC::ncont_interpolated_values();
1212  // If the id is below this number, we call the BASIC functon
1213  if (value_id < n_basic_values)
1214  {
1215  return BASIC::get_interpolating_node_at_local_coordinate(s, value_id);
1216  }
1217  // Otherwise it's the solid and its value_id is the the current
1218  // it minus n_basic_values
1219  else
1220  {
1221  return SOLID::get_interpolating_node_at_local_coordinate(
1222  s, (value_id - n_basic_values));
1223  }
1224  }

References s.

◆ get_Z2_flux()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::get_Z2_flux ( const Vector< double > &  s,
Vector< double > &  flux 
)
inline

'Flux' vector for Z2 error estimation: Error estimation is based on error in BASIC element

1296  {
1298  }
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery.
Definition: overloaded_element_body.h:745

References ProblemParameters::flux(), get_Z2_flux(), and s.

◆ identify_geometric_data()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::identify_geometric_data ( std::set< Data * > &  geometric_data_pt)
inline

Specify Data that affects the geometry of the element by adding the position Data to the set that's passed in. (This functionality is required in FSI problems; set is used to avoid double counting). Refineable version includes hanging nodes

1055  {
1056  // Loop over the node update data and add to the set
1057  const unsigned n_node = this->nnode();
1058  for (unsigned j = 0; j < n_node; j++)
1059  {
1060  // If the node is a hanging node
1061  if (this->node_pt(j)->is_hanging())
1062  {
1063  // Find the local hang info object
1064  HangInfo* hang_info_pt = this->node_pt(j)->hanging_pt();
1065 
1066  // Find the number of master nodes
1067  unsigned n_master = hang_info_pt->nmaster();
1068 
1069  // Loop over the master nodes
1070  for (unsigned m = 0; m < n_master; m++)
1071  {
1072  // Get the m-th master node
1073  Node* Master_node_pt = hang_info_pt->master_node_pt(m);
1074 
1075  // Add to set
1076  geometric_data_pt.insert(
1077  dynamic_cast<SolidNode*>(Master_node_pt)->variable_position_pt());
1078  }
1079  }
1080  // Not hanging
1081  else
1082  {
1083  // Add node itself to set
1084  geometric_data_pt.insert(
1085  dynamic_cast<SolidNode*>(this->node_pt(j))->variable_position_pt());
1086  }
1087  }
1088  }
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References j, m, oomph::HangInfo::master_node_pt(), and oomph::HangInfo::nmaster().

◆ interpolating_basis()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::interpolating_basis ( const Vector< double > &  s,
Shape psi,
const int value_id 
) const
inline

The basis interpolating the pressure is given by pshape(). / The basis interpolating the velocity is shape().

1269  {
1270  // Find the number of interpolated values in the BASIC equations
1271  int n_basic_values = BASIC::ncont_interpolated_values();
1272  // If the id is below this number, we call the BASIC functon
1273  if (value_id < n_basic_values)
1274  {
1275  return BASIC::interpolating_basis(s, psi, value_id);
1276  }
1277  // Otherwise it's the solid and its value_id is the the current
1278  // it minus n_basic_values
1279  else
1280  {
1281  return SOLID::interpolating_basis(s, psi, (value_id - n_basic_values));
1282  }
1283  }

References s.

◆ interpolating_node_pt()

template<class BASIC , class SOLID >
Node* oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::interpolating_node_pt ( const unsigned n,
const int value_id 
)
inline

We must compose the underlying interpolating nodes from the BASIC and SOLID equations, the BASIC ones are first

1163  {
1164  // Find the number of interpolated values in the BASIC equations
1165  int n_basic_values = BASIC::ncont_interpolated_values();
1166  // If the id is below this number, we call the BASIC functon
1167  if (value_id < n_basic_values)
1168  {
1169  return BASIC::interpolating_node_pt(n, value_id);
1170  }
1171  // Otherwise it's the solid and its value_id is the the current
1172  // it minus n_basic_values
1173  else
1174  {
1175  return SOLID::interpolating_node_pt(n, (value_id - n_basic_values));
1176  }
1177  }

References n.

◆ local_one_d_fraction_of_interpolating_node()

template<class BASIC , class SOLID >
double oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::local_one_d_fraction_of_interpolating_node ( const unsigned n1d,
const unsigned i,
const int value_id 
)
inline

The pressure nodes are the corner nodes, so when value_id==0, the fraction is the same as the 1d node number, 0 or 1.

1184  {
1185  // Find the number of interpolated values in the BASIC equations
1186  int n_basic_values = BASIC::ncont_interpolated_values();
1187  // If the id is below this number, we call the BASIC functon
1188  if (value_id < n_basic_values)
1189  {
1190  return BASIC::local_one_d_fraction_of_interpolating_node(
1191  n1d, i, value_id);
1192  }
1193  // Otherwise it's the solid and its value_id is the the current
1194  // it minus n_basic_values
1195  else
1196  {
1197  return SOLID::local_one_d_fraction_of_interpolating_node(
1198  n1d, i, (value_id - n_basic_values));
1199  }
1200  }

References i.

◆ nbasic_dof_types()

template<class BASIC , class SOLID >
unsigned oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::nbasic_dof_types ( ) const
inline

return the number of DOF types associated with the BASIC elements in this combined element

1410  {
1411  return BASIC::ndof_types();
1412  }

Referenced by oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::get_dof_numbers_for_unknowns().

◆ ncont_interpolated_values()

template<class BASIC , class SOLID >
unsigned oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::ncont_interpolated_values ( ) const
inline

The number of continuously interpolated values is the sum of the SOLID and BASIC values

619  {
620  return BASIC::ncont_interpolated_values() +
621  SOLID::ncont_interpolated_values();
622  }

◆ ndof_types()

template<class BASIC , class SOLID >
unsigned oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::ndof_types ( ) const
inline

The number of "DOF types" that degrees of freedom in this element are sub-divided into.

1403  {
1404  return BASIC::ndof_types() + SOLID::ndof_types();
1405  }

◆ ninterpolating_node()

template<class BASIC , class SOLID >
unsigned oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::ninterpolating_node ( const int value_id)
inline

The number of pressure nodes is 2^DIM. The number of velocity nodes is the same as the number of geometric nodes.

1248  {
1249  // Find the number of interpolated values in the BASIC equations
1250  int n_basic_values = BASIC::ncont_interpolated_values();
1251  // If the id is below this number, we call the BASIC functon
1252  if (value_id < n_basic_values)
1253  {
1254  return BASIC::ninterpolating_node(value_id);
1255  }
1256  // Otherwise it's the solid and its value_id is the the current
1257  // it minus n_basic_values
1258  else
1259  {
1260  return SOLID::ninterpolating_node((value_id - n_basic_values));
1261  }
1262  }

◆ ninterpolating_node_1d()

template<class BASIC , class SOLID >
unsigned oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::ninterpolating_node_1d ( const int value_id)
inline

The number of 1d pressure nodes is 2, otherwise we have the positional nodes

1229  {
1230  // Find the number of interpolated values in the BASIC equations
1231  int n_basic_values = BASIC::ncont_interpolated_values();
1232  // If the id is below this number, we call the BASIC functon
1233  if (value_id < n_basic_values)
1234  {
1235  return BASIC::ninterpolating_node_1d(value_id);
1236  }
1237  // Otherwise it's the solid and its value_id is the the current
1238  // it minus n_basic_values
1239  else
1240  {
1241  return SOLID::ninterpolating_node_1d((value_id - n_basic_values));
1242  }
1243  }

◆ nrecovery_order()

template<class BASIC , class SOLID >
unsigned oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::nrecovery_order ( )
inline

Order of recovery shape functions for Z2 error estimation: Done for BASIC element since it determines the refinement

1372  {
1373  return BASIC::nrecovery_order();
1374  }

◆ nsolid_dof_types()

template<class BASIC , class SOLID >
unsigned oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::nsolid_dof_types ( ) const
inline

return the number of DOF types associated with the SOLID elements in this combined element

1417  {
1418  return SOLID::ndof_types();
1419  }

◆ num_Z2_flux_terms()

template<class BASIC , class SOLID >
unsigned oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::num_Z2_flux_terms ( )
inline

Number of 'flux' terms for Z2 error estimation: Error estimation is based on error in BASIC element

1289  {
1290  return BASIC::num_Z2_flux_terms();
1291  }

◆ nvertex_node()

template<class BASIC , class SOLID >
unsigned oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::nvertex_node ( ) const
inline

Number of vertex nodes in the element.

1341  {
1342  return BASIC::nvertex_node();
1343  }

◆ output() [1/4]

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::output ( FILE *  file_pt)
inline

Overload the output function: Use that of the BASIC element.

1390  {
1391  BASIC::output(file_pt);
1392  }
void output(std::ostream &outfile, const unsigned &nplot)
Overload output function.
Definition: overloaded_element_body.h:490

References output().

◆ output() [2/4]

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::output ( FILE *  file_pt,
const unsigned n_p 
)
inline

Output function: Use that of the BASIC element.

1396  {
1397  BASIC::output(file_pt, n_p);
1398  }

References output().

◆ output() [3/4]

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::output ( std::ostream &  outfile)
inline

Overload the output function: Use that of the BASIC element.

1378  {
1379  BASIC::output(outfile);
1380  }

References output().

◆ output() [4/4]

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::output ( std::ostream &  outfile,
const unsigned n_p 
)
inline

Output function, plotting at n_p points: Use that of the BASIC element.

1384  {
1385  BASIC::output(outfile, n_p);
1386  }

References output().

◆ rebuild_from_sons()

template<class BASIC , class SOLID >
void oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::rebuild_from_sons ( Mesh *&  mesh_pt)
inline

Call rebuild_from_sons() for both of the underlying element types.

1101  {
1102  BASIC::rebuild_from_sons(mesh_pt);
1103  SOLID::rebuild_from_sons(mesh_pt);
1104  }

◆ required_nvalue()

template<class BASIC , class SOLID >
unsigned oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::required_nvalue ( const unsigned n) const
inline

The required number of values is the sum of the two.

612  {
613  return BASIC::required_nvalue(n) + SOLID::required_nvalue(n);
614  }

References n.

◆ solid_p_nodal_index()

template<class BASIC , class SOLID >
int oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::solid_p_nodal_index ( ) const
inline

We assume that the solid stuff is stored at the end of the nodes, i.e. its index is the number of continuously interplated values in the BASIC equations.

628  {
629  // Find the index in the solid
630  int solid_p_index = SOLID::solid_p_nodal_index();
631  // If there is a solid pressure at the nodes, return the
632  // index after all the BASIC stuff
633  if (solid_p_index >= 0)
634  {
635  return BASIC::ncont_interpolated_values() +
636  SOLID::solid_p_nodal_index();
637  }
638  else
639  {
640  return solid_p_index;
641  }
642  }

Referenced by oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::fill_in_shape_derivatives_by_fd().

◆ vertex_node_pt()

template<class BASIC , class SOLID >
Node* oomph::RefineablePseudoSolidNodeUpdateElement< BASIC, SOLID >::vertex_node_pt ( const unsigned j) const
inline

Pointer to the j-th vertex node in the element.

1347  {
1348  return BASIC::vertex_node_pt(j);
1349  }

References j.


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