Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
oomph::Problem Class Reference

////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// More...

#include <problem.h>

+ Inheritance diagram for oomph::Problem:

Public Types

enum  Distributed_problem_matrix_distribution { Default_matrix_distribution , Problem_matrix_distribution , Uniform_matrix_distribution }
 enum for distribution of distributed jacobians. 1 - Automatic - the Problem distribution is employed, unless any processor has number of rows equal to 110% of N/P, in which case uniform distribution is employed. 2 - Problem - the jacobian on processor p only contains rows that correspond to equations that are on this processor. (minimises communication) 3 - Uniform - each processor holds as close to N/P matrix rows as possible. (very well load balanced) More...
 
typedef void(* SpatialErrorEstimatorFctPt) (Mesh *&mesh_pt, Vector< double > &elemental_error)
 Function pointer for spatial error estimator. More...
 
typedef void(* SpatialErrorEstimatorWithDocFctPt) (Mesh *&mesh_pt, Vector< double > &elemental_error, DocInfo &doc_info)
 Function pointer for spatial error estimator with doc. More...
 

Public Member Functions

virtual void debug_hook_fct (const unsigned &i)
 Hook for debugging. Can be overloaded in driver code; argument allows identification of where we're coming from. More...
 
void set_analytic_dparameter (double *const &parameter_pt)
 Function to turn on analytic calculation of the parameter derivatives in continuation and bifurcation detection problems. More...
 
void unset_analytic_dparameter (double *const &parameter_pt)
 Function to turn off analytic calculation of the parameter derivatives in continuation and bifurcation detection problems. More...
 
bool is_dparameter_calculated_analytically (double *const &parameter_pt)
 Function to determine whether the parameter derivatives are calculated analytically. More...
 
void set_analytic_hessian_products ()
 Function to turn on analytic calculation of the parameter derivatives in continuation and bifurcation detection problems. More...
 
void unset_analytic_hessian_products ()
 Function to turn off analytic calculation of the parameter derivatives in continuation and bifurcation detection problems. More...
 
bool are_hessian_products_calculated_analytically ()
 Function to determine whether the hessian products are calculated analytically. More...
 
void set_pinned_values_to_zero ()
 Set all pinned values to zero. Used to set boundary conditions to be homogeneous in the copy of the problem used in adaptive bifurcation tracking (ALH: TEMPORARY HACK, WILL BE FIXED) More...
 
bool distributed () const
 If we have MPI return the "problem has been distributed" flag, otherwise it can't be distributed so return false. More...
 
Distributed_problem_matrix_distributiondistributed_problem_matrix_distribution ()
 accesss function to the distributed matrix distribution method 1 - Automatic - the Problem distribution is employed, unless any processor has number of rows equal to 110% of N/P, in which case uniform distribution is employed. 2 - Problem - the jacobian on processor p only contains rows that correspond to equations that are on this processor. (minimises communication) 3 - Uniform - each processor holds as close to N/P matrix rows as possible. (very well load balanced) More...
 
void enable_doc_imbalance_in_parallel_assembly ()
 Enable doc of load imbalance in parallel assembly of distributed problem. More...
 
void disable_doc_imbalance_in_parallel_assembly ()
 Disable doc of load imbalance in parallel assembly of distributed problem. More...
 
Vector< double > elemental_assembly_time ()
 Return vector of most-recent elemental assembly times (used for load balancing). Zero sized if no Jacobian has been computed since last re-assignment of equation numbers. More...
 
void clear_elemental_assembly_time ()
 Clear storage of most-recent elemental assembly times (used for load balancing). Next load balancing operation will be based on the number of elements associated with a tree root. More...
 
void enable_problem_distributed ()
 Enable problem distributed. More...
 
void disable_problem_distributed ()
 Disable problem distributed. More...
 
void set_default_first_and_last_element_for_assembly ()
 Set default first and last elements for parallel assembly of non-distributed problem. More...
 
void set_first_and_last_element_for_assembly (Vector< unsigned > &first_el_for_assembly, Vector< unsigned > &last_el_for_assembly)
 Manually set first and last elements for parallel assembly of non-distributed problem. More...
 
void get_first_and_last_element_for_assembly (Vector< unsigned > &first_el_for_assembly, Vector< unsigned > &last_el_for_assembly) const
 Get first and last elements for parallel assembly of non-distributed problem. More...
 
virtual void actions_before_adapt ()
 Actions that are to be performed before a mesh adaptation. These might include removing any additional elements, such as traction boundary elements before the adaptation. More...
 
virtual void actions_after_adapt ()
 Actions that are to be performed after a mesh adaptation. More...
 
OomphCommunicatorcommunicator_pt ()
 access function to the oomph-lib communicator More...
 
const OomphCommunicatorcommunicator_pt () const
 access function to the oomph-lib communicator, const version More...
 
 Problem ()
 Constructor: Allocate space for one time stepper and set all pointers to NULL and set defaults for all parameters. More...
 
 Problem (const Problem &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const Problem &)=delete
 Broken assignment operator. More...
 
virtual ~Problem ()
 Virtual destructor to clean up memory. More...
 
Mesh *& mesh_pt ()
 Return a pointer to the global mesh. More...
 
Mesh *const & mesh_pt () const
 Return a pointer to the global mesh (const version) More...
 
Mesh *& mesh_pt (const unsigned &imesh)
 Return a pointer to the i-th submesh. If there are no submeshes, the 0-th submesh is the global mesh itself. More...
 
Mesh *const & mesh_pt (const unsigned &imesh) const
 Return a pointer to the i-th submesh (const version) More...
 
unsigned nsub_mesh () const
 Return number of submeshes. More...
 
unsigned add_sub_mesh (Mesh *const &mesh_pt)
 Add a submesh to the problem and return its number, i, by which it can be accessed via mesh_pt(i). More...
 
void flush_sub_meshes ()
 Flush the problem's collection of sub-meshes. Must be followed by call to rebuild_global_mesh(). More...
 
void build_global_mesh ()
 Build the global mesh by combining the all the submeshes. Note: The nodes boundary information refers to the boundary numbers within the submesh! More...
 
void rebuild_global_mesh ()
 If one of the submeshes has changed (e.g. by mesh adaptation) we need to update the global mesh. Note: The nodes boundary information refers to the boundary numbers within the submesh! More...
 
virtual void build_mesh ()
 Function to build the Problem's base mesh; this must be supplied by the user if they wish to use the load_balance() functionality, which is only available to problems that have already been distributed. If the problem has multiple meshes, each mesh must be built, added as as a submesh, and a call to build_global_mesh() must be made in this function. On return from this function all meshes must have been refined to the same level that they were in the when Problem::distribute() was first called. More...
 
void load_balance ()
 Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. More...
 
void load_balance (const bool &report_stats)
 Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. Produce explicit stats of load balancing process if boolean, report_stats, is set to true. More...
 
void load_balance (DocInfo &doc_info, const bool &report_stats)
 Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. Produce explicit stats of load balancing process if boolean, report_stats, is set to true. More...
 
void load_balance (DocInfo &doc_info, const bool &report_stats, const Vector< unsigned > &input_target_domain_for_local_non_halo_element)
 Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. Produce explicit stats of load balancing process if boolean, report_stats, is set to true and doc various bits of data (mainly for debugging) in directory specified by DocInfo object. If final input vector is non-zero-sized it provides an imposed partitioning. More...
 
void set_default_partition_in_load_balance ()
 Set the use of the default partition in the load balance. More...
 
void unset_default_partition_in_load_balance ()
 Do not use the default partition in the load balance. More...
 
void refine_distributed_base_mesh (Vector< Vector< Vector< unsigned > > > &to_be_refined_on_each_root, const unsigned &max_level_overall)
 Load balance helper routine: refine each new base (sub)mesh based upon the elements to be refined within each tree at each root on the current processor. More...
 
LinearSolver *& linear_solver_pt ()
 Return a pointer to the linear solver object. More...
 
LinearSolver *const & linear_solver_pt () const
 Return a pointer to the linear solver object (const version) More...
 
LinearSolver *& mass_matrix_solver_for_explicit_timestepper_pt ()
 Return a pointer to the linear solver object used for explicit time stepping. More...
 
LinearSolvermass_matrix_solver_for_explicit_timestepper_pt () const
 Return a pointer to the linear solver object used for explicit time stepping (const version). More...
 
EigenSolver *& eigen_solver_pt ()
 Return a pointer to the eigen solver object. More...
 
EigenSolver *const & eigen_solver_pt () const
 Return a pointer to the eigen solver object (const version) More...
 
Time *& time_pt ()
 Return a pointer to the global time object. More...
 
Timetime_pt () const
 Return a pointer to the global time object (const version). More...
 
double & time ()
 Return the current value of continuous time. More...
 
double time () const
 Return the current value of continuous time (const version) More...
 
TimeStepper *& time_stepper_pt ()
 Access function for the pointer to the first (presumably only) timestepper. More...
 
const TimeSteppertime_stepper_pt () const
 Access function for the pointer to the first (presumably only) timestepper. More...
 
TimeStepper *& time_stepper_pt (const unsigned &i)
 Return a pointer to the i-th timestepper. More...
 
ExplicitTimeStepper *& explicit_time_stepper_pt ()
 Return a pointer to the explicit timestepper. More...
 
unsigned long set_timestepper_for_all_data (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data=false)
 Set all problem data to have the same timestepper (timestepper_pt) Return the new number of dofs in the problem. More...
 
virtual void shift_time_values ()
 Shift all values along to prepare for next timestep. More...
 
AssemblyHandler *& assembly_handler_pt ()
 Return a pointer to the assembly handler object. More...
 
AssemblyHandler *const & assembly_handler_pt () const
 Return a pointer to the assembly handler object (const version) More...
 
double & minimum_dt ()
 Access function to min timestep in adaptive timestepping. More...
 
double & maximum_dt ()
 Access function to max timestep in adaptive timestepping. More...
 
unsigned & max_newton_iterations ()
 Access function to max Newton iterations before giving up. More...
 
void problem_is_nonlinear (const bool &prob_lin)
 Access function to Problem_is_nonlinear. More...
 
double & max_residuals ()
 Access function to max residuals in Newton iterations before giving up. More...
 
bool & time_adaptive_newton_crash_on_solve_fail ()
 Access function for Time_adaptive_newton_crash_on_solve_fail. More...
 
double & newton_solver_tolerance ()
 Access function to tolererance of the Newton solver, i.e. the maximum value of the residuals that will be accepted. More...
 
void add_time_stepper_pt (TimeStepper *const &time_stepper_pt)
 Add a timestepper to the problem. The function will automatically create or resize the Time object so that it contains the appropriate number of levels of storage. More...
 
void set_explicit_time_stepper_pt (ExplicitTimeStepper *const &explicit_time_stepper_pt)
 Set the explicit timestepper for the problem. The function will automatically create or resize the Time object so that it contains the appropriate number of levels of storage. More...
 
void initialise_dt (const double &dt)
 Set all timesteps to the same value, dt, and assign weights for all timesteppers in the problem. More...
 
void initialise_dt (const Vector< double > &dt)
 Set the value of the timesteps to be equal to the values passed in a vector and assign weights for all timesteppers in the problem. More...
 
Data *& global_data_pt (const unsigned &i)
 Return a pointer to the the i-th global data object. More...
 
void add_global_data (Data *const &global_data_pt)
 Add Data to the Problem's global data – the Problem will perform equation numbering etc. for such Data. More...
 
void flush_global_data ()
 Flush the Problem's global data – resizes container to zero. Data objects are not deleted! More...
 
LinearAlgebraDistribution *const & dof_distribution_pt () const
 Return the pointer to the dof distribution (read-only) More...
 
unsigned long ndof () const
 Return the number of dofs. More...
 
unsigned ntime_stepper () const
 Return the number of time steppers. More...
 
unsigned nglobal_data () const
 Return the number of global data values. More...
 
unsigned self_test ()
 Self-test: Check meshes and global data. Return 0 for OK. More...
 
void enable_store_local_dof_pt_in_elements ()
 Insist that local dof pointers are set up in each element when equation numbering takes place. More...
 
void disable_store_local_dof_pt_in_elements ()
 Insist that local dof pointers are NOT set up in each element when equation numbering takes place (the default) More...
 
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 elements) and then does the equation numbering for the elements. Virtual so it can be overloaded in MPI problems. Bool argument can be set to false to ignore assigning local equation numbers (found to be necessary in the parallel implementation of locate_zeta between multiple meshes). More...
 
void describe_dofs (std::ostream &out= *(oomph_info.stream_pt())) const
 Function to describe the dofs in terms of the global equation number, i.e. what type of value (nodal value of a Node; value in a Data object; value of internal Data in an element; etc) is the unknown with a certain global equation number. Output stream defaults to oomph_info. More...
 
void enable_discontinuous_formulation ()
 Indicate that the problem involves discontinuous elements This allows for a more efficiently assembly and inversion of the mass matrix. More...
 
void disable_discontinuous_formulation ()
 Disable the use of a discontinuous-element formulation. Note that the methods will all still work even if the elements are discontinuous, we will just be assembling a larger system matrix than necessary. More...
 
void get_dofs (DoubleVector &dofs) const
 Return the vector of dofs, i.e. a vector containing the current values of all unknowns. More...
 
void get_dofs (const unsigned &t, DoubleVector &dofs) const
 Return vector of the t'th history value of all dofs. More...
 
void set_dofs (const DoubleVector &dofs)
 Set the values of the dofs. More...
 
void set_dofs (const unsigned &t, DoubleVector &dofs)
 Set the history values of the dofs. More...
 
void set_dofs (const unsigned &t, Vector< double * > &dof_pt)
 Set history values of dofs from the type of vector stored in problem::Dof_pt. More...
 
void add_to_dofs (const double &lambda, const DoubleVector &increment_dofs)
 Add lambda x incremenet_dofs[l] to the l-th dof. More...
 
double * global_dof_pt (const unsigned &i)
 Return a pointer to the dof, indexed by global equation number which may be haloed or stored locally. If it is haloed, a local copy must have been requested on this processor in the Halo_scheme_pt. More...
 
double & dof (const unsigned &i)
 i-th dof in the problem More...
 
double dof (const unsigned &i) const
 i-th dof in the problem (const version) More...
 
double *& dof_pt (const unsigned &i)
 Pointer to i-th dof in the problem. More...
 
double * dof_pt (const unsigned &i) const
 Pointer to i-th dof in the problem (const version) More...
 
virtual void get_inverse_mass_matrix_times_residuals (DoubleVector &Mres)
 Return the residual vector multiplied by the inverse mass matrix Virtual so that it can be overloaded for mpi problems. More...
 
virtual void get_dvaluesdt (DoubleVector &f)
 Get the time derivative of all values (using get_inverse_mass_matrix_times_residuals(..) with all time steppers set to steady) e.g. for use in explicit time steps. The approach used is slighty hacky, beware if you have a residual which is non-linear or implicit in the derivative or if you have overloaded get_jacobian(...). More...
 
virtual void get_residuals (DoubleVector &residuals)
 Return the fully-assembled residuals Vector for the problem: Virtual so it can be overloaded in for mpi problems. More...
 
virtual void get_jacobian (DoubleVector &residuals, DenseDoubleMatrix &jacobian)
 Return the fully-assembled Jacobian and residuals for the problem Interface for the case when the Jacobian matrix is dense. This is virtual so, if we feel like it (e.g. for testing iterative solvers with specific test matrices, we can bypass the default assembly procedure for the Jacobian and the residual vector. More...
 
virtual void get_jacobian (DoubleVector &residuals, CRDoubleMatrix &jacobian)
 Return the fully-assembled Jacobian and residuals for the problem. Interface for the case when the Jacobian is in row-compressed storage format. This is virtual so, if we feel like it (e.g. for testing iterative solvers with specific test matrices), we can bypass the default assembly procedure for the Jacobian and the residual vector. More...
 
virtual void get_jacobian (DoubleVector &residuals, CCDoubleMatrix &jacobian)
 Return the fully-assembled Jacobian and residuals for the problem. Interface for the case when the Jacobian is in column-compressed storage format. This is virtual so, if we feel like it (e.g. for testing iterative solvers with specific test matrices), we can bypass the default assembly procedure for the Jacobian and the residual vector. More...
 
virtual void get_jacobian (DoubleVector &residuals, SumOfMatrices &jacobian)
 Dummy virtual function that must be overloaded by the problem to specify which matrices should be summed to give the final Jacobian. More...
 
void get_fd_jacobian (DoubleVector &residuals, DenseMatrix< double > &jacobian)
 Return the fully-assembled Jacobian and residuals, generated by finite differences. More...
 
void get_derivative_wrt_global_parameter (double *const &parameter_pt, DoubleVector &result)
 Get the derivative of the entire residuals vector wrt a global parameter, used in continuation problems. More...
 
void get_hessian_vector_products (DoubleVectorWithHaloEntries const &Y, Vector< DoubleVectorWithHaloEntries > const &C, Vector< DoubleVectorWithHaloEntries > &product)
 Return the product of the global hessian (derivative of Jacobian matrix with respect to all variables) with an eigenvector, Y, and any number of other specified vectors C (d(J_{ij})/d u_{k}) Y_{j} C_{k}. This function is used in assembling and solving the augmented systems associated with bifurcation tracking. The default implementation is to use finite differences at the global level. More...
 
void solve_eigenproblem (const unsigned &n_eval, Vector< std::complex< double > > &eigenvalue, Vector< DoubleVector > &eigenvector, const bool &steady=true)
 Get derivative of an element in the problem wrt a global parameter, used in continuation problems. More...
 
void solve_eigenproblem (const unsigned &n_eval, Vector< std::complex< double > > &eigenvalue, const bool &steady=true)
 Solve an eigenproblem as assembled by EigenElements, but only return the eigenvalues, not the eigenvectors. The boolean flag (default true) is used to specify whether the weighted mass-matrix terms from the timestepping scheme should be included in the jacobian. More...
 
virtual void get_eigenproblem_matrices (CRDoubleMatrix &mass_matrix, CRDoubleMatrix &main_matrix, const double &shift=0.0)
 Get the matrices required by a eigensolver. If the shift parameter is non-zero the second matrix will be shifted. More...
 
void assign_eigenvector_to_dofs (DoubleVector &eigenvector)
 Assign the eigenvector passed to the function to the dofs in the problem so that it can be output by the usual routines. More...
 
void add_eigenvector_to_dofs (const double &epsilon, const DoubleVector &eigenvector)
 Add the eigenvector passed to the function scaled by the constat epsilon to the dofs in the problem so that it can be output by the usual routines. More...
 
void store_current_dof_values ()
 Store the current values of the degrees of freedom. More...
 
void restore_dof_values ()
 Restore the stored values of the degrees of freedom. More...
 
void enable_jacobian_reuse ()
 Enable recycling of Jacobian in Newton iteration (if the linear solver allows it). Useful for linear problems with constant Jacobians or nonlinear problems where you're willing to risk the trade-off between faster solve times and degraded Newton convergence rate. More...
 
void disable_jacobian_reuse ()
 Disable recycling of Jacobian in Newton iteration. More...
 
bool jacobian_reuse_is_enabled ()
 Is recycling of Jacobian in Newton iteration enabled? More...
 
bool & use_predictor_values_as_initial_guess ()
 
void newton_solve ()
 Use Newton method to solve the problem. More...
 
void enable_globally_convergent_newton_method ()
 enable globally convergent Newton method More...
 
void disable_globally_convergent_newton_method ()
 disable globally convergent Newton method More...
 
void newton_solve (unsigned const &max_adapt)
 Adaptive Newton solve: up to max_adapt adaptations of all refineable submeshes are performed to achieve the the error targets specified in the refineable submeshes. More...
 
void steady_newton_solve (unsigned const &max_adapt=0)
 Solve a steady problem using adaptive Newton's method, but in the context of an overall unstady problem, perhaps to determine an initial condition. This is achieved by setting the weights in the timesteppers to be zero which has the effect of rendering them steady timesteppers. The optional argument max_adapt specifies the max. number of adaptations of all refineable submeshes are performed to achieve the the error targets specified in the refineable submeshes. More...
 
void copy (Problem *orig_problem_pt)
 Copy Data values, nodal positions etc from specified problem. Note: This is not a copy constructor. We assume that the current and the "original" problem have both been created by calling the same problem constructor so that all Data objects, time steppers etc. in the two problems are completely independent. This function copies the nodal, internal and global values, and the time parameters from the original problem into "this" one. This functionality is required, e.g. for multigrid computations. More...
 
virtual Problemmake_copy ()
 Make and return a pointer to the copy of the problem. A virtual function that must be filled in by the user is they wish to perform adaptive refinement in bifurcation tracking or in multigrid problems. ALH: WILL NOT BE NECESSARY IN BIFURCATION TRACKING IN LONG RUN... More...
 
virtual void read (std::ifstream &restart_file, bool &unsteady_restart)
 Read refinement pattern of all refineable meshes and refine them accordingly, then read all Data and nodal position info from file for restart. Return flag to indicate if the restart was from steady or unsteady solution. More...
 
virtual void read (std::ifstream &restart_file)
 Read refinement pattern of all refineable meshes and refine them accordingly, then read all Data and nodal position info from file for restart. More...
 
virtual void dump (std::ofstream &dump_file) const
 Dump refinement pattern of all refineable meshes and all generic Problem data to file for restart. More...
 
void dump (const std::string &dump_file_name) const
 Dump refinement pattern of all refineable meshes and all generic Problem data to file for restart. More...
 
void get_all_halo_data (std::map< unsigned, double * > &map_of_halo_data)
 Get pointers to all possible halo data indexed by global equation number in a map. More...
 
long synchronise_eqn_numbers (const bool &assign_local_eqn_numbers=true)
 Classify any non-classified nodes into halo/haloed and synchronise equation numbers. Return the total number of degrees of freedom in the overall problem. More...
 
void synchronise_dofs (const bool &do_halos, const bool &do_external_halos)
 Synchronise the degrees of freedom by overwriting the haloed values with their non-halo counterparts held on other processors. Bools control if we deal with data associated with external halo/ed elements/nodes or the "normal" halo/ed ones. More...
 
void synchronise_all_dofs ()
 Perform all required synchronisation in solvers. More...
 
void check_halo_schemes (DocInfo &doc_info)
 Check the halo/haloed node/element schemes. More...
 
void check_halo_schemes ()
 Check the halo/haloed node/element schemes. More...
 
Vector< unsigned > distribute (const Vector< unsigned > &element_partition, DocInfo &doc_info, const bool &report_stats=false)
 Distribute the problem and doc, using the specified partition; returns a vector which details the partitioning. More...
 
Vector< unsigned > distribute (DocInfo &doc_info, const bool &report_stats=false)
 Distribute the problem; returns a vector which details the partitioning. More...
 
Vector< unsigned > distribute (const Vector< unsigned > &element_partition, const bool &report_stats=false)
 Distribute the problem using the specified partition; returns a vector which details the partitioning. More...
 
Vector< unsigned > distribute (const bool &report_stats=false)
 Distribute the problem; returns a vector which details the partitioning. More...
 
virtual void partition_global_mesh (Mesh *&global_mesh_pt, DocInfo &doc_info, Vector< unsigned > &element_domain, const bool &report_stats=false)
 Partition the global mesh, return vector specifying the processor number for each element. Virtual so that it can be overloaded by any user; the default is to use METIS to perform the partitioning (with a bit of cleaning up afterwards to sort out "special cases"). More...
 
void prune_halo_elements_and_nodes (DocInfo &doc_info, const bool &report_stats)
 (Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called. More...
 
void prune_halo_elements_and_nodes (const bool &report_stats=false)
 (Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called. More...
 
bool problem_has_been_distributed ()
 Access to Problem_has_been_distributed flag. More...
 
void delete_all_external_storage ()
 Wrapper function to delete external storage for each submesh of the problem. More...
 
virtual void symmetrise_eigenfunction_for_adaptive_pitchfork_tracking ()
 Virtual function that is used to symmetrise the problem so that the current solution exactly satisfies any symmetries within the system. Used when adpativly solving pitchfork detection problems when small asymmetries in the coarse solution can be magnified leading to very inaccurate answers on the fine mesh. This is always problem-specific and must be filled in by the user The default issues a warning. More...
 
double * bifurcation_parameter_pt () const
 Return pointer to the parameter that is used in the bifurcation detection. If we are not tracking a bifurcation then an error will be thrown by the AssemblyHandler. More...
 
void get_bifurcation_eigenfunction (Vector< DoubleVector > &eigenfunction)
 Return the eigenfunction calculated as part of a bifurcation tracking process. If we are not tracking a bifurcation then an error will be thrown by the AssemblyHandler. More...
 
void activate_fold_tracking (double *const &parameter_pt, const bool &block_solve=true)
 Turn on fold tracking using the augmented system specified in the FoldHandler class. After a call to this function subsequent calls of the standard solution methods will converge to a fold (limit) point at a particular value of the variable addressed by parameter_pt. The system may not converge if the initial guess is sufficiently poor or, alternatively, if finite differencing is used to calculate the jacobian matrix in the elements. If the boolean flag block_solver is true (the default) then a block factorisation is used to solve the augmented system which is both faster and uses less memory. More...
 
void activate_bifurcation_tracking (double *const &parameter_pt, const DoubleVector &eigenvector, const bool &block_solve=true)
 Activate generic bifurcation tracking for a single (real) eigenvalue where the initial guess for the eigenvector can be specified. More...
 
void activate_bifurcation_tracking (double *const &parameter_pt, const DoubleVector &eigenvector, const DoubleVector &normalisation, const bool &block_solve=true)
 Activate generic bifurcation tracking for a single (real) eigenvalue where the initial guess for the eigenvector can be specified and the normalisation condition can also be specified. More...
 
void activate_pitchfork_tracking (double *const &parameter_pt, const DoubleVector &symmetry_vector, const bool &block_solve=true)
 Turn on pitchfork tracking using the augmented system specified in the PitchForkHandler class. After a call to this function subsequent calls of the standard solution methods will converge to a pitchfork bifurcation at a particular value of the variable addressed by parameter_pt. The symmetry that is to be broken must be specified by supplying a symmetry_vector(ndof). The easiest way to determine such a vector is to solve the associated eigenproblem $ Jx = \lambda M x$ and pass in the eigenvector. This is not always necessary however, if the symmetry is easy to construct. The system may not converge if the initial guess is sufficiently poor or, alternatively, if finite differencing is used to calculate the jacobian matrix in the elements. If the boolean flag block_solver is true (the default) then a block factorisation is used to solve the augmented system which is both faster and requires less memory. More...
 
void activate_hopf_tracking (double *const &parameter_pt, const bool &block_solve=true)
 Turn on Hopf bifurcation tracking using the augmented system specified in the HopfHandler class. After a call to this function subsequent calls of the standard solution methods will converge to a Hopf bifuraction at a particular value of the variable addressed by parameter_pt. The system may not converge if the initial guess is sufficiently poor or, alternatively, if finite differencing is used to calculate the jacobian matrix in the elements. More...
 
void activate_hopf_tracking (double *const &parameter_pt, const double &omega, const DoubleVector &null_real, const DoubleVector &null_imag, const bool &block_solve=true)
 Turn on Hopf bifurcation tracking using the augmented system specified in the HopfHandler class. After a call to this function subsequent calls of the standard solution methods will converge to a Hopf bifuraction at a particular value of the variable addressed by parameter_pt. The system may not converge if the initial guess is sufficiently poor or, alternatively, if finite differencing is used to calculate the jacobian matrix in the elements. This interface allows specification of an inital guess for the frequency and real and imaginary parts of the null vector, such as might be obtained from an eigensolve. More...
 
void deactivate_bifurcation_tracking ()
 Deactivate all bifuraction tracking, by reseting the assembly handler to the default. More...
 
void reset_assembly_handler_to_default ()
 Reset the system to the standard non-augemented state. More...
 
double arc_length_step_solve (double *const &parameter_pt, const double &ds, const unsigned &max_adapt=0)
 Solve a steady problem using arc-length continuation, when the parameter that becomes a variable corresponding to the arc-length constraint equation is an external double: parameter_pt is a pointer to that double, ds is the desired arc_length and max_adapt is the maximum number of spatial adaptations (default zero, no adaptation). More...
 
double arc_length_step_solve (Data *const &data_pt, const unsigned &data_index, const double &ds, const unsigned &max_adapt=0)
 Solve a steady problem using arc-length continuation, when the variable corresponding to the arc-length constraint equation is already stored in data used in the problem: data_pt is a pointer to the appropriate data object, data_index is the index of the value that will be traded for the constriant, ds is the desired arc_length and max_adapt is the maximum number of spatial adaptations (default zero, no adaptation). Note that the value must be pinned in order for this formulation to work. More...
 
void reset_arc_length_parameters ()
 Reset the "internal" arc-length continuation parameters, so as to allow continuation in another parameter. N.B. The parameters that are reset are the "minimum" that are required, others should perhaps be reset, depending upon the application. More...
 
int & sign_of_jacobian ()
 Access function for the sign of the global jacobian matrix. This will be set by the linear solver, if possible (direct solver). If not alternative methods must be used to detect bifurcations (solving the associated eigenproblem). More...
 
void explicit_timestep (const double &dt, const bool &shift_values=true)
 Take an explicit timestep of size dt and optionally shift any stored values of the time history. More...
 
void unsteady_newton_solve (const double &dt)
 Advance time by dt and solve by Newton's method. This version always shifts time values. More...
 
void unsteady_newton_solve (const double &dt, const bool &shift_values)
 Advance time by dt and solve the system, using Newton's method. The boolean flag is used to control whether the time values should be shifted. If it is true the current data values will be shifted (copied to the locations where there are stored as previous timesteps) before solution. More...
 
void unsteady_newton_solve (const double &dt, const unsigned &max_adapt, const bool &first, const bool &shift=true)
 Unsteady adaptive Newton solve: up to max_adapt adaptations of all refineable submeshes are performed to achieve the the error targets specified in the refineable submeshes. If first==true, the initial conditions are re-assigned after the mesh adaptations. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued. More...
 
double doubly_adaptive_unsteady_newton_solve (const double &dt, const double &epsilon, const unsigned &max_adapt, const bool &first, const bool &shift=true)
 Unsteady "doubly" adaptive Newton solve: Does temporal adaptation first, i.e. we try to do a timestep with an increment of dt, and adjusting dt until the solution on the given mesh satisfies the temporal error measure with tolerance epsilon. Following this, we do up to max_adapt spatial adaptions (without re-examining the temporal error). If first==true, the initial conditions are re-assigned after the mesh adaptations. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued. More...
 
double doubly_adaptive_unsteady_newton_solve (const double &dt, const double &epsilon, const unsigned &max_adapt, const unsigned &suppress_resolve_after_spatial_adapt_flag, const bool &first, const bool &shift=true)
 Unsteady "doubly" adaptive Newton solve: Does temporal adaptation first, i.e. we try to do a timestep with an increment of dt, and adjusting dt until the solution on the given mesh satisfies the temporal error measure with tolerance epsilon. Following this, we do up to max_adapt spatial adaptions (without re-examining the temporal error). If first==true, the initial conditions are re-assigned after the mesh adaptations. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued. Pseudo-Boolean flag suppress_resolve_after_spatial_adapt [0: false; 1: true] does what it says.]. More...
 
double adaptive_unsteady_newton_solve (const double &dt_desired, const double &epsilon)
 Attempt to advance timestep by dt_desired. If the solution fails the timestep will be halved until convergence is achieved, or the timestep falls below NewtonSolverParameters::Minimum_time_step. The error control parameter epsilon represents the (approximate) desired magnitude of the global error at each timestep. The routine returns a double that is the suggested next timestep and should be passed as dt_desired the next time the routine is called. This version always shifts the time values. More...
 
double adaptive_unsteady_newton_solve (const double &dt_desired, const double &epsilon, const bool &shift_values)
 Attempt to advance timestep by dt_desired. If the solution fails the timestep will be halved until convergence is achieved, or the timestep falls below NewtonSolverParameters::Minimum_time_step. The error control parameter epsilon represents the (approximate) desired magnitude of the global error at each timestep. The routine returns a double that is the suggested next timestep and should be passed as dt_desired the next time the routine is called. Once again the boolean flag, shift_values, is used to control whether the time values are shifted. More...
 
void assign_initial_values_impulsive ()
 Initialise data and nodal positions to simulate impulsive start from initial configuration/solution. More...
 
void assign_initial_values_impulsive (const double &dt)
 Initialise data and nodal positions to simulate an impulsive start and also set the initial and previous values of dt. More...
 
void calculate_predictions ()
 Calculate predictions. More...
 
void enable_mass_matrix_reuse ()
 Enable recycling of the mass matrix in explicit timestepping schemes. Useful for timestepping on fixed meshes when you want to avoid the linear solve phase. More...
 
void disable_mass_matrix_reuse ()
 Turn off recyling of the mass matrix in explicit timestepping schemes. More...
 
bool mass_matrix_reuse_is_enabled ()
 Return whether the mass matrix is being reused. More...
 
void refine_uniformly (const Vector< unsigned > &nrefine_for_mesh)
 Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem. More...
 
void refine_uniformly (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process. More...
 
void refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh)
 Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem. Prune after refinements. More...
 
void refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process. More...
 
void refine_uniformly (DocInfo &doc_info)
 Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process. More...
 
void refine_uniformly_and_prune (DocInfo &doc_info)
 Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process. More...
 
void refine_uniformly ()
 Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem. More...
 
void refine_uniformly (const unsigned &i_mesh, DocInfo &doc_info)
 Do uniform refinement for submesh i_mesh with documentation. More...
 
void refine_uniformly (const unsigned &i_mesh)
 Do uniform refinement for submesh i_mesh without documentation. More...
 
void p_refine_uniformly (const Vector< unsigned > &nrefine_for_mesh)
 p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem More...
 
void p_refine_uniformly (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process More...
 
void p_refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh)
 p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem. Prune after refinements More...
 
void p_refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process More...
 
void p_refine_uniformly (DocInfo &doc_info)
 p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process. More...
 
void p_refine_uniformly_and_prune (DocInfo &doc_info)
 p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process. More...
 
void p_refine_uniformly ()
 p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem More...
 
void p_refine_uniformly (const unsigned &i_mesh, DocInfo &doc_info)
 Do uniform p-refinement for submesh i_mesh with documentation. More...
 
void p_refine_uniformly (const unsigned &i_mesh)
 Do uniform p-refinement for submesh i_mesh without documentation. More...
 
void refine_selected_elements (const Vector< unsigned > &elements_to_be_refined)
 Refine (one and only!) mesh by splitting the elements identified by their numbers relative to the problems' only mesh, then rebuild the problem. More...
 
void refine_selected_elements (const Vector< RefineableElement * > &elements_to_be_refined_pt)
 Refine (one and only!) mesh by splitting the elements identified by their pointers, then rebuild the problem. More...
 
void refine_selected_elements (const unsigned &i_mesh, const Vector< unsigned > &elements_to_be_refined)
 Refine specified submesh by splitting the elements identified by their numbers relative to the submesh, then rebuild the problem. More...
 
void refine_selected_elements (const unsigned &i_mesh, const Vector< RefineableElement * > &elements_to_be_refined_pt)
 Refine specified submesh by splitting the elements identified by their pointers, then rebuild the problem. More...
 
void refine_selected_elements (const Vector< Vector< unsigned > > &elements_to_be_refined)
 Refine all submeshes by splitting the elements identified by their numbers relative to each submesh in a Vector of Vectors, then rebuild the problem. More...
 
void refine_selected_elements (const Vector< Vector< RefineableElement * > > &elements_to_be_refined_pt)
 Refine all submeshes by splitting the elements identified by their pointers within each submesh in a Vector of Vectors, then rebuild the problem. More...
 
void p_refine_selected_elements (const Vector< unsigned > &elements_to_be_refined)
 p-refine (one and only!) mesh by refining the elements identified by their numbers relative to the problems' only mesh, then rebuild the problem. More...
 
void p_refine_selected_elements (const Vector< PRefineableElement * > &elements_to_be_refined_pt)
 p-refine (one and only!) mesh by refining the elements identified by their pointers, then rebuild the problem. More...
 
void p_refine_selected_elements (const unsigned &i_mesh, const Vector< unsigned > &elements_to_be_refined)
 p-refine specified submesh by refining the elements identified by their numbers relative to the submesh, then rebuild the problem. More...
 
void p_refine_selected_elements (const unsigned &i_mesh, const Vector< PRefineableElement * > &elements_to_be_refined_pt)
 p-refine specified submesh by refining the elements identified by their pointers, then rebuild the problem. More...
 
void p_refine_selected_elements (const Vector< Vector< unsigned > > &elements_to_be_refined)
 p-refine all submeshes by refining the elements identified by their numbers relative to each submesh in a Vector of Vectors, then rebuild the problem. More...
 
void p_refine_selected_elements (const Vector< Vector< PRefineableElement * > > &elements_to_be_refined_pt)
 p-refine all submeshes by refining the elements identified by their pointers within each submesh in a Vector of Vectors, then rebuild the problem. More...
 
unsigned unrefine_uniformly ()
 Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem. Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level) More...
 
unsigned unrefine_uniformly (const unsigned &i_mesh)
 Do uniform refinement for submesh i_mesh without documentation. Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level) More...
 
