fsi.h
Go to the documentation of this file.
1 // LIC// ====================================================================
2 // LIC// This file forms part of oomph-lib, the object-oriented,
3 // LIC// multi-physics finite-element library, available
4 // LIC// at http://www.oomph-lib.org.
5 // LIC//
6 // LIC// Copyright (C) 2006-2022 Matthias Heil and Andrew Hazel
7 // LIC//
8 // LIC// This library is free software; you can redistribute it and/or
9 // LIC// modify it under the terms of the GNU Lesser General Public
10 // LIC// License as published by the Free Software Foundation; either
11 // LIC// version 2.1 of the License, or (at your option) any later version.
12 // LIC//
13 // LIC// This library is distributed in the hope that it will be useful,
14 // LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // LIC// Lesser General Public License for more details.
17 // LIC//
18 // LIC// You should have received a copy of the GNU Lesser General Public
19 // LIC// License along with this library; if not, write to the Free Software
20 // LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 // LIC// 02110-1301 USA.
22 // LIC//
23 // LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24 // LIC//
25 // LIC//====================================================================
26 #ifndef OOMPH_FSI_HEADER
27 #define OOMPH_FSI_HEADER
28 
29 // Config header generated by autoconfig
30 #ifdef HAVE_CONFIG_H
31 #include <oomph-lib-config.h>
32 #endif
33 
34 #include <algorithm>
35 
36 // oomph-lib headers
37 #include "elements.h"
38 #include "mesh.h"
39 #include "geom_objects.h"
41 #include "integral.h"
42 #include "problem.h"
43 #include "multi_domain.template.cc"
44 
45 namespace oomph
46 {
47  class AlgebraicNode;
48 
49 
52  // FSIFluidElement
55 
56 
57  //=========================================================================
61  //=========================================================================
62  class FSIFluidElement : public virtual FiniteElement
63  {
64  public:
67 
68 
70  FSIFluidElement(const FSIFluidElement&) = delete;
71 
73  void operator=(const FSIFluidElement&) = delete;
74 
78  virtual void get_load(const Vector<double>& s,
79  const Vector<double>& N,
80  Vector<double>& load) = 0;
81 
82 
90  virtual void identify_load_data(
91  std::set<std::pair<Data*, unsigned>>& paired_load_data) = 0;
92 
101  std::set<std::pair<Data*, unsigned>>& paired_pressure_data) = 0;
102  };
103 
104 
108 
109 
110  //=========================================================================
191  //=========================================================================
192  class FSIWallElement : public virtual SolidFiniteElement,
193  public virtual ElementWithExternalElement
194  {
195  public:
204  void describe_local_dofs(std::ostream& out,
205  const std::string& current_string) const;
206 
209 
216  {
217  }
218 
220  FSIWallElement(const FSIWallElement&) = delete;
221 
223  void operator=(const FSIWallElement&) = delete;
224 
226  virtual ~FSIWallElement() {}
227 
233  void setup_fsi_wall_element(const unsigned& nlagr_solid,
234  const unsigned& ndim_fluid);
235 
241  const double& q() const
242  {
243  return *Q_pt;
244  }
245 
248  double*& q_pt()
249  {
250  return Q_pt;
251  }
252 
253 
259 
260 
270  {
272  }
273 
274 
283  {
285  }
286 
287 
291  {
294  }
295 
304  {
306  }
307 
311  {
313  }
314 
318 
319 
324  DenseMatrix<double>& jacobian)
325  {
326  // Add the contribution to the residuals
328 
329  // Solve for the consistent acceleraction in the Newmark scheme
331  {
333  return;
334  }
335 
336  // Allocate storage for the full residuals (residuals of the entire
337  // element)
338  Vector<double> full_residuals(this->ndof());
339  // Get the residuals for the entire element
340  get_residuals(full_residuals);
341  // Add the internal and external by finite differences
342  fill_in_jacobian_from_internal_by_fd(full_residuals, jacobian);
343  fill_in_jacobian_from_external_by_fd(full_residuals, jacobian);
344  fill_in_jacobian_from_nodal_by_fd(full_residuals, jacobian);
347  jacobian);
348  }
349 
350  protected:
352  inline void update_in_internal_fd(const unsigned& i)
353  {
355  {
357  }
358  }
359 
360  // Do nothing
361  inline void reset_in_internal_fd(const unsigned& i) {}
362 
363  // After all internal stuff reset
365  {
367  {
369  }
370  }
371 
372 
374  inline void update_in_external_fd(const unsigned& i)
375  {
377  {
379  }
380  }
381 
382  // Do nothing
383  inline void reset_in_external_fd(const unsigned& i) {}
384 
385  // After all external stuff reset
387  {
389  {
391  }
392  }
393 
394 
396  inline void update_in_nodal_fd(const unsigned& i)
397  {
399  {
401  }
402  }
403 
404  // Do nothing
405  inline void reset_in_nodal_fd(const unsigned& i) {}
406 
407  // After all nodal stuff reset
408  inline void reset_after_nodal_fd()
409  {
411  {
413  }
414  }
415 
417  inline void update_in_external_interaction_field_fd(const unsigned& i)
418  {
420  {
422  }
423  }
424 
425  // Do nothing
426  inline void reset_in_external_interaction_field_fd(const unsigned& i) {}
427 
428  // After all external field stuff reset
430  {
432  {
434  }
435  }
436 
437 
440  inline void update_in_external_interaction_geometric_fd(const unsigned& i)
441  {
443  {
445  }
446  }
447 
448  // Do nothing
449  inline void reset_in_external_interaction_geometric_fd(const unsigned& i) {}
450 
451  // After all external geometric stuff reset
453  {
455  {
457  }
458  }
459 
460 
462  inline void update_in_solid_position_fd(const unsigned& i)
463  {
465  {
467  }
468  }
469 
470  // Do nothing
471  inline void reset_in_solid_position_fd(const unsigned& i) {}
472 
473  // After all internal stuff reset
475  {
477  {
479  }
480  }
481 
482 
494  // void fill_in_jacobian_from_solid_position_and_external_by_fd(
495  // DenseMatrix<double>& jacobian);
496 
497 
506  void fluid_load_vector(const unsigned& intpt,
507  const Vector<double>& N,
509 
510 
511  private:
517  Vector<std::set<FiniteElement*>> const& external_elements_pt,
518  std::set<std::pair<Data*, unsigned>>& paired_iteraction_data);
519 
523  Vector<std::set<FiniteElement*>> const& external_elements_pt,
524  std::set<Data*>& external_geometric_data_pt);
525 
528  static double Default_Q_Value;
529 
536 
540  double* Q_pt;
541 
548  };
549 
550 
554 
555 
556  //======================================================================
557  // Namespace for "global" FSI functions
558  //======================================================================
559  namespace FSI_functions
560  {
561  //============================================================================
569  //============================================================================
570  extern void apply_no_slip_on_moving_wall(Node* node_pt);
571 
572 
573  //============================================================================
576  //============================================================================
577  extern double Strouhal_for_no_slip;
578 
579 
580  //============================================================================
599  //============================================================================
600  template<class FLUID_ELEMENT, unsigned DIM_FLUID>
602  Problem* problem_pt,
603  Vector<unsigned>& boundary_in_fluid_mesh,
604  Mesh* const& fluid_mesh_pt,
605  Vector<Mesh*>& solid_mesh_pt,
606  const unsigned& face = 0)
607  {
608  // Thin wrapper to multi-domain function
611  DIM_FLUID>(
612  problem_pt, boundary_in_fluid_mesh, fluid_mesh_pt, solid_mesh_pt, face);
613  }
614 
615  //============================================================================
630  //============================================================================
631  template<class FLUID_ELEMENT, unsigned DIM_FLUID>
633  Problem* problem_pt,
634  const unsigned& boundary_in_fluid_mesh,
635  Mesh* const& fluid_mesh_pt,
636  Mesh* const& solid_mesh_pt,
637  const unsigned& face = 0)
638  {
639  // Thin wrapper to multi-domain function
642  DIM_FLUID>(
643  problem_pt, boundary_in_fluid_mesh, fluid_mesh_pt, solid_mesh_pt, face);
644  }
645 
646 
647  //============================================================================
663  //============================================================================
664  template<class SOLID_ELEMENT, unsigned DIM_SOLID>
666  Problem* problem_pt,
667  const Vector<unsigned>& b_solid_fsi,
668  Mesh* const& solid_mesh_pt,
669  Vector<Mesh*>& lagrange_multiplier_mesh_pt)
670  {
671  // Thin wrapper to multi-domain function
673  SOLID_ELEMENT,
674  DIM_SOLID>(
675  problem_pt, b_solid_fsi, solid_mesh_pt, lagrange_multiplier_mesh_pt, 0);
676  }
677 
678 
679  //============================================================================
690  //============================================================================
691  template<class SOLID_ELEMENT, unsigned DIM_SOLID>
693  Problem* problem_pt,
694  const unsigned& b_solid_fsi,
695  Mesh* const& solid_mesh_pt,
696  Mesh* const& lagrange_multiplier_mesh_pt)
697  {
698  // Thin wrapper to multi-domain function
700  SOLID_ELEMENT,
701  DIM_SOLID>(
702  problem_pt, b_solid_fsi, solid_mesh_pt, lagrange_multiplier_mesh_pt, 0);
703  }
704 
705 
706  //============================================================================
722  //============================================================================
723  template<class NODE>
724  void doc_fsi(Mesh* fluid_mesh_pt,
725  SolidMesh* wall_mesh_pt,
726  DocInfo& doc_info)
727  {
728  std::ofstream some_file;
729  std::ostringstream filename;
730 
731  // Number of plot points
732  unsigned npts;
733  npts = 5;
734 
735  // Part 1: Doc which dofs affect the fluid traction on solid
736  //==========================================================
737 
738  // Tecplot helpers
740  label[0] = "X=";
741  label[1] = "Y=";
742  label[2] = "Z=";
743 
744  // Output fluid solution/mesh
745  //---------------------------
746  filename << doc_info.directory() << "/fsi_doc_fluid_mesh"
747  << doc_info.number() << ".dat";
748  some_file.open(filename.str().c_str());
749  fluid_mesh_pt->output(some_file, npts);
750  some_file.close();
751 
752 
753  // Setup map that links the positional Data of SolidNodes with
754  //------------------------------------------------------------
755  // the nodes
756  //----------
757  std::map<Data*, Node*> solid_node_pt;
758  unsigned nnod = wall_mesh_pt->nnode();
759  for (unsigned j = 0; j < nnod; j++)
760  {
761  solid_node_pt[wall_mesh_pt->node_pt(j)->variable_position_pt()] =
762  wall_mesh_pt->node_pt(j);
763  }
764 
765 
766  // Setup map that links the internal (pressure) Data of fluid elements
767  // with
768  //-------------------------------------------------------------------------
769  // those fluid elements
770  //---------------------
771  std::map<Data*, FiniteElement*> internal_data_element_pt;
772  unsigned nelemf = fluid_mesh_pt->nelement();
773  for (unsigned e = 0; e < nelemf; e++)
774  {
775  unsigned ninternal = fluid_mesh_pt->element_pt(e)->ninternal_data();
776  for (unsigned k = 0; k < ninternal; k++)
777  {
778  internal_data_element_pt[fluid_mesh_pt->element_pt(e)
779  ->internal_data_pt(k)] =
780  fluid_mesh_pt->finite_element_pt(e);
781  }
782  }
783 
784 
785 #ifdef OOMPH_HAS_MPI
786  // External halo elements must also be included in this check
787  std::set<int> procs = fluid_mesh_pt->external_halo_proc();
788  for (std::set<int>::iterator it = procs.begin(); it != procs.end(); it++)
789  {
790  unsigned d = unsigned((*it));
791  unsigned n_ext_halo_f = fluid_mesh_pt->nexternal_halo_element(d);
792  for (unsigned e = 0; e < n_ext_halo_f; e++)
793  {
794  unsigned ninternal =
795  fluid_mesh_pt->external_halo_element_pt(d, e)->ninternal_data();
796  for (unsigned k = 0; k < ninternal; k++)
797  {
798  internal_data_element_pt[fluid_mesh_pt
799  ->external_halo_element_pt(d, e)
800  ->internal_data_pt(k)] =
801  dynamic_cast<FiniteElement*>(
802  fluid_mesh_pt->external_halo_element_pt(d, e));
803  }
804  }
805  }
806 #endif
807 
808 
809  // Loop over all wall elements
810  //----------------------------
811  unsigned nelem = wall_mesh_pt->nelement();
812  for (unsigned e = 0; e < nelem; e++)
813  {
814  // Reset the string contents to be empty
815  filename.str("");
816  // Set the new filename
817  filename << doc_info.directory() << "/fsi_doc_wall_element"
818  << doc_info.number() << "-" << e << ".dat";
819  some_file.open(filename.str().c_str());
820 
821  // Get pointer to wall element
822  FSIWallElement* el_pt =
823  dynamic_cast<FSIWallElement*>(wall_mesh_pt->finite_element_pt(e));
824 
825 #ifdef OOMPH_HAS_MPI
826  // If it's a halo element then it will not have set an adjacent
827  // fluid element so there's no point trying to output it!
828  if (!el_pt->is_halo())
829  {
830 #endif
831 
832  // Storage for local and global coords
833  unsigned ndim_local = el_pt->dim();
834  Vector<double> s(ndim_local);
835  unsigned ndim_eulerian = el_pt->nodal_dimension();
836  Vector<double> x(ndim_eulerian);
837 
838 
839  // Map to indicate if the internal Data for a given
840  // fluid element has been plotted already
841  std::map<FiniteElement*, bool> element_internal_data_has_been_plotted;
842 
843  // Loop over Gauss points and doc their position
844  //-----------------------------------------------
845  unsigned nint = el_pt->integral_pt()->nweight();
846  some_file << "ZONE I=" << nint << std::endl;
847  for (unsigned i = 0; i < nint; i++)
848  {
849  for (unsigned j = 0; j < ndim_local; j++)
850  {
851  s[j] = el_pt->integral_pt()->knot(i, j);
852  }
853  el_pt->interpolated_x(s, x);
854  for (unsigned j = 0; j < ndim_eulerian; j++)
855  {
856  some_file << x[j] << " ";
857  }
858  some_file << i << std::endl;
859  }
860 
861 
862  // Loop over Gauss points again to find corresponding points in fluid
863  //--------------------------------------------------------------------
864  // elements
865  //---------
866 
867  // Loop over front and back if required: Get number of fluid-loaded
868  // faces
869  unsigned n_loaded_face = 2;
870  if (el_pt->only_front_is_loaded_by_fluid()) n_loaded_face = 1;
871 
872  for (unsigned face = 0; face < n_loaded_face; face++)
873  {
874  some_file << "ZONE I=" << nint << std::endl;
875  for (unsigned i = 0; i < nint; i++)
876  {
877  // Get corresponding fluid element
878  FSIFluidElement* fluid_el_pt = dynamic_cast<FSIFluidElement*>(
879  el_pt->external_element_pt(face, i));
880 
881  // Get local coordinates in fluid element by copy operation
882  Vector<double> s_fluid(
883  el_pt->external_element_local_coord(face, i));
884 
885  // Get Eulerian position in fluid element
886  fluid_el_pt->interpolated_x(s_fluid, x);
887  for (unsigned j = 0; j < ndim_eulerian; j++)
888  {
889  some_file << x[j] << " ";
890  }
891  some_file << i << std::endl;
892  }
893  }
894 
895 
896  // Get the multiplicity of data that affects the load on this wall
897  // element
898  //------------------------------------------------------------------------
899  std::map<Data*, unsigned> data_count;
900  std::map<FiniteElement*, unsigned> internal_data_count;
901  {
902  Vector<Data*> external_interaction_field_data_pt(
904  unsigned nexternal_interaction_field =
905  external_interaction_field_data_pt.size();
906  for (unsigned l = 0; l < nexternal_interaction_field; l++)
907  {
908  data_count[external_interaction_field_data_pt[l]]++;
909  if (internal_data_element_pt
910  [external_interaction_field_data_pt[l]] != 0)
911  {
912  internal_data_count
913  [internal_data_element_pt
914  [external_interaction_field_data_pt[l]]]++;
915  }
916  }
917  }
918 
919  {
920  Vector<Data*> external_interaction_geometric_data_pt(
922  unsigned nexternal_interaction_geom =
923  external_interaction_geometric_data_pt.size();
924  for (unsigned l = 0; l < nexternal_interaction_geom; l++)
925  {
926  data_count[external_interaction_geometric_data_pt[l]]++;
927  if (internal_data_element_pt
928  [external_interaction_geometric_data_pt[l]] != 0)
929  {
930  internal_data_count
931  [internal_data_element_pt
932  [external_interaction_geometric_data_pt[l]]]++;
933  }
934  }
935  }
936 
937  // Loop over unique data entries
938  //------------------------------
939  for (std::map<Data*, unsigned>::iterator it = data_count.begin();
940  it != data_count.end();
941  it++)
942  {
943  Data* unique_data_pt = it->first;
944 
945  // Try to cast to a Node
946  //----------------------
947  Node* node_pt = dynamic_cast<Node*>(unique_data_pt);
948  if (node_pt == 0)
949  {
950  // Is it a solid node? NOTE: This query makes sense as we're
951  //----------------------------------------------------------
952  // checking for the SolidNode's *positional* Data, not for
953  //--------------------------------------------------------
954  // the SolidNode itself!
955  //----------------------
956  if (solid_node_pt[unique_data_pt] != 0)
957  {
958  some_file << "TEXT ";
959  for (unsigned j = 0; j < ndim_eulerian; j++)
960  {
961  some_file << label[j] << solid_node_pt[unique_data_pt]->x(j)
962  << " ";
963  }
964 
965  some_file << "CS=GRID, HU=FRAME, H=2.5, AN=MIDCENTER, C=GREEN "
966  << "T=\"" << it->second << "\"" << std::endl;
967  }
968 
969  // Is it internal (pressure) Data in a fluid element?
970  //---------------------------------------------------
971  else if (internal_data_element_pt[unique_data_pt] != 0)
972  {
973  if (!element_internal_data_has_been_plotted
974  [internal_data_element_pt[unique_data_pt]])
975  {
976  some_file << "TEXT ";
977  // Pointer to fluid element that contains this internal data
978  FiniteElement* fluid_el_pt =
979  internal_data_element_pt[unique_data_pt];
980 
981  // Get the plot coordinates in this element: centre + a bit of
982  // offset
983  double s_max = fluid_el_pt->s_max();
984  double s_min = fluid_el_pt->s_min();
985  Vector<double> s_fluid(ndim_eulerian);
986  Vector<double> x_fluid(ndim_eulerian);
987  for (unsigned k = 0; k < ndim_eulerian; k++)
988  {
989  s_fluid[k] = 0.5 * (s_max + s_min) + 0.1 * (s_max - s_min);
990  }
991  fluid_el_pt->interpolated_x(s_fluid, x_fluid);
992  for (unsigned j = 0; j < ndim_eulerian; j++)
993  {
994  some_file << label[j] << x_fluid[j] << " ";
995  }
996 
997  some_file << "CS=GRID, HU=FRAME, H=2.5, AN=MIDCENTER, C=BLUE "
998  << "T=\"" << it->second
999  << "\""
1000  // internal_data_count[fluid_el_pt]
1001  << std::endl;
1002 
1003  // Now we have plotted it....
1004  element_internal_data_has_been_plotted
1005  [internal_data_element_pt[unique_data_pt]] = true;
1006  }
1007  }
1008  else
1009  {
1010  std::ostringstream error_message;
1011  error_message
1012  << "Data that affects the load on an FSIWallElement\n"
1013  << "is neither a (fluid) Node, nor a SolidNode nor\n"
1014  << "internal Data in a (fluid) element\n"
1015  << "I don't think this should happen..." << std::endl;
1016  throw OomphLibError(error_message.str(),
1019  }
1020  }
1021  // It must be a node then
1022  //-----------------------
1023  else
1024  {
1025  some_file << "TEXT ";
1026  for (unsigned j = 0; j < ndim_eulerian; j++)
1027  {
1028  some_file << label[j] << node_pt->x(j) << ", ";
1029  }
1030  some_file << "CS=GRID, HU=FRAME, H=2.5, AN=MIDCENTER, C=RED "
1031  << "T=\"" << it->second << "\"" << std::endl;
1032  }
1033  }
1034 
1035 #ifdef OOMPH_HAS_MPI
1036  } // end is_halo()
1037 #endif
1038  some_file.close();
1039  }
1040 
1041  // Part 2: Doc which dofs affect the node update functions
1042  //========================================================
1043 
1044 
1045  // Counter for the number of nodes that are actually
1046  // affected by wall motion
1047  unsigned count = 0;
1048 
1049  // Loop over nodes in fluid mesh
1050  unsigned nnode_fluid = fluid_mesh_pt->nnode();
1051  for (unsigned j = 0; j < nnode_fluid; j++)
1052  {
1053  // Upcast node to appropriate type
1054  NODE* node_pt = dynamic_cast<NODE*>(fluid_mesh_pt->node_pt(j));
1055 
1056  unsigned ndim_eulerian = node_pt->ndim();
1057 
1058  // Cleart the filename
1059  filename.str("");
1060  filename << doc_info.directory() << "/fsi_doc_fluid_element"
1061  << doc_info.number() << "-" << count << ".dat";
1062  some_file.open(filename.str().c_str());
1063  some_file << "ZONE" << std::endl;
1064  for (unsigned i = 0; i < ndim_eulerian; i++)
1065  {
1066  some_file << node_pt->x(i) << " ";
1067  }
1068  some_file << std::endl;
1069 
1070  // Extract geom objects that affect the nodal position
1071  Vector<GeomObject*> geom_obj_pt(node_pt->vector_geom_object_pt());
1072 
1073 
1074  // Get the multiplicity of data that affects this node
1075  //----------------------------------------------------
1076  std::map<Data*, unsigned> data_count;
1077  unsigned ngeom = geom_obj_pt.size();
1078  for (unsigned i = 0; i < ngeom; i++)
1079  {
1080  unsigned ngeom_dat = geom_obj_pt[i]->ngeom_data();
1081  for (unsigned k = 0; k < ngeom_dat; k++)
1082  {
1083  data_count[geom_obj_pt[i]->geom_data_pt(k)]++;
1084  }
1085  }
1086 
1087  // Haven't actually doced any dependcies for this node
1088  bool written_something = false;
1089 
1090  // Loop over unique data entries
1091  //------------------------------
1092  for (std::map<Data*, unsigned>::iterator it = data_count.begin();
1093  it != data_count.end();
1094  it++)
1095  {
1096  Data* unique_data_pt = it->first;
1097 
1098  // Is it a solid node?
1099  if (solid_node_pt[unique_data_pt] != 0)
1100  {
1101  some_file << "TEXT ";
1102  for (unsigned j = 0; j < ndim_eulerian; j++)
1103  {
1104  some_file << label[j] << solid_node_pt[unique_data_pt]->x(j)
1105  << " ";
1106  }
1107 
1108  some_file << "CS=GRID, HU=FRAME, H=2.5, AN=MIDCENTER, C=GREEN "
1109  << "T=\"" << unique_data_pt->nvalue() << "\""
1110  << std::endl;
1111 
1112  // We've actually produced some output
1113  written_something = true;
1114  }
1115  // It's not a solid node --> ??
1116  else
1117  {
1118  std::ostringstream warn_message;
1119  warn_message
1120  << "Info: Position of a fluid node is affected by Data that"
1121  << "is not a SolidNode --> Can't plot this Data. \n\n"
1122  << "(You may also want to check if this is exepcted or likely "
1123  "to\n"
1124  << "indicate a bug in your code...)" << std::endl;
1125  throw OomphLibWarning(warn_message.str(),
1126  "FSI_functions::doc_fsi()",
1128  }
1129  }
1130 
1131 
1132  some_file.close();
1133 
1134  // If we've written something for the last node, bump up
1135  // counter for file so we don't overwrite
1136  if (written_something) count++;
1137  }
1138 
1139  } // end_of_doc_fsi
1140 
1141  } // namespace FSI_functions
1142 
1143 } // namespace oomph
1144 
1145 #endif
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void load(Archive &ar, ParticleHandler &handl)
Definition: Particles.h:21
Definition: nodes.h:86
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
Definition: oomph_utilities.h:499
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
Definition: element_with_external_element.h:56
Vector< double > & external_element_local_coord(const unsigned &interaction_index, const unsigned &ipt)
Definition: element_with_external_element.h:136
FiniteElement *& external_element_pt(const unsigned &interaction_index, const unsigned &ipt)
Definition: element_with_external_element.h:107
Vector< Data * > external_interaction_field_data_pt() const
Definition: element_with_external_element.h:212
void fill_in_jacobian_from_external_interaction_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: element_with_external_element.h:345
bool Add_external_interaction_data
Boolean flag to indicate whether to include the external data.
Definition: element_with_external_element.h:508
Vector< Data * > external_interaction_geometric_data_pt() const
Definition: element_with_external_element.h:251
Definition: fsi.h:63
virtual void identify_pressure_data(std::set< std::pair< Data *, unsigned >> &paired_pressure_data)=0
void operator=(const FSIFluidElement &)=delete
Broken assignment operator.
FSIFluidElement()
Constructor.
Definition: fsi.h:66
FSIFluidElement(const FSIFluidElement &)=delete
Broken copy constructor.
virtual void identify_load_data(std::set< std::pair< Data *, unsigned >> &paired_load_data)=0
virtual void get_load(const Vector< double > &s, const Vector< double > &N, Vector< double > &load)=0
Definition: fsi.h:194
void enable_fluid_loading_on_both_sides()
Definition: fsi.cc:138
FSIWallElement(const FSIWallElement &)=delete
Broken copy constructor.
void reset_after_nodal_fd()
Definition: fsi.h:408
void reset_after_external_fd()
Definition: fsi.h:386
void setup_fsi_wall_element(const unsigned &nlagr_solid, const unsigned &ndim_fluid)
Definition: fsi.cc:121
void update_in_external_interaction_geometric_fd(const unsigned &i)
Definition: fsi.h:440
virtual ~FSIWallElement()
Empty virtual destructor for safety.
Definition: fsi.h:226
void fluid_load_vector(const unsigned &intpt, const Vector< double > &N, Vector< double > &load)
Definition: fsi.cc:162
bool only_front_is_loaded_by_fluid() const
Definition: fsi.h:269
void reset_after_external_interaction_field_fd()
Definition: fsi.h:429
void disable_shear_stress_in_jacobian()
Definition: fsi.h:303
void include_external_load_data()
Definition: fsi.h:290
bool Ignore_shear_stress_in_jacobian
Definition: fsi.h:547
void identify_all_geometric_data_for_external_interaction(Vector< std::set< FiniteElement * >> const &external_elements_pt, std::set< Data * > &external_geometric_data_pt)
Definition: fsi.cc:317
void operator=(const FSIWallElement &)=delete
Broken assignment operator.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: fsi.h:323
void update_in_external_fd(const unsigned &i)
After an external data change, update the nodal positions.
Definition: fsi.h:374
void enable_shear_stress_in_jacobian()
Definition: fsi.h:310
void exclude_external_load_data()
Definition: fsi.h:282
void reset_in_external_interaction_geometric_fd(const unsigned &i)
Definition: fsi.h:449
void reset_in_solid_position_fd(const unsigned &i)
Definition: fsi.h:471
void reset_after_internal_fd()
Definition: fsi.h:364
void identify_all_field_data_for_external_interaction(Vector< std::set< FiniteElement * >> const &external_elements_pt, std::set< std::pair< Data *, unsigned >> &paired_iteraction_data)
Definition: fsi.cc:279
void update_in_external_interaction_field_fd(const unsigned &i)
After an external field data change, update the nodal positions.
Definition: fsi.h:417
double * Q_pt
Definition: fsi.h:540
const double & q() const
Definition: fsi.h:241
static double Default_Q_Value
Definition: fsi.h:528
void reset_after_external_interaction_geometric_fd()
Definition: fsi.h:452
double *& q_pt()
Definition: fsi.h:248
void reset_in_external_interaction_field_fd(const unsigned &i)
Definition: fsi.h:426
void update_in_nodal_fd(const unsigned &i)
After a nodal data change, update the nodal positions.
Definition: fsi.h:396
void update_in_solid_position_fd(const unsigned &i)
After an internal data change, update the nodal positions.
Definition: fsi.h:462
FSIWallElement()
Definition: fsi.h:212
void update_in_internal_fd(const unsigned &i)
After an internal data change, update the nodal positions.
Definition: fsi.h:352
static bool Dont_warn_about_missing_adjacent_fluid_elements
Static flag that allows the suppression of warning messages.
Definition: fsi.h:208
void reset_after_solid_position_fd()
Definition: fsi.h:474
void node_update_adjacent_fluid_elements()
Definition: fsi.cc:230
void reset_in_internal_fd(const unsigned &i)
Definition: fsi.h:361
bool Only_front_is_loaded_by_fluid
Definition: fsi.h:535
void reset_in_nodal_fd(const unsigned &i)
Definition: fsi.h:405
void reset_in_external_fd(const unsigned &i)
Definition: fsi.h:383
void describe_local_dofs(std::ostream &out, const std::string &current_string) const
Definition: fsi.cc:78
Definition: elements.h:1313
virtual void fill_in_jacobian_from_nodal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.cc:3660
virtual double s_min() const
Min value of local coordinate.
Definition: elements.h:2793
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition: elements.cc:3962
unsigned dim() const
Definition: elements.h:2611
virtual double s_max() const
Max. value of local coordinate.
Definition: elements.h:2803
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
Definition: elements.h:2484
virtual void fill_in_contribution_to_residuals(Vector< double > &residuals)
Definition: elements.h:357
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622
virtual void get_residuals(Vector< double > &residuals)
Definition: elements.h:980
unsigned ninternal_data() const
Return the number of internal data objects.
Definition: elements.h:823
void fill_in_jacobian_from_external_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Definition: elements.cc:1199
void fill_in_jacobian_from_internal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Definition: elements.cc:1102
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
Definition: mesh.h:67
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
void output(std::ostream &outfile)
Output for all elements.
Definition: mesh.cc:2027
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
Definition: mesh.h:436
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
Definition: nodes.h:906
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
Definition: nodes.h:1054
Definition: oomph_definitions.h:222
Definition: oomph_definitions.h:267
Definition: problem.h:151
Definition: elements.h:3561
bool Solve_for_consistent_newmark_accel_flag
Definition: elements.h:4302
virtual void fill_in_jacobian_from_solid_position_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.cc:6985
void fill_in_jacobian_for_newmark_accel(DenseMatrix< double > &jacobian)
Definition: elements.cc:7227
Definition: mesh.h:2562
SolidNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global SolidNode.
Definition: mesh.h:2594
Data *const & variable_position_pt() const
Pointer to variable_position data (const version)
Definition: nodes.h:1765
@ N
Definition: constructor.cpp:22
#define FLUID_ELEMENT
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374
string filename
Definition: MergeRestartFiles.py:39
label
Definition: UniformPSDSelfTest.py:24
double Strouhal_for_no_slip
Definition: fsi.cc:39
void setup_solid_elements_for_displacement_bc(Problem *problem_pt, const Vector< unsigned > &b_solid_fsi, Mesh *const &solid_mesh_pt, Vector< Mesh * > &lagrange_multiplier_mesh_pt)
Definition: fsi.h:665
void apply_no_slip_on_moving_wall(Node *node_pt)
Definition: fsi.cc:48
void setup_fluid_load_info_for_solid_elements(Problem *problem_pt, Vector< unsigned > &boundary_in_fluid_mesh, Mesh *const &fluid_mesh_pt, Vector< Mesh * > &solid_mesh_pt, const unsigned &face=0)
Definition: fsi.h:601
void doc_fsi(Mesh *fluid_mesh_pt, SolidMesh *wall_mesh_pt, DocInfo &doc_info)
Definition: fsi.h:724
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
void setup_bulk_elements_adjacent_to_face_mesh(Problem *problem_pt, Vector< unsigned > &boundary_in_bulk_mesh, Mesh *const &bulk_mesh_pt, Vector< Mesh * > &face_mesh_pt, const unsigned &interaction=0)
/ Templated helper functions for multi-domain methods using locate_zeta
Definition: multi_domain.template.cc:72
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
void set(Container &c, Position position, const Value &value)
Definition: stdlist_overload.cpp:36
std::ofstream out("Result.txt")
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2