28 #ifndef OOMPH_PROJECTION_HEADER
29 #define OOMPH_PROJECTION_HEADER
40 #ifdef OOMPH_HAS_TRILINOS
133 const unsigned& fld) = 0;
179 template<
class ELEMENT>
197 ELEMENT::fill_in_contribution_to_residuals(residuals);
213 ELEMENT::describe_local_dofs(out, current_string);
227 ELEMENT::fill_in_contribution_to_jacobian(residuals, jacobian);
242 const unsigned& flag)
247 unsigned n_dim =
dim();
256 const unsigned n_node = this->
nnode();
267 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
285 int local_eqn = 0, local_unknown = 0;
293 if (solid_el_pt == 0)
295 throw OomphLibError(
"Trying to project Lagrangian coordinates in "
296 "non-SolidElement\n",
297 OOMPH_CURRENT_FUNCTION,
298 OOMPH_EXCEPTION_LOCATION);
302 Shape psi(n_node, n_position_type);
317 double interpolated_xi_bar =
322 for (
unsigned l = 0; l < n_node; ++l)
325 for (
unsigned k = 0; k < n_position_type; ++k)
335 residuals[local_eqn] +=
336 (interpolated_xi_proj - interpolated_xi_bar) * psi(l, k) *
342 for (
unsigned l2 = 0; l2 < n_node; l2++)
345 for (
unsigned k2 = 0; k2 < n_position_type; k2++)
349 if (local_unknown >= 0)
351 jacobian(local_eqn, local_unknown) +=
352 psi(l2, k2) * psi(l, k) *
W;
368 Shape psi(n_node, n_position_type);
379 double interpolated_x_proj = 0.0;
381 if (solid_el_pt != 0)
383 interpolated_x_proj =
389 interpolated_x_proj = this->
get_field(0, fld,
s);
397 for (
unsigned l = 0; l < n_node; ++l)
400 for (
unsigned k = 0; k < n_position_type; ++k)
403 if (solid_el_pt != 0)
417 if (n_position_type != 1)
420 "positions not in SolidElement\n",
421 OOMPH_CURRENT_FUNCTION,
422 OOMPH_EXCEPTION_LOCATION);
431 residuals[local_eqn] +=
432 (interpolated_x_proj - interpolated_x_bar) * psi(l, k) *
W;
437 for (
unsigned l2 = 0; l2 < n_node; l2++)
440 for (
unsigned k2 = 0; k2 < n_position_type; k2++)
443 if (solid_el_pt != 0)
453 if (local_unknown >= 0)
455 jacobian(local_eqn, local_unknown) +=
456 psi(l2, k2) * psi(l, k) *
W;
482 double interpolated_value_proj = this->
get_field(now, fld,
s);
485 double interpolated_value_bar =
489 for (
unsigned l = 0; l < n_value; l++)
495 residuals[local_eqn] +=
496 (interpolated_value_proj - interpolated_value_bar) * psi[l] *
502 for (
unsigned l2 = 0; l2 < n_value; l2++)
505 if (local_unknown >= 0)
507 jacobian(local_eqn, local_unknown) +=
508 psi[l2] * psi[l] *
W;
518 throw OomphLibError(
"Wrong type specificied in Projection_type. "
519 "This should never happen\n",
520 OOMPH_CURRENT_FUNCTION,
521 OOMPH_EXCEPTION_LOCATION);
533 const unsigned&
i)
const
541 return ELEMENT::zeta_nodal(n, k,
i);
665 template<
class ELEMENT>
693 template<
class PROJECTABLE_ELEMENT>
699 template<
class FRIEND_PROJECTABLE_ELEMENT>
701 template<
class FRIEND_PROJECTABLE_ELEMENT>
703 template<
class FRIEND_PROJECTABLE_ELEMENT>
705 template<
class FRIEND_PROJECTABLE_ELEMENT>
748 void project(
Mesh* base_mesh_pt,
const bool& dont_project_positions =
false)
755 #ifdef OOMPH_HAS_TRILINOS
817 bool backed_up_doc_time_enabled =
826 unsigned n_element1 = base_mesh_pt->
nelement();
828 unsigned n_node1 = base_mesh_pt->
nnode();
831 oomph_info <<
"\n=============================\n";
832 oomph_info <<
"Base mesh has " << n_element1 <<
" elements\n";
833 oomph_info <<
"Target mesh has " << n_element <<
" elements\n";
834 oomph_info <<
"Base mesh has " << n_node1 <<
" nodes\n";
835 oomph_info <<
"Target mesh has " << n_node <<
" nodes\n";
836 oomph_info <<
"=============================\n\n";
847 oomph_info <<
"Very odd -- no elements in target mesh; "
848 <<
" not doing anything in ProjectionProblem::project()\n";
856 std::ostringstream error_stream;
858 <<
"Mesh has no nodes! Please populate the Node_pt vector\n"
859 <<
"otherwise projection won't work!\n";
861 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
868 ->nfields_for_projection();
874 unsigned n_history_values = 0;
877 for (
unsigned e = 0;
e < n_element;
e++)
879 PROJECTABLE_ELEMENT* el_pt =
883 el_pt->enable_projection();
889 for (
unsigned e = 0;
e < n_element1;
e++)
891 PROJECTABLE_ELEMENT* el_pt =
892 dynamic_cast<PROJECTABLE_ELEMENT*
>(base_mesh_pt->
element_pt(
e));
895 el_pt->enable_projection();
911 <<
"CPU for setup of multi-domain interaction for projection: "
921 if (!dont_project_positions)
941 const unsigned n_lagrangian =
946 for (
unsigned i = 0;
i < n_lagrangian; ++
i)
951 <<
"\n\n=============================================\n";
952 oomph_info <<
"Projecting values for Lagrangian coordinate " <<
i
954 oomph_info <<
"=============================================\n\n";
964 oomph_info <<
"Number of equations for projection of Lagrangian "
966 <<
" : " << ndof_tmp << std::endl
973 std::ostringstream error_stream;
975 <<
"Solid mechanics problems will break if "
976 "Problem_is_nonlinear is\n"
977 <<
"set to true in the projection problem because we're using "
979 <<
"actual nodal positions to store the values of the "
981 <<
"coords. There shouldn't be any need for \n"
982 <<
"Problem_is_nonlinear=true anyway, apart from debugging in "
984 <<
"which case you now know why this case will break!\n";
986 OOMPH_CURRENT_FUNCTION,
987 OOMPH_EXCEPTION_LOCATION);
996 for (
unsigned n = 0; n < n_node; ++n)
1002 const unsigned n_position_type = solid_node_pt->
nposition_type();
1004 const unsigned n_lagrangian_type =
1008 if (n_position_type != n_lagrangian_type)
1010 std::ostringstream error_stream;
1012 <<
"The number of generalised position dofs "
1014 <<
"\n not the same as the number of generalised lagrangian "
1016 << n_lagrangian_type <<
".\n"
1017 <<
"Projection cannot be done at the moment, sorry.\n";
1020 OOMPH_CURRENT_FUNCTION,
1021 OOMPH_EXCEPTION_LOCATION);
1026 for (
unsigned k = 0; k < n_position_type; ++k)
1028 solid_node_pt->
xi_gen(k,
i) = solid_node_pt->
x_gen(k, 0);
1042 n_history_values =
dynamic_cast<PROJECTABLE_ELEMENT*
>(
1044 ->nhistory_values_for_coordinate_projection();
1047 if (n_history_values > 1)
1049 for (
unsigned i = 0;
i < n_dim;
i++)
1054 <<
"\n\n=============================================\n";
1055 oomph_info <<
"Projecting history values for coordinate " <<
i
1058 <<
"=============================================\n\n";
1067 for (
unsigned h_tim = n_history_values; h_tim > 1; h_tim--)
1069 unsigned time_level = h_tim - 1;
1079 <<
"Number of equations for projection of coordinate " <<
i
1080 <<
" at time level " << time_level <<
" : " << ndof_tmp
1090 for (
unsigned n = 0; n < n_node; ++n)
1097 for (
unsigned k = 0; k < n_position_type; ++k)
1099 nod_pt->
x_gen(time_level, k,
i) = nod_pt->
x_gen(0, k,
i);
1131 for (
unsigned e = 0;
e < n_element;
e++)
1134 unsigned nnod = el_pt->
nnode();
1135 for (
unsigned j = 0; j < nnod; j++)
1138 if (nod_pt->
nvalue() == 0)
1140 std::ostringstream error_stream;
1141 error_stream <<
"Node at ";
1142 unsigned n = nod_pt->
ndim();
1143 for (
unsigned i = 0;
i < n;
i++)
1145 error_stream << nod_pt->
x(
i) <<
" ";
1148 <<
"\nhas no values. Projection (of coordinates) doesn't "
1150 <<
"for such cases (at the moment), sorry! Send us the code\n"
1151 <<
"where the problem arises and we'll try to implement "
1153 <<
"(up to now unnecessary) capability...\n";
1155 OOMPH_CURRENT_FUNCTION,
1156 OOMPH_EXCEPTION_LOCATION);
1164 n_history_values =
dynamic_cast<PROJECTABLE_ELEMENT*
>(
1166 ->nhistory_values_for_coordinate_projection();
1169 if (n_history_values > 1)
1171 for (
unsigned i = 0;
i < n_dim;
i++)
1176 <<
"\n\n=============================================\n";
1177 oomph_info <<
"Projecting history values for coordinate " <<
i
1180 <<
"=============================================\n\n";
1188 for (
unsigned h_tim = n_history_values; h_tim > 1; h_tim--)
1190 unsigned time_level = h_tim - 1;
1200 <<
"Number of equations for projection of coordinate " <<
i
1201 <<
" at time level " << time_level <<
" : " << ndof_tmp
1211 for (
unsigned e = 0;
e < n_element;
e++)
1213 PROJECTABLE_ELEMENT* new_el_pt =
1214 dynamic_cast<PROJECTABLE_ELEMENT*
>(
1218 new_el_pt->data_values_of_field(0);
1220 unsigned d_size = data.size();
1221 for (
unsigned d = 0; d < d_size; d++)
1224 double coord = data[d].first->value(0, 0);
1225 dynamic_cast<Node*
>(data[d].first)->x(time_level,
i) =
1242 for (
unsigned e = 0;
e < n_element;
e++)
1244 PROJECTABLE_ELEMENT* el_pt =
1247 el_pt->set_project_values();
1251 for (
unsigned fld = 0; fld < n_fields; fld++)
1264 ->nhistory_values_for_projection(fld);
1268 for (
unsigned h_tim = n_history_values; h_tim > 0; h_tim--)
1270 unsigned time_level = h_tim - 1;
1273 oomph_info <<
"\n=========================================\n";
1274 oomph_info <<
"Projecting field " << fld <<
" at time level "
1275 << time_level << std::endl;
1276 oomph_info <<
"========================================\n";
1286 oomph_info <<
"Number of equations for projection of field " << fld
1287 <<
" at time level " << time_level <<
" : " << ndof_tmp
1298 if (time_level != 0)
1300 for (
unsigned e = 0;
e < n_element;
e++)
1302 PROJECTABLE_ELEMENT* new_el_pt =
1303 dynamic_cast<PROJECTABLE_ELEMENT*
>(
1307 new_el_pt->data_values_of_field(fld);
1309 unsigned d_size = data.size();
1310 for (
unsigned d = 0; d < d_size; d++)
1313 double c_value = data[d].first->value(0, data[d].second);
1314 data[d].first->set_value(time_level, data[d].second, c_value);
1324 for (
unsigned e = 0;
e < n_element;
e++)
1326 PROJECTABLE_ELEMENT* new_el_pt =
1330 new_el_pt->flush_all_external_element_storage();
1332 new_el_pt->disable_projection();
1335 for (
unsigned e = 0;
e < n_element1;
e++)
1337 PROJECTABLE_ELEMENT* el_pt =
1338 dynamic_cast<PROJECTABLE_ELEMENT*
>(base_mesh_pt->
element_pt(
e));
1341 el_pt->flush_all_external_element_storage();
1344 el_pt->disable_projection();
1376 if (backed_up_doc_time_enabled)
1436 if (solid_el_pt != 0)
1442 const unsigned n_position_type =
1445 for (
unsigned n = 0; n < n_node; n++)
1453 for (
unsigned i = 0;
i < n_dim;
i++)
1455 for (
unsigned k = 0; k < n_position_type; k++)
1477 if (solid_el_pt != 0)
1482 const unsigned n_position_type =
1485 for (
unsigned n = 0; n < n_node; n++)
1491 for (
unsigned i = 0;
i < n_dim;
i++)
1493 for (
unsigned k = 0; k < n_position_type; k++)
1511 for (
unsigned e = 0;
e < n_element; ++
e)
1515 for (
unsigned j = 0; j < nint; j++)
1518 unsigned nval = int_data_pt->
nvalue();
1519 for (
unsigned i = 0;
i < nval;
i++)
1521 int_data_pt->
pin(
i);
1525 unsigned nnod = el_pt->
nnode();
1526 for (
unsigned j = 0; j < nnod; j++)
1529 unsigned nval = nod_pt->
nvalue();
1530 for (
unsigned i = 0;
i < nval;
i++)
1540 if (solid_el_pt != 0)
1552 const unsigned n_position_type =
1556 for (
unsigned n = 0; n < n_node; n++)
1560 for (
unsigned i = 0;
i < n_dim;
i++)
1562 for (
unsigned k = 0; k < n_position_type; k++)
1581 for (
unsigned e = 0;
e < n_element; ++
e)
1584 PROJECTABLE_ELEMENT* new_el_pt =
1587 unsigned n_fields = new_el_pt->nfields_for_projection();
1590 for (
unsigned f = 0; f < n_fields; f++)
1594 new_el_pt->data_values_of_field(f);
1596 unsigned d_size = data.size();
1597 for (
unsigned d = 0; d < d_size; d++)
1599 data[d].first->unpin(data[d].second);
1607 if (solid_el_pt != 0)
1619 const unsigned n_position_type =
1623 for (
unsigned n = 0; n < n_node; n++)
1627 for (
unsigned i = 0;
i < n_dim;
i++)
1629 for (
unsigned k = 0; k < n_position_type; k++)
1650 const unsigned n_position_type =
1653 for (
unsigned n = 0; n < n_node; ++n)
1659 for (
unsigned k = 0; k < n_position_type; ++k)
1678 const unsigned n_position_type =
1681 for (
unsigned n = 0; n < n_node; ++n)
1687 for (
unsigned k = 0; k < n_position_type; ++k)
1699 for (
unsigned e = 0;
e < n_element;
e++)
1701 PROJECTABLE_ELEMENT* new_el_pt =
1705 new_el_pt->data_values_of_field(fld);
1707 unsigned d_size = data.size();
1708 for (
unsigned d = 0; d < d_size; d++)
1710 data[d].first->unpin(data[d].second);
1719 for (
unsigned e = 0;
e < n_element;
e++)
1721 PROJECTABLE_ELEMENT* new_el_pt =
1725 new_el_pt->data_values_of_field(fld);
1727 unsigned d_size = data.size();
1728 for (
unsigned d = 0; d < d_size; d++)
1730 data[d].first->pin(data[d].second);
1739 for (
unsigned e = 0;
e < n_element;
e++)
1741 PROJECTABLE_ELEMENT* el_pt =
1745 el_pt->time_level_for_projection() = time_level;
1753 for (
unsigned e = 0;
e < n_element;
e++)
1755 PROJECTABLE_ELEMENT* new_el_pt =
1759 new_el_pt->set_project_coordinates();
1762 new_el_pt->projected_coordinate() =
i;
1770 for (
unsigned e = 0;
e < n_element;
e++)
1772 PROJECTABLE_ELEMENT* new_el_pt =
1776 new_el_pt->set_project_lagrangian();
1779 new_el_pt->projected_lagrangian_coordinate() =
i;
1787 for (
unsigned e = 0;
e < n_element;
e++)
1789 PROJECTABLE_ELEMENT* new_el_pt =
1793 new_el_pt->projected_field() = fld;
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
//////////////////////////////////////////////////////////////////////////// ////////////////////////...
A class that represents a collection of data; each Data object may contain many different individual ...
void pin(const unsigned &i)
Pin the i-th stored variable.
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
This is a base class for all elements that require external sources (e.g. FSI, multi-domain problems ...
Vector< double > & external_element_local_coord(const unsigned &interaction_index, const unsigned &ipt)
Access function to get source element's local coords for specified interaction index at specified int...
void set_ninteraction(const unsigned &n_interaction)
Set the number of interactions in the element This function is usually called in the specific element...
void include_external_geometric_data()
Do include external geometric data when computing the element's Jacobian. This function should be cal...
void describe_local_dofs(std::ostream &out, const std::string &curr_string) const
Function to describe the local dofs of the element. The ostream specifies the output stream to which ...
FiniteElement *& external_element_pt(const unsigned &interaction_index, const unsigned &ipt)
Access function to source element for specified interaction index at specified integration point.
bool add_external_geometric_data()
Are we including external geometric data in the element's Jacobian.
void ignore_external_interaction_data()
Do not include any external interaction data when computing the element's Jacobian.
bool add_external_interaction_data()
Are we including external data in the element's Jacobian.
void include_external_interaction_data()
Do include external geometric data when computing the element's Jacobian This function should be call...
void ignore_external_geometric_data()
Do not include any external geometric data when computing the element's Jacobian. This function shoul...
unsigned ninteraction() const
Return the number of interactions in the element.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
A general Finite Element class.
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
double nodal_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Return the value of the k-th type of the i-th positional variable at the local node n.
unsigned nnode() const
Return the number of nodes.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
unsigned ninternal_data() const
Return the number of internal data objects.
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.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
Base class for all linear iterative solvers. This merely defines standard interfaces for linear itera...
Preconditioner *& preconditioner_pt()
Access function to preconditioner.
bool is_doc_time_enabled() const
Is documentation of solve times enabled?
void disable_doc_time()
Disable documentation of solve times.
void enable_doc_time()
Enable documentation of solve times.
static bool mpi_has_been_initialised()
return true if MPI has been initialised
Matrix-based diagonal preconditioner.
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
unsigned long nnode() const
Return number of nodes in the mesh.
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
unsigned long nelement() const
Return number of elements in the mesh.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
double & x_gen(const unsigned &k, const unsigned &i)
Reference to the generalised position x(k,i). ‘Type’: k; Coordinate direction: i.
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
unsigned nposition_type() const
Number of coordinate types needed in the mapping between local and global coordinates.
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
Preconditioner base class. Gives an interface to call all other preconditioners through and stores th...
////////////////////////////////////////////////////////////////// //////////////////////////////////...
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Assign all equation numbers for problem: Deals with global data (= data that isn't attached to any el...
void newton_solve()
Use Newton method to solve the problem.
LinearSolver *& linear_solver_pt()
Return a pointer to the linear solver object.
Mesh *& mesh_pt()
Return a pointer to the global mesh.
bool Shut_up_in_newton_solve
Boolean to indicate if all output is suppressed in Problem::newton_solve(). Defaults to false.
bool Problem_is_nonlinear
Boolean flag indicating if we're dealing with a linear or nonlinear Problem – if set to false the New...
void disable_info_in_newton_solve()
Disable the output of information when in the newton solver.
Template-free Base class for projectable elements.
bool Backup_external_interaction_data
Remember if the element includes external data when used in non-projection mode (this is temporarily ...
unsigned Projected_lagrangian
When projecting the Lagrangain coordinates indicate which coordiante is to be projected.
Projection_Type Projection_type
Variable to indicate if we're projecting the history values of the nodal coordinates (Coordinate) the...
virtual unsigned nvalue_of_field(const unsigned &fld)=0
Return number of values (pinned or not) associated with field fld within the element....
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...
unsigned Time_level_for_projection
Time level we are projecting (0=current values; >0: history values)
unsigned Backup_ninteraction
Store number of "external" interactions that were assigned to the element before doing the projection...
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....
virtual ~ProjectableElementBase()
Virtual destructor.
ProjectableElementBase()
Constructor: Initialise data so that we don't project but solve the "normal" equations associated wit...
bool Do_projection
Bool to know if we do projection or not. If false (the default) we solve the element's "real" equatio...
bool Backup_external_geometric_data
Remember if the element includes external geometric data when used in non-projection mode (this is te...
Projection_Type
Enumerated collection to specify which projection problem is to be solved.
unsigned Projected_field
Field that is currently being projected.
virtual unsigned nhistory_values_for_coordinate_projection()=0
Number of history values to be stored when projecting the history values of the nodal coordinates (in...
unsigned Projected_coordinate
When projecting the history values of the nodal coordinates, this is the coordinate we're projecting.
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.
virtual unsigned nhistory_values_for_projection(const unsigned &fld)=0
Number of history values to be stored for fld-th field (includes current value!)
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 fun...
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: his...
Wrapper class for projectable elements. Adds "projectability" to the underlying ELEMENT.
void enable_projection()
Backup the element's state and switch it to projection mode.
ProjectableElement()
Constructor [this was only required explicitly from gcc 4.5.2 onwards...].
unsigned & projected_field()
Field that is currently being projected.
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)....
unsigned & projected_coordinate()
When projecting the history values of the nodal coordinates, this is the coordinate we're projecting.
void set_project_values()
Project (history values of) values.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Overloaded version of fill_in_contribution_to_jacobian.
unsigned & projected_lagrangian_coordinate()
When projecting the Lagrangian coordinates this is the coordinate that is being projected.
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 set_project_coordinates()
Project (history values of) coordintes.
unsigned & time_level_for_projection()
Which history value are we projecting?
void set_project_lagrangian()
Project (current and only values of) lagrangian coordinates.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Overloaded version of fill_in_contribution_to_residuals.
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
Use Eulerian coordinates for matching in locate_zeta when doing projection.
void disable_projection()
Helper function to restore the element to the state it was in before we entered the projection mode a...
Projection problem. This is created during the adaptation of unstructured meshes and it is assumed th...
void unpin_dofs_of_field(const unsigned &fld)
Helper function to unpin dofs of fld-th field.
void enable_suppress_output_during_projection()
Suppress all output during projection phases.
ProjectionProblem()
Default constructor (made this private so only the friend class can call the constructor)
void unpin_dofs_of_coordinate(const unsigned &coord)
Helper function to unpin the values of coordinate coord.
void store_positions()
Helper function to store positions (the only things that have been set before doing projection.
bool use_iterative_solver_for_projection()
Return the value of the flag about using an iterative solver for projection.
void set_current_field_for_projection(const unsigned &fld)
Set current field for projection.
bool Output_during_projection_suppressed
Flag to suppress output during projection.
IterativeLinearSolver * Iterative_solver_projection_pt
bool Use_iterative_solver_for_projection
void set_time_level_for_projection(const unsigned &time_level)
Helper function to set time level for projection.
void set_lagrangian_coordinate_for_projection(const unsigned &i)
Set the Lagrangian coordinate for projection.
void pin_all()
Pin all the field values and position unknowns (bit inefficient)
void disable_use_iterative_solver_for_projection()
Disbales the use of an iterative solver for projection.
void disable_suppress_output_during_projection()
Undo suppression of all output during projection phases.
void unpin_all()
Unpin all the field values and position unknowns (bit inefficient)
Preconditioner * Preconditioner_projection_pt
void pin_dofs_of_field(const unsigned &fld)
Helper function to unpin dofs of fld-th field.
void set_coordinate_for_projection(const unsigned &i)
Set the coordinate for projection.
void project(Mesh *base_mesh_pt, const bool &dont_project_positions=false)
Project from base into the problem's own mesh.
void pin_dofs_of_coordinate(const unsigned &coord)
Helper function to unpin the values of coordinate coord.
void restore_positions()
Helper function to restore positions (the only things that have been set before doing projection.
void enable_use_iterative_solver_for_projection()
Enables the use of an iterative solver for projection.
Vector< DenseMatrix< double > > Solid_backup
Backup for pin status of solid node's position Data.
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
/////////////////////////////////////////////////////////////////// /////////////////////////////////...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
////////////////////////////////////////////////////////////////////// //////////////////////////////...
int position_local_eqn(const unsigned &n, const unsigned &k, const unsigned &j) const
Access function that returns the local equation number that corresponds to the j-th coordinate of the...
A Class for nodes that deform elastically (i.e. position is an unknown in the problem)....
unsigned nlagrangian_type() const
Number of types of Lagrangian coordinates used to interpolate the Lagrangian coordinates within the e...
double & xi_gen(const unsigned &k, const unsigned &i)
Reference to the generalised Lagrangian position. ‘Type’: k; 'Coordinate direction: i.
void pin_position(const unsigned &i)
Pin the nodal position.
void unpin_position(const unsigned &i)
Unpin the nodal position.
An interface to the Trilinos AztecOO classes allowing it to be used as an Oomph-lib LinearSolver....
A slight extension to the standard template vector class so that we can include "graceful" array rang...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
void setup_multi_domain_interaction(Problem *problem_pt, Mesh *const &mesh_pt, Mesh *const &external_mesh_pt, const unsigned &interaction_index=0)
Function to set up the one-way multi-domain interaction for problems where the meshes pointed to by m...
double timer()
returns the time in seconds after some point in past
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...