void p_unrefine_uniformly (DocInfo &doc_info)
 p-unrefine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem. More...
 
void p_unrefine_uniformly (const unsigned &i_mesh, DocInfo &doc_info)
 Do uniform p-unrefinement for submesh i_mesh without documentation. More...
 
void adapt (unsigned &n_refined, unsigned &n_unrefined)
 Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again. More...
 
void adapt ()
 Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. On return from this function, Problem can immediately be solved again. [Argument-free wrapper]. More...
 
void p_adapt (unsigned &n_refined, unsigned &n_unrefined)
 p-adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again. More...
 
void p_adapt ()
 p-adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. On return from this function, Problem can immediately be solved again. [Argument-free wrapper] More...
 
void adapt_based_on_error_estimates (unsigned &n_refined, unsigned &n_unrefined, Vector< Vector< double > > &elemental_error)
 Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on the error estimates in elemental_error and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again. More...
 
void adapt_based_on_error_estimates (Vector< Vector< double > > &elemental_error)
 Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on the error estimates in elemental_error and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again. [Wrapper without n_refined and n_unrefined arguments]. More...
 
void get_all_error_estimates (Vector< Vector< double > > &elemental_error)
 Return the error estimates computed by (all) refineable (sub)mesh(es) in the elemental_error structure, which consists of a vector of vectors of elemental errors, one vector for each (sub)mesh. More...
 
void doc_errors (DocInfo &doc_info)
 Get max and min error for all elements in submeshes. More...
 
void doc_errors ()
 Get max and min error for all elements in submeshes. More...
 
void enable_info_in_newton_solve ()
 Enable the output of information when in the newton solver (Default) More...
 
void disable_info_in_newton_solve ()
 Disable the output of information when in the newton solver. More...
 
- Public Member Functions inherited from oomph::ExplicitTimeSteppableObject
 ExplicitTimeSteppableObject ()
 Empty constructor. More...
 
 ExplicitTimeSteppableObject (const ExplicitTimeSteppableObject &)=delete
 Broken copy constructor. More...
 
void operator= (const ExplicitTimeSteppableObject &)=delete
 Broken assignment operator. More...
 
virtual ~ExplicitTimeSteppableObject ()
 Empty destructor. More...
 
virtual void actions_before_explicit_stage ()
 Empty virtual function to do anything needed before a stage of an explicit time step (Runge-Kutta steps contain multiple stages per time step, most others only contain one). More...
 
virtual void actions_after_explicit_stage ()
 Empty virtual function that should be overloaded to update any dependent data or boundary conditions that should be advanced after each stage of an explicit time step (Runge-Kutta steps contain multiple stages per time step, most others only contain one). More...
 

Public Attributes

double Max_permitted_error_for_halo_check
 Threshold for error throwing in Problem::check_halo_schemes() More...
 
bool Shut_up_in_newton_solve
 Boolean to indicate if all output is suppressed in Problem::newton_solve(). Defaults to false. More...
 

Static Public Attributes

static bool Suppress_warning_about_actions_before_read_unstructured_meshes
 Flag to allow suppression of warning messages re reading in unstructured meshes during restart. More...
 

Protected Types

enum  Assembly_method {
  Perform_assembly_using_vectors_of_pairs , Perform_assembly_using_two_vectors , Perform_assembly_using_maps , Perform_assembly_using_lists ,
  Perform_assembly_using_two_arrays
}
 Enumerated flags to determine which sparse assembly method is used. More...
 

Protected Member Functions

unsigned setup_element_count_per_dof ()
 Function that populates the Element_counter_per_dof vector with the number of elements that contribute to each dof. For example, with linear elements in 1D each dof contains contributions from two elements apart from those on the boundary. Returns the total number of elements in the problem. More...
 
void setup_dof_halo_scheme ()
 Function that is used to setup the halo scheme. More...
 
virtual void sparse_assemble_row_or_column_compressed (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag)
 Protected helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. More...
 
virtual void actions_before_newton_solve ()
 Any actions that are to be performed before a complete Newton solve (e.g. adjust boundary conditions). CAREFUL: This step should (and if the FD-based LinearSolver FD_LU is used, must) only update values that are pinned! More...
 
virtual void actions_after_newton_solve ()
 Any actions that are to be performed after a complete Newton solve, e.g. post processing. CAREFUL: This step should (and if the FD-based LinearSolver FD_LU is used, must) only update values that are pinned! More...
 
virtual void actions_before_newton_convergence_check ()
 Any actions that are to be performed before the residual is checked in the Newton method, e.g. update any boundary conditions that depend upon variables of the problem; update any ‘dependent’ variables; or perform an update of the nodal positions in SpineMeshes etc. CAREFUL: This step should (and if the FD-based LinearSolver FD_LU is used, must) only update values that are pinned! More...
 
virtual void actions_before_newton_step ()
 Any actions that are to be performed before each individual Newton step. Most likely to be used for diagnostic purposes to doc the solution during a non-converging iteration, say. More...
 
virtual void actions_after_newton_step ()
 Any actions that are to be performed after each individual Newton step. Most likely to be used for diagnostic purposes to doc the solution during a non-converging iteration, say. More...
 
virtual void actions_before_implicit_timestep ()
 Actions that should be performed before each implicit time step. This is needed when one wants to solve a steady problem before timestepping and needs to distinguish between the two cases. More...
 
virtual void actions_after_implicit_timestep ()
 Actions that should be performed after each implicit time step. This is needed when one wants to solve a steady problem before timestepping and needs to distinguish between the two cases. More...
 
virtual void actions_after_implicit_timestep_and_error_estimation ()
 Actions that should be performed after each implicit time step. This is needed if your actions_after_implicit_timestep() modify the solution in a way that affects the error estimate. More...
 
virtual void actions_before_explicit_timestep ()
 Actions that should be performed before each explicit time step. More...
 
virtual void actions_after_explicit_timestep ()
 Actions that should be performed after each explicit time step. More...
 
virtual void actions_before_read_unstructured_meshes ()
 Actions that are to be performed before reading in restart data for problems involving unstructured bulk meshes. If the problem contains such meshes we need to strip out any face elements that are attached to them because restart of unstructured meshes re-creates their elements and nodes from scratch, leading to dangling pointers from the face elements to the old elements and nodes. This function is virtual and (practically) empty but toggles a flag to indicate that it has been called. This is used to issue a warning, prompting the user to consider overloading it if the problem is found to contain unstructured bulk meshes during restarts. More...
 
virtual void actions_after_read_unstructured_meshes ()
 Actions that are to be performed before reading in restart data for problems involving unstructured bulk meshes. Typically used to re-attach FaceElements, say, that were stripped out in actions_before_read_unstructured_meshes(). This function is virtual and (practically) empty but toggles a flag to indicate that it has been called. This is used to issue a warning, prompting the user to consider overloading it if the problem is found to contain unstructured bulk meshes during restarts. More...
 
virtual void actions_before_distribute ()
 Actions to be performed before a (mesh) distribution. More...
 
virtual void actions_after_distribute ()
 Actions to be performed after a (mesh) distribution. More...
 
virtual void actions_after_change_in_global_parameter (double *const &parameter_pt)
 Actions that are to be performed when the global parameter addressed by parameter_pt has been changed in the function get_derivative_wrt_global_parameter() The default is to call actions_before_newton_solve(), actions_before_newton_convergence_check() and actions_after_newton_solve(). This could be amazingly inefficient in certain problems and should be overloaded in such cases. An example would be when a remesh is required in general, but the global parameter does not affect the mesh directly. More...
 
virtual void actions_after_change_in_bifurcation_parameter ()
 Actions that are to be performed after a change in the parameter that is being varied as part of the solution of a bifurcation detection problem. The default is to call actions_before_newton_solve(), actions_before_newton_convergence_check() and actions_after_newton_solve(). This could be amazingly inefficient in certain problems and should be overloaded in such cases. An example would be when a remesh is required in general, but the global parameter does not affect the mesh directly. More...
 
virtual void actions_after_parameter_increase (double *const &parameter_pt)
 Empty virtual function; provides hook to perform actions after the increase in the arclength parameter (during continuation) More...
 
double & dof_derivative (const unsigned &i)
 Access function to the derivative of the i-th (local) dof with respect to the arc length, used in continuation. More...
 
double & dof_current (const unsigned &i)
 Access function to the current value of the i-th (local) dof at the start of a continuation step. More...
 
virtual void set_initial_condition ()
 Set initial condition (incl previous timesteps). We need to establish this interface because I.C. needs to be reset when problem is adapted during the first timestep. More...
 
virtual double global_temporal_error_norm ()
 Function to calculate a global error norm, used in adaptive timestepping to control the change in timestep. Individual errors for each data object can be obtained via the data timestepper's temporal_error_in_value or temporal_error_in_position functions and should be combined to construct a global norm. For example, in fluids problems a suitable norm is usually the weighted sum of the errors in the velocities; for moving mesh problems is it usually better to use the weighted sum of the errors in position. More...
 
unsigned newton_solve_continuation (double *const &parameter_pt)
 Perform a basic arc-length continuation step using Newton's method. Returns number of Newton steps taken. More...
 
unsigned newton_solve_continuation (double *const &parameter_pt, DoubleVector &z)
 This function performs a basic continuation step using the Newton method. The number of Newton steps taken is returned, to be used in any external step-size control routines. The governing parameter of the problem is passed as a pointer to the routine, as is a vector in which to store the derivatives wrt the parameter, if required. More...
 
void calculate_continuation_derivatives (double *const &parameter_pt)
 A function to calculate the derivatives wrt the arc-length. This version of the function actually does a linear solve so that the derivatives are calculated "exactly" rather than using the values at the Newton step just before convergence. This is necessary in spatially adaptive problems, in which the number of degrees of freedom changes and so the appropriate derivatives must be calculated for the new variables. This function is called if no Newton steps were taken in the continuation routine ... i.e. the initial residuals were sufficiently small. More...
 
void calculate_continuation_derivatives (const DoubleVector &z)
 A function to calculate the derivatives with respect to the arc-length required for continuation. The arguments is the solution of the linear system, Jz = dR/dparameter, that gives du/dparameter and the direction output from the newton_solve_continuation function. The derivatives are stored in the ContinuationParameters namespace. More...
 
void calculate_continuation_derivatives_fd (double *const &parameter_pt)
 A function to calculate the derivatives with respect to the arc-length required for continuation by finite differences, using the previous values of the solution. The derivatives are stored in the ContinuationParameters namespace. More...
 
bool does_pointer_correspond_to_problem_data (double *const &parameter_pt)
 Return a boolean flag to indicate whether the pointer parameter_pt refers to values stored in a Data object that is contained within the problem. More...
 
void set_consistent_pinned_values_for_continuation ()
 Private helper function that is used to set the appropriate pinned values for continuation. More...
 

Protected Attributes

Vector< Problem * > Copy_of_problem_pt
 Vector of pointers to copies of the problem used in adaptive bifurcation tracking problems (ALH: TEMPORARY HACK, WILL BE FIXED) More...
 
std::map< double *, bool > Calculate_dparameter_analytic
 Map used to determine whether the derivatives with respect to a parameter should be finite differenced. The default is that finite differences should be used. More...
 
bool Calculate_hessian_products_analytic
 Map used to determine whether the hessian products should be computed using finite differences. The default is that finite differences will be used. More...
 
LinearAlgebraDistributionDof_distribution_pt
 The distribution of the DOFs in this problem. This object is created in the Problem constructor and setup when assign_eqn_numbers(...) is called. If this problem is distributed then this distribution will match the distribution of the equation numbers. If this problem is not distributed then this distribution will be uniform over all processors. More...
 
Vector< double * > Dof_pt
 Vector of pointers to dofs. More...
 
DoubleVectorWithHaloEntries Element_count_per_dof
 Counter that records how many elements contribute to each dof. Used to determine the (discrete) arc-length automatically. It really should be an integer, but is a double so that the distribution information can be used for distributed problems. More...
 
Vector< double > Elemental_assembly_time
 Storage for assembly times (used for load balancing) More...
 
DoubleVectorHaloSchemeHalo_scheme_pt
 Pointer to the halo scheme for any global vectors that have the Dof_distribution. More...
 
Vector< double * > Halo_dof_pt
 Storage for the halo degrees of freedom (only required) when accessing via the global equation number in distributed problems. More...
 
double Relaxation_factor
 Relaxation fator for Newton method (only a fractional Newton correction is applied if this is less than 1; default 1). More...
 
double Newton_solver_tolerance
 The Tolerance below which the Newton Method is deemed to have converged. More...
 
unsigned Max_newton_iterations
 Maximum number of Newton iterations. More...
 
unsigned Nnewton_iter_taken
 Actual number of Newton iterations taken during the most recent iteration. More...
 
Vector< double > Max_res
 Maximum residuals at start and after each newton iteration. More...
 
double Max_residuals
 Maximum desired residual: if the maximum residual exceeds this value, the program will exit. More...
 
bool Time_adaptive_newton_crash_on_solve_fail
 Bool to specify what to do if a Newton solve fails within a time adaptive solve. Default (false) is to half the step and try again. If true then crash instead. More...
 
bool Jacobian_reuse_is_enabled
 Is re-use of Jacobian in Newton iteration enabled? Default: false. More...
 
bool Jacobian_has_been_computed
 Has a Jacobian been computed (and can therefore be re-used if required)? Default: false. More...
 
bool Problem_is_nonlinear
 Boolean flag indicating if we're dealing with a linear or nonlinear Problem – if set to false the Newton solver will not check the residual before or after the linear solve. Set to true by default; can be over-written in specific Problem class. More...
 
bool Pause_at_end_of_sparse_assembly
 Protected boolean flag to halt program execution during sparse assemble process to assess peak memory usage. Initialised to false (obviously!) More...
 
bool Doc_time_in_distribute
 Protected boolean flag to provide comprehensive timimings during problem distribution. Initialised to false. More...
 
unsigned Sparse_assembly_method
 Flag to determine which sparse assembly method to use By default we use assembly by vectors of pairs. More...
 
unsigned Sparse_assemble_with_arrays_initial_allocation
 the number of elements to initially allocate for a matrix row within the sparse_assembly_with_two_arrays(...) method (if a matrix of this size has not been assembled already). If a matrix of this size has been assembled then the number of elements in each row in that matrix is used as the initial allocation More...
 
unsigned Sparse_assemble_with_arrays_allocation_increment
 the number of elements to add to a matrix row when the initial allocation is exceeded within the sparse_assemble_with_two_arrays(...) method. More...
 
Vector< Vector< unsigned > > Sparse_assemble_with_arrays_previous_allocation
 the number of elements in each row of a compressed matrix in the previous matrix assembly. More...
 
double Numerical_zero_for_sparse_assembly
 A tolerance used to determine whether the entry in a sparse matrix is zero. If it is then storage need not be allocated. More...
 
double FD_step_used_in_get_hessian_vector_products
 
bool Mass_matrix_reuse_is_enabled
 Is re-use of the mass matrix in explicit timestepping enabled Default:false. More...
 
bool Mass_matrix_has_been_computed
 Has the mass matrix been computed (and can therefore be reused) Default: false. More...
 
bool Discontinuous_element_formulation
 Is the problem a discontinuous one, i.e. can the elemental contributions be treated independently. Default: false. More...
 
double Minimum_dt
 Minimum desired dt: if dt falls below this value, exit. More...
 
double Maximum_dt
 Maximum desired dt. More...
 
double DTSF_max_increase
 Maximum possible increase of dt between time-steps in adaptive schemes. More...
 
double DTSF_min_decrease
 Minimum allowed decrease of dt between time-steps in adaptive schemes. Lower scaling values will reject the time-step (and retry with a smaller dt). More...
 
double Minimum_dt_but_still_proceed
 If Minimum_dt_but_still_proceed positive, then dt will not be reduced below this value during adaptive timestepping and the computation will continue with this value, accepting the larger errors that this will incur). Note: This option is disabled by default as this value is initialised to -1.0. More...
 
bool Scale_arc_length
 Boolean to control whether arc-length should be scaled. More...
 
double Desired_proportion_of_arc_length
 Proportion of the arc-length to taken by the parameter. More...
 
double Theta_squared
 Value of the scaling parameter required so that the parameter occupies the desired proportion of the arc length. NOTE: If you wish to change this then make sure to set the value of Scale_arc_length to false to ensure the value of this isn't overwritten during the arc-length process. Instead of changing this variable, it's better to actually update the Desired_proportion_of_arc_length value. More...
 
int Sign_of_jacobian
 Storage for the sign of the global Jacobian. More...
 
double Continuation_direction
 The direction of the change in parameter that will ensure that a branch is followed in one direction only. More...
 
double Parameter_derivative
 Storage for the derivative of the global parameter wrt arc-length. More...
 
double Parameter_current
 Storage for the present value of the global parameter. More...
 
bool Use_continuation_timestepper
 Boolean to control original or new storage of dof stuff. More...
 
unsigned Dof_derivative_offset
 Storage for the offset for the continuation derivatives from the original dofs (default is 1, but this will be differnet when continuing bifurcations and periodic orbits) More...
 
unsigned Dof_current_offset
 Storage for the offset for the current values of dofs from the original dofs (default is 2, but this will be differnet when continuing bifurcations and periodic orbits) More...
 
Vector< double > Dof_derivative
 Storage for the derivative of the problem variables wrt arc-length. More...
 
Vector< double > Dof_current
 Storage for the present values of the variables. More...
 
double Ds_current
 Storage for the current step value. More...
 
unsigned Desired_newton_iterations_ds
 The desired number of Newton Steps to reach convergence at each step along the arc. More...
 
double Minimum_ds
 Minimum desired value of arc-length. More...
 
bool Bifurcation_detection
 Boolean to control bifurcation detection via determinant of Jacobian. More...
 
bool Bisect_to_find_bifurcation
 Boolean to control wheter bisection is used to located bifurcation. More...
 
bool First_jacobian_sign_change
 Boolean to indicate whether a sign change has occured in the Jacobian. More...
 
bool Arc_length_step_taken
 Boolean to indicate whether an arc-length step has been taken. More...
 
bool Use_finite_differences_for_continuation_derivatives
 Boolean to specify which scheme to use to calculate the continuation derivatievs. More...
 
bool Problem_has_been_distributed
 Has the problem been distributed amongst multiple processors? More...
 
bool Bypass_increase_in_dof_check_during_pruning
 Boolean to bypass check of increase in dofs during pruning. More...
 
OomphCommunicatorCommunicator_pt
 The communicator for this problem. More...
 
bool Always_take_one_newton_step
 Boolean to indicate whether a Newton step should be taken even if the initial residuals are below the required tolerance. More...
 
double Timestep_reduction_factor_after_nonconvergence
 What it says: If temporally adaptive Newton solver fails to to converge, reduce timestep by this factor and try again; defaults to 1/2; can be over-written by user in derived problem. More...
 
bool Keep_temporal_error_below_tolerance
 Boolean to decide if a timestep is to be rejected if the error estimate post-solve (computed by global_temporal_error_norm()) exceeds the tolerance required in the call to adaptive_unsteady_newton_solve(...). Defaults to true. More...
 

Static Protected Attributes

static ContinuationStorageScheme Continuation_time_stepper
 Storage for the single static continuation timestorage object. More...
 

Private Member Functions

double doubly_adaptive_unsteady_newton_solve_helper (const double &dt, const double &epsilon, const unsigned &max_adapt, const unsigned &suppress_resolve_after_spatial_adapt, const bool &first, const bool &shift=true)
 Private helper function that actually performs the unsteady "doubly" adaptive Newton solve. See actual (non-helper) functions for description of parameters. More...
 
void refine_uniformly_aux (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info, const bool &prune)
 Helper function to do compund refinement of (all) refineable (sub)mesh(es) uniformly as many times as specified in vector and rebuild problem; doc refinement process. Set boolean argument to true if you want to prune immediately after refining the meshes individually. More...
 
void p_refine_uniformly_aux (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info, const bool &prune)
 Helper function to do compund p-refinement of (all) p-refineable (sub)mesh(es) uniformly as many times as specified in vector and rebuild problem; doc refinement process. Set boolean argument to true if you want to prune immediately after refining the meshes individually. More...
 
void setup_base_mesh_info_after_pruning ()
 Helper function to re-setup the Base_mesh enumeration (used during load balancing) after pruning. More...
 
virtual void sparse_assemble_row_or_column_compressed_with_vectors_of_pairs (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag)
 Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses vectors of pairs. More...
 
virtual void sparse_assemble_row_or_column_compressed_with_two_vectors (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag)
 Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses two vectors. More...
 
virtual void sparse_assemble_row_or_column_compressed_with_maps (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag)
 Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses maps. More...
 
virtual void sparse_assemble_row_or_column_compressed_with_lists (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag)
 Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses lists. More...
 
virtual void sparse_assemble_row_or_column_compressed_with_two_arrays (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag)
 Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses lists. More...
 
void calculate_continuation_derivatives_helper (const DoubleVector &z)
 A function that performs the guts of the continuation derivative calculation in arc length continuation problems. More...
 
