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

The Problem class. 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
 
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)
 Broken copy constructor. More...
 
void operator= (const Problem &)
 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 ()
 
LinearSolvermass_matrix_solver_for_explicit_timestepper_pt () const
 
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)
 
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)
 
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. 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)
 
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 &)
 Broken copy constructor. More...
 
void operator= (const ExplicitTimeSteppableObject &)
 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 and slaved 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 `slave' 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. 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
 
unsigned Dof_current_offset
 
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
 
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...
 

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
 
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
add_time_stepper_pt(time_stepper_pt);
// Build and assign mesh
Problem::mesh_pt() = new 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;

For time-dependent problems, we can then use

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

or

Definition at line 152 of file problem.h.

Member Typedef Documentation

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

Function pointer for spatial error estimator.

Definition at line 1233 of file problem.h.

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 1237 of file problem.h.

Member Enumeration Documentation

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 641 of file problem.h.

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 819 of file problem.h.

Constructor & Destructor Documentation

oomph::Problem::Problem ( )

Constructor: Allocate space for one time stepper and set all pointers to NULL and set defaults for all parameters.

Constructor: Allocate space for one time stepper and set all pointers to NULL and set defaults for all parameters.

Setup terminate helper

Definition at line 75 of file problem.cc.

References Assembly_handler_pt, oomph::MPI_Helpers::communicator_pt(), Communicator_pt, Default_assembly_handler_pt, Default_eigen_solver_pt, Default_linear_solver_pt, Dof_distribution_pt, Eigen_solver_pt, Linear_solver_pt, Mass_matrix_solver_for_explicit_timestepper_pt, oomph::MPI_Helpers::mpi_has_been_initialised(), oomph::TerminateHelper::setup(), Sub_mesh_pt, Time_stepper_pt, and Use_predictor_values_as_initial_guess.

oomph::Problem::Problem ( const Problem dummy)
inline

Broken copy constructor.

Definition at line 1248 of file problem.h.

References oomph::BrokenCopy::broken_copy().

oomph::Problem::~Problem ( )
virtual

Member Function Documentation

virtual void oomph::Problem::actions_after_adapt ( )
inlinevirtual
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 1134 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().

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

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

Actions to be performed after a (mesh) distribution.

Definition at line 1102 of file problem.h.

Referenced by load_balance(), and prune_halo_elements_and_nodes().

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 1064 of file problem.h.

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 1053 of file problem.h.

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

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 1058 of file problem.h.

Referenced by adaptive_unsteady_newton_solve(), and unsteady_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::WomersleyProblem< ELEMENT, DIM >, oomph::WomersleyProblem< WOMERSLEY_ELEMENT, DIM >, oomph::BiharmonicFluidProblem< DIM >, oomph::SolidICProblem, and oomph::BiharmonicProblem< DIM >.

Definition at line 1021 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().

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 1041 of file problem.h.

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

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 1144 of file problem.h.

Referenced by arc_length_step_solve_helper().

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 1092 of file problem.h.

References Empty_actions_after_read_unstructured_meshes_has_been_called.

Referenced by read().

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 1004 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::HelmholtzMGPreconditioner< DIM >::setup_mg_hierarchy(), oomph::MGSolver< DIM >::setup_mg_hierarchy(), and unrefine_uniformly().

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

Actions to be performed before a (mesh) distribution.

Definition at line 1099 of file problem.h.

Referenced by load_balance(), and prune_halo_elements_and_nodes().

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 1061 of file problem.h.

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 >, and oomph::WomersleyProblem< WOMERSLEY_ELEMENT, DIM >.

Definition at line 1047 of file problem.h.

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

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 `slave' 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 1031 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().

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::WomersleyProblem< ELEMENT, DIM >, oomph::WomersleyProblem< WOMERSLEY_ELEMENT, DIM >, oomph::NonLinearElasticitySmoothMesh< ELEMENT >, oomph::BiharmonicFluidProblem< DIM >, oomph::SolidICProblem, and oomph::BiharmonicProblem< DIM >.

Definition at line 1015 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().

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 1036 of file problem.h.

Referenced by newton_solve(), and newton_solve_continuation().

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 1078 of file problem.h.

References Empty_actions_before_read_unstructured_meshes_has_been_called.

Referenced by read().

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 10037 of file problem.cc.

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

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 10067 of file problem.cc.

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

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 10011 of file problem.cc.

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

Referenced by bifurcation_adapt_helper().

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 10135 of file problem.cc.

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

Referenced by bifurcation_adapt_helper().

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 10163 of file problem.cc.

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

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

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.

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 13429 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::Mesh::nelement(), oomph::LinearAlgebraDistribution::nrow_local(), nsub_mesh(), oomph::oomph_info, rebuild_global_mesh(), oomph::TimingHelpers::timer(), Use_continuation_timestepper, and oomph::Node::x().

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 2734 of file problem.h.

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

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

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 2784 of file problem.h.

References adapt_based_on_error_estimates().

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 10941 of file problem.cc.

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.

Definition at line 10958 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, 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.

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 8704 of file problem.cc.

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

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 1561 of file problem.h.

References Global_data_pt.

unsigned oomph::Problem::add_sub_mesh ( Mesh *const &  mesh_pt)
inline
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.

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 1528 of file problem.cc.

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

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

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 3519 of file problem.cc.

References Dof_pt, and ndof().

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 10210 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.

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

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

bool oomph::Problem::are_hessian_products_calculated_analytically ( )
inline

Function to determine whether the hessian products are calculated analytically.

Definition at line 301 of file problem.h.

References Calculate_hessian_products_analytic.

Referenced by get_hessian_vector_products().

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

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

Definition at line 1505 of file problem.h.