void calculate_continuation_derivatives_fd_helper (double *const &parameter_pt)
 A function that performs the guts of the continuation derivative calculation in arc-length continuation problems using finite differences. More...
 
void bifurcation_adapt_helper (unsigned &n_refined, unsigned &n_unrefined, const unsigned &bifurcation_type, const bool &actually_adapt=true)
 A function that is used to adapt a bifurcation-tracking problem, which requires separate interpolation of the associated eigenfunction. The error measure is chosen to be a suitable combination of the errors in the base flow and the eigenfunction. More...
 
void bifurcation_adapt_doc_errors (const unsigned &bifurcation_type)
 A function that is used to document the errors used in the adaptive solution of bifurcation problems. More...
 
void get_my_eqns (AssemblyHandler *const &assembly_handler_pt, const unsigned &el_lo, const unsigned &el_hi, Vector< unsigned > &my_eqns)
 Helper method that returns the (unique) global equations to which the elements in the range el_lo to el_hi contribute on this processor using the given assembly_handler. More...
 
void parallel_sparse_assemble (const LinearAlgebraDistribution *const &dist_pt, Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residuals)
 Helper method to assemble CRDoubleMatrices from distributed on multiple processors. More...
 
void copy_haloed_eqn_numbers_helper (const bool &do_halos, const bool &do_external_halos)
 A private helper function to copy the haloed equation numbers into the halo equation numbers, either for the problem's one and only mesh or for all of its submeshes. Bools control if we deal with data associated with external halo/ed elements/nodes or the "normal" halo/ed ones. More...
 
void remove_duplicate_data (Mesh *const &mesh_pt, bool &actually_removed_some_data)
 Private helper function to remove repeated data in external haloed elements in specified mesh. Bool is true if some data was removed – this usually requires re-running through certain parts of the equation numbering procedure. More...
 
void remove_null_pointers_from_external_halo_node_storage ()
 Consolidate external halo node storage by removing nulled out pointers in external halo and haloed schemes for all meshes. More...
 
void recompute_load_balanced_assembly ()
 Helper function to re-assign the first and last elements to be assembled by each processor during parallel assembly for non-distributed problem. More...
 
void get_data_to_be_sent_during_load_balancing (const Vector< unsigned > &element_domain_on_this_proc, Vector< int > &send_n, Vector< double > &send_data, Vector< int > &send_displacement, Vector< unsigned > &old_domain_for_base_element, Vector< unsigned > &new_domain_for_base_element, unsigned &max_refinement_level_overall)
 Load balance helper routine: Get data to be sent to other processors during load balancing and other information about re-distribution. More...
 
void get_flat_packed_refinement_pattern_for_load_balancing (const Vector< unsigned > &old_domain_for_base_element, const Vector< unsigned > &new_domain_for_base_element, const unsigned &max_refinement_level_overall, std::map< unsigned, Vector< unsigned > > &flat_packed_refinement_info_for_root)
 Get flat-packed refinement pattern for each root element in current mesh (labeled by unique number of root element in unrefined base mesh). The vector stored for each root element contains the following information: More...
 
void send_data_to_be_sent_during_load_balancing (Vector< int > &send_n, Vector< double > &send_data, Vector< int > &send_displacement)
 Load balance helper routine: Send data to other processors during load balancing. More...
 
void send_refinement_info_helper (Vector< unsigned > &old_domain_for_base_element, Vector< unsigned > &new_domain_for_base_element, const unsigned &max_refinement_level_overall, std::map< unsigned, Vector< unsigned > > &refinement_info_for_root_local, Vector< Vector< Vector< unsigned > > > &refinement_info_for_root_elements)
 Send refinement information between processors. More...
 
void globally_convergent_line_search (const Vector< double > &x_old, const double &half_residual_squared_old, DoubleVector &gradient, DoubleVector &newton_dir, double &half_residual_squared, const double &stpmax)
 Line search helper for globally convergent Newton method. More...
 
double arc_length_step_solve_helper (double *const &parameter_pt, const double &ds, const unsigned &max_adapt)
 Private helper function that actually contains the guts of the arc-length stepping, parameter_pt is a pointer to the parameter that is traded for the arc-length constraint, ds is the desired arc length and max_adapt is the maximum number of spatial adaptations. The pointer to the parameter may be changed if this is called from the Data-based interface. More...
 

Private Attributes

MeshMesh_pt
 The mesh pointer. More...
 
Vector< Mesh * > Sub_mesh_pt
 Vector of pointers to submeshes. More...
 
LinearSolverLinear_solver_pt
 Pointer to the linear solver for the problem. More...
 
LinearSolverMass_matrix_solver_for_explicit_timestepper_pt
 Pointer to the linear solver used for explicit time steps (this is likely to be different to the linear solver for newton solves because explicit time steps only involve inverting a mass matrix. This can be done very efficiently by, e.g. CG with a diagonal predconditioner). More...
 
EigenSolverEigen_solver_pt
 Pointer to the eigen solver for the problem. More...
 
AssemblyHandlerAssembly_handler_pt
 
LinearSolverDefault_linear_solver_pt
 Pointer to the default linear solver. More...
 
EigenSolverDefault_eigen_solver_pt
 Pointer to the default eigensolver. More...
 
AssemblyHandlerDefault_assembly_handler_pt
 Pointer to the default assembly handler. More...
 
TimeTime_pt
 Pointer to global time for the problem. More...
 
Vector< TimeStepper * > Time_stepper_pt
 The Vector of time steppers (there could be many different ones in multiphysics problems) More...
 
ExplicitTimeStepperExplicit_time_stepper_pt
 Pointer to a single explicit timestepper. More...
 
Vector< double > * Saved_dof_pt
 Pointer to vector for backup of dofs. More...
 
bool Default_set_initial_condition_called
 Has default set_initial_condition function been called? Default: false. More...
 
bool Use_globally_convergent_newton_method
 Use the globally convergent newton method. More...
 
bool Empty_actions_before_read_unstructured_meshes_has_been_called
 Boolean to indicate that empty actions_before_read_unstructured_meshes() function has been called. More...
 
bool Empty_actions_after_read_unstructured_meshes_has_been_called
 Boolean to indicate that empty actions_after_read_unstructured_meshes() function has been called. More...
 
bool Store_local_dof_pt_in_elements
 Boolean to indicate whether local dof pointers should be stored in the elements. More...
 
bool Use_predictor_values_as_initial_guess
 Use values from the time stepper predictor as an initial guess. More...
 
Vector< Data * > Global_data_pt
 Vector of global data: "Nobody" (i.e. none of the elements etc.) is "in charge" of this Data so it would be overlooked when it comes to equation-numbering, timestepping etc. Including (pointers) to such Data in here, puts the Problem itself "in charge" of these tasks. More...
 
bool Doc_imbalance_in_parallel_assembly
 Boolean to switch on assessment of load imbalance in parallel assembly of distributed problem. More...
 
bool Use_default_partition_in_load_balance
 Flag to use "default partition" during load balance. Should only be set to true when run in validation mode. More...
 
Vector< unsigned > First_el_for_assembly
 First element to be assembled by given processor for non-distributed problem (only kept up to date when default assignment is used) More...
 
Vector< unsigned > Last_el_plus_one_for_assembly
 Last element (plus one) to be assembled by given processor for non-distributed problem (only kept up to date when default assignment is used) More...
 
bool Must_recompute_load_balance_for_assembly
 Boolean indicating that the division of elements over processors during the assembly process must be re-load-balanced. (only used for non-distributed problems) More...
 
std::map< GeneralisedElement *, unsigned > Base_mesh_element_number_plus_one
 Map which stores the correspondence between a root element and its element number (plus one) within the global mesh at the point when it is distributed. NB a root element in this instance is one of the elements in the uniformly-refined mesh at the point when Problem::distribute() is called, since these elements become roots on each of the processors involved in the distribution. Null when element doesn't exist following the adjustment of this when pruning. More...
 
Vector< GeneralisedElement * > Base_mesh_element_pt
 Vector to store the correspondence between a root element and its element number within the global mesh at the point when it is distributed. NB a root element in this instance is one of the elements in the uniformly-refined mesh at the point when Problem::distribute() is called, since these elements become roots on each of the processors involved in the distribution. Null when element doesn't exist following the adjustment of this when pruning. More...
 
Distributed_problem_matrix_distribution Dist_problem_matrix_distribution
 The distributed matrix distribution method 1 - Automatic - the Problem distribution is employed, unless any processor has number of rows equal to 110% of N/P, in which case uniform distribution is employed. 2 - Problem - the jacobian on processor p only contains rows that correspond to equations that are on this processor. (minimises communication) 3 - Uniform - each processor holds as close to N/P matrix rows as possible. (very well load balanced) More...
 
unsigned Parallel_sparse_assemble_previous_allocation
 The amount of data allocated during the previous parallel sparse assemble. Used to optimise the next call to parallel_sparse_assemble() More...
 

Friends

class FoldHandler
 
class PitchForkHandler
 
class HopfHandler
 
template<unsigned NNODE_1D>
class PeriodicOrbitAssemblyHandler
 
class BlockFoldLinearSolver
 
class BlockPitchForkLinearSolver
 
class AugmentedBlockFoldLinearSolver
 
class AugmentedBlockPitchForkLinearSolver
 
class BlockHopfLinearSolver
 

Detailed Description

////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////

The Problem class

The main components of a Problem are:

Obviously, at this level in the code hierarchy, many things become very problem-dependent but when setting up a specific problem (as a class that inherits from Problem), the problem constructor will/should typically have a structure similar to this:

// Set up a timestepper
TimeStepper* time_stepper_pt=new Steady;
// Add timestepper to problem
// Build and assign mesh
SomeMesh<ELEMENT_TYPE>(Nelement,time_stepper_pt);
// Set the boundary conditions for this problem: All nodes are
// free by default -- just pin the ones that have Dirichlet conditions
// here (boundary 0 in this example)
unsigned i_bound = 0
unsigned num_nod= mesh_pt()->nboundary_node(ibound);
for (unsigned inod=0;inod<num_nod;inod++)
{
mesh_pt()->boundary_node_pt(ibound,inod)->pin(0);
}
// Complete the build of all elements so they are fully functional
// Setup equation numbering scheme
oomph_info <<"Number of equations: " << assign_eqn_numbers() <<
std::endl;
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
unsigned long nboundary_node(const unsigned &ibound) const
Return number of nodes on a particular boundary.
Definition: mesh.h:833
Node *& boundary_node_pt(const unsigned &b, const unsigned &n)
Return pointer to node n on boundary b.
Definition: mesh.h:493
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...
Definition: problem.cc:1989
void add_time_stepper_pt(TimeStepper *const &time_stepper_pt)
Add a timestepper to the problem. The function will automatically create or resize the Time object so...
Definition: problem.cc:1545
TimeStepper *& time_stepper_pt()
Access function for the pointer to the first (presumably only) timestepper.
Definition: problem.h:1524
Mesh *& mesh_pt()
Return a pointer to the global mesh.
Definition: problem.h:1280
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...

For time-dependent problems, we can then use

void assign_initial_values_impulsive()
Initialise data and nodal positions to simulate impulsive start from initial configuration/solution.
Definition: problem.cc:11499

to generate an initial guess (for an impulsive start) and the problem can then be solved, e.g. using the steady or unsteady Newton solvers

void newton_solve()
Use Newton method to solve the problem.
Definition: problem.cc:8783

or

void unsteady_newton_solve(const double &dt)
Advance time by dt and solve by Newton's method. This version always shifts time values.
Definition: problem.cc:10953

Definition at line 150 of file problem.h.

Member Typedef Documentation

◆ SpatialErrorEstimatorFctPt

typedef void(* oomph::Problem::SpatialErrorEstimatorFctPt) (Mesh *&mesh_pt, Vector< double > &elemental_error)

Function pointer for spatial error estimator.

Definition at line 1258 of file problem.h.

◆ SpatialErrorEstimatorWithDocFctPt

typedef void(* oomph::Problem::SpatialErrorEstimatorWithDocFctPt) (Mesh *&mesh_pt, Vector< double > &elemental_error, DocInfo &doc_info)

Function pointer for spatial error estimator with doc.

Definition at line 1262 of file problem.h.

Member Enumeration Documentation

◆ Assembly_method

Enumerated flags to determine which sparse assembly method is used.

Enumerator
Perform_assembly_using_vectors_of_pairs 
Perform_assembly_using_two_vectors 
Perform_assembly_using_maps 
Perform_assembly_using_lists 
Perform_assembly_using_two_arrays 

Definition at line 644 of file problem.h.

◆ Distributed_problem_matrix_distribution

enum for distribution of distributed jacobians. 1 - Automatic - the Problem distribution is employed, unless any processor has number of rows equal to 110% of N/P, in which case uniform distribution is employed. 2 - Problem - the jacobian on processor p only contains rows that correspond to equations that are on this processor. (minimises communication) 3 - Uniform - each processor holds as close to N/P matrix rows as possible. (very well load balanced)

Enumerator
Default_matrix_distribution 
Problem_matrix_distribution 
Uniform_matrix_distribution 

Definition at line 829 of file problem.h.

Constructor & Destructor Documentation

◆ Problem() [1/2]

oomph::Problem::Problem ( )

◆ Problem() [2/2]

oomph::Problem::Problem ( const Problem dummy)
delete

Broken copy constructor.

◆ ~Problem()

oomph::Problem::~Problem ( )
virtual

Member Function Documentation

◆ actions_after_adapt()

virtual void oomph::Problem::actions_after_adapt ( )
inlinevirtual

◆ actions_after_change_in_bifurcation_parameter()

virtual void oomph::Problem::actions_after_change_in_bifurcation_parameter ( )
inlineprotectedvirtual

Actions that are to be performed after a change in the parameter that is being varied as part of the solution of a bifurcation detection problem. The default is to call actions_before_newton_solve(), actions_before_newton_convergence_check() and actions_after_newton_solve(). This could be amazingly inefficient in certain problems and should be overloaded in such cases. An example would be when a remesh is required in general, but the global parameter does not affect the mesh directly.

Definition at line 1151 of file problem.h.

References actions_after_newton_solve(), actions_before_newton_convergence_check(), and actions_before_newton_solve().

Referenced by oomph::FoldHandler::get_jacobian(), oomph::PitchForkHandler::get_jacobian(), oomph::HopfHandler::get_jacobian(), oomph::AugmentedBlockFoldLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), and oomph::BlockHopfLinearSolver::solve_for_two_rhs().

◆ actions_after_change_in_global_parameter()

virtual void oomph::Problem::actions_after_change_in_global_parameter ( double *const &  parameter_pt)
inlineprotectedvirtual

Actions that are to be performed when the global parameter addressed by parameter_pt has been changed in the function get_derivative_wrt_global_parameter() The default is to call actions_before_newton_solve(), actions_before_newton_convergence_check() and actions_after_newton_solve(). This could be amazingly inefficient in certain problems and should be overloaded in such cases. An example would be when a remesh is required in general, but the global parameter does not affect the mesh directly.

Definition at line 1133 of file problem.h.

References actions_after_newton_solve(), actions_before_newton_convergence_check(), and actions_before_newton_solve().

Referenced by get_derivative_wrt_global_parameter().

◆ actions_after_distribute()

virtual void oomph::Problem::actions_after_distribute ( )
inlineprotectedvirtual

Actions to be performed after a (mesh) distribution.

Definition at line 1119 of file problem.h.

Referenced by distribute(), load_balance(), and prune_halo_elements_and_nodes().

◆ actions_after_explicit_timestep()

virtual void oomph::Problem::actions_after_explicit_timestep ( )
inlineprotectedvirtual

Actions that should be performed after each explicit time step.

Reimplemented from oomph::ExplicitTimeSteppableObject.

Definition at line 1081 of file problem.h.

◆ actions_after_implicit_timestep()

virtual void oomph::Problem::actions_after_implicit_timestep ( )
inlineprotectedvirtual

Actions that should be performed after each implicit time step. This is needed when one wants to solve a steady problem before timestepping and needs to distinguish between the two cases.

Definition at line 1070 of file problem.h.

Referenced by adaptive_unsteady_newton_solve(), unsteady_newton_solve(), and oomph::SegregatableFSIProblem::unsteady_segregated_solve().

◆ actions_after_implicit_timestep_and_error_estimation()

virtual void oomph::Problem::actions_after_implicit_timestep_and_error_estimation ( )
inlineprotectedvirtual

Actions that should be performed after each implicit time step. This is needed if your actions_after_implicit_timestep() modify the solution in a way that affects the error estimate.

Definition at line 1075 of file problem.h.

Referenced by adaptive_unsteady_newton_solve(), and unsteady_newton_solve().

◆ actions_after_newton_solve()

virtual void oomph::Problem::actions_after_newton_solve ( )
inlineprotectedvirtual

Any actions that are to be performed after a complete Newton solve, e.g. post processing. CAREFUL: This step should (and if the FD-based LinearSolver FD_LU is used, must) only update values that are pinned!

Reimplemented in oomph::BiharmonicProblem< DIM >, oomph::BiharmonicFluidProblem< DIM >, oomph::SolidICProblem, and oomph::WomersleyProblem< ELEMENT, DIM >.

Definition at line 1038 of file problem.h.

Referenced by actions_after_change_in_bifurcation_parameter(), actions_after_change_in_global_parameter(), adaptive_unsteady_newton_solve(), get_fd_jacobian(), newton_solve(), and newton_solve_continuation().

◆ actions_after_newton_step()

virtual void oomph::Problem::actions_after_newton_step ( )
inlineprotectedvirtual

Any actions that are to be performed after each individual Newton step. Most likely to be used for diagnostic purposes to doc the solution during a non-converging iteration, say.

Definition at line 1058 of file problem.h.

Referenced by adaptive_unsteady_newton_solve(), newton_solve(), and newton_solve_continuation().

◆ actions_after_parameter_increase()

virtual void oomph::Problem::actions_after_parameter_increase ( double *const &  parameter_pt)
inlineprotectedvirtual

Empty virtual function; provides hook to perform actions after the increase in the arclength parameter (during continuation)

Definition at line 1161 of file problem.h.

Referenced by arc_length_step_solve_helper().

◆ actions_after_read_unstructured_meshes()

virtual void oomph::Problem::actions_after_read_unstructured_meshes ( )
inlineprotectedvirtual

Actions that are to be performed before reading in restart data for problems involving unstructured bulk meshes. Typically used to re-attach FaceElements, say, that were stripped out in actions_before_read_unstructured_meshes(). This function is virtual and (practically) empty but toggles a flag to indicate that it has been called. This is used to issue a warning, prompting the user to consider overloading it if the problem is found to contain unstructured bulk meshes during restarts.

Definition at line 1109 of file problem.h.

References Empty_actions_after_read_unstructured_meshes_has_been_called.

Referenced by read().

◆ actions_before_adapt()

virtual void oomph::Problem::actions_before_adapt ( )
inlinevirtual

Actions that are to be performed before a mesh adaptation. These might include removing any additional elements, such as traction boundary elements before the adaptation.

Definition at line 1022 of file problem.h.

Referenced by adapt(), adapt_based_on_error_estimates(), load_balance(), p_adapt(), p_refine_selected_elements(), p_refine_uniformly(), p_refine_uniformly_aux(), p_unrefine_uniformly(), read(), refine_selected_elements(), refine_uniformly(), refine_uniformly_aux(), oomph::MGSolver< DIM >::setup_mg_hierarchy(), oomph::HelmholtzMGPreconditioner< DIM >::setup_mg_hierarchy(), and unrefine_uniformly().

◆ actions_before_distribute()

virtual void oomph::Problem::actions_before_distribute ( )
inlineprotectedvirtual

Actions to be performed before a (mesh) distribution.

Definition at line 1116 of file problem.h.

Referenced by distribute(), load_balance(), and prune_halo_elements_and_nodes().

◆ actions_before_explicit_timestep()

virtual void oomph::Problem::actions_before_explicit_timestep ( )
inlineprotectedvirtual

Actions that should be performed before each explicit time step.

Reimplemented from oomph::ExplicitTimeSteppableObject.

Definition at line 1078 of file problem.h.

◆ actions_before_implicit_timestep()

virtual void oomph::Problem::actions_before_implicit_timestep ( )
inlineprotectedvirtual

Actions that should be performed before each implicit time step. This is needed when one wants to solve a steady problem before timestepping and needs to distinguish between the two cases.

Reimplemented in oomph::WomersleyProblem< ELEMENT, DIM >.

Definition at line 1064 of file problem.h.

Referenced by adaptive_unsteady_newton_solve(), unsteady_newton_solve(), and oomph::SegregatableFSIProblem::unsteady_segregated_solve().

◆ actions_before_newton_convergence_check()

virtual void oomph::Problem::actions_before_newton_convergence_check ( )
inlineprotectedvirtual

Any actions that are to be performed before the residual is checked in the Newton method, e.g. update any boundary conditions that depend upon variables of the problem; update any ‘dependent’ variables; or perform an update of the nodal positions in SpineMeshes etc. CAREFUL: This step should (and if the FD-based LinearSolver FD_LU is used, must) only update values that are pinned!

Definition at line 1048 of file problem.h.

Referenced by actions_after_change_in_bifurcation_parameter(), actions_after_change_in_global_parameter(), adaptive_unsteady_newton_solve(), oomph::PitchForkHandler::get_dresiduals_dparameter(), get_fd_jacobian(), get_hessian_vector_products(), oomph::FoldHandler::get_jacobian(), oomph::PitchForkHandler::get_jacobian(), newton_solve(), and newton_solve_continuation().

◆ actions_before_newton_solve()

virtual void oomph::Problem::actions_before_newton_solve ( )
inlineprotectedvirtual

Any actions that are to be performed before a complete Newton solve (e.g. adjust boundary conditions). CAREFUL: This step should (and if the FD-based LinearSolver FD_LU is used, must) only update values that are pinned!

Reimplemented in oomph::BiharmonicProblem< DIM >, oomph::BiharmonicFluidProblem< DIM >, oomph::SolidICProblem, oomph::NonLinearElasticitySmoothMesh< ELEMENT >, and oomph::WomersleyProblem< ELEMENT, DIM >.

Definition at line 1032 of file problem.h.

Referenced by actions_after_change_in_bifurcation_parameter(), actions_after_change_in_global_parameter(), get_fd_jacobian(), newton_solve(), and newton_solve_continuation().

◆ actions_before_newton_step()

virtual void oomph::Problem::actions_before_newton_step ( )
inlineprotectedvirtual

Any actions that are to be performed before each individual Newton step. Most likely to be used for diagnostic purposes to doc the solution during a non-converging iteration, say.

Definition at line 1053 of file problem.h.

Referenced by newton_solve(), and newton_solve_continuation().

◆ actions_before_read_unstructured_meshes()

virtual void oomph::Problem::actions_before_read_unstructured_meshes ( )
inlineprotectedvirtual

Actions that are to be performed before reading in restart data for problems involving unstructured bulk meshes. If the problem contains such meshes we need to strip out any face elements that are attached to them because restart of unstructured meshes re-creates their elements and nodes from scratch, leading to dangling pointers from the face elements to the old elements and nodes. This function is virtual and (practically) empty but toggles a flag to indicate that it has been called. This is used to issue a warning, prompting the user to consider overloading it if the problem is found to contain unstructured bulk meshes during restarts.

Definition at line 1095 of file problem.h.

References Empty_actions_before_read_unstructured_meshes_has_been_called.

Referenced by read().

◆ activate_bifurcation_tracking() [1/2]

void oomph::Problem::activate_bifurcation_tracking ( double *const &  parameter_pt,
const DoubleVector eigenvector,
const bool &  block_solve = true 
)

Activate generic bifurcation tracking for a single (real) eigenvalue where the initial guess for the eigenvector can be specified.

Activate the generic bifurcation ///tracking system by changing the assembly handler and initialising it using the parameter addressed by parameter_pt.

Definition at line 10129 of file problem.cc.

References Assembly_handler_pt, AugmentedBlockFoldLinearSolver, FoldHandler, Linear_solver_pt, and reset_assembly_handler_to_default().

◆ activate_bifurcation_tracking() [2/2]

void oomph::Problem::activate_bifurcation_tracking ( double *const &  parameter_pt,
const DoubleVector eigenvector,
const DoubleVector normalisation,
const bool &  block_solve = true 
)

Activate generic bifurcation tracking for a single (real) eigenvalue where the initial guess for the eigenvector can be specified and the normalisation condition can also be specified.

Activate the generic bifurcation ///tracking system by changing the assembly handler and initialising it using the parameter addressed by parameter_pt.

Definition at line 10157 of file problem.cc.

References Assembly_handler_pt, AugmentedBlockFoldLinearSolver, FoldHandler, Linear_solver_pt, and reset_assembly_handler_to_default().

◆ activate_fold_tracking()

void oomph::Problem::activate_fold_tracking ( double *const &  parameter_pt,
const bool &  block_solve = true 
)

Turn on fold tracking using the augmented system specified in the FoldHandler class. After a call to this function subsequent calls of the standard solution methods will converge to a fold (limit) point at a particular value of the variable addressed by parameter_pt. The system may not converge if the initial guess is sufficiently poor or, alternatively, if finite differencing is used to calculate the jacobian matrix in the elements. If the boolean flag block_solver is true (the default) then a block factorisation is used to solve the augmented system which is both faster and uses less memory.

Activate the fold tracking system by changing the assembly handler and initialising it using the parameter addressed by parameter_pt.

Definition at line 10103 of file problem.cc.

References Assembly_handler_pt, AugmentedBlockFoldLinearSolver, FoldHandler, Linear_solver_pt, and reset_assembly_handler_to_default().

Referenced by bifurcation_adapt_helper().

◆ activate_hopf_tracking() [1/2]

void oomph::Problem::activate_hopf_tracking ( double *const &  parameter_pt,
const bool &  block_solve = true 
)

Turn on Hopf bifurcation tracking using the augmented system specified in the HopfHandler class. After a call to this function subsequent calls of the standard solution methods will converge to a Hopf bifuraction at a particular value of the variable addressed by parameter_pt. The system may not converge if the initial guess is sufficiently poor or, alternatively, if finite differencing is used to calculate the jacobian matrix in the elements.

Activate the hopf tracking system by changing the assembly handler and initialising it using the parameter addressed by parameter_pt.

Definition at line 10218 of file problem.cc.

References Assembly_handler_pt, BlockHopfLinearSolver, HopfHandler, Linear_solver_pt, and reset_assembly_handler_to_default().

Referenced by bifurcation_adapt_helper().

◆ activate_hopf_tracking() [2/2]

void oomph::Problem::activate_hopf_tracking ( double *const &  parameter_pt,
const double &  omega,
const DoubleVector null_real,
const DoubleVector null_imag,
const bool &  block_solve = true 
)

Turn on Hopf bifurcation tracking using the augmented system specified in the HopfHandler class. After a call to this function subsequent calls of the standard solution methods will converge to a Hopf bifuraction at a particular value of the variable addressed by parameter_pt. The system may not converge if the initial guess is sufficiently poor or, alternatively, if finite differencing is used to calculate the jacobian matrix in the elements. This interface allows specification of an inital guess for the frequency and real and imaginary parts of the null vector, such as might be obtained from an eigensolve.

Activate the hopf tracking system by changing the assembly handler and initialising it using the parameter addressed by parameter_pt and the frequency and null vectors specified.

Definition at line 10246 of file problem.cc.

References Assembly_handler_pt, BlockHopfLinearSolver, HopfHandler, Linear_solver_pt, and reset_assembly_handler_to_default().

◆ activate_pitchfork_tracking()

void oomph::Problem::activate_pitchfork_tracking ( double *const &  parameter_pt,
const DoubleVector symmetry_vector,
const bool &  block_solve = true 
)

Turn on pitchfork tracking using the augmented system specified in the PitchForkHandler class. After a call to this function subsequent calls of the standard solution methods will converge to a pitchfork bifurcation at a particular value of the variable addressed by parameter_pt. The symmetry that is to be broken must be specified by supplying a symmetry_vector(ndof). The easiest way to determine such a vector is to solve the associated eigenproblem $ Jx = \lambda M x$ and pass in the eigenvector. This is not always necessary however, if the symmetry is easy to construct. The system may not converge if the initial guess is sufficiently poor or, alternatively, if finite differencing is used to calculate the jacobian matrix in the elements. If the boolean flag block_solver is true (the default) then a block factorisation is used to solve the augmented system which is both faster and requires less memory.

Activate the pitchfork tracking system by changing the assembly handler and initialising it using the parameter addressed by parameter_pt and a symmetry vector. The boolean flag is used to specify whether a block solver is used, default is true.

Definition at line 10188 of file problem.cc.

References Assembly_handler_pt, assembly_handler_pt(), BlockPitchForkLinearSolver, Linear_solver_pt, PitchForkHandler, and reset_assembly_handler_to_default().

Referenced by bifurcation_adapt_helper().

◆ adapt() [1/2]

void oomph::Problem::adapt ( )
inline

Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. On return from this function, Problem can immediately be solved again. [Argument-free wrapper].

Definition at line 2859 of file problem.h.

References adapt().

Referenced by adapt(), arc_length_step_solve_helper(), doubly_adaptive_unsteady_newton_solve_helper(), newton_solve(), and unsteady_newton_solve().

◆ adapt() [2/2]

void oomph::Problem::adapt ( unsigned &  n_refined,
unsigned &  n_unrefined 
)

Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again.

Definition at line 13666 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), adapt_based_on_error_estimates(), Assembly_handler_pt, assign_eqn_numbers(), bifurcation_adapt_helper(), oomph::AssemblyHandler::bifurcation_type(), Copy_of_problem_pt, oomph::Global_timings::Doc_comprehensive_timings, Dof_current, dof_current(), Dof_derivative, dof_derivative(), Dof_distribution_pt, get_all_error_estimates(), oomph::ErrorEstimator::get_element_errors(), i, make_copy(), mesh_pt(), oomph::Node::ndim(), ndof(), oomph::LinearAlgebraDistribution::nrow_local(), nsub_mesh(), oomph::oomph_info, rebuild_global_mesh(), oomph::TimingHelpers::timer(), Use_continuation_timestepper, and oomph::Node::x().

◆ adapt_based_on_error_estimates() [1/2]

void oomph::Problem::adapt_based_on_error_estimates ( unsigned &  n_refined,
unsigned &  n_unrefined,
Vector< Vector< double > > &  elemental_error 
)

Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on the error estimates in elemental_error and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again.

Perform mesh adaptation for (all) refineable (sub)mesh(es), based on the error estimates in elemental_error and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again.

Definition at line 14528 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

Referenced by adapt(), adapt_based_on_error_estimates(), and bifurcation_adapt_helper().

◆ adapt_based_on_error_estimates() [2/2]

void oomph::Problem::adapt_based_on_error_estimates ( Vector< Vector< double > > &  elemental_error)
inline

Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on the error estimates in elemental_error and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again. [Wrapper without n_refined and n_unrefined arguments].

Definition at line 2910 of file problem.h.

References adapt_based_on_error_estimates().

◆ adaptive_unsteady_newton_solve() [1/2]

double oomph::Problem::adaptive_unsteady_newton_solve ( const double &  dt_desired,
const double &  epsilon 
)

Attempt to advance timestep by dt_desired. If the solution fails the timestep will be halved until convergence is achieved, or the timestep falls below NewtonSolverParameters::Minimum_time_step. The error control parameter epsilon represents the (approximate) desired magnitude of the global error at each timestep. The routine returns a double that is the suggested next timestep and should be passed as dt_desired the next time the routine is called. This version always shifts the time values.

Attempt to take one timestep forward using dt_desired. The error control parameter, epsilon, is used to specify the desired approximate value of the global error norm per timestep. The routine returns the value an estimate of the next value of dt that should be taken.

Definition at line 11056 of file problem.cc.

References adaptive_unsteady_newton_solve().

Referenced by adaptive_unsteady_newton_solve(), and doubly_adaptive_unsteady_newton_solve_helper().

◆ adaptive_unsteady_newton_solve() [2/2]

double oomph::Problem::adaptive_unsteady_newton_solve ( const double &  dt_desired,
const double &  epsilon,
const bool &  shift_values 
)

Attempt to advance timestep by dt_desired. If the solution fails the timestep will be halved until convergence is achieved, or the timestep falls below NewtonSolverParameters::Minimum_time_step. The error control parameter epsilon represents the (approximate) desired magnitude of the global error at each timestep. The routine returns a double that is the suggested next timestep and should be passed as dt_desired the next time the routine is called. Once again the boolean flag, shift_values, is used to control whether the time values are shifted.

Attempt to take one timestep forward using the dt_desired. This is the driver for a number of adaptive solvers. If the solution fails to converge at a given timestep, the routine will automatically halve the time step and try again, until the time step falls below the specified minimum value. The routine returns the value an estimate of the next value of dt that should be taken. Timestep is also rejected if the error estimate post-solve (computed by global_temporal_error_norm()) exceeds epsilon. This behaviour can be over-ruled by setting the protected boolean Problem::Keep_temporal_error_below_tolerance to false.

Definition at line 11076 of file problem.cc.

References actions_after_implicit_timestep(), actions_after_implicit_timestep_and_error_estimation(), actions_after_newton_solve(), actions_after_newton_step(), oomph::TimeStepper::actions_after_timestep(), actions_before_implicit_timestep(), actions_before_newton_convergence_check(), oomph::TimeStepper::actions_before_timestep(), calculate_predictions(), dof(), dof_distribution_pt(), oomph::Time::dt(), DTSF_max_increase, DTSF_min_decrease, e, global_temporal_error_norm(), i, Keep_temporal_error_below_tolerance, oomph::NewtonSolverError::linear_solver_error, Maximum_dt, Minimum_dt, Minimum_dt_but_still_proceed, newton_solve(), oomph::LinearAlgebraDistribution::nrow_local(), ntime_stepper(), oomph::oomph_info, oomph::TimeStepper::set_error_weights(), oomph::TimeStepper::set_predictor_weights(), oomph::TimeStepper::set_weights(), shift_time_values(), oomph::Global_string_for_annotation::string(), synchronise_all_dofs(), oomph::Time::time(), Time_adaptive_newton_crash_on_solve_fail, time_pt(), time_stepper_pt(), and Timestep_reduction_factor_after_nonconvergence.

◆ add_eigenvector_to_dofs()

void oomph::Problem::add_eigenvector_to_dofs ( const double &  epsilon,
const DoubleVector eigenvector 
)

Add the eigenvector passed to the function scaled by the constat epsilon to the dofs in the problem so that it can be output by the usual routines.

Add the eigenvector passed to the function to the dofs with magnitude epsilon.

Definition at line 8747 of file problem.cc.

References dof(), ndof(), oomph::DistributableLinearAlgebraObject::nrow(), oomph::DistributableLinearAlgebraObject::nrow_local(), and synchronise_all_dofs().

◆ add_global_data()

void oomph::Problem::add_global_data ( Data *const &  global_data_pt)
inline

Add Data to the Problem's global data – the Problem will perform equation numbering etc. for such Data.

Definition at line 1654 of file problem.h.

References Global_data_pt, and global_data_pt().

◆ add_sub_mesh()

unsigned oomph::Problem::add_sub_mesh ( Mesh *const &  mesh_pt)
inline

◆ add_time_stepper_pt()

void oomph::Problem::add_time_stepper_pt ( TimeStepper *const &  time_stepper_pt)

Add a timestepper to the problem. The function will automatically create or resize the Time object so that it contains the appropriate number of levels of storage.

Definition at line 1545 of file problem.cc.

References oomph::Time::ndt(), oomph::TimeStepper::ndt(), oomph::oomph_info, oomph::Time::resize(), Time_pt, oomph::TimeStepper::time_pt(), Time_stepper_pt, and time_stepper_pt().

Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt(), arc_length_step_solve(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().

◆ add_to_dofs()

void oomph::Problem::add_to_dofs ( const double &  lambda,
const DoubleVector increment_dofs 
)
virtual

Add lambda x incremenet_dofs[l] to the l-th dof.

Function that adds the values to the dofs.

Reimplemented from oomph::ExplicitTimeSteppableObject.

Definition at line 3564 of file problem.cc.

References Dof_pt, and ndof().

◆ arc_length_step_solve() [1/2]

double oomph::Problem::arc_length_step_solve ( Data *const &  data_pt,
const unsigned &  data_index,
const double &  ds,
const unsigned &  max_adapt = 0 
)

Solve a steady problem using arc-length continuation, when the variable corresponding to the arc-length constraint equation is already stored in data used in the problem: data_pt is a pointer to the appropriate data object, data_index is the index of the value that will be traded for the constriant, ds is the desired arc_length and max_adapt is the maximum number of spatial adaptations (default zero, no adaptation). Note that the value must be pinned in order for this formulation to work.

This function takes one step of length ds in pseudo-arclength.The argument data_pt is a pointer to the data that holds the parameter (global variable) that is being traded for arc-length. The exact value is located at the location given by data_index. The function returns the next desired arc-length according to criteria based upon the desired number of Newton Iterations per solve.

Definition at line 10382 of file problem.cc.

References add_time_stepper_pt(), arc_length_step_solve_helper(), Arc_length_step_taken, Continuation_time_stepper, i, oomph::Data::is_pinned(), ntime_stepper(), oomph::oomph_info, set_timestepper_for_all_data(), time_stepper_pt(), Use_continuation_timestepper, and oomph::Data::value_pt().

◆ arc_length_step_solve() [2/2]

double oomph::Problem::arc_length_step_solve ( double *const &  parameter_pt,
const double &  ds,
const unsigned &  max_adapt = 0 
)

Solve a steady problem using arc-length continuation, when the parameter that becomes a variable corresponding to the arc-length constraint equation is an external double: parameter_pt is a pointer to that double, ds is the desired arc_length and max_adapt is the maximum number of spatial adaptations (default zero, no adaptation).

This function takes one step of length ds in pseudo-arclength.The argument parameter_pt is a pointer to the parameter (global variable) that is being traded for arc-length. The function returns the next desired arc-length according to criteria based upon the desired number of Newton Iterations per solve.

Definition at line 10294 of file problem.cc.

References add_time_stepper_pt(), arc_length_step_solve_helper(), Arc_length_step_taken, Continuation_time_stepper, does_pointer_correspond_to_problem_data(), i, ntime_stepper(), oomph::oomph_info, set_timestepper_for_all_data(), time_stepper_pt(), and Use_continuation_timestepper.

◆ arc_length_step_solve_helper()

double oomph::Problem::arc_length_step_solve_helper ( double *const &  parameter_pt,
const double &  ds,
const unsigned &  max_adapt 
)
private

Private helper function that actually contains the guts of the arc-length stepping, parameter_pt is a pointer to the parameter that is traded for the arc-length constraint, ds is the desired arc length and max_adapt is the maximum number of spatial adaptations. The pointer to the parameter may be changed if this is called from the Data-based interface.

This function takes one step of length ds in pseudo-arclength.The argument parameter_pt is a pointer to the parameter (global variable) that is being traded for arc-length. The function returns the next desired arc-length according to criteria based upon the desired number of Newton Iterations per solve.

end of adaptation loop

Definition at line 10515 of file problem.cc.

References actions_after_parameter_increase(), adapt(), Arc_length_step_taken, Bifurcation_detection, Bisect_to_find_bifurcation, calculate_continuation_derivatives(), calculate_continuation_derivatives_fd(), communicator_pt(), Desired_newton_iterations_ds, Dof_current, dof_current(), Dof_derivative, dof_derivative(), Dof_distribution_pt, Dof_pt, Ds_current, First_jacobian_sign_change, i, oomph::TimeStepper::is_steady(), oomph::NewtonSolverError::linear_solver_error, oomph::TimeStepper::make_steady(), Minimum_ds, newton_solve_continuation(), oomph::LinearAlgebraDistribution::nrow_local(), ntime_stepper(), oomph::oomph_info, Parameter_current, Parameter_derivative, Problem_has_been_distributed, set_consistent_pinned_values_for_continuation(), Sign_of_jacobian, oomph::Global_string_for_annotation::string(), time_stepper_pt(), oomph::TimeStepper::undo_make_steady(), Use_continuation_timestepper, and Use_finite_differences_for_continuation_derivatives.

Referenced by arc_length_step_solve().

◆ are_hessian_products_calculated_analytically()

bool oomph::Problem::are_hessian_products_calculated_analytically ( )
inline

Function to determine whether the hessian products are calculated analytically.

Definition at line 303 of file problem.h.

References Calculate_hessian_products_analytic.

Referenced by get_hessian_vector_products().

◆ assembly_handler_pt() [1/2]

AssemblyHandler *& oomph::Problem::assembly_handler_pt ( )
inline

◆ assembly_handler_pt() [2/2]

AssemblyHandler *const & oomph::Problem::assembly_handler_pt ( ) const
inline

Return a pointer to the assembly handler object (const version)

Definition at line 1576 of file problem.h.

References Assembly_handler_pt.

◆ assign_eigenvector_to_dofs()

void oomph::Problem::assign_eigenvector_to_dofs ( DoubleVector eigenvector)

Assign the eigenvector passed to the function to the dofs in the problem so that it can be output by the usual routines.

Assign the eigenvector passed to the function to the dofs.

Definition at line 8716 of file problem.cc.

References dof(), ndof(), oomph::DistributableLinearAlgebraObject::nrow(), oomph::DistributableLinearAlgebraObject::nrow_local(), and synchronise_all_dofs().

◆ assign_eqn_numbers()

unsigned long oomph::Problem::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 elements) and then does the equation numbering for the elements. Virtual so it can be overloaded in MPI problems. Bool argument can be set to false to ignore assigning local equation numbers (found to be necessary in the parallel implementation of locate_zeta between multiple meshes).