References Assembly_handler_pt.

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 8671 of file problem.cc.

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

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 1965 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(), 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::HelmholtzMGPreconditioner< DIM >::setup_mg_hierarchy(), oomph::MGSolver< DIM >::setup_mg_hierarchy(), oomph::SolidICProblem::setup_problem(), unrefine_uniformly(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().

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

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 11365 of file problem.cc.

References assign_initial_values_impulsive(), and initialise_dt().

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 13410 of file problem.cc.

References bifurcation_adapt_helper().

Referenced by doc_errors().

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 13119 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(), oomph::oomph_info, and symmetrise_eigenfunction_for_adaptive_pitchfork_tracking().

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

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.

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 9991 of file problem.cc.

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

Referenced by bifurcation_adapt_helper().

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

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 1325 of file problem.h.

References oomph::Global_string_for_annotation::string().

Referenced by load_balance().

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 9644 of file problem.cc.

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

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.

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 9721 of file problem.cc.

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

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

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

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

void oomph::Problem::calculate_predictions ( )
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 16269 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.

void oomph::Problem::check_halo_schemes ( )
inline

Check the halo/haloed node/element schemes.

Definition at line 1995 of file problem.h.

References oomph::DocInfo::disable_doc().

Referenced by self_test().

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 858 of file problem.h.

References Elemental_assembly_time, and Must_recompute_load_balance_for_assembly.

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

access function to the oomph-lib communicator

Definition at line 1221 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(), 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(), 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::MumpsSolver::solve(), oomph::HSL_MA42::solve(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::SuperLUSolver::solve(), oomph::BlockPitchForkLinearSolver::solve(), oomph::GS< MATRIX >::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::GS< CRDoubleMatrix >::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::DampedJacobi< MATRIX >::solve(), oomph::GMRES< MATRIX >::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::PitchForkHandler::synchronise(), synchronise_dofs(), unsteady_newton_solve(), oomph::FoldHandler::~FoldHandler(), and oomph::HopfHandler::~HopfHandler().

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

access function to the oomph-lib communicator, const version

Definition at line 1227 of file problem.h.

References Communicator_pt.

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

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

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.

external halo/ed elements/nodes or the "normal" halo/ed ones.

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

Definition at line 16791 of file problem.cc.

References communicator_pt(), e, oomph::Mesh::external_halo_element_pt(), oomph::Mesh::external_halo_node_pt(), oomph::Mesh::external_haloed_element_pt(), oomph::Mesh::external_haloed_node_pt(), oomph::Mesh::halo_node_pt(), oomph::Mesh::haloed_element_pt(), oomph::Mesh::haloed_node_pt(), mesh_pt(), oomph::Mesh::nexternal_halo_element(), oomph::Mesh::nexternal_halo_node(), oomph::Mesh::nexternal_haloed_element(), oomph::Mesh::nexternal_haloed_node(), oomph::Mesh::nhalo_node(), oomph::Mesh::nhaloed_node(), and nsub_mesh().

Referenced by synchronise_eqn_numbers().

void oomph::Problem::deactivate_bifurcation_tracking ( )
inline

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

Definition at line 2228 of file problem.h.

References reset_assembly_handler_to_default().

Referenced by bifurcation_adapt_helper().

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 254 of file problem.h.

References oomph::oomph_info.

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 16221 of file problem.cc.

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

Referenced by load_balance().

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 2334 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.

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 1622 of file problem.h.

References Discontinuous_element_formulation.

void oomph::Problem::disable_doc_imbalance_in_parallel_assembly ( )
inline

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

Definition at line 846 of file problem.h.

References Doc_imbalance_in_parallel_assembly.

void oomph::Problem::disable_globally_convergent_newton_method ( )
inline

disable globally convergent Newton method

Definition at line 1886 of file problem.h.

References Use_globally_convergent_newton_method.

void oomph::Problem::disable_info_in_newton_solve ( )
inline

Disable the output of information when in the newton solver.

Definition at line 2812 of file problem.h.

References Shut_up_in_newton_solve.

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

void oomph::Problem::disable_jacobian_reuse ( )
inline

Disable recycling of Jacobian in Newton iteration.

Definition at line 1859 of file problem.h.

References Jacobian_has_been_computed, and Jacobian_reuse_is_enabled.

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

void oomph::Problem::disable_problem_distributed ( )
inline

Disable problem distributed.

Definition at line 962 of file problem.h.

References Problem_has_been_distributed.

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 1593 of file problem.h.

References Store_local_dof_pt_in_elements.

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 390 of file problem.cc.

References oomph::Mesh::distribute(), e, oomph::Mesh::element_pt(), oomph::Mesh::nelement(), oomph::DocInfo::number(), oomph::oomph_info, oomph::Mesh::set_communicator_pt(), and oomph::TimingHelpers::timer().

Referenced by distribute().

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 370 of file problem.cc.

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

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 334 of file problem.cc.

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

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 313 of file problem.cc.

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

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

If we have MPI return the "problem has been distributed" flag, otherwise it can't be distributed so return false.

Definition at line 798 of file problem.h.

References Problem_has_been_distributed.

Referenced by calculate_predictions(), get_dofs(), oomph::PitchForkHandler::PitchForkHandler(), oomph::BlockPitchForkLinearSolver::resolve(), set_dofs(), and oomph::BlockPitchForkLinearSolver::solve().

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 834 of file problem.h.

References Dist_problem_matrix_distribution.

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

Get max and min error for all elements in submeshes.

Definition at line 2801 of file problem.h.

References oomph::DocInfo::disable_doc().

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

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

i-th dof in the problem (const version)

Definition at line 1702 of file problem.h.

References Dof_pt, and i.

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

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

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

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

Definition at line 1570 of file problem.h.

References Dof_distribution_pt.

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

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

Pointer to i-th dof in the problem.

Definition at line 1708 of file problem.h.

References Dof_pt, and i.

Referenced by oomph::AssemblyHandler::local_problem_dof().

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

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

Definition at line 1711 of file problem.h.

References Dof_pt, and i.

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 2347 of file problem.h.

References doubly_adaptive_unsteady_newton_solve_helper().

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 2380 of file problem.h.

References doubly_adaptive_unsteady_newton_solve_helper().

double oomph::Problem::doubly_adaptive_unsteady_newton_solve_helper ( const double &  dt_desired,
const double &  epsilon,
const unsigned &  max_adapt,
const unsigned &  suppress_resolve_after_spatial_adapt_flag,
const bool &  first,
const bool &  shift_values = 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 11230 of file problem.cc.

References oomph::oomph_info.

Referenced by doubly_adaptive_unsteady_newton_solve().

void oomph::Problem::dump ( std::ofstream &  dump_file) const
virtual
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 1956 of file problem.h.

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

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

Return a pointer to the eigen solver object.

Definition at line 1440 of file problem.h.

References Eigen_solver_pt.

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

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

Definition at line 1443 of file problem.h.

References Eigen_solver_pt.

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 852 of file problem.h.

References Elemental_assembly_time.

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

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 1615 of file problem.h.

References Discontinuous_element_formulation.

void oomph::Problem::enable_doc_imbalance_in_parallel_assembly ( )
inline

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

Definition at line 841 of file problem.h.

References Doc_imbalance_in_parallel_assembly.

void oomph::Problem::enable_globally_convergent_newton_method ( )
inline

enable globally convergent Newton method

Definition at line 1880 of file problem.h.

References Use_globally_convergent_newton_method.

void oomph::Problem::enable_info_in_newton_solve ( )
inline

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

Definition at line 2809 of file problem.h.

References Shut_up_in_newton_solve.

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 1852 of file problem.h.

References Jacobian_has_been_computed, and Jacobian_reuse_is_enabled.

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

void oomph::Problem::enable_problem_distributed ( )
inline

Enable problem distributed.

Definition at line 959 of file problem.h.

References Problem_has_been_distributed.

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

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 1588 of file problem.h.

References Store_local_dof_pt_in_elements.

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

Return a pointer to the explicit timestepper.

Definition at line 1489 of file problem.h.

References Explicit_time_stepper_pt.

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

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

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 1567 of file problem.h.

References Global_data_pt.

void oomph::Problem::flush_sub_meshes ( )
inline
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 14421 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().

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 16243 of file problem.cc.

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

Referenced by setup_dof_halo_scheme().

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.

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 9999 of file problem.cc.

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

Referenced by bifurcation_adapt_helper().

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

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 19048 of file problem.cc.

References oomph::GeneralisedElement::add_internal_data_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(), t, oomph::Node::value(), and oomph::Node::x().

Referenced by load_balance().

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

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

void oomph::Problem::get_dofs ( const unsigned &  t,
DoubleVector dofs 
) const
virtual
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 3640 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().

void oomph::Problem::get_eigenproblem_matrices ( CRDoubleMatrix mass_matrix,
CRDoubleMatrix main_matrix,
const double &  shift = 0.0 
)
virtual
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 7804 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().

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

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

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 19595 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(), and oomph::RefineableElement::root_element_pt().

Referenced by load_balance().

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.

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

void oomph::Problem::get_inverse_mass_matrix_times_residuals ( DoubleVector Mres)
virtual
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 3851 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, oomph::AssemblyHandler::ndof(), 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::MumpsSolver::solve(), oomph::DenseLU::solve(), oomph::CG< MATRIX >::solve(), oomph::TrilinosAztecOOSolver::solve(), oomph::BiCGStab< MATRIX >::solve(), oomph::SuperLUSolver::solve(), oomph::GS< MATRIX >::solve(), oomph::HypreSolver::solve(), oomph::GS< CRDoubleMatrix >::solve(), oomph::DampedJacobi< MATRIX >::solve(), oomph::GMRES< MATRIX >::solve(), oomph::HelmholtzGMRESMG< MATRIX >::solve(), and oomph::HelmholtzFGMRESMG< MATRIX >::solve().

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 3961 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.

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 4167 of file problem.cc.

References oomph::DoubleVector::build(), oomph::CCMatrix< T >::build_without_copy(), oomph::DoubleVector::built(), oomph::LinearAlgebraDistribution::communicator_pt(), 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().

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 1755 of file problem.h.

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 6504 of file problem.cc.

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

Referenced by setup_dof_halo_scheme().

void oomph::Problem::get_residuals ( DoubleVector residuals)
virtual
Data* & oomph::Problem::global_data_pt ( const unsigned &  i)
inline

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

Definition at line 1557 of file problem.h.

References Global_data_pt, and i.

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

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 1648 of file problem.h.

References oomph::DoubleVectorHaloScheme::distribution_pt(), Dof_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().

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 1202 of file problem.h.

References oomph::Global_string_for_annotation::string().

Referenced by adaptive_unsteady_newton_solve().

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 9095 of file problem.cc.

References Dof_pt, get_residuals(), i, and ndof().

Referenced by newton_solve().

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.

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

Definition at line 13001 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().

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.

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

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 280 of file problem.h.

References Calculate_dparameter_analytic.

Referenced by get_derivative_wrt_global_parameter().

bool oomph::Problem::jacobian_reuse_is_enabled ( )
inline

Is recycling of Jacobian in Newton iteration enabled?

Definition at line 1866 of file problem.h.

References Jacobian_reuse_is_enabled.

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

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

Definition at line 1427 of file problem.h.

References Linear_solver_pt.

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 1343 of file problem.h.

References oomph::DocInfo::disable_doc().

Referenced by load_balance(), and read().

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 1364 of file problem.h.

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

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 1383 of file problem.h.

References load_balance().

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 17011 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(), load_balance(), 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.

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

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 11857 of file problem.cc.

Referenced by adapt(), and bifurcation_adapt_helper().

bool oomph::Problem::mass_matrix_reuse_is_enabled ( )
inline

Return whether the mass matrix is being reused.

Definition at line 2444 of file problem.h.

References Mass_matrix_reuse_is_enabled.

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 1431 of file problem.h.

References Mass_matrix_solver_for_explicit_timestepper_pt.

Referenced by get_inverse_mass_matrix_times_residuals().

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 1436 of file problem.h.

References Mass_matrix_solver_for_explicit_timestepper_pt.

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

Access function to max Newton iterations before giving up.

Definition at line 1515 of file problem.h.

References Max_newton_iterations.

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

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

Definition at line 1526 of file problem.h.

References Max_residuals.

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

Access function to max timestep in adaptive timestepping.

Definition at line 1512 of file problem.h.

References Maximum_dt.

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

Return a pointer to the global mesh.

Definition at line 1264 of file problem.h.

References Mesh_pt.

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::RefineableTriangleMesh< ELEMENT >::adapt(), adapt(), adapt_based_on_error_estimates(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_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(), 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_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::HSL_MA42::solve(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::MGSolver< DIM >::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::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* const& oomph::Problem::mesh_pt ( ) const
inline

Return a pointer to the global mesh (const version)

Definition at line 1267 of file problem.h.

References Mesh_pt.

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 1271 of file problem.h.

References Mesh_pt, and Sub_mesh_pt.

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

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

Definition at line 1280 of file problem.h.

References Mesh_pt, and Sub_mesh_pt.

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

Access function to min timestep in adaptive timestepping.

Definition at line 1509 of file problem.h.

References Minimum_dt.

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

Return the number of dofs.

Definition at line 1574 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(), 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::MumpsSolver::solve(), oomph::HSL_MA42::solve(), oomph::DenseLU::solve(), oomph::FD_LU::solve(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::SuperLUSolver::solve(), oomph::GS< MATRIX >::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::GS< CRDoubleMatrix >::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::DampedJacobi< MATRIX >::solve(), oomph::GMRES< MATRIX >::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(), 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().

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

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 16090 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.

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 9323 of file problem.cc.

Referenced by arc_length_step_solve_helper().

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

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 1534 of file problem.h.

References Newton_solver_tolerance.

unsigned oomph::Problem::nglobal_data ( ) const
inline
unsigned oomph::Problem::nsub_mesh ( ) const
inline
unsigned oomph::Problem::ntime_stepper ( ) const
inline
void oomph::Problem::operator= ( const Problem )
inline

Broken assignment operator.

Definition at line 1254 of file problem.h.

References oomph::BrokenCopy::broken_assign().

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.

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 14020 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(), oomph::Mesh::nelement(), nsub_mesh(), oomph::oomph_info, rebuild_global_mesh(), and oomph::TimingHelpers::timer().

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 2756 of file problem.h.

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.

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 14989 of file problem.cc.

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

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.

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

Definition at line 15038 of file problem.cc.

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

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

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.

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

Definition at line 15143 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().

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.

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

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.

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

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 2533 of file problem.h.

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

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 2543 of file problem.h.

References p_refine_uniformly_aux().

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 2580 of file problem.h.

References nsub_mesh(), and p_refine_uniformly().

void oomph::Problem::p_refine_uniformly ( )
inline

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

Definition at line 2610 of file problem.h.

References oomph::DocInfo::disable_doc().

Referenced by p_refine_uniformly().

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

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

Do uniform p-refinement for submesh i_mesh without documentation.

Definition at line 2621 of file problem.h.

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

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 2553 of file problem.h.

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

Referenced by p_refine_uniformly_and_prune().

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 2567 of file problem.h.

References p_refine_uniformly_aux().

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 2593 of file problem.h.

References nsub_mesh(), and p_refine_uniformly_and_prune().

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.

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

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

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

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

/short 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").

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

bool oomph::Problem::problem_has_been_distributed ( )
inline

Access to Problem_has_been_distributed flag.

Definition at line 2056 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().

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

Access function to Problem_is_nonlinear.

Definition at line 1518 of file problem.h.

References Problem_is_nonlinear.

void oomph::Problem::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.

(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 1032 of file problem.cc.

References actions_after_distribute(), actions_before_distribute(), assign_eqn_numbers(), Base_mesh_element_number_plus_one, Base_mesh_element_pt, Bypass_increase_in_dof_check_during_pruning, communicator_pt(), oomph::Global_timings::Doc_comprehensive_timings, e, oomph::Mesh::element_pt(), oomph::GeneralisedElement::is_halo(), mesh_pt(), ndof(), oomph::Mesh::nelement(), nsub_mesh(), oomph::Tree::object_pt(), oomph::oomph_info, Problem_has_been_distributed, oomph::Mesh::prune_halo_elements_and_nodes(), rebuild_global_mesh(), oomph::Tree::root_pt(), setup_base_mesh_info_after_pruning(), oomph::Tree::stick_all_tree_nodes_into_vector(), t, oomph::TimingHelpers::timer(), and oomph::RefineableElement::tree_pt().

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

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 2045 of file problem.h.

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

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.

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 12100 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, 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, oomph::Time::time(), time(), time_pt(), and oomph::TriangleMeshBase::use_triangulateio_restart().

Referenced by read().

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 1944 of file problem.h.

References read().

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

void oomph::Problem::recompute_load_balanced_assembly ( )
private

Helper function to re-assign the first and last elements to be assembled by each processor during parallel assembly for non-distributed problem.

Helper function to re-assign the first and last elements to be assembled by each processor during parallel assembly for non-distributed problem.

Definition at line 1676 of file problem.cc.

References communicator_pt(), e, Elemental_assembly_time, First_el_for_assembly, Last_el_plus_one_for_assembly, Mesh_pt, oomph::Mesh::nelement(), oomph::oomph_info, Shut_up_in_newton_solve, and Sparse_assemble_with_arrays_previous_allocation.

Referenced by 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(), and sparse_assemble_row_or_column_compressed_with_vectors_of_pairs().

void oomph::Problem::refine_distributed_base_mesh ( Vector< Vector< Vector< unsigned > > > &  refinement_info_for_root_elements,
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 19747 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().

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.

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 14710 of file problem.cc.

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

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.

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

Definition at line 14759 of file problem.cc.

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

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

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.

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

Definition at line 14859 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().

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.

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

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.

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

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 2448 of file problem.h.

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

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 2458 of file problem.h.

References refine_uniformly_aux().

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 2487 of file problem.h.

References nsub_mesh(), and refine_uniformly().

void oomph::Problem::refine_uniformly ( )
inline

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

Definition at line 2513 of file problem.h.

References oomph::DocInfo::disable_doc().

Referenced by read(), and refine_uniformly().

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

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

Do uniform refinement for submesh i_mesh without documentation.

Definition at line 2524 of file problem.h.

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

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 2468 of file problem.h.

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

Referenced by refine_uniformly_and_prune().

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 2478 of file problem.h.

References refine_uniformly_aux().

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 2500 of file problem.h.

References nsub_mesh(), and refine_uniformly_and_prune().

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.

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

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 2547 of file problem.cc.

References communicator_pt(), e, oomph::Mesh::element_pt(), oomph::Data::eqn_number(), oomph::Node::hanging_pt(), i, oomph::Node::is_hanging(), oomph::HangInfo::master_node_pt(), oomph::HangInfo::master_weight(), 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::OomphInfo::stream_pt(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().

Referenced by assign_eqn_numbers().

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.

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

Definition at line 3142 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().

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 2286 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.

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

void oomph::Problem::restore_dof_values ( )

Restore the stored values of the degrees of freedom.

Restore the saved dofs.

Definition at line 8609 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().

unsigned oomph::Problem::self_test ( )
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

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 18726 of file problem.cc.

References Base_mesh_element_pt, communicator_pt(), e, i, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), nsub_mesh(), oomph::GeneralisedElement::read_internal_data_values_from_vector(), rebuild_global_mesh(), synchronise_dofs(), and oomph::RefineableElement::tree_pt().

Referenced by load_balance().

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

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 261 of file problem.h.

References Calculate_dparameter_analytic.

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 291 of file problem.h.

References Calculate_hessian_products_analytic.

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

void oomph::Problem::set_default_first_and_last_element_for_assembly ( )

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

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

Definition at line 1597 of file problem.cc.

References communicator_pt(), First_el_for_assembly, Last_el_plus_one_for_assembly, Mesh_pt, oomph::Mesh::nelement(), oomph::oomph_info, Problem_has_been_distributed, and Shut_up_in_newton_solve.

Referenced by assign_eqn_numbers(), and oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix().

void oomph::Problem::set_default_partition_in_load_balance ( )
inline

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

Definition at line 1407 of file problem.h.

References Use_default_partition_in_load_balance.

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 3361 of file problem.cc.

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

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

void oomph::Problem::set_dofs ( const unsigned &  t,
DoubleVector dofs 
)
void oomph::Problem::set_dofs ( const unsigned &  t,
Vector< double * > &  dof_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 1569 of file problem.cc.

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

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

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 1172 of file problem.h.

References Default_set_initial_condition_called.

Referenced by unsteady_newton_solve().

void oomph::Problem::set_pinned_values_to_zero ( )
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 11412 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(), and Sub_mesh_pt.

Referenced by arc_length_step_solve().

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.

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

Definition at line 19860 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().

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

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

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

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 2301 of file problem.h.

References Sign_of_jacobian.

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

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

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 1814 of file problem.h.

References solve_eigenproblem().

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 * > &  residuals,
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 4460 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().

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 * > &  residuals,
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 4912 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, i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, oomph::AssemblyHandler::ndof(), 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().

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 * > &  residuals,
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 4567 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, i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, oomph::AssemblyHandler::ndof(), 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().

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 * > &  residuals,
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 6052 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, i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, oomph::AssemblyHandler::ndof(), 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().

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 * > &  residuals,
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 5686 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, i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, oomph::AssemblyHandler::ndof(), 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().

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 * > &  residuals,
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 5327 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, i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, oomph::AssemblyHandler::ndof(), 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().

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

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

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 9969 of file problem.cc.

Referenced by bifurcation_adapt_helper().

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

void oomph::Problem::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.

external halo/ed elements/nodes or the "normal" halo/ed ones.

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

Definition at line 16328 of file problem.cc.

References oomph::Node::add_values_to_vector(), communicator_pt(), e, oomph::Mesh::external_halo_element_pt(), oomph::Mesh::external_halo_node_pt(), oomph::Mesh::external_haloed_element_pt(), oomph::Mesh::external_haloed_node_pt(), oomph::Mesh::halo_node_pt(), oomph::Mesh::haloed_element_pt(), oomph::Mesh::haloed_node_pt(), mesh_pt(), oomph::Mesh::nexternal_halo_element(), oomph::Mesh::nexternal_halo_node(), oomph::Mesh::nexternal_haloed_element(), oomph::Mesh::nexternal_haloed_node(), oomph::Mesh::nhalo_node(), oomph::Mesh::nhaloed_node(), and nsub_mesh().

Referenced by send_data_to_be_sent_during_load_balancing(), and synchronise_all_dofs().

long oomph::Problem::synchronise_eqn_numbers ( const bool &  assign_local_eqn_numbers = true)
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 11377 of file problem.cc.

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

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

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 11392 of file problem.cc.

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

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

Access function for Time_adaptive_newton_crash_on_solve_fail.

Definition at line 1529 of file problem.h.

References Time_adaptive_newton_crash_on_solve_fail.

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

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

Reimplemented from oomph::ExplicitTimeSteppableObject.

Definition at line 1449 of file problem.h.

References Time_pt.

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

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

Definition at line 1473 of file problem.h.

References Time_stepper_pt.

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

Return a pointer to the i-th timestepper.

Definition at line 1485 of file problem.h.

References i, and Time_stepper_pt.

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

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

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 266 of file problem.h.

References Calculate_dparameter_analytic.

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.

void oomph::Problem::unset_default_partition_in_load_balance ( )
inline

Do not use the default partition in the load balance.

Definition at line 1411 of file problem.h.

References Use_default_partition_in_load_balance.

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 10843 of file problem.cc.

Referenced by unsteady_newton_solve().

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

void oomph::Problem::unsteady_newton_solve ( const double &  dt,
const unsigned &  max_adapt,
const bool &  first_timestep,
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 15945 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().

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

Friends And Related Function Documentation

friend class AugmentedBlockFoldLinearSolver
friend

Definition at line 162 of file problem.h.

Referenced by activate_bifurcation_tracking(), and activate_fold_tracking().

Definition at line 163 of file problem.h.

friend class BlockFoldLinearSolver
friend

Definition at line 160 of file problem.h.

friend class BlockHopfLinearSolver
friend

Definition at line 164 of file problem.h.

Referenced by activate_hopf_tracking().

friend class BlockPitchForkLinearSolver
friend

Definition at line 161 of file problem.h.

Referenced by activate_pitchfork_tracking().

friend class FoldHandler
friend

Definition at line 155 of file problem.h.

Referenced by activate_bifurcation_tracking(), and activate_fold_tracking().

friend class HopfHandler
friend

Definition at line 157 of file problem.h.

Referenced by activate_hopf_tracking().

template<unsigned NNODE_1D>
friend class PeriodicOrbitAssemblyHandler
friend

Definition at line 159 of file problem.h.

friend class PitchForkHandler
friend

Definition at line 156 of file problem.h.

Referenced by activate_pitchfork_tracking().

Member Data Documentation

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 2076 of file problem.h.

Referenced by newton_solve(), and newton_solve_continuation().

bool oomph::Problem::Arc_length_step_taken
protected

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

Definition at line 788 of file problem.h.

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

AssemblyHandler* oomph::Problem::Assembly_handler_pt
private
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 534 of file problem.h.

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

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 544 of file problem.h.

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

bool oomph::Problem::Bifurcation_detection
protected

Boolean to control bifurcation detection via determinant of Jacobian.

Definition at line 779 of file problem.h.

Referenced by arc_length_step_solve_helper().

bool oomph::Problem::Bisect_to_find_bifurcation
protected

Boolean to control wheter bisection is used to located bifurcation.

Definition at line 782 of file problem.h.

Referenced by arc_length_step_solve_helper().

bool oomph::Problem::Bypass_increase_in_dof_check_during_pruning
protected

Boolean to bypass check of increase in dofs during pruning.

Definition at line 954 of file problem.h.

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

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 243 of file problem.h.

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

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 248 of file problem.h.

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

OomphCommunicator* oomph::Problem::Communicator_pt
protected
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 738 of file problem.h.

Referenced by calculate_continuation_derivatives_helper(), and reset_arc_length_parameters().

ContinuationStorageScheme oomph::Problem::Continuation_time_stepper
staticprotected

Storage for the single static continuation timestorage object.

The continuation timestepper object.

Definition at line 750 of file problem.h.

Referenced by arc_length_step_solve(), and set_consistent_pinned_values_for_continuation().

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 238 of file problem.h.

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

AssemblyHandler* oomph::Problem::Default_assembly_handler_pt
private

Pointer to the default assembly handler.

Definition at line 197 of file problem.h.

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

EigenSolver* oomph::Problem::Default_eigen_solver_pt
private

Pointer to the default eigensolver.

Definition at line 194 of file problem.h.

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

LinearSolver* oomph::Problem::Default_linear_solver_pt
private

Pointer to the default linear solver.

Definition at line 191 of file problem.h.

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

bool oomph::Problem::Default_set_initial_condition_called
private

Has default set_initial_condition function been called? Default: false.

Definition at line 214 of file problem.h.

Referenced by set_initial_condition(), and unsteady_newton_solve().

unsigned oomph::Problem::Desired_newton_iterations_ds
protected

The desired number of Newton Steps to reach convergence at each step along the arc.

Definition at line 773 of file problem.h.

Referenced by arc_length_step_solve_helper().

double oomph::Problem::Desired_proportion_of_arc_length
protected

Proportion of the arc-length to taken by the parameter.

Definition at line 727 of file problem.h.

Referenced by calculate_continuation_derivatives(), and calculate_continuation_derivatives_fd().

bool oomph::Problem::Discontinuous_element_formulation
protected

Is the problem a discontinuous one, i.e. can the elemental contributions be treated independently. Default: false.

Definition at line 693 of file problem.h.

Referenced by disable_discontinuous_formulation(), disable_mass_matrix_reuse(), enable_discontinuous_formulation(), enable_mass_matrix_reuse(), and get_inverse_mass_matrix_times_residuals().

Distributed_problem_matrix_distribution oomph::Problem::Dist_problem_matrix_distribution
private

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 942 of file problem.h.

Referenced by distributed_problem_matrix_distribution(), get_eigenproblem_matrices(), get_jacobian(), and get_residuals().

bool oomph::Problem::Doc_imbalance_in_parallel_assembly
private

Boolean to switch on assessment of load imbalance in parallel assembly of distributed problem.

Definition at line 506 of file problem.h.

Referenced by disable_doc_imbalance_in_parallel_assembly(), and enable_doc_imbalance_in_parallel_assembly().

bool oomph::Problem::Doc_time_in_distribute
protected

Protected boolean flag to provide comprehensive timimings during problem distribution. Initialised to false.

Definition at line 634 of file problem.h.

Vector<double> oomph::Problem::Dof_current
protected

Storage for the present values of the variables.

Definition at line 766 of file problem.h.

Referenced by adapt(), arc_length_step_solve_helper(), calculate_continuation_derivatives_fd_helper(), and dof_current().

unsigned oomph::Problem::Dof_current_offset
protected

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)

Definition at line 760 of file problem.h.

Referenced by dof_current().

Vector<double> oomph::Problem::Dof_derivative
protected

Storage for the derivative of the problem variables wrt arc-length.

Definition at line 763 of file problem.h.

Referenced by adapt(), arc_length_step_solve_helper(), calculate_continuation_derivatives_helper(), dof_derivative(), and reset_arc_length_parameters().

unsigned oomph::Problem::Dof_derivative_offset
protected

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)

Definition at line 755 of file problem.h.

Referenced by dof_derivative().

LinearAlgebraDistribution* oomph::Problem::Dof_distribution_pt
protected

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.

Definition at line 457 of file problem.h.

Referenced by adapt(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), arc_length_step_solve_helper(), assign_eqn_numbers(), calculate_continuation_derivatives_fd_helper(), calculate_continuation_derivatives_helper(), dof_distribution_pt(), oomph::FoldHandler::FoldHandler(), get_dofs(), get_eigenproblem_matrices(), get_hessian_vector_products(), get_jacobian(), get_residuals(), oomph::HopfHandler::HopfHandler(), ndof(), newton_solve(), newton_solve_continuation(), oomph::PitchForkHandler::PitchForkHandler(), Problem(), restore_dof_values(), setup_dof_halo_scheme(), setup_element_count_per_dof(), oomph::FoldHandler::solve_augmented_block_system(), oomph::PitchForkHandler::solve_augmented_block_system(), oomph::FoldHandler::solve_block_system(), oomph::PitchForkHandler::solve_block_system(), oomph::HopfHandler::solve_complex_system(), oomph::FoldHandler::solve_full_system(), oomph::PitchForkHandler::solve_full_system(), oomph::HopfHandler::solve_full_system(), oomph::HopfHandler::solve_standard_system(), store_current_dof_values(), synchronise_eqn_numbers(), oomph::FoldHandler::~FoldHandler(), oomph::HopfHandler::~HopfHandler(), oomph::PitchForkHandler::~PitchForkHandler(), and ~Problem().

Vector<double*> oomph::Problem::Dof_pt
protected
double oomph::Problem::Ds_current
protected

Storage for the current step value.

Definition at line 769 of file problem.h.

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

double oomph::Problem::DTSF_max_increase
protected

Maximum possible increase of dt between time-steps in adaptive schemes.

Definition at line 706 of file problem.h.

Referenced by adaptive_unsteady_newton_solve().

double oomph::Problem::DTSF_min_decrease
protected

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

Definition at line 711 of file problem.h.

Referenced by adaptive_unsteady_newton_solve().

EigenSolver* oomph::Problem::Eigen_solver_pt
private

Pointer to the eigen solver for the problem.

Definition at line 185 of file problem.h.

Referenced by eigen_solver_pt(), Problem(), and solve_eigenproblem().

DoubleVectorWithHaloEntries oomph::Problem::Element_count_per_dof
protected

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.

Definition at line 557 of file problem.h.

Referenced by setup_element_count_per_dof().

Vector<double> oomph::Problem::Elemental_assembly_time
protected
bool oomph::Problem::Empty_actions_after_read_unstructured_meshes_has_been_called
private

Boolean to indicate that empty actions_after_read_unstructured_meshes() function has been called.

Definition at line 225 of file problem.h.

Referenced by actions_after_read_unstructured_meshes(), and read().

bool oomph::Problem::Empty_actions_before_read_unstructured_meshes_has_been_called
private

Boolean to indicate that empty actions_before_read_unstructured_meshes() function has been called.

Definition at line 221 of file problem.h.

Referenced by actions_before_read_unstructured_meshes(), and read().

ExplicitTimeStepper* oomph::Problem::Explicit_time_stepper_pt
private

Pointer to a single explicit timestepper.

Definition at line 207 of file problem.h.

Referenced by explicit_time_stepper_pt(), and set_explicit_time_stepper_pt().

double oomph::Problem::FD_step_used_in_get_hessian_vector_products
protected

Definition at line 679 of file problem.h.

Referenced by get_hessian_vector_products().

Vector<unsigned> oomph::Problem::First_el_for_assembly
private
bool oomph::Problem::First_jacobian_sign_change
protected

Boolean to indicate whether a sign change has occured in the Jacobian.

Definition at line 785 of file problem.h.

Referenced by arc_length_step_solve_helper(), and reset_arc_length_parameters().

Vector<Data*> oomph::Problem::Global_data_pt
private

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.

Definition at line 423 of file problem.h.

Referenced by add_global_data(), assign_eqn_numbers(), assign_initial_values_impulsive(), calculate_predictions(), copy(), describe_dofs(), does_pointer_correspond_to_problem_data(), dump(), flush_global_data(), get_dofs(), global_data_pt(), nglobal_data(), read(), self_test(), set_consistent_pinned_values_for_continuation(), set_dofs(), set_pinned_values_to_zero(), set_timestepper_for_all_data(), and shift_time_values().

Vector<double*> oomph::Problem::Halo_dof_pt
protected

Storage for the halo degrees of freedom (only required) when accessing via the global equation number in distributed problems.

Definition at line 578 of file problem.h.

Referenced by global_dof_pt(), and setup_dof_halo_scheme().

DoubleVectorHaloScheme* oomph::Problem::Halo_scheme_pt
protected
bool oomph::Problem::Jacobian_has_been_computed
protected

Has a Jacobian been computed (and can therefore be re-used if required)? Default: false.

Definition at line 619 of file problem.h.

Referenced by disable_jacobian_reuse(), enable_jacobian_reuse(), and newton_solve().

bool oomph::Problem::Jacobian_reuse_is_enabled
protected

Is re-use of Jacobian in Newton iteration enabled? Default: false.

Definition at line 615 of file problem.h.

Referenced by disable_jacobian_reuse(), enable_jacobian_reuse(), jacobian_reuse_is_enabled(), and newton_solve().

Vector<unsigned> oomph::Problem::Last_el_plus_one_for_assembly
private
LinearSolver* oomph::Problem::Linear_solver_pt
private
bool oomph::Problem::Mass_matrix_has_been_computed
protected

Has the mass matrix been computed (and can therefore be reused) Default: false.

Definition at line 688 of file problem.h.

Referenced by disable_mass_matrix_reuse(), enable_mass_matrix_reuse(), and get_inverse_mass_matrix_times_residuals().

bool oomph::Problem::Mass_matrix_reuse_is_enabled
protected

Is re-use of the mass matrix in explicit timestepping enabled Default:false.

Definition at line 684 of file problem.h.

Referenced by disable_mass_matrix_reuse(), enable_mass_matrix_reuse(), get_inverse_mass_matrix_times_residuals(), and mass_matrix_reuse_is_enabled().

LinearSolver* oomph::Problem::Mass_matrix_solver_for_explicit_timestepper_pt
private

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

Definition at line 182 of file problem.h.

Referenced by mass_matrix_solver_for_explicit_timestepper_pt(), and Problem().

unsigned oomph::Problem::Max_newton_iterations
protected

Maximum number of Newton iterations.

Definition at line 596 of file problem.h.

Referenced by max_newton_iterations(), newton_solve(), newton_solve_continuation(), steady_newton_solve(), and unsteady_newton_solve().

double oomph::Problem::Max_permitted_error_for_halo_check

Threshold for error throwing in Problem::check_halo_schemes()

Definition at line 2053 of file problem.h.

Referenced by check_halo_schemes().

Vector<double> oomph::Problem::Max_res
protected

Maximum residuals at start and after each newton iteration.

Definition at line 603 of file problem.h.

Referenced by newton_solve().

double oomph::Problem::Max_residuals
protected

Maximum desired residual: if the maximum residual exceeds this value, the program will exit.

Definition at line 607 of file problem.h.

Referenced by max_residuals(), newton_solve(), newton_solve_continuation(), steady_newton_solve(), and unsteady_newton_solve().

double oomph::Problem::Maximum_dt
protected

Maximum desired dt.

Definition at line 702 of file problem.h.

Referenced by adaptive_unsteady_newton_solve(), and maximum_dt().

Mesh* oomph::Problem::Mesh_pt
private
double oomph::Problem::Minimum_ds
protected

Minimum desired value of arc-length.

Definition at line 776 of file problem.h.

Referenced by arc_length_step_solve_helper().

double oomph::Problem::Minimum_dt
protected

Minimum desired dt: if dt falls below this value, exit.

Definition at line 699 of file problem.h.

Referenced by adaptive_unsteady_newton_solve(), and minimum_dt().

double oomph::Problem::Minimum_dt_but_still_proceed
protected

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.

Definition at line 718 of file problem.h.

Referenced by adaptive_unsteady_newton_solve().

bool oomph::Problem::Must_recompute_load_balance_for_assembly
private
double oomph::Problem::Newton_solver_tolerance
protected
unsigned oomph::Problem::Nnewton_iter_taken
protected

Actual number of Newton iterations taken during the most recent iteration.

Definition at line 600 of file problem.h.

Referenced by newton_solve().

double oomph::Problem::Numerical_zero_for_sparse_assembly
protected
unsigned oomph::Problem::Parallel_sparse_assemble_previous_allocation
private

The amount of data allocated during the previous parallel sparse assemble. Used to optimise the next call to parallel_sparse_assemble()

Definition at line 946 of file problem.h.

Referenced by assign_eqn_numbers().

double oomph::Problem::Parameter_current
protected

Storage for the present value of the global parameter.

Definition at line 744 of file problem.h.

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

double oomph::Problem::Parameter_derivative
protected
bool oomph::Problem::Pause_at_end_of_sparse_assembly
protected

Protected boolean flag to halt program execution during sparse assemble process to assess peak memory usage. Initialised to false (obviously!)

Definition at line 630 of file problem.h.

Referenced by 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(), and sparse_assemble_row_or_column_compressed_with_vectors_of_pairs().

bool oomph::Problem::Problem_has_been_distributed
protected
bool oomph::Problem::Problem_is_nonlinear
protected

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.

Definition at line 625 of file problem.h.

Referenced by newton_solve(), problem_is_nonlinear(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::ProjectionProblem(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().

double oomph::Problem::Relaxation_factor
protected

Relaxation fator for Newton method (only a fractional Newton correction is applied if this is less than 1; default 1).

Definition at line 589 of file problem.h.

Referenced by newton_solve().

Vector<double>* oomph::Problem::Saved_dof_pt
private

Pointer to vector for backup of dofs.

Definition at line 210 of file problem.h.

Referenced by restore_dof_values(), and store_current_dof_values().

bool oomph::Problem::Scale_arc_length
protected

Boolean to control whether arc-length should be scaled.

Definition at line 724 of file problem.h.

Referenced by calculate_continuation_derivatives(), and calculate_continuation_derivatives_fd().

bool oomph::Problem::Shut_up_in_newton_solve
int oomph::Problem::Sign_of_jacobian
protected

Storage for the sign of the global Jacobian.

Definition at line 734 of file problem.h.

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

unsigned oomph::Problem::Sparse_assemble_with_arrays_allocation_increment
protected

the number of elements to add to a matrix row when the initial allocation is exceeded within the sparse_assemble_with_two_arrays(...) method.

Definition at line 657 of file problem.h.

Referenced by sparse_assemble_row_or_column_compressed_with_two_arrays().

unsigned oomph::Problem::Sparse_assemble_with_arrays_initial_allocation
protected

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

Definition at line 652 of file problem.h.

Referenced by sparse_assemble_row_or_column_compressed_with_two_arrays().

Vector<Vector<unsigned> > oomph::Problem::Sparse_assemble_with_arrays_previous_allocation
protected
unsigned oomph::Problem::Sparse_assembly_method
protected

Flag to determine which sparse assembly method to use By default we use assembly by vectors of pairs.

Definition at line 638 of file problem.h.

Referenced by sparse_assemble_row_or_column_compressed().

bool oomph::Problem::Store_local_dof_pt_in_elements
private

Boolean to indicate whether local dof pointers should be stored in the elements.

Definition at line 229 of file problem.h.

Referenced by assign_eqn_numbers(), disable_store_local_dof_pt_in_elements(), enable_store_local_dof_pt_in_elements(), and synchronise_eqn_numbers().

Vector<Mesh*> oomph::Problem::Sub_mesh_pt
private
bool oomph::Problem::Suppress_warning_about_actions_before_read_unstructured_meshes
static
Initial value:
=
false

Flag to allow suppression of warning messages re reading in unstructured meshes during restart.

Instantiation of public flag to allow suppression of warning messages re reading in unstructured meshes during restart.

Definition at line 313 of file problem.h.

Referenced by read().

double oomph::Problem::Theta_squared
protected

Value of the scaling parameter required so that the parameter occupies the desired proportion of the arc length.

Definition at line 731 of file problem.h.

Referenced by calculate_continuation_derivatives(), calculate_continuation_derivatives_fd(), calculate_continuation_derivatives_fd_helper(), calculate_continuation_derivatives_helper(), newton_solve_continuation(), and reset_arc_length_parameters().

bool oomph::Problem::Time_adaptive_newton_crash_on_solve_fail
protected

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.

Definition at line 612 of file problem.h.

Referenced by adaptive_unsteady_newton_solve(), and time_adaptive_newton_crash_on_solve_fail().

Time* oomph::Problem::Time_pt
private

Pointer to global time for the problem.

Definition at line 200 of file problem.h.

Referenced by add_time_stepper_pt(), initialise_dt(), set_explicit_time_stepper_pt(), shift_time_values(), time(), time_pt(), and ~Problem().

Vector<TimeStepper*> oomph::Problem::Time_stepper_pt
private

The Vector of time steppers (there could be many different ones in multiphysics problems)

Definition at line 204 of file problem.h.

Referenced by add_time_stepper_pt(), calculate_predictions(), ntime_stepper(), Problem(), and time_stepper_pt().

double oomph::Problem::Timestep_reduction_factor_after_nonconvergence
protected

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.

Definition at line 2081 of file problem.h.

Referenced by adaptive_unsteady_newton_solve().

bool oomph::Problem::Use_continuation_timestepper
protected

Boolean to control original or new storage of dof stuff.

Definition at line 747 of file problem.h.

Referenced by adapt(), arc_length_step_solve(), arc_length_step_solve_helper(), calculate_continuation_derivatives_helper(), dof_current(), and dof_derivative().

bool oomph::Problem::Use_default_partition_in_load_balance
private

Flag to use "default partition" during load balance. Should only be set to true when run in validation mode.

Definition at line 510 of file problem.h.

Referenced by load_balance(), set_default_partition_in_load_balance(), and unset_default_partition_in_load_balance().

bool oomph::Problem::Use_finite_differences_for_continuation_derivatives
protected

Boolean to specify which scheme to use to calculate the continuation derivatievs

Definition at line 792 of file problem.h.

Referenced by arc_length_step_solve_helper().

bool oomph::Problem::Use_globally_convergent_newton_method
private

Use the globally convergent newton method.

Definition at line 217 of file problem.h.

Referenced by disable_globally_convergent_newton_method(), enable_globally_convergent_newton_method(), and newton_solve().

bool oomph::Problem::Use_predictor_values_as_initial_guess
private

Use values from the time stepper predictor as an initial guess.

Definition at line 232 of file problem.h.

Referenced by Problem(), and use_predictor_values_as_initial_guess().


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