Assign all equation numbers for problem: Deals with global data (= data that isn't attached to any elements) and then does the equation numbering for the elements. Bool argument can be set to false to ignore assigning local equation numbers (necessary in the parallel implementation of locate_zeta between multiple meshes).

Definition at line 1989 of file problem.cc.

References oomph::Mesh::assign_global_eqn_numbers(), oomph::Mesh::assign_local_eqn_numbers(), oomph::LinearAlgebraDistribution::build(), Communicator_pt, communicator_pt(), oomph::GeneralisedElement::complete_setup_of_dependencies(), oomph::Global_timings::Doc_comprehensive_timings, Dof_distribution_pt, Dof_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::Mesh::external_halo_element_pt(), Global_data_pt, i, Mesh_pt, mesh_pt(), Must_recompute_load_balance_for_assembly, oomph::Mesh::nelement(), oomph::Mesh::nexternal_halo_element(), nglobal_data(), nsub_mesh(), oomph::oomph_info, Parallel_sparse_assemble_previous_allocation, Problem_has_been_distributed, remove_duplicate_data(), remove_null_pointers_from_external_halo_node_storage(), set_default_first_and_last_element_for_assembly(), Sparse_assemble_with_arrays_previous_allocation, Store_local_dof_pt_in_elements, Sub_mesh_pt, synchronise_eqn_numbers(), and oomph::TimingHelpers::timer().

Referenced by adapt(), adapt_based_on_error_estimates(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), bifurcation_adapt_helper(), oomph::BiharmonicProblem< DIM >::build_global_mesh_and_assign_eqn_numbers(), distribute(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::get_pressure_advection_diffusion_jacobian(), load_balance(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::LinearElasticitySmoothMesh< LINEAR_ELASTICITY_ELEMENT >::operator()(), oomph::PoissonSmoothMesh< POISSON_ELEMENT >::operator()(), p_adapt(), p_refine_selected_elements(), p_refine_uniformly(), p_refine_uniformly_aux(), p_unrefine_uniformly(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), prune_halo_elements_and_nodes(), read(), refine_selected_elements(), refine_uniformly(), refine_uniformly_aux(), oomph::SegregatableFSIProblem::segregated_solve(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::SolidICProblem::set_newmark_initial_condition_directly(), oomph::SolidICProblem::set_static_initial_condition(), set_timestepper_for_all_data(), oomph::MGSolver< DIM >::setup_mg_hierarchy(), oomph::HelmholtzMGPreconditioner< DIM >::setup_mg_hierarchy(), oomph::SolidICProblem::setup_problem(), unrefine_uniformly(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().

◆ assign_initial_values_impulsive() [1/2]

void oomph::Problem::assign_initial_values_impulsive ( )

Initialise data and nodal positions to simulate impulsive start from initial configuration/solution.

Initialise the previous values of the variables for time stepping corresponding to an impulsive start. Previous history for all data is generated by the appropriate timesteppers. Previous nodal positions are simply copied backwards.

Definition at line 11499 of file problem.cc.

References oomph::Mesh::assign_initial_values_impulsive(), Global_data_pt, and Mesh_pt.

Referenced by assign_initial_values_impulsive(), oomph::SolidICProblem::set_static_initial_condition(), steady_newton_solve(), and oomph::SegregatableFSIProblem::steady_segregated_solve().

◆ assign_initial_values_impulsive() [2/2]

void oomph::Problem::assign_initial_values_impulsive ( const double &  dt)

Initialise data and nodal positions to simulate an impulsive start and also set the initial and previous values of dt.

Assign the values for an impulsive start and also set the initial values of the previous dts to both be dt.

Definition at line 11519 of file problem.cc.

References assign_initial_values_impulsive(), and initialise_dt().

◆ bifurcation_adapt_doc_errors()

void oomph::Problem::bifurcation_adapt_doc_errors ( const unsigned &  bifurcation_type)
private

A function that is used to document the errors used in the adaptive solution of bifurcation problems.

A function that is used to document the errors when adapting a bifurcation-tracking problem, which requires separate interpolation of the associated eigenfunction. The error measure is chosen to be a suitable combination of the errors in the base flow and the eigenfunction. The bifurcation type is passed as an argument.

Definition at line 13648 of file problem.cc.

References bifurcation_adapt_helper().

Referenced by doc_errors().

◆ bifurcation_adapt_helper()

void oomph::Problem::bifurcation_adapt_helper ( unsigned &  n_refined,
unsigned &  n_unrefined,
const unsigned &  bifurcation_type,
const bool &  actually_adapt = true 
)
private

A function that is used to adapt a bifurcation-tracking problem, which requires separate interpolation of the associated eigenfunction. The error measure is chosen to be a suitable combination of the errors in the base flow and the eigenfunction.

A function that is used to adapt a bifurcation-tracking problem, which requires separate interpolation of the associated eigenfunction. The error measure is chosen to be a suitable combination of the errors in the base flow and the eigenfunction. The bifurcation type is passed as an argument.

Definition at line 13354 of file problem.cc.

References activate_fold_tracking(), activate_hopf_tracking(), activate_pitchfork_tracking(), adapt_based_on_error_estimates(), assembly_handler_pt(), assign_eqn_numbers(), bifurcation_parameter_pt(), Copy_of_problem_pt, deactivate_bifurcation_tracking(), dof(), e, get_all_error_estimates(), get_bifurcation_eigenfunction(), make_copy(), mesh_pt(), ndof(), and oomph::oomph_info.

Referenced by adapt(), bifurcation_adapt_doc_errors(), and p_adapt().

◆ bifurcation_parameter_pt()

double * oomph::Problem::bifurcation_parameter_pt ( ) const

Return pointer to the parameter that is used in the bifurcation detection. If we are not tracking a bifurcation then an error will be thrown by the AssemblyHandler.

Definition at line 10081 of file problem.cc.

References Assembly_handler_pt, and oomph::AssemblyHandler::bifurcation_parameter_pt().

Referenced by bifurcation_adapt_helper().

◆ build_global_mesh()

void oomph::Problem::build_global_mesh ( )

Build the global mesh by combining the all the submeshes. Note: The nodes boundary information refers to the boundary numbers within the submesh!

Build a single (global) mesh from a number of submeshes which are passed as a vector of pointers to the submeshes. The ordering is not necessarily optimal.

Definition at line 1493 of file problem.cc.

References Mesh_pt, rebuild_global_mesh(), oomph::Global_string_for_annotation::string(), and Sub_mesh_pt.

Referenced by oomph::BiharmonicProblem< DIM >::build_global_mesh_and_assign_eqn_numbers(), and oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()().

◆ build_mesh()

virtual void oomph::Problem::build_mesh ( )
inlinevirtual

Function to build the Problem's base mesh; this must be supplied by the user if they wish to use the load_balance() functionality, which is only available to problems that have already been distributed. If the problem has multiple meshes, each mesh must be built, added as as a submesh, and a call to build_global_mesh() must be made in this function. On return from this function all meshes must have been refined to the same level that they were in the when Problem::distribute() was first called.

Definition at line 1365 of file problem.h.

References oomph::Global_string_for_annotation::string().

Referenced by load_balance().

◆ calculate_continuation_derivatives() [1/2]

void oomph::Problem::calculate_continuation_derivatives ( const DoubleVector z)
protected

A function to calculate the derivatives with respect to the arc-length required for continuation. The arguments is the solution of the linear system, Jz = dR/dparameter, that gives du/dparameter and the direction output from the newton_solve_continuation function. The derivatives are stored in the ContinuationParameters namespace.

Definition at line 9792 of file problem.cc.

References calculate_continuation_derivatives_helper(), Desired_proportion_of_arc_length, Parameter_derivative, Scale_arc_length, and Theta_squared.

◆ calculate_continuation_derivatives() [2/2]

void oomph::Problem::calculate_continuation_derivatives ( double *const &  parameter_pt)
protected

A function to calculate the derivatives wrt the arc-length. This version of the function actually does a linear solve so that the derivatives are calculated "exactly" rather than using the values at the Newton step just before convergence. This is necessary in spatially adaptive problems, in which the number of degrees of freedom changes and so the appropriate derivatives must be calculated for the new variables. This function is called if no Newton steps were taken in the continuation routine ... i.e. the initial residuals were sufficiently small.

A function to calculate the derivatives wrt the arc-length. This version of the function actually does a linear solve so that the derivatives are calculated "exactly" rather than using the values at the Newton step just before convergence. This is only necessary in spatially adaptive problems, in which the number of degrees of freedom changes and so the appropriate derivatives must be calculated for the new variables.

Definition at line 9715 of file problem.cc.

References calculate_continuation_derivatives(), Communicator_pt, oomph::LinearSolver::disable_resolve(), oomph::LinearSolver::enable_resolve(), get_derivative_wrt_global_parameter(), oomph::LinearSolver::is_resolve_enabled(), Linear_solver_pt, ndof(), oomph::LinearSolver::resolve(), and oomph::LinearSolver::solve().

Referenced by arc_length_step_solve_helper(), and calculate_continuation_derivatives().

◆ calculate_continuation_derivatives_fd()

void oomph::Problem::calculate_continuation_derivatives_fd ( double *const &  parameter_pt)
protected

A function to calculate the derivatives with respect to the arc-length required for continuation by finite differences, using the previous values of the solution. The derivatives are stored in the ContinuationParameters namespace.

A function to calculate the derivatives with respect to the arc-length required for continuation using finite differences.

Definition at line 9818 of file problem.cc.

References calculate_continuation_derivatives_fd_helper(), Desired_proportion_of_arc_length, Parameter_derivative, Scale_arc_length, and Theta_squared.

Referenced by arc_length_step_solve_helper().

◆ calculate_continuation_derivatives_fd_helper()

void oomph::Problem::calculate_continuation_derivatives_fd_helper ( double *const &  parameter_pt)
private

A function that performs the guts of the continuation derivative calculation in arc-length continuation problems using finite differences.

A private helper function to calculate the derivatives with respect to the arc-length required for continuation using finite differences.

Definition at line 10004 of file problem.cc.

References oomph::LinearAlgebraDistribution::communicator_pt(), oomph::LinearAlgebraDistribution::distributed(), Dof_current, dof_derivative(), Dof_distribution_pt, Dof_pt, Ds_current, oomph::LinearAlgebraDistribution::nrow_local(), Parameter_current, Parameter_derivative, and Theta_squared.

Referenced by calculate_continuation_derivatives_fd().

◆ calculate_continuation_derivatives_helper()

void oomph::Problem::calculate_continuation_derivatives_helper ( const DoubleVector z)
private

A function that performs the guts of the continuation derivative calculation in arc length continuation problems.

A private helper function to calculate the derivatives with respect to the arc-length required for continuation. The arguments is the solution of the linear system, Jz = dR/dparameter, that gives du/dparameter and the direction output from the newton_solve_continuation function. The derivatives are stored in the ContinuationParameters namespace.

Definition at line 9912 of file problem.cc.

References oomph::LinearAlgebraDistribution::communicator_pt(), Continuation_direction, oomph::LinearAlgebraDistribution::distributed(), Dof_derivative, dof_derivative(), Dof_distribution_pt, oomph::DoubleVector::dot(), oomph::LinearAlgebraDistribution::nrow_local(), Parameter_derivative, oomph::DoubleVector::redistribute(), Theta_squared, Use_continuation_timestepper, and oomph::DoubleVector::values_pt().

Referenced by calculate_continuation_derivatives().

◆ calculate_predictions()

void oomph::Problem::calculate_predictions ( )

◆ check_halo_schemes() [1/2]

void oomph::Problem::check_halo_schemes ( )
inline

Check the halo/haloed node/element schemes.

Definition at line 2116 of file problem.h.

References check_halo_schemes(), and oomph::DocInfo::disable_doc().

Referenced by check_halo_schemes(), and self_test().

◆ check_halo_schemes() [2/2]

void oomph::Problem::check_halo_schemes ( DocInfo doc_info)

Check the halo/haloed node/element schemes.

Check the halo/haloed/shared node/element schemes.

Definition at line 16403 of file problem.cc.

References oomph::Mesh::check_halo_schemes(), oomph::DocInfo::label(), Max_permitted_error_for_halo_check, mesh_pt(), nsub_mesh(), and oomph::oomph_info.

◆ clear_elemental_assembly_time()

void oomph::Problem::clear_elemental_assembly_time ( )
inline

Clear storage of most-recent elemental assembly times (used for load balancing). Next load balancing operation will be based on the number of elements associated with a tree root.

Definition at line 872 of file problem.h.

References Elemental_assembly_time, and Must_recompute_load_balance_for_assembly.

◆ communicator_pt() [1/2]

OomphCommunicator * oomph::Problem::communicator_pt ( )
inline

access function to the oomph-lib communicator

Definition at line 1246 of file problem.h.

References Communicator_pt.

Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), arc_length_step_solve_helper(), assign_eqn_numbers(), oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), copy_haloed_eqn_numbers_helper(), oomph::Multi_domain_functions::create_external_halo_elements(), distribute(), doubly_adaptive_unsteady_newton_solve_helper(), dump(), oomph::FoldHandler::FoldHandler(), get_data_to_be_sent_during_load_balancing(), oomph::Multi_domain_functions::get_dim_helper(), oomph::FoldHandler::get_eigenfunction(), oomph::HopfHandler::get_eigenfunction(), get_hessian_vector_products(), get_inverse_mass_matrix_times_residuals(), get_jacobian(), get_residuals(), oomph::HopfHandler::HopfHandler(), load_balance(), oomph::Multi_domain_functions::locate_zeta_for_missing_coordinates(), newton_solve(), parallel_sparse_assemble(), oomph::METIS::partition_distributed_mesh(), partition_global_mesh(), oomph::PitchForkHandler::PitchForkHandler(), prune_halo_elements_and_nodes(), read(), recompute_load_balanced_assembly(), remove_duplicate_data(), remove_null_pointers_from_external_halo_node_storage(), oomph::BlockPitchForkLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), oomph::Multi_domain_functions::send_and_receive_located_info(), oomph::Multi_domain_functions::send_and_receive_missing_zetas(), send_data_to_be_sent_during_load_balancing(), send_refinement_info_helper(), set_default_first_and_last_element_for_assembly(), oomph::SolidICProblem::set_static_initial_condition(), setup_base_mesh_info_after_pruning(), setup_element_count_per_dof(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::BlockPitchForkLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::solve(), oomph::GS< MATRIX >::solve(), oomph::GS< CRDoubleMatrix >::solve(), oomph::DampedJacobi< MATRIX >::solve(), oomph::GMRES< MATRIX >::solve(), oomph::AugmentedProblemGMRES::solve(), oomph::SuperLUSolver::solve(), oomph::MumpsSolver::solve(), oomph::HelmholtzGMRESMG< MATRIX >::solve(), oomph::HelmholtzFGMRESMG< MATRIX >::solve(), oomph::FoldHandler::solve_augmented_block_system(), oomph::PitchForkHandler::solve_augmented_block_system(), oomph::FoldHandler::solve_block_system(), oomph::HopfHandler::solve_complex_system(), oomph::ARPACK::solve_eigenproblem(), oomph::LAPACK_QZ::solve_eigenproblem(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), oomph::FoldHandler::solve_full_system(), oomph::PitchForkHandler::solve_full_system(), oomph::HopfHandler::solve_full_system(), oomph::HopfHandler::solve_standard_system(), oomph::SuperLUSolver::solve_transpose(), oomph::PitchForkHandler::synchronise(), synchronise_dofs(), unsteady_newton_solve(), oomph::FoldHandler::~FoldHandler(), and oomph::HopfHandler::~HopfHandler().

◆ communicator_pt() [2/2]

const OomphCommunicator * oomph::Problem::communicator_pt ( ) const
inline

access function to the oomph-lib communicator, const version

Definition at line 1252 of file problem.h.

References Communicator_pt.

◆ copy()

void oomph::Problem::copy ( Problem orig_problem_pt)

Copy Data values, nodal positions etc from specified problem. Note: This is not a copy constructor. We assume that the current and the "original" problem have both been created by calling the same problem constructor so that all Data objects, time steppers etc. in the two problems are completely independent. This function copies the nodal, internal and global values, and the time parameters from the original problem into "this" one. This functionality is required, e.g. for multigrid computations.

Copy Data values, nodal positions etc from specified problem. Note: This is not a copy constructor. We assume that the current and the "original" problem have both been created by calling the same problem constructor so that all Data objects, time steppers etc. in the two problems are completely independent. This function copies the nodal, internal and global values and the time parameters from the original problem into "this" one. This functionality is required, e.g. for multigrid computations.

Definition at line 11865 of file problem.cc.

References oomph::Data::copy(), oomph::Node::copy(), oomph::SolidNode::copy(), oomph::Time::dt(), e, oomph::Mesh::element_pt(), Global_data_pt, global_data_pt(), i, oomph::GeneralisedElement::internal_data_pt(), mesh_pt(), oomph::Time::ndt(), oomph::Mesh::nelement(), nglobal_data(), oomph::GeneralisedElement::ninternal_data(), oomph::Mesh::nnode(), oomph::Mesh::node_pt(), nsub_mesh(), ntime_stepper(), oomph::oomph_info, oomph::Time::resize(), oomph::TimeStepper::set_weights(), oomph::Time::time(), time_pt(), and time_stepper_pt().

◆ copy_haloed_eqn_numbers_helper()

void oomph::Problem::copy_haloed_eqn_numbers_helper ( const bool &  do_halos,
const bool &  do_external_halos 
)
private

◆ deactivate_bifurcation_tracking()

void oomph::Problem::deactivate_bifurcation_tracking ( )
inline

Deactivate all bifuraction tracking, by reseting the assembly handler to the default.

Definition at line 2353 of file problem.h.

References reset_assembly_handler_to_default().

Referenced by bifurcation_adapt_helper().

◆ debug_hook_fct()

virtual void oomph::Problem::debug_hook_fct ( const unsigned &  i)
inlinevirtual

Hook for debugging. Can be overloaded in driver code; argument allows identification of where we're coming from.

Definition at line 249 of file problem.h.

References i, and oomph::oomph_info.

◆ delete_all_external_storage()

void oomph::Problem::delete_all_external_storage ( )

Wrapper function to delete external storage for each submesh of the problem.

Delete any external storage for any submeshes NB this would ordinarily take place within the adaptation procedure for each submesh (See RefineableMesh::adapt_mesh(...)), but there are instances where the actions_before/after_adapt routines are used and no adaptive routines are called in between (e.g. when doc-ing errors at the end of an adaptive newton solver)

Definition at line 16355 of file problem.cc.

References oomph::Mesh::delete_all_external_storage(), mesh_pt(), and nsub_mesh().

Referenced by load_balance().

◆ describe_dofs()

void oomph::Problem::describe_dofs ( std::ostream &  out = *(oomph_info.stream_pt())) const

Function to describe the dofs in terms of the global equation number, i.e. what type of value (nodal value of a Node; value in a Data object; value of internal Data in an element; etc) is the unknown with a certain global equation number. Output stream defaults to oomph_info.

Definition at line 2359 of file problem.cc.

References oomph::Mesh::describe_dofs(), oomph::Mesh::describe_local_dofs(), Global_data_pt, i, Mesh_pt, nglobal_data(), nsub_mesh(), oomph::Global_string_for_annotation::string(), and Sub_mesh_pt.

◆ disable_discontinuous_formulation()

void oomph::Problem::disable_discontinuous_formulation ( )
inline

Disable the use of a discontinuous-element formulation. Note that the methods will all still work even if the elements are discontinuous, we will just be assembling a larger system matrix than necessary.

Definition at line 1736 of file problem.h.

References Discontinuous_element_formulation.

◆ disable_doc_imbalance_in_parallel_assembly()

void oomph::Problem::disable_doc_imbalance_in_parallel_assembly ( )
inline

Disable doc of load imbalance in parallel assembly of distributed problem.

Definition at line 856 of file problem.h.

References Doc_imbalance_in_parallel_assembly.

◆ disable_globally_convergent_newton_method()

void oomph::Problem::disable_globally_convergent_newton_method ( )
inline

disable globally convergent Newton method

Definition at line 2009 of file problem.h.

References Use_globally_convergent_newton_method.

◆ disable_info_in_newton_solve()

void oomph::Problem::disable_info_in_newton_solve ( )
inline

Disable the output of information when in the newton solver.

Definition at line 2941 of file problem.h.

References Shut_up_in_newton_solve.

Referenced by oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project().

◆ disable_jacobian_reuse()

void oomph::Problem::disable_jacobian_reuse ( )
inline

Disable recycling of Jacobian in Newton iteration.

Definition at line 1982 of file problem.h.

References Jacobian_has_been_computed, and Jacobian_reuse_is_enabled.

◆ disable_mass_matrix_reuse()

void oomph::Problem::disable_mass_matrix_reuse ( )

Turn off recyling of the mass matrix in explicit timestepping schemes.

Turn off the recyling of the mass matrix in explicit time-stepping schemes.

Definition at line 11832 of file problem.cc.

References oomph::DGElement::disable_mass_matrix_reuse(), Discontinuous_element_formulation, e, oomph::Mesh::element_pt(), Mass_matrix_has_been_computed, Mass_matrix_reuse_is_enabled, mesh_pt(), and oomph::Mesh::nelement().

◆ disable_problem_distributed()

void oomph::Problem::disable_problem_distributed ( )
inline

Disable problem distributed.

Definition at line 977 of file problem.h.

References Problem_has_been_distributed.

◆ disable_store_local_dof_pt_in_elements()

void oomph::Problem::disable_store_local_dof_pt_in_elements ( )
inline

Insist that local dof pointers are NOT set up in each element when equation numbering takes place (the default)

Definition at line 1703 of file problem.h.

References Store_local_dof_pt_in_elements.

◆ distribute() [1/4]

Vector< unsigned > oomph::Problem::distribute ( const bool &  report_stats = false)

Distribute the problem; returns a vector which details the partitioning.

Distribute the problem without doc; report stats if required. Returns actual partitioning used, e.g. for restart.

Definition at line 329 of file problem.cc.

References oomph::DocInfo::disable_doc(), distribute(), mesh_pt(), and oomph::Mesh::nelement().

◆ distribute() [2/4]

Vector< unsigned > oomph::Problem::distribute ( const Vector< unsigned > &  element_partition,
const bool &  report_stats = false 
)

Distribute the problem using the specified partition; returns a vector which details the partitioning.

Distribute the problem according to specified partition. If all entries in partitioning vector are zero we use METIS to do the partitioning after all. Returns actual partitioning used, e.g. for restart.

Definition at line 349 of file problem.cc.

References oomph::DocInfo::disable_doc(), distribute(), and i.

◆ distribute() [3/4]

Vector< unsigned > oomph::Problem::distribute ( const Vector< unsigned > &  element_partition,
DocInfo doc_info,
const bool &  report_stats = false 
)

Distribute the problem and doc, using the specified partition; returns a vector which details the partitioning.

Distribute the problem according to specified partition. (If all entries in partitioning vector are zero we use METIS to do the partitioning after all) and doc. Returns actual partitioning used, e.g. for restart.

Definition at line 404 of file problem.cc.

References actions_after_distribute(), actions_before_distribute(), assign_eqn_numbers(), Base_mesh_element_number_plus_one, Base_mesh_element_pt, communicator_pt(), oomph::Mesh::distribute(), Doc_time_in_distribute, e, oomph::Mesh::element_pt(), Elemental_assembly_time, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::Mesh::nelement(), nglobal_data(), nsub_mesh(), oomph::DocInfo::number(), oomph::oomph_info, partition_global_mesh(), Problem_has_been_distributed, rebuild_global_mesh(), oomph::Mesh::set_communicator_pt(), and oomph::TimingHelpers::timer().

Referenced by distribute().

◆ distribute() [4/4]

Vector< unsigned > oomph::Problem::distribute ( DocInfo doc_info,
const bool &  report_stats = false 
)

Distribute the problem; returns a vector which details the partitioning.

Distribute the problem and doc to specified DocInfo. Returns actual partitioning used, e.g. for restart.

Definition at line 385 of file problem.cc.

References distribute(), mesh_pt(), and oomph::Mesh::nelement().

◆ distributed()

bool oomph::Problem::distributed ( ) const
inline

◆ distributed_problem_matrix_distribution()

Distributed_problem_matrix_distribution & oomph::Problem::distributed_problem_matrix_distribution ( )
inline

accesss function to the distributed matrix distribution method 1 - Automatic - the Problem distribution is employed, unless any processor has number of rows equal to 110% of N/P, in which case uniform distribution is employed. 2 - Problem - the jacobian on processor p only contains rows that correspond to equations that are on this processor. (minimises communication) 3 - Uniform - each processor holds as close to N/P matrix rows as possible. (very well load balanced)

Definition at line 842 of file problem.h.

References Dist_problem_matrix_distribution.

◆ doc_errors() [1/2]

void oomph::Problem::doc_errors ( )
inline

Get max and min error for all elements in submeshes.

Definition at line 2926 of file problem.h.

References oomph::DocInfo::disable_doc(), and doc_errors().

Referenced by doc_errors().

◆ doc_errors() [2/2]

void oomph::Problem::doc_errors ( DocInfo doc_info)

◆ does_pointer_correspond_to_problem_data()

bool oomph::Problem::does_pointer_correspond_to_problem_data ( double *const &  parameter_pt)
protected

Return a boolean flag to indicate whether the pointer parameter_pt refers to values stored in a Data object that is contained within the problem.

Function that returns a boolean flag to indicate whether the pointer parameter_pt refers to memory that is a value in a Data object used within the problem.

Definition at line 9846 of file problem.cc.

References oomph::Mesh::does_pointer_correspond_to_mesh_data(), Global_data_pt, i, Mesh_pt, nsub_mesh(), and Sub_mesh_pt.

Referenced by arc_length_step_solve().

◆ dof() [1/2]

double & oomph::Problem::dof ( const unsigned &  i)
inline

◆ dof() [2/2]

double oomph::Problem::dof ( const unsigned &  i) const
inline

i-th dof in the problem (const version)

Definition at line 1819 of file problem.h.

References Dof_pt, and i.

◆ dof_current()

double & oomph::Problem::dof_current ( const unsigned &  i)
inlineprotected

Access function to the current value of the i-th (local) dof at the start of a continuation step.

Definition at line 1182 of file problem.h.

References Dof_current, Dof_current_offset, Dof_pt, i, and Use_continuation_timestepper.

Referenced by adapt(), arc_length_step_solve_helper(), and newton_solve_continuation().

◆ dof_derivative()

double & oomph::Problem::dof_derivative ( const unsigned &  i)
inlineprotected

Access function to the derivative of the i-th (local) dof with respect to the arc length, used in continuation.

Definition at line 1168 of file problem.h.

References Dof_derivative, Dof_derivative_offset, Dof_pt, i, and Use_continuation_timestepper.

Referenced by adapt(), arc_length_step_solve_helper(), calculate_continuation_derivatives_fd_helper(), calculate_continuation_derivatives_helper(), and newton_solve_continuation().

◆ dof_distribution_pt()

LinearAlgebraDistribution *const & oomph::Problem::dof_distribution_pt ( ) const
inline

Return the pointer to the dof distribution (read-only)

Definition at line 1668 of file problem.h.

References Dof_distribution_pt.

Referenced by adaptive_unsteady_newton_solve(), oomph::ProblemBasedShiftInvertOperator::ProblemBasedShiftInvertOperator(), and oomph::ANASAZI::solve_eigenproblem().

◆ dof_pt() [1/2]

double *& oomph::Problem::dof_pt ( const unsigned &  i)
inline

Pointer to i-th dof in the problem.

Definition at line 1825 of file problem.h.

References Dof_pt, and i.

Referenced by oomph::AssemblyHandler::local_problem_dof(), and set_dofs().

◆ dof_pt() [2/2]

double * oomph::Problem::dof_pt ( const unsigned &  i) const
inline

Pointer to i-th dof in the problem (const version)

Definition at line 1831 of file problem.h.

References Dof_pt, and i.

◆ doubly_adaptive_unsteady_newton_solve() [1/2]

double oomph::Problem::doubly_adaptive_unsteady_newton_solve ( const double &  dt,
const double &  epsilon,
const unsigned &  max_adapt,
const bool &  first,
const bool &  shift = true 
)
inline

Unsteady "doubly" adaptive Newton solve: Does temporal adaptation first, i.e. we try to do a timestep with an increment of dt, and adjusting dt until the solution on the given mesh satisfies the temporal error measure with tolerance epsilon. Following this, we do up to max_adapt spatial adaptions (without re-examining the temporal error). If first==true, the initial conditions are re-assigned after the mesh adaptations. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued.

Definition at line 2471 of file problem.h.

References doubly_adaptive_unsteady_newton_solve_helper().

◆ doubly_adaptive_unsteady_newton_solve() [2/2]

double oomph::Problem::doubly_adaptive_unsteady_newton_solve ( const double &  dt,
const double &  epsilon,
const unsigned &  max_adapt,
const unsigned &  suppress_resolve_after_spatial_adapt_flag,
const bool &  first,
const bool &  shift = true 
)
inline

Unsteady "doubly" adaptive Newton solve: Does temporal adaptation first, i.e. we try to do a timestep with an increment of dt, and adjusting dt until the solution on the given mesh satisfies the temporal error measure with tolerance epsilon. Following this, we do up to max_adapt spatial adaptions (without re-examining the temporal error). If first==true, the initial conditions are re-assigned after the mesh adaptations. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued. Pseudo-Boolean flag suppress_resolve_after_spatial_adapt [0: false; 1: true] does what it says.].

Definition at line 2504 of file problem.h.

References doubly_adaptive_unsteady_newton_solve_helper().

◆ doubly_adaptive_unsteady_newton_solve_helper()

double oomph::Problem::doubly_adaptive_unsteady_newton_solve_helper ( const double &  dt,
const double &  epsilon,
const unsigned &  max_adapt,
const unsigned &  suppress_resolve_after_spatial_adapt,
const bool &  first,
const bool &  shift = true 
)
private

Private helper function that actually performs the unsteady "doubly" adaptive Newton solve. See actual (non-helper) functions for description of parameters.

Private helper function to perform unsteady "doubly" adaptive Newton solve: Does temporal adaptation first, i.e. we try to do a timestep with an increment of dt, and adjusting dt until the solution on the given mesh satisfies the temporal error measure with tolerance epsilon. Following this, we do up to max_adapt spatial adaptions (without re-examining the temporal error). If first==true, the initial conditions are re-assigned after the mesh adaptations. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued. Pseudo-Boolean flag suppress_resolve_after_spatial_adapt [0: false; 1: true] does what it says.].

Definition at line 11379 of file problem.cc.

References adapt(), adaptive_unsteady_newton_solve(), communicator_pt(), Default_set_initial_condition_called, oomph::Time::dt(), oomph::oomph_info, Problem_has_been_distributed, set_initial_condition(), oomph::Time::time(), time_pt(), and unsteady_newton_solve().

Referenced by doubly_adaptive_unsteady_newton_solve().

◆ dump() [1/2]

void oomph::Problem::dump ( const std::string &  dump_file_name) const
inline

Dump refinement pattern of all refineable meshes and all generic Problem data to file for restart.

Definition at line 2078 of file problem.h.

References dump(), and oomph::Global_string_for_annotation::string().

◆ dump() [2/2]

void oomph::Problem::dump ( std::ofstream &  dump_file) const
virtual

◆ eigen_solver_pt() [1/2]

EigenSolver *& oomph::Problem::eigen_solver_pt ( )
inline

Return a pointer to the eigen solver object.

Definition at line 1492 of file problem.h.

References Eigen_solver_pt.

◆ eigen_solver_pt() [2/2]

EigenSolver *const & oomph::Problem::eigen_solver_pt ( ) const
inline

Return a pointer to the eigen solver object (const version)

Definition at line 1498 of file problem.h.

References Eigen_solver_pt.

◆ elemental_assembly_time()

Vector< double > oomph::Problem::elemental_assembly_time ( )
inline

Return vector of most-recent elemental assembly times (used for load balancing). Zero sized if no Jacobian has been computed since last re-assignment of equation numbers.

Definition at line 864 of file problem.h.

References Elemental_assembly_time.

Referenced by oomph::METIS::partition_distributed_mesh().

◆ enable_discontinuous_formulation()

void oomph::Problem::enable_discontinuous_formulation ( )
inline

Indicate that the problem involves discontinuous elements This allows for a more efficiently assembly and inversion of the mass matrix.

Definition at line 1727 of file problem.h.

References Discontinuous_element_formulation.

◆ enable_doc_imbalance_in_parallel_assembly()

void oomph::Problem::enable_doc_imbalance_in_parallel_assembly ( )
inline

Enable doc of load imbalance in parallel assembly of distributed problem.

Definition at line 849 of file problem.h.

References Doc_imbalance_in_parallel_assembly.

◆ enable_globally_convergent_newton_method()

void oomph::Problem::enable_globally_convergent_newton_method ( )
inline

enable globally convergent Newton method

Definition at line 2003 of file problem.h.

References Use_globally_convergent_newton_method.

◆ enable_info_in_newton_solve()

void oomph::Problem::enable_info_in_newton_solve ( )
inline

Enable the output of information when in the newton solver (Default)

Definition at line 2935 of file problem.h.

References Shut_up_in_newton_solve.

◆ enable_jacobian_reuse()

void oomph::Problem::enable_jacobian_reuse ( )
inline

Enable recycling of Jacobian in Newton iteration (if the linear solver allows it). Useful for linear problems with constant Jacobians or nonlinear problems where you're willing to risk the trade-off between faster solve times and degraded Newton convergence rate.

Definition at line 1975 of file problem.h.

References Jacobian_has_been_computed, and Jacobian_reuse_is_enabled.

◆ enable_mass_matrix_reuse()

void oomph::Problem::enable_mass_matrix_reuse ( )

Enable recycling of the mass matrix in explicit timestepping schemes. Useful for timestepping on fixed meshes when you want to avoid the linear solve phase.

Definition at line 11807 of file problem.cc.

References Discontinuous_element_formulation, e, oomph::Mesh::element_pt(), oomph::DGElement::enable_mass_matrix_reuse(), Mass_matrix_has_been_computed, Mass_matrix_reuse_is_enabled, mesh_pt(), and oomph::Mesh::nelement().

◆ enable_problem_distributed()

void oomph::Problem::enable_problem_distributed ( )
inline

Enable problem distributed.

Definition at line 971 of file problem.h.

References Problem_has_been_distributed.

Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt().

◆ enable_store_local_dof_pt_in_elements()

void oomph::Problem::enable_store_local_dof_pt_in_elements ( )
inline

Insist that local dof pointers are set up in each element when equation numbering takes place.

Definition at line 1696 of file problem.h.

References Store_local_dof_pt_in_elements.

◆ explicit_time_stepper_pt()

ExplicitTimeStepper *& oomph::Problem::explicit_time_stepper_pt ( )
inline

Return a pointer to the explicit timestepper.

Definition at line 1555 of file problem.h.

References Explicit_time_stepper_pt.

Referenced by calculate_predictions(), explicit_timestep(), and set_explicit_time_stepper_pt().

◆ explicit_timestep()

void oomph::Problem::explicit_timestep ( const double &  dt,
const bool &  shift_values = true 
)

Take an explicit timestep of size dt and optionally shift any stored values of the time history.

Take an explicit timestep of size dt.

Definition at line 10918 of file problem.cc.

References oomph::Time::dt(), explicit_time_stepper_pt(), shift_time_values(), time_pt(), and oomph::ExplicitTimeStepper::timestep().

Referenced by calculate_predictions().

◆ flush_global_data()

void oomph::Problem::flush_global_data ( )
inline

Flush the Problem's global data – resizes container to zero. Data objects are not deleted!

Definition at line 1662 of file problem.h.

References Global_data_pt.

◆ flush_sub_meshes()

void oomph::Problem::flush_sub_meshes ( )
inline

◆ get_all_error_estimates()

void oomph::Problem::get_all_error_estimates ( Vector< Vector< double > > &  elemental_error)

Return the error estimates computed by (all) refineable (sub)mesh(es) in the elemental_error structure, which consists of a vector of vectors of elemental errors, one vector for each (sub)mesh.

Return the error estimates computed by (all) refineable (sub)mesh(es) in the elemental_error structure, which consists of a vector of elemental errors for each (sub)mesh.

Definition at line 14627 of file problem.cc.

References oomph::ErrorEstimator::get_element_errors(), mesh_pt(), nsub_mesh(), and oomph::oomph_info.

Referenced by adapt(), and bifurcation_adapt_helper().

◆ get_all_halo_data()

void oomph::Problem::get_all_halo_data ( std::map< unsigned, double * > &  map_of_halo_data)

Get pointers to all possible halo data indexed by global equation number in a map.

Get all the halo data stored on this processor and store pointers to the data in a map, indexed by the gobal eqn number.

Definition at line 16377 of file problem.cc.

References oomph::Mesh::get_all_halo_data(), mesh_pt(), and nsub_mesh().

Referenced by setup_dof_halo_scheme().

◆ get_bifurcation_eigenfunction()

void oomph::Problem::get_bifurcation_eigenfunction ( Vector< DoubleVector > &  eigenfunction)

Return the eigenfunction calculated as part of a bifurcation tracking process. If we are not tracking a bifurcation then an error will be thrown by the AssemblyHandler.

Definition at line 10091 of file problem.cc.

References Assembly_handler_pt, and oomph::AssemblyHandler::get_eigenfunction().

Referenced by bifurcation_adapt_helper().

◆ get_data_to_be_sent_during_load_balancing()

void oomph::Problem::get_data_to_be_sent_during_load_balancing ( const Vector< unsigned > &  target_domain_for_local_non_halo_element,
Vector< int > &  send_n,
Vector< double > &  send_data,
Vector< int > &  send_displacement,
Vector< unsigned > &  old_domain_for_base_element,
Vector< unsigned > &  new_domain_for_base_element,
unsigned &  max_refinement_level_overall 
)
private

Load balance helper routine: Get data to be sent to other processors during load balancing and other information about re-distribution.

  • target_domain_for_local_non_halo_element: Input, generated by METIS. target_domain_for_local_non_halo_element[e] contains the number of the domain [0,1,...,nproc-1] to which non-halo element e on THE CURRENT PROCESSOR ONLY has been assigned. The order of the non-halo elements is the same as in the Problem's mesh, with the halo elements being skipped.
  • send_n: Output, number of data to be sent to each processor
  • send_data: Output, storage for all values to be sent to all processors
  • send_displacement: Output, start location within send_data for data to be sent to each processor
  • max_refinement_level_overall: Output, max. refinement level of any element

Where do I come from, where do I go to?

Where do I come from, where do I go to?

Definition at line 19279 of file problem.cc.

References oomph::GeneralisedElement::add_internal_data_values_to_vector(), oomph::Node::add_values_to_vector(), Base_mesh_element_number_plus_one, Base_mesh_element_pt, communicator_pt(), e, oomph::Mesh::element_pt(), i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), oomph::GeneralisedElement::is_halo(), mesh_pt(), oomph::Node::ndim(), oomph::Mesh::nelement(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), nsub_mesh(), oomph::Data::ntstorage(), oomph::Data::nvalue(), oomph::Node::position(), oomph::RefineableElement::root_element_pt(), oomph::Data::set_value(), oomph::Tree::stick_leaves_into_vector(), t, oomph::RefineableElement::tree_pt(), oomph::Node::value(), and oomph::Node::x().

Referenced by load_balance().

◆ get_derivative_wrt_global_parameter()

void oomph::Problem::get_derivative_wrt_global_parameter ( double *const &  parameter_pt,
DoubleVector result 
)

Get the derivative of the entire residuals vector wrt a global parameter, used in continuation problems.

Get derivative of the residuals vector wrt a global parameter This is required in continuation problems.

Definition at line 7887 of file problem.cc.

References actions_after_change_in_global_parameter(), Assembly_handler_pt, oomph::BlackBoxFDNewtonSolver::FD_step, get_residuals(), is_dparameter_calculated_analytically(), and oomph::DistributableLinearAlgebraObject::nrow_local().

Referenced by calculate_continuation_derivatives(), oomph::FoldHandler::FoldHandler(), oomph::HopfHandler::HopfHandler(), newton_solve_continuation(), and oomph::BlockPitchForkLinearSolver::solve().

◆ get_dofs() [1/2]

void oomph::Problem::get_dofs ( const unsigned &  t,
DoubleVector dofs 
) const
virtual

◆ get_dofs() [2/2]

void oomph::Problem::get_dofs ( DoubleVector dofs) const
virtual

Return the vector of dofs, i.e. a vector containing the current values of all unknowns.

Get the vector of dofs, i.e. a vector containing the current values of all unknowns.

Reimplemented from oomph::ExplicitTimeSteppableObject.

Definition at line 2479 of file problem.cc.

References oomph::DoubleVector::build(), Dof_distribution_pt, Dof_pt, and ndof().

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::IMRByBDF::actions_before_timestep(), and calculate_predictions().

◆ get_dvaluesdt()

void oomph::Problem::get_dvaluesdt ( DoubleVector f)
virtual

Get the time derivative of all values (using get_inverse_mass_matrix_times_residuals(..) with all time steppers set to steady) e.g. for use in explicit time steps. The approach used is slighty hacky, beware if you have a residual which is non-linear or implicit in the derivative or if you have overloaded get_jacobian(...).

Reimplemented from oomph::ExplicitTimeSteppableObject.

Definition at line 3684 of file problem.cc.

References get_inverse_mass_matrix_times_residuals(), i, oomph::TimeStepper::is_steady(), oomph::TimeStepper::make_steady(), ntime_stepper(), time_stepper_pt(), and oomph::TimeStepper::undo_make_steady().

Referenced by oomph::TR::setup_initial_derivative().

◆ get_eigenproblem_matrices()

void oomph::Problem::get_eigenproblem_matrices ( CRDoubleMatrix mass_matrix,
CRDoubleMatrix main_matrix,
const double &  shift = 0.0 
)
virtual

◆ get_fd_jacobian()

void oomph::Problem::get_fd_jacobian ( DoubleVector residuals,
DenseMatrix< double > &  jacobian 
)

Return the fully-assembled Jacobian and residuals, generated by finite differences.

Get the full Jacobian by finite differencing.

Definition at line 7823 of file problem.cc.

References actions_after_newton_solve(), actions_before_newton_convergence_check(), actions_before_newton_solve(), Dof_pt, oomph::BlackBoxFDNewtonSolver::FD_step, get_residuals(), ndof(), Problem_has_been_distributed, and oomph::DenseMatrix< T >::resize().

Referenced by oomph::FD_LU::solve().

◆ get_first_and_last_element_for_assembly()

void oomph::Problem::get_first_and_last_element_for_assembly ( Vector< unsigned > &  first_el_for_assembly,
Vector< unsigned > &  last_el_for_assembly 
) const
inline

Get first and last elements for parallel assembly of non-distributed problem.

Definition at line 1004 of file problem.h.

References First_el_for_assembly, i, and Last_el_plus_one_for_assembly.

Referenced by oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix().

◆ get_flat_packed_refinement_pattern_for_load_balancing()

void oomph::Problem::get_flat_packed_refinement_pattern_for_load_balancing ( const Vector< unsigned > &  old_domain_for_base_element,
const Vector< unsigned > &  new_domain_for_base_element,
const unsigned &  max_refinement_level_overall,
std::map< unsigned, Vector< unsigned > > &  flat_packed_refinement_info_for_root 
)
private

Get flat-packed refinement pattern for each root element in current mesh (labeled by unique number of root element in unrefined base mesh). The vector stored for each root element contains the following information:

  • First entry: Number of tree nodes (not just leaves!) in refinement tree emanating from this root [Zero if root element is not refineable]
  • Loop over all refinement levels
    • Loop over all tree nodes (not just leaves!)
      • If associated element exists when the mesh has been refined to this level (either because it has been refined to this level or because it's less refined): 1
        • If the element is to be refined: 1; else: 0
      • else (element doesn't exist when mesh is refined to this level (because it's more refined): 0

Definition at line 19835 of file problem.cc.

References Base_mesh_element_number_plus_one, e, oomph::Mesh::element_pt(), oomph::GeneralisedElement::is_halo(), mesh_pt(), oomph::Mesh::nelement(), nsub_mesh(), oomph::RefineableElement::root_element_pt(), oomph::Tree::stick_all_tree_nodes_into_vector(), and oomph::RefineableElement::tree_pt().

Referenced by load_balance().

◆ get_hessian_vector_products()

void oomph::Problem::get_hessian_vector_products ( DoubleVectorWithHaloEntries const &  Y,
Vector< DoubleVectorWithHaloEntries > const &  C,
Vector< DoubleVectorWithHaloEntries > &  product 
)

Return the product of the global hessian (derivative of Jacobian matrix with respect to all variables) with an eigenvector, Y, and any number of other specified vectors C (d(J_{ij})/d u_{k}) Y_{j} C_{k}. This function is used in assembling and solving the augmented systems associated with bifurcation tracking. The default implementation is to use finite differences at the global level.

Alice: My bifurcation tracking converges better with this FD_step as 1.0e-5. The default value remains at 1.0e-8.

Definition at line 7985 of file problem.cc.

References actions_before_newton_convergence_check(), are_hessian_products_calculated_analytically(), Assembly_handler_pt, assembly_handler_pt(), communicator_pt(), oomph::DistributableLinearAlgebraObject::distribution_pt(), dof(), Dof_distribution_pt, e, oomph::Mesh::element_pt(), oomph::AssemblyHandler::eqn_number(), oomph::BlackBoxFDNewtonSolver::FD_step, FD_step_used_in_get_hessian_vector_products, oomph::AssemblyHandler::get_hessian_vector_products(), oomph::AssemblyHandler::get_jacobian(), global_dof_pt(), oomph::DoubleVectorWithHaloEntries::global_value(), Halo_scheme_pt, i, oomph::Vector< _Tp >::initialise(), oomph::GeneralisedElement::is_halo(), Mesh_pt, mesh_pt(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), oomph::LinearAlgebraDistribution::nrow_local(), and Problem_has_been_distributed.

Referenced by oomph::BlockPitchForkLinearSolver::resolve(), and oomph::BlockPitchForkLinearSolver::solve().

◆ get_inverse_mass_matrix_times_residuals()

void oomph::Problem::get_inverse_mass_matrix_times_residuals ( DoubleVector Mres)
virtual

◆ get_jacobian() [1/4]

void oomph::Problem::get_jacobian ( DoubleVector residuals,
CCDoubleMatrix jacobian 
)
virtual

Return the fully-assembled Jacobian and residuals for the problem. Interface for the case when the Jacobian is in column-compressed storage format. This is virtual so, if we feel like it (e.g. for testing iterative solvers with specific test matrices), we can bypass the default assembly procedure for the Jacobian and the residual vector.

Return the fully-assembled Jacobian and residuals for the problem, in the case when the jacobian matrix is in column-compressed storage format.

Definition at line 4185 of file problem.cc.

References oomph::DoubleVector::build(), oomph::CCMatrix< T >::build_without_copy(), oomph::DoubleVector::built(), communicator_pt(), oomph::LinearAlgebraDistribution::communicator_pt(), Communicator_pt, oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distribution_pt(), ndof(), oomph::LinearAlgebraDistribution::nrow(), oomph::DoubleVector::set_external_values(), and sparse_assemble_row_or_column_compressed().

◆ get_jacobian() [2/4]

void oomph::Problem::get_jacobian ( DoubleVector residuals,
CRDoubleMatrix jacobian 
)
virtual

Return the fully-assembled Jacobian and residuals for the problem. Interface for the case when the Jacobian is in row-compressed storage format. This is virtual so, if we feel like it (e.g. for testing iterative solvers with specific test matrices), we can bypass the default assembly procedure for the Jacobian and the residual vector.

Return the fully-assembled Jacobian and residuals for the problem, in the case where the Jacobian matrix is in a distributable row compressed storage format.

  1. If the distribution of the jacobian and residuals is setup then, they will be returned with that distribution. Note. the jacobian and residuals must have the same distribution.
  2. If the distribution of the jacobian and residuals are not setup then their distribution will computed based on: Distributed_problem_matrix_distribution.

Definition at line 3997 of file problem.cc.

References oomph::DoubleVector::build(), oomph::CRDoubleMatrix::build(), oomph::CRDoubleMatrix::build_without_copy(), oomph::DoubleVector::built(), Communicator_pt, Default_matrix_distribution, Dist_problem_matrix_distribution, oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distribution_built(), oomph::DistributableLinearAlgebraObject::distribution_pt(), Dof_distribution_pt, ndof(), oomph::LinearAlgebraDistribution::nrow(), oomph::LinearAlgebraDistribution::nrow_local(), parallel_sparse_assemble(), Problem_has_been_distributed, Problem_matrix_distribution, oomph::DoubleVector::redistribute(), oomph::CRDoubleMatrix::redistribute(), oomph::DoubleVector::set_external_values(), sparse_assemble_row_or_column_compressed(), and Uniform_matrix_distribution.

◆ get_jacobian() [3/4]

void oomph::Problem::get_jacobian ( DoubleVector residuals,
DenseDoubleMatrix jacobian 
)
virtual

Return the fully-assembled Jacobian and residuals for the problem Interface for the case when the Jacobian matrix is dense. This is virtual so, if we feel like it (e.g. for testing iterative solvers with specific test matrices, we can bypass the default assembly procedure for the Jacobian and the residual vector.

Get the fully assembled residual vector and Jacobian matrix in dense storage. The DoubleVector residuals returned will be non-distributed. If on calling this method the DoubleVector residuals is setup then it must be non-distributed and of the correct length. The matrix type DenseDoubleMatrix is not distributable and therefore the residual vector is also assumed to be non distributable.

Definition at line 3890 of file problem.cc.

References Assembly_handler_pt, assembly_handler_pt(), oomph::DoubleVector::build(), oomph::DoubleVector::built(), oomph::LinearAlgebraDistribution::communicator_pt(), Communicator_pt, oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distribution_pt(), e, oomph::Mesh::element_pt(), oomph::AssemblyHandler::eqn_number(), oomph::AssemblyHandler::get_jacobian(), oomph::DoubleVector::initialise(), oomph::DenseMatrix< T >::initialise(), Mesh_pt, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), oomph::LinearAlgebraDistribution::nrow(), and oomph::DenseMatrix< T >::resize().

Referenced by oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::get_pressure_advection_diffusion_jacobian(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::CG< MATRIX >::solve(), oomph::BiCGStab< MATRIX >::solve(), oomph::GS< MATRIX >::solve(), oomph::GS< CRDoubleMatrix >::solve(), oomph::DampedJacobi< MATRIX >::solve(), oomph::GMRES< MATRIX >::solve(), oomph::AugmentedProblemGMRES::solve(), oomph::DenseLU::solve(), oomph::SuperLUSolver::solve(), oomph::MumpsSolver::solve(), oomph::HelmholtzGMRESMG< MATRIX >::solve(), oomph::HelmholtzFGMRESMG< MATRIX >::solve(), oomph::HypreSolver::solve(), oomph::TrilinosAztecOOSolver::solve(), and oomph::SuperLUSolver::solve_transpose().

◆ get_jacobian() [4/4]

virtual void oomph::Problem::get_jacobian ( DoubleVector residuals,
SumOfMatrices jacobian 
)
inlinevirtual

Dummy virtual function that must be overloaded by the problem to specify which matrices should be summed to give the final Jacobian.

Definition at line 1879 of file problem.h.

◆ get_my_eqns()

void oomph::Problem::get_my_eqns ( AssemblyHandler *const &  assembly_handler_pt,
const unsigned &  el_lo,
const unsigned &  el_hi,
Vector< unsigned > &  my_eqns 
)
private

Helper method that returns the (unique) global equations to which the elements in the range el_lo to el_hi contribute on this processor using the given assembly_handler.

Helper method that returns the global equations to which the elements in the range el_lo to el_hi contribute on this processor.

Definition at line 6509 of file problem.cc.

References assembly_handler_pt(), e, oomph::Mesh::element_pt(), oomph::AssemblyHandler::eqn_number(), i, oomph::GeneralisedElement::is_halo(), mesh_pt(), and oomph::AssemblyHandler::ndof().

Referenced by parallel_sparse_assemble(), and setup_dof_halo_scheme().

◆ get_residuals()

void oomph::Problem::get_residuals ( DoubleVector residuals)
virtual

◆ global_data_pt()

Data *& oomph::Problem::global_data_pt ( const unsigned &  i)
inline

Return a pointer to the the i-th global data object.

Definition at line 1647 of file problem.h.

References Global_data_pt, and i.

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), add_global_data(), and copy().

◆ global_dof_pt()

double * oomph::Problem::global_dof_pt ( const unsigned &  i)
inline

Return a pointer to the dof, indexed by global equation number which may be haloed or stored locally. If it is haloed, a local copy must have been requested on this processor in the Halo_scheme_pt.

Definition at line 1764 of file problem.h.

References oomph::DoubleVectorHaloScheme::distribution_pt(), oomph::LinearAlgebraDistribution::first_row(), Halo_dof_pt, Halo_scheme_pt, i, oomph::DoubleVectorHaloScheme::local_index(), oomph::LinearAlgebraDistribution::nrow_local(), and Problem_has_been_distributed.

Referenced by get_hessian_vector_products(), oomph::PitchForkHandler::get_jacobian(), and oomph::PitchForkHandler::get_residuals().

◆ global_temporal_error_norm()

virtual double oomph::Problem::global_temporal_error_norm ( )
inlineprotectedvirtual

Function to calculate a global error norm, used in adaptive timestepping to control the change in timestep. Individual errors for each data object can be obtained via the data timestepper's temporal_error_in_value or temporal_error_in_position functions and should be combined to construct a global norm. For example, in fluids problems a suitable norm is usually the weighted sum of the errors in the velocities; for moving mesh problems is it usually better to use the weighted sum of the errors in position.

Definition at line 1230 of file problem.h.

References oomph::Global_string_for_annotation::string().

Referenced by adaptive_unsteady_newton_solve().

◆ globally_convergent_line_search()

void oomph::Problem::globally_convergent_line_search ( const Vector< double > &  x_old,
const double &  half_residual_squared_old,
DoubleVector gradient,
DoubleVector newton_dir,
double &  half_residual_squared,
const double &  stpmax 
)
private

Line search helper for globally convergent Newton method.

Helper function for the globally convergent Newton solver.

Definition at line 9146 of file problem.cc.

References Dof_pt, get_residuals(), i, ndof(), and oomph::oomph_info.

Referenced by newton_solve().

◆ initialise_dt() [1/2]

void oomph::Problem::initialise_dt ( const double &  dt)

Set all timesteps to the same value, dt, and assign weights for all timesteppers in the problem.

Definition at line 13231 of file problem.cc.

References i, oomph::Time::initialise_dt(), ntime_stepper(), oomph::TimeStepper::set_error_weights(), oomph::TimeStepper::set_weights(), Time_pt, and time_stepper_pt().

Referenced by assign_initial_values_impulsive(), and read().

◆ initialise_dt() [2/2]

void oomph::Problem::initialise_dt ( const Vector< double > &  dt)

Set the value of the timesteps to be equal to the values passed in a vector and assign weights for all timesteppers in the problem.

Definition at line 13254 of file problem.cc.

References i, oomph::Time::initialise_dt(), ntime_stepper(), oomph::TimeStepper::set_error_weights(), oomph::TimeStepper::set_weights(), Time_pt, and time_stepper_pt().

◆ is_dparameter_calculated_analytically()

bool oomph::Problem::is_dparameter_calculated_analytically ( double *const &  parameter_pt)
inline

Function to determine whether the parameter derivatives are calculated analytically.

Definition at line 277 of file problem.h.

References Calculate_dparameter_analytic.

Referenced by get_derivative_wrt_global_parameter().

◆ jacobian_reuse_is_enabled()

bool oomph::Problem::jacobian_reuse_is_enabled ( )
inline

Is recycling of Jacobian in Newton iteration enabled?

Definition at line 1989 of file problem.h.

References Jacobian_reuse_is_enabled.

◆ linear_solver_pt() [1/2]

LinearSolver *& oomph::Problem::linear_solver_pt ( )
inline

◆ linear_solver_pt() [2/2]

LinearSolver *const & oomph::Problem::linear_solver_pt ( ) const
inline

Return a pointer to the linear solver object (const version)

Definition at line 1472 of file problem.h.

References Linear_solver_pt.

◆ load_balance() [1/4]

void oomph::Problem::load_balance ( )
inline

Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors.

Definition at line 1382 of file problem.h.

References oomph::DocInfo::disable_doc(), and load_balance().

Referenced by load_balance(), and read().

◆ load_balance() [2/4]

void oomph::Problem::load_balance ( const bool &  report_stats)
inline

Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. Produce explicit stats of load balancing process if boolean, report_stats, is set to true.

Definition at line 1403 of file problem.h.

References oomph::DocInfo::disable_doc(), and load_balance().

◆ load_balance() [3/4]

void oomph::Problem::load_balance ( DocInfo doc_info,
const bool &  report_stats 
)
inline

Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. Produce explicit stats of load balancing process if boolean, report_stats, is set to true.

Definition at line 1422 of file problem.h.

References load_balance().

◆ load_balance() [4/4]

void oomph::Problem::load_balance ( DocInfo doc_info,
const bool &  report_stats,
const Vector< unsigned > &  input_target_domain_for_local_non_halo_element 
)

Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. Produce explicit stats of load balancing process if boolean, report_stats, is set to true and doc various bits of data (mainly for debugging) in directory specified by DocInfo object. If final input vector is non-zero-sized it provides an imposed partitioning.

Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over the processors. Produce explicit stats of load balancing process if boolean, report_stats, is set to true and doc various bits of data (mainly for debugging) in directory specified by DocInfo object.

Definition at line 17190 of file problem.cc.

References actions_after_adapt(), actions_after_distribute(), actions_before_adapt(), actions_before_distribute(), assign_eqn_numbers(), Base_mesh_element_number_plus_one, Base_mesh_element_pt, build_mesh(), oomph::FaceElement::bulk_element_pt(), Communicator_pt, communicator_pt(), delete_all_external_storage(), oomph::Mesh::distribute(), e, oomph::Mesh::element_pt(), oomph::FaceElement::face_index(), oomph::Mesh::finite_element_pt(), oomph::Mesh::flush_element_and_node_storage(), flush_sub_meshes(), get_data_to_be_sent_during_load_balancing(), get_flat_packed_refinement_pattern_for_load_balancing(), oomph::TreeBasedRefineableMeshBase::get_refinement_levels(), i, oomph::GeneralisedElement::is_halo(), mesh_pt(), ndof(), oomph::Mesh::nelement(), oomph::Mesh::nnon_halo_element(), nsub_mesh(), oomph::DocInfo::number(), oomph::oomph_info, oomph::METIS::partition_distributed_mesh(), Problem_has_been_distributed, oomph::Mesh::prune_halo_elements_and_nodes(), rebuild_global_mesh(), refine_distributed_base_mesh(), oomph::TreeBasedRefineableMeshBase::refine_uniformly(), send_data_to_be_sent_during_load_balancing(), send_refinement_info_helper(), setup_base_mesh_info_after_pruning(), synchronise_all_dofs(), oomph::TimingHelpers::timer(), oomph::TreeBasedRefineableMeshBase::uniform_refinement_level_when_pruned(), and Use_default_partition_in_load_balance.

◆ make_copy()

Problem * oomph::Problem::make_copy ( )
virtual

Make and return a pointer to the copy of the problem. A virtual function that must be filled in by the user is they wish to perform adaptive refinement in bifurcation tracking or in multigrid problems. ALH: WILL NOT BE NECESSARY IN BIFURCATION TRACKING IN LONG RUN...

Definition at line 12011 of file problem.cc.

Referenced by adapt(), and bifurcation_adapt_helper().

◆ mass_matrix_reuse_is_enabled()

bool oomph::Problem::mass_matrix_reuse_is_enabled ( )
inline

Return whether the mass matrix is being reused.

Definition at line 2568 of file problem.h.

References Mass_matrix_reuse_is_enabled.

◆ mass_matrix_solver_for_explicit_timestepper_pt() [1/2]

LinearSolver *& oomph::Problem::mass_matrix_solver_for_explicit_timestepper_pt ( )
inline

Return a pointer to the linear solver object used for explicit time stepping.

Definition at line 1479 of file problem.h.

References Mass_matrix_solver_for_explicit_timestepper_pt.

Referenced by get_inverse_mass_matrix_times_residuals().

◆ mass_matrix_solver_for_explicit_timestepper_pt() [2/2]

LinearSolver * oomph::Problem::mass_matrix_solver_for_explicit_timestepper_pt ( ) const
inline

Return a pointer to the linear solver object used for explicit time stepping (const version).

Definition at line 1486 of file problem.h.

References Mass_matrix_solver_for_explicit_timestepper_pt.

◆ max_newton_iterations()

unsigned & oomph::Problem::max_newton_iterations ( )
inline

Access function to max Newton iterations before giving up.

Definition at line 1594 of file problem.h.

References Max_newton_iterations.

◆ max_residuals()

double & oomph::Problem::max_residuals ( )
inline

Access function to max residuals in Newton iterations before giving up.

Definition at line 1608 of file problem.h.

References Max_residuals.

◆ maximum_dt()

double & oomph::Problem::maximum_dt ( )
inline

Access function to max timestep in adaptive timestepping.

Definition at line 1588 of file problem.h.

References Maximum_dt.

◆ mesh_pt() [1/4]

Mesh *& oomph::Problem::mesh_pt ( )
inline

Return a pointer to the global mesh.

Definition at line 1280 of file problem.h.

References Mesh_pt.

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::RefineableGmshTetMesh< ELEMENT >::adapt(), oomph::RefineableTetgenMesh< ELEMENT >::adapt(), oomph::RefineableTriangleMesh< ELEMENT >::adapt(), adapt(), adapt_based_on_error_estimates(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), add_sub_mesh(), assign_eqn_numbers(), oomph::SolidICProblem::backup_original_state(), bifurcation_adapt_helper(), check_halo_schemes(), copy(), copy_haloed_eqn_numbers_helper(), delete_all_external_storage(), disable_mass_matrix_reuse(), distribute(), doc_errors(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::doc_solution(), dump(), enable_mass_matrix_reuse(), oomph::SegregatableFSIProblem::extrapolate_solid_data(), oomph::FoldHandler::FoldHandler(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::FpPressureAdvectionDiffusionProblem(), get_all_error_estimates(), get_all_halo_data(), get_data_to_be_sent_during_load_balancing(), get_dofs(), get_flat_packed_refinement_pattern_for_load_balancing(), get_hessian_vector_products(), get_inverse_mass_matrix_times_residuals(), get_my_eqns(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::FoldHandler::get_residuals(), oomph::HopfHandler::get_residuals(), oomph::HopfHandler::HopfHandler(), load_balance(), oomph::LinearElasticitySmoothMesh< LINEAR_ELASTICITY_ELEMENT >::operator()(), oomph::PoissonSmoothMesh< POISSON_ELEMENT >::operator()(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::orbit_output(), p_adapt(), p_refine_selected_elements(), p_refine_uniformly(), p_refine_uniformly_aux(), p_unrefine_uniformly(), parallel_sparse_assemble(), oomph::METIS::partition_distributed_mesh(), oomph::METIS::partition_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_all(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::pin_all_non_pressure_dofs(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_dofs_of_coordinate(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_dofs_of_field(), oomph::PitchForkHandler::PitchForkHandler(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), prune_halo_elements_and_nodes(), read(), refine_distributed_base_mesh(), refine_selected_elements(), refine_uniformly(), refine_uniformly_aux(), remove_duplicate_data(), remove_null_pointers_from_external_halo_node_storage(), oomph::HSL_MA42::reorder_elements(), oomph::SolidICProblem::reset_original_state(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::reset_pin_status(), oomph::AugmentedBlockFoldLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::restore_positions(), self_test(), send_refinement_info_helper(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_coordinate_for_projection(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_current_field_for_projection(), set_dofs(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_lagrangian_coordinate_for_projection(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::SolidICProblem::set_newmark_initial_condition_directly(), oomph::SolidICProblem::set_static_initial_condition(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_time_level_for_projection(), setup_base_mesh_info_after_pruning(), setup_dof_halo_scheme(), setup_element_count_per_dof(), oomph::SolidICProblem::setup_problem(), oomph::SegregatableFSIProblem::setup_segregated_solver(), oomph::SolidICProblem::SolidICProblem(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::solve(), oomph::MGSolver< DIM >::solve(), oomph::HelmholtzGMRESMG< MATRIX >::solve(), oomph::HelmholtzFGMRESMG< MATRIX >::solve(), oomph::HSL_MA42::solve_for_one_dof(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), sparse_assemble_row_or_column_compressed_with_lists(), sparse_assemble_row_or_column_compressed_with_maps(), sparse_assemble_row_or_column_compressed_with_two_arrays(), sparse_assemble_row_or_column_compressed_with_two_vectors(), sparse_assemble_row_or_column_compressed_with_vectors_of_pairs(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::store_positions(), synchronise_dofs(), synchronise_eqn_numbers(), oomph::METIS::uniform_partition_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_all(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_dofs_of_coordinate(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_dofs_of_field(), unrefine_uniformly(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().

◆ mesh_pt() [2/4]

Mesh *const & oomph::Problem::mesh_pt ( ) const
inline

Return a pointer to the global mesh (const version)

Definition at line 1286 of file problem.h.

References Mesh_pt.

◆ mesh_pt() [3/4]

Mesh *& oomph::Problem::mesh_pt ( const unsigned &  imesh)
inline

Return a pointer to the i-th submesh. If there are no submeshes, the 0-th submesh is the global mesh itself.

Definition at line 1293 of file problem.h.

References Mesh_pt, and Sub_mesh_pt.

◆ mesh_pt() [4/4]

Mesh *const & oomph::Problem::mesh_pt ( const unsigned &  imesh) const
inline

Return a pointer to the i-th submesh (const version)

Definition at line 1308 of file problem.h.

References Mesh_pt, and Sub_mesh_pt.

◆ minimum_dt()

double & oomph::Problem::minimum_dt ( )
inline

Access function to min timestep in adaptive timestepping.

Definition at line 1582 of file problem.h.

References Minimum_dt.

◆ ndof()

unsigned long oomph::Problem::ndof ( ) const
inline

Return the number of dofs.

Definition at line 1674 of file problem.h.

References Dof_distribution_pt, and oomph::LinearAlgebraDistribution::nrow().

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::IMRByBDF::actions_before_timestep(), adapt(), add_eigenvector_to_dofs(), add_to_dofs(), assign_eigenvector_to_dofs(), bifurcation_adapt_helper(), calculate_continuation_derivatives(), calculate_predictions(), distribute(), oomph::FoldHandler::FoldHandler(), get_dofs(), get_eigenproblem_matrices(), get_fd_jacobian(), get_inverse_mass_matrix_times_residuals(), get_jacobian(), get_residuals(), globally_convergent_line_search(), oomph::HopfHandler::HopfHandler(), load_balance(), newton_solve(), oomph::PitchForkHandler::PitchForkHandler(), oomph::MGPreconditioner< DIM >::preconditioner_solve(), prune_halo_elements_and_nodes(), oomph::HSL_MA42::reorder_elements(), oomph::AugmentedBlockFoldLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), restore_dof_values(), set_dofs(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::solve(), oomph::GS< MATRIX >::solve(), oomph::GS< CRDoubleMatrix >::solve(), oomph::DampedJacobi< MATRIX >::solve(), oomph::GMRES< MATRIX >::solve(), oomph::AugmentedProblemGMRES::solve(), oomph::DenseLU::solve(), oomph::FD_LU::solve(), oomph::SuperLUSolver::solve(), oomph::MumpsSolver::solve(), oomph::HelmholtzGMRESMG< MATRIX >::solve(), oomph::HelmholtzFGMRESMG< MATRIX >::solve(), oomph::ARPACK::solve_eigenproblem(), oomph::LAPACK_QZ::solve_eigenproblem(), oomph::HSL_MA42::solve_for_one_dof(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), oomph::SuperLUSolver::solve_transpose(), sparse_assemble_row_or_column_compressed_with_lists(), sparse_assemble_row_or_column_compressed_with_maps(), sparse_assemble_row_or_column_compressed_with_two_arrays(), sparse_assemble_row_or_column_compressed_with_two_vectors(), sparse_assemble_row_or_column_compressed_with_vectors_of_pairs(), and store_current_dof_values().

◆ newton_solve() [1/2]

void oomph::Problem::newton_solve ( )

Use Newton method to solve the problem.

General Newton solver. Requires only a convergence tolerance. The linear solver takes a pointer to the problem (which defines the Jacobian J and the residual Vector r) and returns the solution x of the system.

\[ {\bf J} {\bf x} = - \bf{r} \]

.

Definition at line 8783 of file problem.cc.

References actions_after_newton_solve(), actions_after_newton_step(), actions_before_newton_convergence_check(), actions_before_newton_solve(), actions_before_newton_step(), Always_take_one_newton_step, oomph::DoubleVector::clear(), oomph::TimingHelpers::convert_secs_to_formatted_string(), Dof_distribution_pt, Dof_pt, oomph::LinearSolver::enable_computation_of_gradient(), oomph::LinearSolver::enable_resolve(), oomph::LinearSolver::get_gradient(), get_residuals(), globally_convergent_line_search(), i, Jacobian_has_been_computed, Jacobian_reuse_is_enabled, Linear_solver_pt, oomph::DoubleVector::max(), Max_newton_iterations, Max_res, Max_residuals, oomph::MPI_Helpers::mpi_has_been_initialised(), ndof(), Newton_solver_tolerance, Nnewton_iter_taken, oomph::LinearAlgebraDistribution::nrow_local(), oomph::oomph_info, Problem_is_nonlinear, oomph::DoubleVector::redistribute(), Relaxation_factor, oomph::LinearSolver::reset_gradient(), oomph::LinearSolver::resolve(), Shut_up_in_newton_solve, oomph::LinearSolver::solve(), synchronise_all_dofs(), oomph::TimingHelpers::timer(), Use_globally_convergent_newton_method, and oomph::DoubleVector::values_pt().

Referenced by adaptive_unsteady_newton_solve(), newton_solve(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::LinearElasticitySmoothMesh< LINEAR_ELASTICITY_ELEMENT >::operator()(), oomph::PoissonSmoothMesh< POISSON_ELEMENT >::operator()(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), oomph::SegregatableFSIProblem::segregated_solve(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::SolidICProblem::set_newmark_initial_condition_directly(), oomph::SolidICProblem::set_static_initial_condition(), steady_newton_solve(), unsteady_newton_solve(), and oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate().

◆ newton_solve() [2/2]

void oomph::Problem::newton_solve ( unsigned const &  max_adapt)

Adaptive Newton solve: up to max_adapt adaptations of all refineable submeshes are performed to achieve the the error targets specified in the refineable submeshes.

Adaptive Newton solver. The linear solver takes a pointer to the problem (which defines the Jacobian J and the residual Vector r) and returns the solution x of the system.

\[ {\bf J} {\bf x} = - \bf{r} \]

. Performs at most max_adapt adaptations on all meshes.

Definition at line 16223 of file problem.cc.

References adapt(), communicator_pt(), oomph::NewtonSolverError::iterations, Max_newton_iterations, Max_residuals, oomph::NewtonSolverError::maxres, newton_solve(), oomph::oomph_info, and Problem_has_been_distributed.

◆ newton_solve_continuation() [1/2]

unsigned oomph::Problem::newton_solve_continuation ( double *const &  parameter_pt)
protected

Perform a basic arc-length continuation step using Newton's method. Returns number of Newton steps taken.

Perform a basic continuation step using Newton's method. The governing parameter of the problem is passed as a pointer to the routine. The number of Newton steps taken is returned.

Definition at line 9376 of file problem.cc.

References newton_solve_continuation().

Referenced by arc_length_step_solve_helper(), and newton_solve_continuation().

◆ newton_solve_continuation() [2/2]

unsigned oomph::Problem::newton_solve_continuation ( double *const &  parameter_pt,
DoubleVector z 
)
protected

This function performs a basic continuation step using the Newton method. The number of Newton steps taken is returned, to be used in any external step-size control routines. The governing parameter of the problem is passed as a pointer to the routine, as is a vector in which to store the derivatives wrt the parameter, if required.

This function performs a basic continuation step using the Newton method. The number of Newton steps taken is returned, to be used in any external step-size control routines. The governing parameter of the problem is passed as a pointer to the routine, as is the sign of the Jacobian and a Vector in which to store the derivatives wrt the parameter, if required.

Definition at line 9396 of file problem.cc.

References actions_after_newton_solve(), actions_after_newton_step(), actions_before_newton_convergence_check(), actions_before_newton_solve(), actions_before_newton_step(), Always_take_one_newton_step, oomph::DoubleVector::clear(), oomph::LinearAlgebraDistribution::communicator_pt(), oomph::LinearSolver::disable_resolve(), oomph::LinearAlgebraDistribution::distributed(), dof_current(), dof_derivative(), Dof_distribution_pt, Dof_pt, Ds_current, oomph::LinearSolver::enable_resolve(), get_derivative_wrt_global_parameter(), get_residuals(), oomph::LinearSolver::is_resolve_enabled(), Linear_solver_pt, oomph::DoubleVector::max(), Max_newton_iterations, Max_residuals, Newton_solver_tolerance, oomph::LinearAlgebraDistribution::nrow_local(), oomph::oomph_info, Parameter_current, Parameter_derivative, oomph::DoubleVector::redistribute(), oomph::LinearSolver::resolve(), Shut_up_in_newton_solve, oomph::LinearSolver::solve(), synchronise_all_dofs(), Theta_squared, and oomph::DoubleVector::values_pt().

◆ newton_solver_tolerance()

double & oomph::Problem::newton_solver_tolerance ( )
inline

Access function to tolererance of the Newton solver, i.e. the maximum value of the residuals that will be accepted.

Definition at line 1621 of file problem.h.

References Newton_solver_tolerance.

◆ nglobal_data()

unsigned oomph::Problem::nglobal_data ( ) const
inline

◆ nsub_mesh()

unsigned oomph::Problem::nsub_mesh ( ) const
inline

◆ ntime_stepper()

unsigned oomph::Problem::ntime_stepper ( ) const
inline

◆ operator=()

void oomph::Problem::operator= ( const Problem )
delete

Broken assignment operator.

◆ p_adapt() [1/2]

void oomph::Problem::p_adapt ( )
inline

p-adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. On return from this function, Problem can immediately be solved again. [Argument-free wrapper]

Definition at line 2881 of file problem.h.

References p_adapt().

Referenced by p_adapt().

◆ p_adapt() [2/2]

void oomph::Problem::p_adapt ( unsigned &  n_refined,
unsigned &  n_unrefined 
)

p-adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again.

Definition at line 14243 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), Assembly_handler_pt, assign_eqn_numbers(), bifurcation_adapt_helper(), oomph::AssemblyHandler::bifurcation_type(), oomph::Global_timings::Doc_comprehensive_timings, oomph::ErrorEstimator::get_element_errors(), mesh_pt(), nsub_mesh(), oomph::oomph_info, rebuild_global_mesh(), and oomph::TimingHelpers::timer().

◆ p_refine_selected_elements() [1/6]

void oomph::Problem::p_refine_selected_elements ( const unsigned &  i_mesh,
const Vector< PRefineableElement * > &  elements_to_be_refined_pt 
)

p-refine specified submesh by refining the elements identified by their pointers, then rebuild the problem.

Definition at line 15305 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ p_refine_selected_elements() [2/6]

void oomph::Problem::p_refine_selected_elements ( const unsigned &  i_mesh,
const Vector< unsigned > &  elements_to_be_refined 
)

p-refine specified submesh by refining the elements identified by their numbers relative to the submesh, then rebuild the problem.

p-refine specified submesh by refining the elements identified by their numbers relative to the specified mesh, then rebuild the problem.

Definition at line 15253 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ p_refine_selected_elements() [3/6]

void oomph::Problem::p_refine_selected_elements ( const Vector< PRefineableElement * > &  elements_to_be_refined_pt)

p-refine (one and only!) mesh by refining the elements identified by their pointers, then rebuild the problem.

Definition at line 15206 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), and oomph::oomph_info.

◆ p_refine_selected_elements() [4/6]

void oomph::Problem::p_refine_selected_elements ( const Vector< unsigned > &  elements_to_be_refined)

p-refine (one and only!) mesh by refining the elements identified by their numbers relative to the problems' only mesh, then rebuild the problem.

Definition at line 15159 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), and oomph::oomph_info.

◆ p_refine_selected_elements() [5/6]

void oomph::Problem::p_refine_selected_elements ( const Vector< Vector< PRefineableElement * > > &  elements_to_be_refined_pt)

p-refine all submeshes by refining the elements identified by their pointers within each submesh in a Vector of Vectors, then rebuild the problem.

Definition at line 15400 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ p_refine_selected_elements() [6/6]

void oomph::Problem::p_refine_selected_elements ( const Vector< Vector< unsigned > > &  elements_to_be_refined)

p-refine all submeshes by refining the elements identified by their numbers relative to each submesh in a Vector of Vectors, then rebuild the problem.

Definition at line 15358 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ p_refine_uniformly() [1/6]

void oomph::Problem::p_refine_uniformly ( )
inline

p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem

Definition at line 2737 of file problem.h.

References oomph::DocInfo::disable_doc(), and p_refine_uniformly().

Referenced by p_refine_uniformly().

◆ p_refine_uniformly() [2/6]

void oomph::Problem::p_refine_uniformly ( const unsigned &  i_mesh)
inline

Do uniform p-refinement for submesh i_mesh without documentation.

Definition at line 2748 of file problem.h.

References oomph::DocInfo::disable_doc(), and p_refine_uniformly().

◆ p_refine_uniformly() [3/6]

void oomph::Problem::p_refine_uniformly ( const unsigned &  i_mesh,
DocInfo doc_info 
)

Do uniform p-refinement for submesh i_mesh with documentation.

p-refine submesh i_mesh uniformly and rebuild problem; doc refinement process.

Definition at line 15784 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ p_refine_uniformly() [4/6]

void oomph::Problem::p_refine_uniformly ( const Vector< unsigned > &  nrefine_for_mesh)
inline

p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem

Definition at line 2660 of file problem.h.

References oomph::DocInfo::disable_doc(), and p_refine_uniformly_aux().

◆ p_refine_uniformly() [5/6]

void oomph::Problem::p_refine_uniformly ( const Vector< unsigned > &  nrefine_for_mesh,
DocInfo doc_info 
)
inline

p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process

Definition at line 2670 of file problem.h.

References p_refine_uniformly_aux().

◆ p_refine_uniformly() [6/6]

void oomph::Problem::p_refine_uniformly ( DocInfo doc_info)
inline

p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process.

Definition at line 2707 of file problem.h.

References nsub_mesh(), and p_refine_uniformly().

◆ p_refine_uniformly_and_prune() [1/3]

void oomph::Problem::p_refine_uniformly_and_prune ( const Vector< unsigned > &  nrefine_for_mesh)
inline

p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem. Prune after refinements

Definition at line 2680 of file problem.h.

References oomph::DocInfo::disable_doc(), and p_refine_uniformly_aux().

Referenced by p_refine_uniformly_and_prune().

◆ p_refine_uniformly_and_prune() [2/3]

void oomph::Problem::p_refine_uniformly_and_prune ( const Vector< unsigned > &  nrefine_for_mesh,
DocInfo doc_info 
)
inline

p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process

Definition at line 2694 of file problem.h.

References p_refine_uniformly_aux().

◆ p_refine_uniformly_and_prune() [3/3]

void oomph::Problem::p_refine_uniformly_and_prune ( DocInfo doc_info)
inline

p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process.

Definition at line 2720 of file problem.h.

References nsub_mesh(), and p_refine_uniformly_and_prune().

◆ p_refine_uniformly_aux()

void oomph::Problem::p_refine_uniformly_aux ( const Vector< unsigned > &  nrefine_for_mesh,
DocInfo doc_info,
const bool &  prune 
)
private

Helper function to do compund p-refinement of (all) p-refineable (sub)mesh(es) uniformly as many times as specified in vector and rebuild problem; doc refinement process. Set boolean argument to true if you want to prune immediately after refining the meshes individually.

Definition at line 15592 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), Bypass_increase_in_dof_check_during_pruning, oomph::Global_timings::Doc_comprehensive_timings, i, mesh_pt(), nsub_mesh(), oomph::oomph_info, prune_halo_elements_and_nodes(), rebuild_global_mesh(), and oomph::TimingHelpers::timer().

Referenced by p_refine_uniformly(), and p_refine_uniformly_and_prune().

◆ p_unrefine_uniformly() [1/2]

void oomph::Problem::p_unrefine_uniformly ( const unsigned &  i_mesh,
DocInfo doc_info 
)

Do uniform p-unrefinement for submesh i_mesh without documentation.

p-unrefine submesh i_mesh uniformly and rebuild problem; doc refinement process.

Definition at line 16019 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ p_unrefine_uniformly() [2/2]

void oomph::Problem::p_unrefine_uniformly ( DocInfo doc_info)

p-unrefine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem.

p-unrefine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process.

Definition at line 15960 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ parallel_sparse_assemble()

void oomph::Problem::parallel_sparse_assemble ( const LinearAlgebraDistribution *const &  dist_pt,
Vector< int * > &  column_or_row_index,
Vector< int * > &  row_or_column_start,
Vector< double * > &  value,
Vector< unsigned > &  nnz,
Vector< double * > &  residuals 
)
private

◆ partition_global_mesh()

void oomph::Problem::partition_global_mesh ( Mesh *&  global_mesh_pt,
DocInfo doc_info,
Vector< unsigned > &  element_domain,
const bool &  report_stats = false 
)
virtual

Partition the global mesh, return vector specifying the processor number for each element. Virtual so that it can be overloaded by any user; the default is to use METIS to perform the partitioning (with a bit of cleaning up afterwards to sort out "special cases").

Definition at line 878 of file problem.cc.

References communicator_pt(), oomph::DocInfo::directory(), e, oomph::DocInfo::is_doc_enabled(), oomph::DocInfo::number(), oomph::oomph_info, oomph::Mesh::output(), and oomph::METIS::partition_mesh().

Referenced by distribute().

◆ problem_has_been_distributed()

bool oomph::Problem::problem_has_been_distributed ( )
inline

Access to Problem_has_been_distributed flag.

Definition at line 2178 of file problem.h.

References Problem_has_been_distributed.

Referenced by oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), and oomph::SolidICProblem::set_static_initial_condition().

◆ problem_is_nonlinear()

void oomph::Problem::problem_is_nonlinear ( const bool &  prob_lin)
inline

Access function to Problem_is_nonlinear.

Definition at line 1600 of file problem.h.

References Problem_is_nonlinear.

◆ prune_halo_elements_and_nodes() [1/2]

void oomph::Problem::prune_halo_elements_and_nodes ( const bool &  report_stats = false)
inline

(Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called.

Definition at line 2167 of file problem.h.

References oomph::DocInfo::disable_doc(), and prune_halo_elements_and_nodes().

◆ prune_halo_elements_and_nodes() [2/2]

void oomph::Problem::prune_halo_elements_and_nodes ( DocInfo doc_info,
const bool &  report_stats 
)

◆ read() [1/2]

virtual void oomph::Problem::read ( std::ifstream &  restart_file)
inlinevirtual

Read refinement pattern of all refineable meshes and refine them accordingly, then read all Data and nodal position info from file for restart.

Definition at line 2066 of file problem.h.

References read().

◆ read() [2/2]

void oomph::Problem::read ( std::ifstream &  restart_file,
bool &  unsteady_restart 
)
virtual

Read refinement pattern of all refineable meshes and refine them accordingly, then read all Data and nodal position info from file for restart. Return flag to indicate if the restart was from steady or unsteady solution.

Definition at line 12251 of file problem.cc.

References actions_after_adapt(), actions_after_read_unstructured_meshes(), actions_before_adapt(), actions_before_read_unstructured_meshes(), assign_eqn_numbers(), Base_mesh_element_number_plus_one, Base_mesh_element_pt, oomph::FaceElement::bulk_element_pt(), Communicator_pt, communicator_pt(), oomph::DocInfo::disable_doc(), e, oomph::Mesh::element_pt(), Empty_actions_after_read_unstructured_meshes_has_been_called, Empty_actions_before_read_unstructured_meshes_has_been_called, oomph::TreeBasedRefineableMeshBase::get_refinement_levels(), Global_data_pt, i, initialise_dt(), oomph::GeneralisedElement::is_halo(), oomph::Mesh::is_mesh_distributed(), load_balance(), mesh_pt(), oomph::Mesh::nelement(), nsub_mesh(), oomph::oomph_info, Problem_has_been_distributed, prune_halo_elements_and_nodes(), oomph::Mesh::read(), oomph::TriangleMeshBase::read_distributed_info_for_restart(), rebuild_global_mesh(), oomph::TriangleMeshBase::reestablish_distribution_info_for_restart(), refine_uniformly(), oomph::TriangleMeshBase::remesh_from_triangulateio(), oomph::Time::resize(), oomph::Global_string_for_annotation::string(), Suppress_warning_about_actions_before_read_unstructured_meshes, time(), oomph::Time::time(), time_pt(), and oomph::TriangleMeshBase::use_triangulateio_restart().

Referenced by read().

◆ rebuild_global_mesh()

void oomph::Problem::rebuild_global_mesh ( )

If one of the submeshes has changed (e.g. by mesh adaptation) we need to update the global mesh. Note: The nodes boundary information refers to the boundary numbers within the submesh!

If one of the submeshes has changed (e.g. by mesh adaptation) we need to update the global mesh. Note: The nodes boundary information refers to the boundary numbers within the submesh! N.B. This is essentially the same function as the Mesh constructor that assembles a single global mesh from submeshes.

Definition at line 1533 of file problem.cc.

References oomph::Mesh::merge_meshes(), Mesh_pt, and Sub_mesh_pt.

Referenced by adapt(), adapt_based_on_error_estimates(), build_global_mesh(), distribute(), load_balance(), p_adapt(), p_refine_selected_elements(), p_refine_uniformly(), p_refine_uniformly_aux(), p_unrefine_uniformly(), prune_halo_elements_and_nodes(), read(), oomph::SegregatableFSIProblem::rebuild_monolithic_mesh(), refine_distributed_base_mesh(), refine_selected_elements(), refine_uniformly(), refine_uniformly_aux(), send_data_to_be_sent_during_load_balancing(), unrefine_uniformly(), oomph::SegregatableFSIProblem::use_only_fluid_elements(), and oomph::SegregatableFSIProblem::use_only_solid_elements().

◆ recompute_load_balanced_assembly()

void oomph::Problem::recompute_load_balanced_assembly ( )
private

◆ refine_distributed_base_mesh()

void oomph::Problem::refine_distributed_base_mesh ( Vector< Vector< Vector< unsigned > > > &  to_be_refined_on_each_root,
const unsigned &  max_level_overall 
)

Load balance helper routine: refine each new base (sub)mesh based upon the elements to be refined within each tree at each root on the current processor.

Load balance helper routine: Function performs max_level_overall successive refinements of the problem's mesh(es) using the following procdure: Given ID of root element, root_element_id, and current refinement level, level, the e-th entry in refinement_info_for_root_elements[root_element_id][level][e] is equal to 2 if the e-th element (using the enumeration when the mesh has been refined to the level-th level) is to be refined during the next refinement; it's 1 if it's not to be refined.

Definition at line 19990 of file problem.cc.

References Base_mesh_element_number_plus_one, e, oomph::Mesh::finite_element_pt(), mesh_pt(), oomph::Mesh::nelement(), nsub_mesh(), rebuild_global_mesh(), and oomph::TreeBasedRefineableMeshBase::refine_base_mesh().

Referenced by load_balance().

◆ refine_selected_elements() [1/6]

void oomph::Problem::refine_selected_elements ( const unsigned &  i_mesh,
const Vector< RefineableElement * > &  elements_to_be_refined_pt 
)

Refine specified submesh by splitting the elements identified by their pointers, then rebuild the problem.

Definition at line 15037 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ refine_selected_elements() [2/6]

void oomph::Problem::refine_selected_elements ( const unsigned &  i_mesh,
const Vector< unsigned > &  elements_to_be_refined 
)

Refine specified submesh by splitting the elements identified by their numbers relative to the submesh, then rebuild the problem.

Refine specified submesh by splitting the elements identified by their numbers relative to the specified mesh, then rebuild the problem.

Definition at line 14990 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ refine_selected_elements() [3/6]

void oomph::Problem::refine_selected_elements ( const Vector< RefineableElement * > &  elements_to_be_refined_pt)

Refine (one and only!) mesh by splitting the elements identified by their pointers, then rebuild the problem.

Definition at line 14944 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), and oomph::oomph_info.

◆ refine_selected_elements() [4/6]

void oomph::Problem::refine_selected_elements ( const Vector< unsigned > &  elements_to_be_refined)

Refine (one and only!) mesh by splitting the elements identified by their numbers relative to the problems' only mesh, then rebuild the problem.

Definition at line 14898 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), and oomph::oomph_info.

◆ refine_selected_elements() [5/6]

void oomph::Problem::refine_selected_elements ( const Vector< Vector< RefineableElement * > > &  elements_to_be_refined_pt)

Refine all submeshes by splitting the elements identified by their pointers within each submesh in a Vector of Vectors, then rebuild the problem.

Definition at line 15122 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ refine_selected_elements() [6/6]

void oomph::Problem::refine_selected_elements ( const Vector< Vector< unsigned > > &  elements_to_be_refined)

Refine all submeshes by splitting the elements identified by their numbers relative to each submesh in a Vector of Vectors, then rebuild the problem.

Definition at line 15085 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ refine_uniformly() [1/6]

void oomph::Problem::refine_uniformly ( )
inline

Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem.

Definition at line 2640 of file problem.h.

References oomph::DocInfo::disable_doc(), and refine_uniformly().

Referenced by read(), and refine_uniformly().

◆ refine_uniformly() [2/6]

void oomph::Problem::refine_uniformly ( const unsigned &  i_mesh)
inline

Do uniform refinement for submesh i_mesh without documentation.

Definition at line 2651 of file problem.h.

References oomph::DocInfo::disable_doc(), and refine_uniformly().

◆ refine_uniformly() [3/6]

void oomph::Problem::refine_uniformly ( const unsigned &  i_mesh,
DocInfo doc_info 
)

Do uniform refinement for submesh i_mesh with documentation.

Refine submesh i_mesh uniformly and rebuild problem; doc refinement process.

Definition at line 15740 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ refine_uniformly() [4/6]

void oomph::Problem::refine_uniformly ( const Vector< unsigned > &  nrefine_for_mesh)
inline

Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem.

Definition at line 2575 of file problem.h.

References oomph::DocInfo::disable_doc(), and refine_uniformly_aux().

◆ refine_uniformly() [5/6]

void oomph::Problem::refine_uniformly ( const Vector< unsigned > &  nrefine_for_mesh,
DocInfo doc_info 
)
inline

Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process.

Definition at line 2585 of file problem.h.

References refine_uniformly_aux().

◆ refine_uniformly() [6/6]

void oomph::Problem::refine_uniformly ( DocInfo doc_info)
inline

Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process.

Definition at line 2614 of file problem.h.

References nsub_mesh(), and refine_uniformly().

◆ refine_uniformly_and_prune() [1/3]

void oomph::Problem::refine_uniformly_and_prune ( const Vector< unsigned > &  nrefine_for_mesh)
inline

Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem. Prune after refinements.

Definition at line 2595 of file problem.h.

References oomph::DocInfo::disable_doc(), and refine_uniformly_aux().

Referenced by refine_uniformly_and_prune().

◆ refine_uniformly_and_prune() [2/3]

void oomph::Problem::refine_uniformly_and_prune ( const Vector< unsigned > &  nrefine_for_mesh,
DocInfo doc_info 
)
inline

Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process.

Definition at line 2605 of file problem.h.

References refine_uniformly_aux().

◆ refine_uniformly_and_prune() [3/3]

void oomph::Problem::refine_uniformly_and_prune ( DocInfo doc_info)
inline

Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process.

Definition at line 2627 of file problem.h.

References nsub_mesh(), and refine_uniformly_and_prune().

◆ refine_uniformly_aux()

void oomph::Problem::refine_uniformly_aux ( const Vector< unsigned > &  nrefine_for_mesh,
DocInfo doc_info,
const bool &  prune 
)
private

Helper function to do compund refinement of (all) refineable (sub)mesh(es) uniformly as many times as specified in vector and rebuild problem; doc refinement process. Set boolean argument to true if you want to prune immediately after refining the meshes individually.

Definition at line 15445 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), Bypass_increase_in_dof_check_during_pruning, oomph::Global_timings::Doc_comprehensive_timings, i, mesh_pt(), nsub_mesh(), oomph::oomph_info, prune_halo_elements_and_nodes(), rebuild_global_mesh(), and oomph::TimingHelpers::timer().

Referenced by refine_uniformly(), and refine_uniformly_and_prune().

◆ remove_duplicate_data()

void oomph::Problem::remove_duplicate_data ( Mesh *const &  mesh_pt,
bool &  actually_removed_some_data 
)
private

Private helper function to remove repeated data in external haloed elements in specified mesh. Bool is true if some data was removed – this usually requires re-running through certain parts of the equation numbering procedure.

Private helper function to remove repeated data in external haloed elements associated with specified mesh. Bool is true if some data was removed – this usually requires re-running through certain parts of the equation numbering procedure.

Definition at line 2568 of file problem.cc.

References communicator_pt(), e, oomph::Mesh::element_pt(), oomph::Data::eqn_number(), oomph::Mesh::external_halo_element_pt(), oomph::Node::get_boundaries_pt(), oomph::Node::hanging_pt(), i, oomph::Node::is_hanging(), oomph::HangInfo::master_node_pt(), oomph::HangInfo::master_weight(), mesh_pt(), oomph::Node::ndim(), oomph::Mesh::nelement(), oomph::Mesh::nexternal_halo_element(), oomph::HangInfo::nmaster(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Mesh::null_external_halo_node(), oomph::Data::nvalue(), oomph::oomph_info, oomph::FiniteElement::output(), oomph::Mesh::remove_boundary_node(), oomph::HangInfo::set_master_node_pt(), oomph::OomphInfo::stream_pt(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().

Referenced by assign_eqn_numbers().

◆ remove_null_pointers_from_external_halo_node_storage()

void oomph::Problem::remove_null_pointers_from_external_halo_node_storage ( )
private

Consolidate external halo node storage by removing nulled out pointers in external halo and haloed schemes for all meshes.

Definition at line 3178 of file problem.cc.

References communicator_pt(), oomph::Mesh::external_halo_node_pt(), oomph::Mesh::external_haloed_node_pt(), mesh_pt(), nsub_mesh(), oomph::Mesh::set_external_halo_node_pt(), and oomph::Mesh::set_external_haloed_node_pt().

Referenced by assign_eqn_numbers().

◆ reset_arc_length_parameters()

void oomph::Problem::reset_arc_length_parameters ( )
inline

Reset the "internal" arc-length continuation parameters, so as to allow continuation in another parameter. N.B. The parameters that are reset are the "minimum" that are required, others should perhaps be reset, depending upon the application.

Definition at line 2409 of file problem.h.

References Arc_length_step_taken, Continuation_direction, Dof_derivative, First_jacobian_sign_change, Parameter_derivative, Sign_of_jacobian, and Theta_squared.

◆ reset_assembly_handler_to_default()

void oomph::Problem::reset_assembly_handler_to_default ( )

Reset the system to the standard non-augemented state.

Reset the assembly handler to default.

Definition at line 10275 of file problem.cc.

References Assembly_handler_pt, and Default_assembly_handler_pt.

Referenced by activate_bifurcation_tracking(), activate_fold_tracking(), activate_hopf_tracking(), activate_pitchfork_tracking(), and deactivate_bifurcation_tracking().

◆ restore_dof_values()

void oomph::Problem::restore_dof_values ( )

Restore the stored values of the degrees of freedom.

Restore the saved dofs.

Definition at line 8653 of file problem.cc.

References dof(), Dof_distribution_pt, Dof_pt, ndof(), oomph::LinearAlgebraDistribution::nrow_local(), Problem_has_been_distributed, and Saved_dof_pt.

Referenced by calculate_predictions().

◆ self_test()

unsigned oomph::Problem::self_test ( )

◆ send_data_to_be_sent_during_load_balancing()

void oomph::Problem::send_data_to_be_sent_during_load_balancing ( Vector< int > &  send_n,
Vector< double > &  send_data,
Vector< int > &  send_displacement 
)
private

Load balance helper routine: Send data to other processors during load balancing.

  • send_n: Input, number of data to be sent to each processor
  • send_data: Input, storage for all values to be sent to all processors
  • send_displacement: Input, start location within send_data for data to be sent to each processor

Definition at line 18949 of file problem.cc.

References Base_mesh_element_pt, communicator_pt(), e, i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), nsub_mesh(), oomph::Data::nvalue(), oomph::GeneralisedElement::read_internal_data_values_from_vector(), oomph::Node::read_values_from_vector(), rebuild_global_mesh(), oomph::Node::resize(), oomph::Tree::stick_leaves_into_vector(), synchronise_dofs(), and oomph::RefineableElement::tree_pt().

Referenced by load_balance().

◆ send_refinement_info_helper()

void oomph::Problem::send_refinement_info_helper ( Vector< unsigned > &  old_domain_for_base_element,
Vector< unsigned > &  new_domain_for_base_element,
const unsigned &  max_refinement_level_overall,
std::map< unsigned, Vector< unsigned > > &  refinement_info_for_root_local,
Vector< Vector< Vector< unsigned > > > &  refinement_info_for_root_elements 
)
private

Send refinement information between processors.

Definition at line 18328 of file problem.cc.

References Base_mesh_element_number_plus_one, communicator_pt(), e, oomph::Mesh::haloed_element_pt(), mesh_pt(), and nsub_mesh().

Referenced by load_balance().

◆ set_analytic_dparameter()

void oomph::Problem::set_analytic_dparameter ( double *const &  parameter_pt)
inline

Function to turn on analytic calculation of the parameter derivatives in continuation and bifurcation detection problems.

Definition at line 256 of file problem.h.

References Calculate_dparameter_analytic.

◆ set_analytic_hessian_products()

void oomph::Problem::set_analytic_hessian_products ( )
inline

Function to turn on analytic calculation of the parameter derivatives in continuation and bifurcation detection problems.

Definition at line 289 of file problem.h.

References Calculate_hessian_products_analytic.

◆ set_consistent_pinned_values_for_continuation()

void oomph::Problem::set_consistent_pinned_values_for_continuation ( )
protected

Private helper function that is used to set the appropriate pinned values for continuation.

Private helper function that is used to set the appropriate pinned values for continuation. If the data is pinned, the its current value is always the same as the original value and the derivative is always zero. If these are not set properly then interpolation and projection in spatial adaptivity will not give the best answers.

Definition at line 10466 of file problem.cc.

References Continuation_time_stepper, Global_data_pt, i, Mesh_pt, nsub_mesh(), oomph::ContinuationStorageScheme::set_consistent_pinned_values(), oomph::Mesh::set_consistent_pinned_values_for_continuation(), and Sub_mesh_pt.

Referenced by arc_length_step_solve_helper().

◆ set_default_first_and_last_element_for_assembly()

void oomph::Problem::set_default_first_and_last_element_for_assembly ( )

◆ set_default_partition_in_load_balance()

void oomph::Problem::set_default_partition_in_load_balance ( )
inline

Set the use of the default partition in the load balance.

Definition at line 1445 of file problem.h.

References Use_default_partition_in_load_balance.

◆ set_dofs() [1/3]

void oomph::Problem::set_dofs ( const DoubleVector dofs)
virtual

Set the values of the dofs.

Function that sets the values of the dofs in the object.

Reimplemented from oomph::ExplicitTimeSteppableObject.

Definition at line 3411 of file problem.cc.

References Dof_pt, ndof(), and oomph::DistributableLinearAlgebraObject::nrow().

Referenced by calculate_predictions(), and oomph::TR::setup_initial_derivative().

◆ set_dofs() [2/3]

void oomph::Problem::set_dofs ( const unsigned &  t,
DoubleVector dofs 
)

◆ set_dofs() [3/3]

void oomph::Problem::set_dofs ( const unsigned &  t,
Vector< double * > &  dof_pt 
)

◆ set_explicit_time_stepper_pt()

void oomph::Problem::set_explicit_time_stepper_pt ( ExplicitTimeStepper *const &  explicit_time_stepper_pt)

Set the explicit timestepper for the problem. The function will automatically create or resize the Time object so that it contains the appropriate number of levels of storage.

Set the explicit time stepper for the problem and also ensure that a time object has been created.

Definition at line 1586 of file problem.cc.

References Explicit_time_stepper_pt, explicit_time_stepper_pt(), oomph::oomph_info, and Time_pt.

◆ set_first_and_last_element_for_assembly()

void oomph::Problem::set_first_and_last_element_for_assembly ( Vector< unsigned > &  first_el_for_assembly,
Vector< unsigned > &  last_el_for_assembly 
)
inline

Manually set first and last elements for parallel assembly of non-distributed problem.

Definition at line 988 of file problem.h.

References First_el_for_assembly, i, and Last_el_plus_one_for_assembly.

Referenced by oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix().

◆ set_initial_condition()

virtual void oomph::Problem::set_initial_condition ( )
inlineprotectedvirtual

Set initial condition (incl previous timesteps). We need to establish this interface because I.C. needs to be reset when problem is adapted during the first timestep.

Definition at line 1198 of file problem.h.

References Default_set_initial_condition_called.

Referenced by doubly_adaptive_unsteady_newton_solve_helper(), and unsteady_newton_solve().

◆ set_pinned_values_to_zero()

void oomph::Problem::set_pinned_values_to_zero ( )

◆ set_timestepper_for_all_data()

unsigned long oomph::Problem::set_timestepper_for_all_data ( TimeStepper *const &  time_stepper_pt,
const bool &  preserve_existing_data = false 
)

Set all problem data to have the same timestepper (timestepper_pt) Return the new number of dofs in the problem.

Set all problem data to have the same timestepper (timestepper_pt). This is mainly used in continuation and bifurcation detection problems in which case the total number of unknowns may change and the changes to the underlying memory layout means that the Dof_pt must be reallocated. Thus, the function calls assign_eqn_numbers() and returns the number of new equation numbers.

Definition at line 11572 of file problem.cc.

References assign_eqn_numbers(), Global_data_pt, i, Mesh_pt, nsub_mesh(), Problem_has_been_distributed, oomph::Mesh::set_mesh_level_time_stepper(), oomph::Mesh::set_nodal_and_elemental_time_stepper(), Sub_mesh_pt, and time_stepper_pt().

Referenced by arc_length_step_solve().

◆ setup_base_mesh_info_after_pruning()

void oomph::Problem::setup_base_mesh_info_after_pruning ( )
private

Helper function to re-setup the Base_mesh enumeration (used during load balancing) after pruning.

Definition at line 20102 of file problem.cc.

References Base_mesh_element_number_plus_one, Base_mesh_element_pt, communicator_pt(), e, mesh_pt(), nsub_mesh(), oomph::Mesh::root_halo_element_pt(), and oomph::Mesh::root_haloed_element_pt().

Referenced by load_balance(), and prune_halo_elements_and_nodes().

◆ setup_dof_halo_scheme()

void oomph::Problem::setup_dof_halo_scheme ( )
protected

Function that is used to setup the halo scheme.

Setup the halo scheme for the degrees of freedom.

Definition at line 300 of file problem.cc.

References Assembly_handler_pt, Dof_distribution_pt, get_all_halo_data(), get_my_eqns(), Halo_dof_pt, Halo_scheme_pt, mesh_pt(), oomph::Mesh::nelement(), and oomph::DoubleVectorHaloScheme::setup_halo_dofs().

Referenced by oomph::PitchForkHandler::PitchForkHandler().

◆ setup_element_count_per_dof()

unsigned oomph::Problem::setup_element_count_per_dof ( )
protected

Function that populates the Element_counter_per_dof vector with the number of elements that contribute to each dof. For example, with linear elements in 1D each dof contains contributions from two elements apart from those on the boundary. Returns the total number of elements in the problem.

Setup the count vector that records how many elements contribute to each degree of freedom. Returns the total number of elements in the problem.

Definition at line 230 of file problem.cc.

References Assembly_handler_pt, oomph::DoubleVector::build(), oomph::DoubleVectorWithHaloEntries::build_halo_scheme(), communicator_pt(), Dof_distribution_pt, e, Element_count_per_dof, oomph::Mesh::element_pt(), oomph::AssemblyHandler::eqn_number(), oomph::DoubleVectorWithHaloEntries::global_value(), Halo_scheme_pt, oomph::GeneralisedElement::is_halo(), mesh_pt(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Problem_has_been_distributed, and oomph::DoubleVectorWithHaloEntries::sum_all_halo_and_haloed_values().

◆ shift_time_values()

void oomph::Problem::shift_time_values ( )
virtual

Shift all values along to prepare for next timestep.

Shift all time-dependent data along for next timestep.

Definition at line 11634 of file problem.cc.

References Global_data_pt, Mesh_pt, oomph::Time::shift_dt(), oomph::Mesh::shift_time_values(), and Time_pt.

Referenced by adaptive_unsteady_newton_solve(), explicit_timestep(), unsteady_newton_solve(), and oomph::SegregatableFSIProblem::unsteady_segregated_solve().

◆ sign_of_jacobian()

int & oomph::Problem::sign_of_jacobian ( )
inline

Access function for the sign of the global jacobian matrix. This will be set by the linear solver, if possible (direct solver). If not alternative methods must be used to detect bifurcations (solving the associated eigenproblem).

Definition at line 2424 of file problem.h.

References Sign_of_jacobian.

Referenced by oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::BlockPitchForkLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::solve(), oomph::DenseLU::solve(), oomph::FD_LU::solve(), oomph::SuperLUSolver::solve(), oomph::HSL_MA42::solve_for_one_dof(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), and oomph::SuperLUSolver::solve_transpose().

◆ solve_eigenproblem() [1/2]

void oomph::Problem::solve_eigenproblem ( const unsigned &  n_eval,
Vector< std::complex< double > > &  eigenvalue,
const bool &  steady = true 
)
inline

Solve an eigenproblem as assembled by EigenElements, but only return the eigenvalues, not the eigenvectors. The boolean flag (default true) is used to specify whether the weighted mass-matrix terms from the timestepping scheme should be included in the jacobian.

Definition at line 1937 of file problem.h.

References solve_eigenproblem().

◆ solve_eigenproblem() [2/2]

void oomph::Problem::solve_eigenproblem ( const unsigned &  n_eval,
Vector< std::complex< double > > &  eigenvalue,
Vector< DoubleVector > &  eigenvector,
const bool &  steady = true 
)

Get derivative of an element in the problem wrt a global parameter, used in continuation problems.

Get derivative of an element in the problem wrt a global parameter, to be used in continuation problems.

Solve an eigenproblem as assembled by EigenElements calculate n_eval eigenvalues and return the corresponding eigenvectors. The boolean flag (default true) specifies whether the steady jacobian should be assembled. If the flag is false then the weighted mass-matrix terms from the timestepper will be included in the jacobian — this is almost certainly never wanted.

Solve the eigenproblem

Definition at line 8313 of file problem.cc.

References Eigen_solver_pt, i, oomph::TimeStepper::is_steady(), oomph::TimeStepper::make_steady(), ntime_stepper(), oomph::EigenSolver::solve_eigenproblem(), time_stepper_pt(), and oomph::TimeStepper::undo_make_steady().

Referenced by solve_eigenproblem().

◆ sparse_assemble_row_or_column_compressed()

void oomph::Problem::sparse_assemble_row_or_column_compressed ( Vector< int * > &  column_or_row_index,
Vector< int * > &  row_or_column_start,
Vector< double * > &  value,
Vector< unsigned > &  nnz,
Vector< double * > &  residual,
bool  compressed_row_flag 
)
protectedvirtual

Protected helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column.

This is a (private) helper function that is used to assemble system matrices in compressed row or column format and compute residual vectors. The default action is to assemble the jacobian matrix and residuals for the Newton method. The action can be overloaded at an elemental level by changing the default behaviour of the function Element::get_all_vectors_and_matrices(). column_or_row_index: Column [or row] index of given entry row_or_column_start: Index of first entry for given row [or column] value : Vector of nonzero entries residuals : Residual vector compressed_row_flag: Bool flag to indicate if storage format is compressed row [if false interpretation of arguments is as stated in square brackets]. We provide four different assembly methods, each with different memory requirements/execution speeds. The method is set by the public flag Problem::Sparse_assembly_method.

Definition at line 4484 of file problem.cc.

References Perform_assembly_using_lists, Perform_assembly_using_maps, Perform_assembly_using_two_arrays, Perform_assembly_using_two_vectors, Perform_assembly_using_vectors_of_pairs, sparse_assemble_row_or_column_compressed_with_lists(), sparse_assemble_row_or_column_compressed_with_maps(), sparse_assemble_row_or_column_compressed_with_two_arrays(), sparse_assemble_row_or_column_compressed_with_two_vectors(), sparse_assemble_row_or_column_compressed_with_vectors_of_pairs(), and Sparse_assembly_method.

Referenced by get_eigenproblem_matrices(), and get_jacobian().

◆ sparse_assemble_row_or_column_compressed_with_lists()

void oomph::Problem::sparse_assemble_row_or_column_compressed_with_lists ( Vector< int * > &  column_or_row_index,
Vector< int * > &  row_or_column_start,
Vector< double * > &  value,
Vector< unsigned > &  nnz,
Vector< double * > &  residual,
bool  compressed_row_flag 
)
privatevirtual

Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses lists.

This is a (private) helper function that is used to assemble system matrices in compressed row or column format and compute residual vectors using lists The default action is to assemble the jacobian matrix and residuals for the Newton method. The action can be overloaded at an elemental level by chaging the default behaviour of the function Element::get_all_vectors_and_matrices(). column_or_row_index: Column [or row] index of given entry row_or_column_start: Index of first entry for given row [or column] value : Vector of nonzero entries residuals : Residual vector compressed_row_flag: Bool flag to indicate if storage format is compressed row [if false interpretation of arguments is as stated in square brackets].

Definition at line 4930 of file problem.cc.

References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::AssemblyHandler::get_all_vectors_and_matrices(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, oomph::pause(), Pause_at_end_of_sparse_assembly, Problem_has_been_distributed, recompute_load_balanced_assembly(), and oomph::TimingHelpers::timer().

Referenced by sparse_assemble_row_or_column_compressed().

◆ sparse_assemble_row_or_column_compressed_with_maps()

void oomph::Problem::sparse_assemble_row_or_column_compressed_with_maps ( Vector< int * > &  column_or_row_index,
Vector< int * > &  row_or_column_start,
Vector< double * > &  value,
Vector< unsigned > &  nnz,
Vector< double * > &  residual,
bool  compressed_row_flag 
)
privatevirtual

Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses maps.

This is a (private) helper function that is used to assemble system matrices in compressed row or column format and compute residual vectors, using maps The default action is to assemble the jacobian matrix and residuals for the Newton method. The action can be overloaded at an elemental level by chaging the default behaviour of the function Element::get_all_vectors_and_matrices(). column_or_row_index: Column [or row] index of given entry row_or_column_start: Index of first entry for given row [or column] value : Vector of nonzero entries residuals : Residual vector compressed_row_flag: Bool flag to indicate if storage format is compressed row [if false interpretation of arguments is as stated in square brackets].

Definition at line 4584 of file problem.cc.

References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::AssemblyHandler::get_all_vectors_and_matrices(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, oomph::pause(), Pause_at_end_of_sparse_assembly, Problem_has_been_distributed, recompute_load_balanced_assembly(), and oomph::TimingHelpers::timer().

Referenced by sparse_assemble_row_or_column_compressed().

◆ sparse_assemble_row_or_column_compressed_with_two_arrays()

void oomph::Problem::sparse_assemble_row_or_column_compressed_with_two_arrays ( Vector< int * > &  column_or_row_index,
Vector< int * > &  row_or_column_start,
Vector< double * > &  value,
Vector< unsigned > &  nnz,
Vector< double * > &  residual,
bool  compressed_row_flag 
)
privatevirtual

Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses lists.

This is a (private) helper function that is used to assemble system matrices in compressed row or column format and compute residual vectors using two vectors. The default action is to assemble the jacobian matrix and residuals for the Newton method. The action can be overloaded at an elemental level by chaging the default behaviour of the function Element::get_all_vectors_and_matrices(). column_or_row_index: Column [or row] index of given entry row_or_column_start: Index of first entry for given row [or column] value : Vector of nonzero entries residuals : Residual vector compressed_row_flag: Bool flag to indicate if storage format is compressed row [if false interpretation of arguments is as stated in square brackets].

Definition at line 6061 of file problem.cc.

References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::AssemblyHandler::get_all_vectors_and_matrices(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, oomph::pause(), Pause_at_end_of_sparse_assembly, Problem_has_been_distributed, recompute_load_balanced_assembly(), Sparse_assemble_with_arrays_allocation_increment, Sparse_assemble_with_arrays_initial_allocation, Sparse_assemble_with_arrays_previous_allocation, and oomph::TimingHelpers::timer().

Referenced by sparse_assemble_row_or_column_compressed().

◆ sparse_assemble_row_or_column_compressed_with_two_vectors()

void oomph::Problem::sparse_assemble_row_or_column_compressed_with_two_vectors ( Vector< int * > &  column_or_row_index,
Vector< int * > &  row_or_column_start,
Vector< double * > &  value,
Vector< unsigned > &  nnz,
Vector< double * > &  residual,
bool  compressed_row_flag 
)
privatevirtual

Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses two vectors.

This is a (private) helper function that is used to assemble system matrices in compressed row or column format and compute residual vectors using two vectors. The default action is to assemble the jacobian matrix and residuals for the Newton method. The action can be overloaded at an elemental level by chaging the default behaviour of the function Element::get_all_vectors_and_matrices(). column_or_row_index: Column [or row] index of given entry row_or_column_start: Index of first entry for given row [or column] value : Vector of nonzero entries residuals : Residual vector compressed_row_flag: Bool flag to indicate if storage format is compressed row [if false interpretation of arguments is as stated in square brackets].

Definition at line 5698 of file problem.cc.

References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::AssemblyHandler::get_all_vectors_and_matrices(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, oomph::pause(), Pause_at_end_of_sparse_assembly, Problem_has_been_distributed, recompute_load_balanced_assembly(), and oomph::TimingHelpers::timer().

Referenced by sparse_assemble_row_or_column_compressed().

◆ sparse_assemble_row_or_column_compressed_with_vectors_of_pairs()

void oomph::Problem::sparse_assemble_row_or_column_compressed_with_vectors_of_pairs ( Vector< int * > &  column_or_row_index,
Vector< int * > &  row_or_column_start,
Vector< double * > &  value,
Vector< unsigned > &  nnz,
Vector< double * > &  residual,
bool  compressed_row_flag 
)
privatevirtual

Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses vectors of pairs.

This is a (private) helper function that is used to assemble system matrices in compressed row or column format and compute residual vectors using vectors of pairs The default action is to assemble the jacobian matrix and residuals for the Newton method. The action can be overloaded at an elemental level by chaging the default behaviour of the function Element::get_all_vectors_and_matrices(). column_or_row_index: Column [or row] index of given entry row_or_column_start: Index of first entry for given row [or column] value : Vector of nonzero entries residuals : Residual vector compressed_row_flag: Bool flag to indicate if storage format is compressed row [if false interpretation of arguments is as stated in square brackets].

Definition at line 5345 of file problem.cc.

References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::AssemblyHandler::get_all_vectors_and_matrices(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, oomph::pause(), Pause_at_end_of_sparse_assembly, Problem_has_been_distributed, recompute_load_balanced_assembly(), and oomph::TimingHelpers::timer().

Referenced by sparse_assemble_row_or_column_compressed().

◆ steady_newton_solve()

void oomph::Problem::steady_newton_solve ( unsigned const &  max_adapt = 0)

Solve a steady problem using adaptive Newton's method, but in the context of an overall unstady problem, perhaps to determine an initial condition. This is achieved by setting the weights in the timesteppers to be zero which has the effect of rendering them steady timesteppers. The optional argument max_adapt specifies the max. number of adaptations of all refineable submeshes are performed to achieve the the error targets specified in the refineable submeshes.

Solve a steady problem, in the context of an overall unsteady problem. This is achieved by setting the weights in the timesteppers to be zero which has the effect of rendering them steady timesteppers The optional argument max_adapt specifies the max. number of adaptations of all refineable submeshes are performed to achieve the the error targets specified in the refineable submeshes.

Definition at line 9292 of file problem.cc.

References assign_initial_values_impulsive(), i, oomph::TimeStepper::is_steady(), oomph::NewtonSolverError::iterations, oomph::NewtonSolverError::linear_solver_error, oomph::TimeStepper::make_steady(), Max_newton_iterations, Max_residuals, oomph::NewtonSolverError::maxres, newton_solve(), ntime_stepper(), oomph::oomph_info, time_stepper_pt(), and oomph::TimeStepper::undo_make_steady().

◆ store_current_dof_values()

void oomph::Problem::store_current_dof_values ( )

Store the current values of the degrees of freedom.

Stored the current values of the dofs.

Definition at line 8607 of file problem.cc.

References dof(), Dof_distribution_pt, Dof_pt, i, ndof(), oomph::LinearAlgebraDistribution::nrow_local(), Problem_has_been_distributed, and Saved_dof_pt.

Referenced by calculate_predictions().

◆ symmetrise_eigenfunction_for_adaptive_pitchfork_tracking()

void oomph::Problem::symmetrise_eigenfunction_for_adaptive_pitchfork_tracking ( )
virtual

Virtual function that is used to symmetrise the problem so that the current solution exactly satisfies any symmetries within the system. Used when adpativly solving pitchfork detection problems when small asymmetries in the coarse solution can be magnified leading to very inaccurate answers on the fine mesh. This is always problem-specific and must be filled in by the user The default issues a warning.

Definition at line 10059 of file problem.cc.

◆ synchronise_all_dofs()

void oomph::Problem::synchronise_all_dofs ( )

Perform all required synchronisation in solvers.

Synchronise all dofs by calling the appropriate synchronisation routines for all meshes and the assembly handler.

Definition at line 16439 of file problem.cc.

References assembly_handler_pt(), oomph::AssemblyHandler::synchronise(), and synchronise_dofs().

Referenced by adaptive_unsteady_newton_solve(), add_eigenvector_to_dofs(), assign_eigenvector_to_dofs(), load_balance(), newton_solve(), and newton_solve_continuation().

◆ synchronise_dofs()

void oomph::Problem::synchronise_dofs ( const bool &  do_halos,
const bool &  do_external_halos 
)

◆ synchronise_eqn_numbers()

long oomph::Problem::synchronise_eqn_numbers ( const bool &  assign_local_eqn_numbers = true)

◆ time() [1/2]

double & oomph::Problem::time ( )
virtual

Return the current value of continuous time.

Return the current value of continuous time. If not Time object has been assigned, then throw an error.

Reimplemented from oomph::ExplicitTimeSteppableObject.

Definition at line 11531 of file problem.cc.

References oomph::Time::time(), and Time_pt.

Referenced by oomph::WomersleyProblem< ELEMENT, DIM >::actions_before_implicit_timestep(), calculate_predictions(), read(), oomph::SolidICProblem::set_static_initial_condition(), and oomph::SegregatableFSIProblem::t_spent_on_actual_solve().

◆ time() [2/2]

double oomph::Problem::time ( ) const

Return the current value of continuous time (const version)

Return the current value of continuous time. If not Time object has been assigned, then throw an error. Const version.

Definition at line 11549 of file problem.cc.

References oomph::Time::time(), and Time_pt.

◆ time_adaptive_newton_crash_on_solve_fail()

bool & oomph::Problem::time_adaptive_newton_crash_on_solve_fail ( )
inline

Access function for Time_adaptive_newton_crash_on_solve_fail.

Definition at line 1614 of file problem.h.

References Time_adaptive_newton_crash_on_solve_fail.

◆ time_pt() [1/2]

Time *& oomph::Problem::time_pt ( )
inline

◆ time_pt() [2/2]

Time * oomph::Problem::time_pt ( ) const
inlinevirtual

Return a pointer to the global time object (const version).

Reimplemented from oomph::ExplicitTimeSteppableObject.

Definition at line 1510 of file problem.h.

References Time_pt.

◆ time_stepper_pt() [1/3]

TimeStepper *& oomph::Problem::time_stepper_pt ( )
inline

◆ time_stepper_pt() [2/3]

const TimeStepper * oomph::Problem::time_stepper_pt ( ) const
inline

Access function for the pointer to the first (presumably only) timestepper.

Definition at line 1537 of file problem.h.

References Time_stepper_pt.

◆ time_stepper_pt() [3/3]

TimeStepper *& oomph::Problem::time_stepper_pt ( const unsigned &  i)
inline

Return a pointer to the i-th timestepper.

Definition at line 1549 of file problem.h.

References i, and Time_stepper_pt.

◆ unrefine_uniformly() [1/2]

unsigned oomph::Problem::unrefine_uniformly ( )

Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem. Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level)

Unrefine (all) refineable (sub)mesh(es) uniformly and rebuild problem. Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level)

Definition at line 15831 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ unrefine_uniformly() [2/2]

unsigned oomph::Problem::unrefine_uniformly ( const unsigned &  i_mesh)

Do uniform refinement for submesh i_mesh without documentation. Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level)

Unrefine submesh i_mesh uniformly and rebuild problem. Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level)

Definition at line 15902 of file problem.cc.

References actions_after_adapt(), actions_before_adapt(), assign_eqn_numbers(), mesh_pt(), nsub_mesh(), oomph::oomph_info, and rebuild_global_mesh().

◆ unset_analytic_dparameter()

void oomph::Problem::unset_analytic_dparameter ( double *const &  parameter_pt)
inline

Function to turn off analytic calculation of the parameter derivatives in continuation and bifurcation detection problems.

Definition at line 263 of file problem.h.

References Calculate_dparameter_analytic.

◆ unset_analytic_hessian_products()

void oomph::Problem::unset_analytic_hessian_products ( )
inline

Function to turn off analytic calculation of the parameter derivatives in continuation and bifurcation detection problems.

Definition at line 296 of file problem.h.

References Calculate_hessian_products_analytic.

◆ unset_default_partition_in_load_balance()

void oomph::Problem::unset_default_partition_in_load_balance ( )
inline

Do not use the default partition in the load balance.

Definition at line 1451 of file problem.h.

References Use_default_partition_in_load_balance.

◆ unsteady_newton_solve() [1/3]

void oomph::Problem::unsteady_newton_solve ( const double &  dt)

Advance time by dt and solve by Newton's method. This version always shifts time values.

Do one timestep of size dt using Newton's method with the specified tolerance and linear solver defined as member data of the Problem class. This will be the most commonly used version of unsteady_newton_solve, in which the time values are always shifted This does not include any kind of adaptativity. If the solution fails to converge the program will end.

Definition at line 10953 of file problem.cc.

References unsteady_newton_solve().

Referenced by doubly_adaptive_unsteady_newton_solve_helper(), and unsteady_newton_solve().

◆ unsteady_newton_solve() [2/3]

void oomph::Problem::unsteady_newton_solve ( const double &  dt,
const bool &  shift_values 
)

Advance time by dt and solve the system, using Newton's method. The boolean flag is used to control whether the time values should be shifted. If it is true the current data values will be shifted (copied to the locations where there are stored as previous timesteps) before solution.

Do one timestep forward of size dt using Newton's method with the specified tolerance and linear solver defined via member data of the Problem class. The boolean flag shift_values is used to control whether the time values should be shifted or not.

Definition at line 10966 of file problem.cc.

References actions_after_implicit_timestep(), actions_after_implicit_timestep_and_error_estimation(), oomph::TimeStepper::actions_after_timestep(), actions_before_implicit_timestep(), oomph::TimeStepper::actions_before_timestep(), oomph::Time::dt(), i, oomph::NewtonSolverError::iterations, oomph::NewtonSolverError::linear_solver_error, Max_newton_iterations, Max_residuals, oomph::NewtonSolverError::maxres, newton_solve(), ntime_stepper(), oomph::oomph_info, oomph::TimeStepper::set_weights(), shift_time_values(), oomph::Time::time(), time_pt(), and time_stepper_pt().

◆ unsteady_newton_solve() [3/3]

void oomph::Problem::unsteady_newton_solve ( const double &  dt,
const unsigned &  max_adapt,
const bool &  first,
const bool &  shift = true 
)

Unsteady adaptive Newton solve: up to max_adapt adaptations of all refineable submeshes are performed to achieve the the error targets specified in the refineable submeshes. If first==true, the initial conditions are re-assigned after the mesh adaptations. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued.

Do one timestep, dt, forward using Newton's method with specified tolerance and linear solver specified via member data. Keep adapting on all meshes to criteria specified in these meshes (up to max_adapt adaptations are performed). If first_timestep==true, re-set initial conditions after mesh adaptation. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued.

Definition at line 16072 of file problem.cc.

References adapt(), communicator_pt(), Default_set_initial_condition_called, oomph::oomph_info, Problem_has_been_distributed, set_initial_condition(), oomph::Time::time(), time_pt(), and unsteady_newton_solve().

◆ use_predictor_values_as_initial_guess()

bool & oomph::Problem::use_predictor_values_as_initial_guess ( )
inline

Friends And Related Function Documentation

◆ AugmentedBlockFoldLinearSolver

friend class AugmentedBlockFoldLinearSolver
friend

Definition at line 160 of file problem.h.

Referenced by activate_bifurcation_tracking(), and activate_fold_tracking().

◆ AugmentedBlockPitchForkLinearSolver

Definition at line 161 of file problem.h.

◆ BlockFoldLinearSolver

friend class BlockFoldLinearSolver
friend

Definition at line 158 of file problem.h.

◆ BlockHopfLinearSolver

friend class BlockHopfLinearSolver
friend

Definition at line 162 of file problem.h.

Referenced by activate_hopf_tracking().

◆ BlockPitchForkLinearSolver

friend class BlockPitchForkLinearSolver
friend

Definition at line 159 of file problem.h.

Referenced by activate_pitchfork_tracking().

◆ FoldHandler

friend class FoldHandler
friend

Definition at line 153 of file problem.h.

Referenced by activate_bifurcation_tracking(), and activate_fold_tracking().

◆ HopfHandler

friend class HopfHandler
friend

Definition at line 155 of file problem.h.

Referenced by activate_hopf_tracking().

◆ PeriodicOrbitAssemblyHandler

template<unsigned NNODE_1D>
friend class PeriodicOrbitAssemblyHandler
friend

Definition at line 157 of file problem.h.

◆ PitchForkHandler

friend class PitchForkHandler
friend

Definition at line 154 of file problem.h.

Referenced by activate_pitchfork_tracking().

Member Data Documentation

◆ Always_take_one_newton_step

bool oomph::Problem::Always_take_one_newton_step
protected

Boolean to indicate whether a Newton step should be taken even if the initial residuals are below the required tolerance.

Definition at line 2197 of file problem.h.

Referenced by newton_solve(), and newton_solve_continuation().

◆ Arc_length_step_taken

bool oomph::Problem::Arc_length_step_taken
protected

Boolean to indicate whether an arc-length step has been taken.

Definition at line 799 of file problem.h.

Referenced by arc_length_step_solve(), arc_length_step_solve_helper(), and reset_arc_length_parameters().

◆ Assembly_handler_pt

AssemblyHandler* oomph::Problem::Assembly_handler_pt
private

◆ Base_mesh_element_number_plus_one

std::map<GeneralisedElement*, unsigned> oomph::Problem::Base_mesh_element_number_plus_one
private

Map which stores the correspondence between a root element and its element number (plus one) within the global mesh at the point when it is distributed. NB a root element in this instance is one of the elements in the uniformly-refined mesh at the point when Problem::distribute() is called, since these elements become roots on each of the processors involved in the distribution. Null when element doesn't exist following the adjustment of this when pruning.

Definition at line 538 of file problem.h.

Referenced by distribute(), get_data_to_be_sent_during_load_balancing(), get_flat_packed_refinement_pattern_for_load_balancing(), load_balance(), prune_halo_elements_and_nodes(), read(), refine_distributed_base_mesh(), send_refinement_info_helper(), and setup_base_mesh_info_after_pruning().

◆ Base_mesh_element_pt

Vector<GeneralisedElement*> oomph::Problem::Base_mesh_element_pt
private

Vector to store the correspondence between a root element and its element number within the global mesh at the point when it is distributed. NB a root element in this instance is one of the elements in the uniformly-refined mesh at the point when Problem::distribute() is called, since these elements become roots on each of the processors involved in the distribution. Null when element doesn't exist following the adjustment of this when pruning.

Definition at line 548 of file problem.h.

Referenced by distribute(), dump(), get_data_to_be_sent_during_load_balancing(), load_balance(), prune_halo_elements_and_nodes(), read(), send_data_to_be_sent_during_load_balancing(), and setup_base_mesh_info_after_pruning().

◆ Bifurcation_detection

bool oomph::Problem::Bifurcation_detection
protected

Boolean to control bifurcation detection via determinant of Jacobian.

Definition at line 790 of file problem.h.

Referenced by arc_length_step_solve_helper().

◆ Bisect_to_find_bifurcation

bool oomph::Problem::Bisect_to_find_bifurcation
protected

Boolean to control wheter bisection is used to located bifurcation.

Definition at line 793 of file problem.h.

Referenced by arc_length_step_solve_helper().

◆ Bypass_increase_in_dof_check_during_pruning

bool oomph::Problem::Bypass_increase_in_dof_check_during_pruning
protected

Boolean to bypass check of increase in dofs during pruning.

Definition at line 967 of file problem.h.

Referenced by p_refine_uniformly_aux(), prune_halo_elements_and_nodes(), and refine_uniformly_aux().

◆ Calculate_dparameter_analytic

std::map<double*, bool> oomph::Problem::Calculate_dparameter_analytic
protected

Map used to determine whether the derivatives with respect to a parameter should be finite differenced. The default is that finite differences should be used.

Definition at line 239 of file problem.h.

Referenced by is_dparameter_calculated_analytically(), set_analytic_dparameter(), and unset_analytic_dparameter().

◆ Calculate_hessian_products_analytic

bool oomph::Problem::Calculate_hessian_products_analytic
protected

Map used to determine whether the hessian products should be computed using finite differences. The default is that finite differences will be used.

Definition at line 244 of file problem.h.

Referenced by are_hessian_products_calculated_analytically(), set_analytic_hessian_products(), and unset_analytic_hessian_products().

◆ Communicator_pt

OomphCommunicator* oomph::Problem::Communicator_pt
protected

◆ Continuation_direction

double oomph::Problem::Continuation_direction
protected

The direction of the change in parameter that will ensure that a branch is followed in one direction only.

Definition at line 749 of file problem.h.

Referenced by calculate_continuation_derivatives_helper(), and reset_arc_length_parameters().

◆ Continuation_time_stepper

ContinuationStorageScheme oomph::Problem::Continuation_time_stepper
staticprotected

Storage for the single static continuation timestorage object.

The continuation timestepper object.

Definition at line 761 of file problem.h.

Referenced by arc_length_step_solve(), and set_consistent_pinned_values_for_continuation().

◆ Copy_of_problem_pt

Vector<Problem*> oomph::Problem::Copy_of_problem_pt
protected

Vector of pointers to copies of the problem used in adaptive bifurcation tracking problems (ALH: TEMPORARY HACK, WILL BE FIXED)

Definition at line 234 of file problem.h.

Referenced by adapt(), bifurcation_adapt_helper(), and ~Problem().

◆ Default_assembly_handler_pt

AssemblyHandler* oomph::Problem::Default_assembly_handler_pt
private

Pointer to the default assembly handler.

Definition at line 194 of file problem.h.

Referenced by get_inverse_mass_matrix_times_residuals(), Problem(), reset_assembly_handler_to_default(), and ~Problem().

◆ Default_eigen_solver_pt

EigenSolver* oomph::Problem::Default_eigen_solver_pt
private

Pointer to the default eigensolver.

Definition at line 191 of file problem.h.

Referenced by Problem(), and ~Problem().

◆ Default_linear_solver_pt

LinearSolver* oomph::Problem::Default_linear_solver_pt
private

Pointer to the default linear solver.

Definition at line 188 of file