////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// More...
#include <problem.h>
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 ¶meter_pt) |
Function to turn on analytic calculation of the parameter derivatives in continuation and bifurcation detection problems. More... | |
void | unset_analytic_dparameter (double *const ¶meter_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 ¶meter_pt) |
Function to determine whether the parameter derivatives are calculated analytically. More... | |
void | set_analytic_hessian_products () |
Function to turn on analytic calculation of the parameter derivatives in continuation and bifurcation detection problems. More... | |
void | unset_analytic_hessian_products () |
Function to turn off analytic calculation of the parameter derivatives in continuation and bifurcation detection problems. More... | |
bool | are_hessian_products_calculated_analytically () |
Function to determine whether the hessian products are calculated analytically. More... | |
void | set_pinned_values_to_zero () |
Set all pinned values to zero. Used to set boundary conditions to be homogeneous in the copy of the problem used in adaptive bifurcation tracking (ALH: TEMPORARY HACK, WILL BE FIXED) More... | |
bool | distributed () const |
If we have MPI return the "problem has been distributed" flag, otherwise it can't be distributed so return false. More... | |
Distributed_problem_matrix_distribution & | distributed_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... | |
OomphCommunicator * | communicator_pt () |
access function to the oomph-lib communicator More... | |
const OomphCommunicator * | communicator_pt () const |
access function to the oomph-lib communicator, const version More... | |
Problem () | |
Constructor: Allocate space for one time stepper and set all pointers to NULL and set defaults for all parameters. More... | |
Problem (const Problem &dummy)=delete | |
Broken copy constructor. More... | |
void | operator= (const Problem &)=delete |
Broken assignment operator. More... | |
virtual | ~Problem () |
Virtual destructor to clean up memory. More... | |
Mesh *& | mesh_pt () |
Return a pointer to the global mesh. More... | |
Mesh *const & | mesh_pt () const |
Return a pointer to the global mesh (const version) More... | |
Mesh *& | mesh_pt (const unsigned &imesh) |
Return a pointer to the i-th submesh. If there are no submeshes, the 0-th submesh is the global mesh itself. More... | |
Mesh *const & | mesh_pt (const unsigned &imesh) const |
Return a pointer to the i-th submesh (const version) More... | |
unsigned | nsub_mesh () const |
Return number of submeshes. More... | |
unsigned | add_sub_mesh (Mesh *const &mesh_pt) |
Add a submesh to the problem and return its number, i, by which it can be accessed via mesh_pt(i). More... | |
void | flush_sub_meshes () |
Flush the problem's collection of sub-meshes. Must be followed by call to rebuild_global_mesh(). More... | |
void | build_global_mesh () |
Build the global mesh by combining the all the submeshes. Note: The nodes boundary information refers to the boundary numbers within the submesh! More... | |
void | rebuild_global_mesh () |
If one of the submeshes has changed (e.g. by mesh adaptation) we need to update the global mesh. Note: The nodes boundary information refers to the boundary numbers within the submesh! More... | |
virtual void | build_mesh () |
Function to build the Problem's base mesh; this must be supplied by the user if they wish to use the load_balance() functionality, which is only available to problems that have already been distributed. If the problem has multiple meshes, each mesh must be built, added as as a submesh, and a call to build_global_mesh() must be made in this function. On return from this function all meshes must have been refined to the same level that they were in the when Problem::distribute() was first called. More... | |
void | load_balance () |
Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. More... | |
void | load_balance (const bool &report_stats) |
Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. Produce explicit stats of load balancing process if boolean, report_stats, is set to true. More... | |
void | load_balance (DocInfo &doc_info, const bool &report_stats) |
Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. Produce explicit stats of load balancing process if boolean, report_stats, is set to true. More... | |
void | load_balance (DocInfo &doc_info, const bool &report_stats, const Vector< unsigned > &input_target_domain_for_local_non_halo_element) |
Balance the load of a (possibly non-uniformly refined) problem that has already been distributed, by re-distributing elements over processors. Produce explicit stats of load balancing process if boolean, report_stats, is set to true and doc various bits of data (mainly for debugging) in directory specified by DocInfo object. If final input vector is non-zero-sized it provides an imposed partitioning. More... | |
void | set_default_partition_in_load_balance () |
Set the use of the default partition in the load balance. More... | |
void | unset_default_partition_in_load_balance () |
Do not use the default partition in the load balance. More... | |
void | refine_distributed_base_mesh (Vector< Vector< Vector< unsigned >>> &to_be_refined_on_each_root, const unsigned &max_level_overall) |
Load balance helper routine: refine each new base (sub)mesh based upon the elements to be refined within each tree at each root on the current processor. More... | |
LinearSolver *& | linear_solver_pt () |
Return a pointer to the linear solver object. More... | |
LinearSolver *const & | linear_solver_pt () const |
Return a pointer to the linear solver object (const version) More... | |
LinearSolver *& | mass_matrix_solver_for_explicit_timestepper_pt () |
Return a pointer to the linear solver object used for explicit time stepping. More... | |
LinearSolver * | mass_matrix_solver_for_explicit_timestepper_pt () const |
Return a pointer to the linear solver object used for explicit time stepping (const version). More... | |
EigenSolver *& | eigen_solver_pt () |
Return a pointer to the eigen solver object. More... | |
EigenSolver *const & | eigen_solver_pt () const |
Return a pointer to the eigen solver object (const version) More... | |
Time *& | time_pt () |
Return a pointer to the global time object. More... | |
Time * | time_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 TimeStepper * | time_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... | |
double & | target_error_safety_factor () |
Access function to the safety factor 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... | |
void | create_new_linear_algebra_distribution (LinearAlgebraDistribution *&dist_pt) |
Get new linear algebra distribution (you're in charge of deleting it!) More... | |
LinearAlgebraDistribution *const & | dof_distribution_pt () const |
Return the pointer to the dof distribution (read-only) More... | |
unsigned long | ndof () const |
Return the number of dofs. More... | |
unsigned | ntime_stepper () const |
Return the number of time steppers. More... | |
unsigned | nglobal_data () const |
Return the number of global data values. More... | |
unsigned | self_test () |
Self-test: Check meshes and global data. Return 0 for OK. More... | |
void | enable_store_local_dof_pt_in_elements () |
Insist that local dof pointers are set up in each element when equation numbering takes place. More... | |
void | disable_store_local_dof_pt_in_elements () |
Insist that local dof pointers are NOT set up in each element when equation numbering takes place (the default) More... | |
unsigned long | assign_eqn_numbers (const bool &assign_local_eqn_numbers=true) |
Assign all equation numbers for problem: Deals with global data (= data that isn't attached to any elements) and then does the equation numbering for the elements. Virtual so it can be overloaded in MPI problems. Bool argument can be set to false to ignore assigning local equation numbers (found to be necessary in the parallel implementation of locate_zeta between multiple meshes). More... | |
void | describe_dofs (std::ostream &out= *(oomph_info.stream_pt())) const |
Function to describe the dofs in terms of the global equation number, i.e. what type of value (nodal value of a Node; value in a Data object; value of internal Data in an element; etc) is the unknown with a certain global equation number. Output stream defaults to oomph_info. More... | |
void | enable_discontinuous_formulation () |
Indicate that the problem involves discontinuous elements This allows for a more efficiently assembly and inversion of the mass matrix. More... | |
void | disable_discontinuous_formulation () |
Disable the use of a discontinuous-element formulation. Note that the methods will all still work even if the elements are discontinuous, we will just be assembling a larger system matrix than necessary. More... | |
void | get_dofs (DoubleVector &dofs) const |
Return the vector of dofs, i.e. a vector containing the current values of all unknowns. More... | |
void | get_dofs (const unsigned &t, DoubleVector &dofs) const |
Return vector of the t'th history value of all dofs. More... | |
void | set_dofs (const DoubleVector &dofs) |
Set the values of the dofs. More... | |
void | set_dofs (const unsigned &t, DoubleVector &dofs) |
Set the history values of the dofs. More... | |
void | set_dofs (const unsigned &t, Vector< double * > &dof_pt) |
Set history values of dofs from the type of vector stored in problem::Dof_pt. More... | |
void | add_to_dofs (const double &lambda, const DoubleVector &increment_dofs) |
Add lambda x incremenet_dofs[l] to the l-th dof. More... | |
double * | global_dof_pt (const unsigned &i) |
Return a pointer to the dof, indexed by global equation number which may be haloed or stored locally. If it is haloed, a local copy must have been requested on this processor in the Halo_scheme_pt. More... | |
double & | dof (const unsigned &i) |
i-th dof in the problem More... | |
double | dof (const unsigned &i) const |
i-th dof in the problem (const version) More... | |
double *& | dof_pt (const unsigned &i) |
Pointer to i-th dof in the problem. More... | |
double * | dof_pt (const unsigned &i) const |
Pointer to i-th dof in the problem (const version) More... | |
virtual void | get_inverse_mass_matrix_times_residuals (DoubleVector &Mres) |
Return the residual vector multiplied by the inverse mass matrix Virtual so that it can be overloaded for mpi problems. More... | |
virtual void | get_dvaluesdt (DoubleVector &f) |
Get the time derivative of all values (using get_inverse_mass_matrix_times_residuals(..) with all time steppers set to steady) e.g. for use in explicit time steps. The approach used is slighty hacky, beware if you have a residual which is non-linear or implicit in the derivative or if you have overloaded get_jacobian(...). More... | |
virtual void | get_residuals (DoubleVector &residuals) |
Return the fully-assembled residuals Vector for the problem: Virtual so it can be overloaded in for mpi problems. More... | |
virtual void | get_jacobian (DoubleVector &residuals, DenseDoubleMatrix &jacobian) |
Return the fully-assembled Jacobian and residuals for the problem Interface for the case when the Jacobian matrix is dense. This is virtual so, if we feel like it (e.g. for testing iterative solvers with specific test matrices, we can bypass the default assembly procedure for the Jacobian and the residual vector. More... | |
virtual void | get_jacobian (DoubleVector &residuals, CRDoubleMatrix &jacobian) |
Return the fully-assembled Jacobian and residuals for the problem. Interface for the case when the Jacobian is in row-compressed storage format. This is virtual so, if we feel like it (e.g. for testing iterative solvers with specific test matrices), we can bypass the default assembly procedure for the Jacobian and the residual vector. More... | |
virtual void | get_jacobian (DoubleVector &residuals, CCDoubleMatrix &jacobian) |
Return the fully-assembled Jacobian and residuals for the problem. Interface for the case when the Jacobian is in column-compressed storage format. This is virtual so, if we feel like it (e.g. for testing iterative solvers with specific test matrices), we can bypass the default assembly procedure for the Jacobian and the residual vector. More... | |
virtual void | get_jacobian (DoubleVector &residuals, SumOfMatrices &jacobian) |
Dummy virtual function that must be overloaded by the problem to specify which matrices should be summed to give the final Jacobian. More... | |
void | get_fd_jacobian (DoubleVector &residuals, DenseMatrix< double > &jacobian) |
Return the fully-assembled Jacobian and residuals, generated by finite differences. More... | |
void | get_derivative_wrt_global_parameter (double *const ¶meter_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 >> &alpha, Vector< double > &beta, Vector< DoubleVector > &eigenvector_real, Vector< DoubleVector > &eigenvector_imag, const bool &steady=true) |
Solve an eigenproblem as assembled by the Problem's constituent elements. Calculate (at least) 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. The eigenvalues and eigenvectors are, in general, complex. Eigenvalues may be infinite and are therefore returned as where is complex while is real. The actual eigenvalues may then be computed by doing the division, checking for zero betas to avoid NaNs. There's a convenience wrapper to this function that simply computes these eigenvalues regardless. That version may die in NaN checking is enabled (via the fenv.h header and the associated feenable function). More... | |
void | solve_eigenproblem (const unsigned &n_eval, Vector< std::complex< double >> &eigenvalue, Vector< DoubleVector > &eigenvector_real, Vector< DoubleVector > &eigenvector_imag, const bool &steady=true) |
Solve an eigenproblem as assembled by the Problem's constituent elements. Calculate (at least) 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. Note that the eigenvalues and eigenvectors are, in general, complex and the eigenvalues may be infinite. In this case it's safer to use the other version of this function which returns the eigenvalues in terms of a fractional representation. More... | |
void | solve_eigenproblem (const unsigned &n_eval, Vector< std::complex< double >> &eigenvalue, const bool &make_timesteppers_steady=true) |
Solve an eigenproblem as assembled by the Problem's constituent elements but only return the eigenvalues, not the eigenvectors. At least n_eval eigenvalues are computed. 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 — this is almost certainly never wanted. Note that the eigenvalues may be infinite. In this case it's safer to use the other version of this function which returns the eigenvalues in terms of a fractional representation. More... | |
void | solve_eigenproblem (const unsigned &n_eval, Vector< std::complex< double >> &alpha, Vector< double > &beta, const bool &steady=true) |
Solve an eigenproblem as assembled by the Problem's constituent elements but only return the eigenvalues, not the eigenvectors. At least n_eval eigenvalues are computed. 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 — this is almost certainly never wanted. Note that the eigenvalues may be infinite and are therefore returned as where is complex while is real. The actual eigenvalues may then be computed by doing the division, checking for zero betas to avoid NaNs. More... | |
void | solve_adjoint_eigenproblem (const unsigned &n_eval, Vector< std::complex< double >> &eigenvalue, Vector< DoubleVector > &eigenvector_real, Vector< DoubleVector > &eigenvector_imag, const bool &steady=true) |
Solve an adjoint eigenvalue problem using the same procedure as solve_eigenproblem. See the documentation on that function for more details. More... | |
void | solve_adjoint_eigenproblem (const unsigned &n_eval, Vector< std::complex< double >> &eigenvalue, const bool &steady=true) |
Solve an adjoint eigenvalue problem using the same procedure as solve_eigenproblem but only return the eigenvalues, not the eigenvectors. At least n_eval eigenvalues are computed. See the documentation on that function for more details. 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 Problem * | make_copy () |
Make and return a pointer to the copy of the problem. A virtual function that must be filled in by the user is they wish to perform adaptive refinement in bifurcation tracking or in multigrid problems. ALH: WILL NOT BE NECESSARY IN BIFURCATION TRACKING IN LONG RUN... More... | |
virtual void | read (std::ifstream &restart_file, bool &unsteady_restart) |
Read refinement pattern of all refineable meshes and refine them accordingly, then read all Data and nodal position info from file for restart. Return flag to indicate if the restart was from steady or unsteady solution. More... | |
virtual void | read (std::ifstream &restart_file) |
Read refinement pattern of all refineable meshes and refine them accordingly, then read all Data and nodal position info from file for restart. More... | |
virtual void | dump (std::ofstream &dump_file) const |
Dump refinement pattern of all refineable meshes and all generic Problem data to file for restart. More... | |
void | dump (const std::string &dump_file_name) const |
Dump refinement pattern of all refineable meshes and all generic Problem data to file for restart. More... | |
void | get_all_halo_data (std::map< unsigned, double * > &map_of_halo_data) |
Get pointers to all possible halo data indexed by global equation number in a map. More... | |
long | synchronise_eqn_numbers (const bool &assign_local_eqn_numbers=true) |
Classify any non-classified nodes into halo/haloed and synchronise equation numbers. Return the total number of degrees of freedom in the overall problem. More... | |
void | synchronise_dofs (const bool &do_halos, const bool &do_external_halos) |
Synchronise the degrees of freedom by overwriting the haloed values with their non-halo counterparts held on other processors. Bools control if we deal with data associated with external halo/ed elements/nodes or the "normal" halo/ed ones. More... | |
void | synchronise_all_dofs () |
Perform all required synchronisation in solvers. More... | |
void | check_halo_schemes (DocInfo &doc_info) |
Check the halo/haloed node/element schemes. More... | |
void | check_halo_schemes () |
Check the halo/haloed node/element schemes. More... | |
Vector< unsigned > | distribute (const Vector< unsigned > &element_partition, DocInfo &doc_info, const bool &report_stats=false) |
Distribute the problem and doc, using the specified partition; returns a vector which details the partitioning. More... | |
Vector< unsigned > | distribute (DocInfo &doc_info, const bool &report_stats=false) |
Distribute the problem; returns a vector which details the partitioning. More... | |
Vector< unsigned > | distribute (const Vector< unsigned > &element_partition, const bool &report_stats=false) |
Distribute the problem using the specified partition; returns a vector which details the partitioning. More... | |
Vector< unsigned > | distribute (const bool &report_stats=false) |
Distribute the problem; returns a vector which details the partitioning. More... | |
virtual void | partition_global_mesh (Mesh *&global_mesh_pt, DocInfo &doc_info, Vector< unsigned > &element_domain, const bool &report_stats=false) |
Partition the global mesh, return vector specifying the processor number for each element. Virtual so that it can be overloaded by any user; the default is to use METIS to perform the partitioning (with a bit of cleaning up afterwards to sort out "special cases"). More... | |
void | prune_halo_elements_and_nodes (DocInfo &doc_info, const bool &report_stats) |
(Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called. More... | |
void | prune_halo_elements_and_nodes (const bool &report_stats=false) |
(Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called. More... | |
bool | problem_has_been_distributed () |
Access to Problem_has_been_distributed flag. More... | |
void | delete_all_external_storage () |
Wrapper function to delete external storage for each submesh of the problem. More... | |
virtual void | symmetrise_eigenfunction_for_adaptive_pitchfork_tracking () |
Virtual function that is used to symmetrise the problem so that the current solution exactly satisfies any symmetries within the system. Used when adpativly solving pitchfork detection problems when small asymmetries in the coarse solution can be magnified leading to very inaccurate answers on the fine mesh. This is always problem-specific and must be filled in by the user The default issues a warning. More... | |
double * | bifurcation_parameter_pt () const |
Return pointer to the parameter that is used in the bifurcation detection. If we are not tracking a bifurcation then an error will be thrown by the AssemblyHandler. More... | |
void | get_bifurcation_eigenfunction (Vector< DoubleVector > &eigenfunction) |
Return the eigenfunction calculated as part of a bifurcation tracking process. If we are not tracking a bifurcation then an error will be thrown by the AssemblyHandler. More... | |
void | activate_fold_tracking (double *const ¶meter_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 ¶meter_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 ¶meter_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 ¶meter_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 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 ¶meter_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 ¶meter_pt, const double &omega, const DoubleVector &null_real, const DoubleVector &null_imag, const bool &block_solve=true) |
Turn on Hopf bifurcation tracking using the augmented system specified in the HopfHandler class. After a call to this function subsequent calls of the standard solution methods will converge to a Hopf bifuraction at a particular value of the variable addressed by parameter_pt. The system may not converge if the initial guess is sufficiently poor or, alternatively, if finite differencing is used to calculate the jacobian matrix in the elements. This interface allows specification of an inital guess for the frequency and real and imaginary parts of the null vector, such as might be obtained from an eigensolve. More... | |
void | deactivate_bifurcation_tracking () |
Deactivate all bifuraction tracking, by reseting the assembly handler to the default. More... | |
void | reset_assembly_handler_to_default () |
Reset the system to the standard non-augemented state. More... | |
double | arc_length_step_solve (double *const ¶meter_pt, const double &ds, const unsigned &max_adapt=0) |
Solve a steady problem using arc-length continuation, when the parameter that becomes a variable corresponding to the arc-length constraint equation is an external double: parameter_pt is a pointer to that double, ds is the desired arc_length and max_adapt is the maximum number of spatial adaptations (default zero, no adaptation). More... | |
double | arc_length_step_solve (Data *const &data_pt, const unsigned &data_index, const double &ds, const unsigned &max_adapt=0) |
Solve a steady problem using arc-length continuation, when the variable corresponding to the arc-length constraint equation is already stored in data used in the problem: data_pt is a pointer to the appropriate data object, data_index is the index of the value that will be traded for the constriant, ds is the desired arc_length and max_adapt is the maximum number of spatial adaptations (default zero, no adaptation). Note that the value must be pinned in order for this formulation to work. More... | |
void | reset_arc_length_parameters () |
Reset the "internal" arc-length continuation parameters, so as to allow continuation in another parameter. N.B. The parameters that are reset are the "minimum" that are required, others should perhaps be reset, depending upon the application. More... | |
int & | sign_of_jacobian () |
Access function for the sign of the global jacobian matrix. This will be set by the linear solver, if possible (direct solver). If not alternative methods must be used to detect bifurcations (solving the associated eigenproblem). More... | |
void | explicit_timestep (const double &dt, const bool &shift_values=true) |
Take an explicit timestep of size dt and optionally shift any stored values of the time history. More... | |
void | unsteady_newton_solve (const double &dt) |
Advance time by dt and solve by Newton's method. This version always shifts time values. More... | |
void | unsteady_newton_solve (const double &dt, const bool &shift_values) |
Advance time by dt and solve the system, using Newton's method. The boolean flag is used to control whether the time values should be shifted. If it is true the current data values will be shifted (copied to the locations where there are stored as previous timesteps) before solution. More... | |
void | unsteady_newton_solve (const double &dt, const unsigned &max_adapt, const bool &first, const bool &shift=true) |
Unsteady adaptive Newton solve: up to max_adapt adaptations of all refineable submeshes are performed to achieve the the error targets specified in the refineable submeshes. If first==true, the initial conditions are re-assigned after the mesh adaptations. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued. More... | |
double | doubly_adaptive_unsteady_newton_solve (const double &dt, const double &epsilon, const unsigned &max_adapt, const bool &first, const bool &shift=true) |
Unsteady "doubly" adaptive Newton solve: Does temporal adaptation first, i.e. we try to do a timestep with an increment of dt, and adjusting dt until the solution on the given mesh satisfies the temporal error measure with tolerance epsilon. Following this, we do up to max_adapt spatial adaptions (without re-examining the temporal error). If first==true, the initial conditions are re-assigned after the mesh adaptations. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued. More... | |
double | doubly_adaptive_unsteady_newton_solve (const double &dt, const double &epsilon, const unsigned &max_adapt, const unsigned &suppress_resolve_after_spatial_adapt_flag, const bool &first, const bool &shift=true) |
Unsteady "doubly" adaptive Newton solve: Does temporal adaptation first, i.e. we try to do a timestep with an increment of dt, and adjusting dt until the solution on the given mesh satisfies the temporal error measure with tolerance epsilon. Following this, we do up to max_adapt spatial adaptions (without re-examining the temporal error). If first==true, the initial conditions are re-assigned after the mesh adaptations. Shifting of time can be suppressed by overwriting the default value of shift (true). [Shifting must be done if first_timestep==true because we're constantly re-assigning the initial conditions; if first_timestep==true and shift==false shifting is performed anyway and a warning is issued. Pseudo-Boolean flag suppress_resolve_after_spatial_adapt [0: false; 1: true] does what it says.]. More... | |
double | adaptive_unsteady_newton_solve (const double &dt_desired, const double &epsilon) |
Attempt to advance timestep by dt_desired. If the solution fails the timestep will be halved until convergence is achieved, or the timestep falls below NewtonSolverParameters::Minimum_time_step. The error control parameter epsilon represents the (approximate) desired magnitude of the global error at each timestep. The routine returns a double that is the suggested next timestep and should be passed as dt_desired the next time the routine is called. This version always shifts the time values. More... | |
double | adaptive_unsteady_newton_solve (const double &dt_desired, const double &epsilon, const bool &shift_values) |
Attempt to advance timestep by dt_desired. If the solution fails the timestep will be halved until convergence is achieved, or the timestep falls below NewtonSolverParameters::Minimum_time_step. The error control parameter epsilon represents the (approximate) desired magnitude of the global error at each timestep. The routine returns a double that is the suggested next timestep and should be passed as dt_desired the next time the routine is called. Once again the boolean flag, shift_values, is used to control whether the time values are shifted. More... | |
void | assign_initial_values_impulsive () |
Initialise data and nodal positions to simulate impulsive start from initial configuration/solution. More... | |
void | assign_initial_values_impulsive (const double &dt) |
Initialise data and nodal positions to simulate an impulsive start and also set the initial and previous values of dt. More... | |
void | calculate_predictions () |
Calculate predictions. More... | |
void | enable_mass_matrix_reuse () |
Enable recycling of the mass matrix in explicit timestepping schemes. Useful for timestepping on fixed meshes when you want to avoid the linear solve phase. More... | |
void | disable_mass_matrix_reuse () |
Turn off recyling of the mass matrix in explicit timestepping schemes. More... | |
bool | mass_matrix_reuse_is_enabled () |
Return whether the mass matrix is being reused. More... | |
void | refine_uniformly (const Vector< unsigned > &nrefine_for_mesh) |
Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem. More... | |
void | refine_uniformly (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info) |
Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process. More... | |
void | refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh) |
Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem. Prune after refinements. More... | |
void | refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info) |
Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process. More... | |
void | refine_uniformly (DocInfo &doc_info) |
Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process. More... | |
void | refine_uniformly_and_prune (DocInfo &doc_info) |
Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process. More... | |
void | refine_uniformly () |
Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem. More... | |
void | refine_uniformly (const unsigned &i_mesh, DocInfo &doc_info) |
Do uniform refinement for submesh i_mesh with documentation. More... | |
void | refine_uniformly (const unsigned &i_mesh) |
Do uniform refinement for submesh i_mesh without documentation. More... | |
void | p_refine_uniformly (const Vector< unsigned > &nrefine_for_mesh) |
p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem More... | |
void | p_refine_uniformly (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info) |
p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process More... | |
void | p_refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh) |
p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem. Prune after refinements More... | |
void | p_refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info) |
p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process More... | |
void | p_refine_uniformly (DocInfo &doc_info) |
p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process. More... | |
void | p_refine_uniformly_and_prune (DocInfo &doc_info) |
p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process. More... | |
void | p_refine_uniformly () |
p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem More... | |
void | p_refine_uniformly (const unsigned &i_mesh, DocInfo &doc_info) |
Do uniform p-refinement for submesh i_mesh with documentation. More... | |
void | p_refine_uniformly (const unsigned &i_mesh) |
Do uniform p-refinement for submesh i_mesh without documentation. More... | |
void | refine_selected_elements (const Vector< unsigned > &elements_to_be_refined) |
Refine (one and only!) mesh by splitting the elements identified by their numbers relative to the problems' only mesh, then rebuild the problem. More... | |
void | refine_selected_elements (const Vector< RefineableElement * > &elements_to_be_refined_pt) |
Refine (one and only!) mesh by splitting the elements identified by their pointers, then rebuild the problem. More... | |
void | refine_selected_elements (const unsigned &i_mesh, const Vector< unsigned > &elements_to_be_refined) |
Refine specified submesh by splitting the elements identified by their numbers relative to the submesh, then rebuild the problem. More... | |
void | refine_selected_elements (const unsigned &i_mesh, const Vector< RefineableElement * > &elements_to_be_refined_pt) |
Refine specified submesh by splitting the elements identified by their pointers, then rebuild the problem. More... | |
void | refine_selected_elements (const Vector< Vector< unsigned >> &elements_to_be_refined) |
Refine all submeshes by splitting the elements identified by their numbers relative to each submesh in a Vector of Vectors, then rebuild the problem. More... | |
void | refine_selected_elements (const Vector< Vector< RefineableElement * >> &elements_to_be_refined_pt) |
Refine all submeshes by splitting the elements identified by their pointers within each submesh in a Vector of Vectors, then rebuild the problem. More... | |
void | p_refine_selected_elements (const Vector< unsigned > &elements_to_be_refined) |
p-refine (one and only!) mesh by refining the elements identified by their numbers relative to the problems' only mesh, then rebuild the problem. More... | |
void | p_refine_selected_elements (const Vector< PRefineableElement * > &elements_to_be_refined_pt) |
p-refine (one and only!) mesh by refining the elements identified by their pointers, then rebuild the problem. More... | |
void | p_refine_selected_elements (const unsigned &i_mesh, const Vector< unsigned > &elements_to_be_refined) |
p-refine specified submesh by refining the elements identified by their numbers relative to the submesh, then rebuild the problem. More... | |
void | p_refine_selected_elements (const unsigned &i_mesh, const Vector< PRefineableElement * > &elements_to_be_refined_pt) |
p-refine specified submesh by refining the elements identified by their pointers, then rebuild the problem. More... | |
void | p_refine_selected_elements (const Vector< Vector< unsigned >> &elements_to_be_refined) |
p-refine all submeshes by refining the elements identified by their numbers relative to each submesh in a Vector of Vectors, then rebuild the problem. More... | |
void | p_refine_selected_elements (const Vector< Vector< PRefineableElement * >> &elements_to_be_refined_pt) |
p-refine all submeshes by refining the elements identified by their pointers within each submesh in a Vector of Vectors, then rebuild the problem. More... | |
unsigned | unrefine_uniformly () |
Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem. Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level) More... | |
unsigned | unrefine_uniformly (const unsigned &i_mesh) |
Do uniform refinement for submesh i_mesh without documentation. Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level) More... | |
void | p_unrefine_uniformly (DocInfo &doc_info) |
p-unrefine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem. More... | |
void | p_unrefine_uniformly (const unsigned &i_mesh, DocInfo &doc_info) |
Do uniform p-unrefinement for submesh i_mesh without documentation. More... | |
void | adapt (unsigned &n_refined, unsigned &n_unrefined) |
Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again. More... | |
void | adapt () |
Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. On return from this function, Problem can immediately be solved again. [Argument-free wrapper]. More... | |
void | p_adapt (unsigned &n_refined, unsigned &n_unrefined) |
p-adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again. More... | |
void | p_adapt () |
p-adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. On return from this function, Problem can immediately be solved again. [Argument-free wrapper] More... | |
void | adapt_based_on_error_estimates (unsigned &n_refined, unsigned &n_unrefined, Vector< Vector< double >> &elemental_error) |
Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on the error estimates in elemental_error and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again. More... | |
void | adapt_based_on_error_estimates (Vector< Vector< double >> &elemental_error) |
Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on the error estimates in elemental_error and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again. [Wrapper without n_refined and n_unrefined arguments]. More... | |
void | get_all_error_estimates (Vector< Vector< double >> &elemental_error) |
Return the error estimates computed by (all) refineable (sub)mesh(es) in the elemental_error structure, which consists of a vector of vectors of elemental errors, one vector for each (sub)mesh. More... | |
void | doc_errors (DocInfo &doc_info) |
Get max and min error for all elements in submeshes. More... | |
void | doc_errors () |
Get max and min error for all elements in submeshes. More... | |
void | enable_info_in_newton_solve () |
Enable the output of information when in the newton solver (Default) More... | |
void | disable_info_in_newton_solve () |
Disable the output of information when in the newton solver. More... | |
Public Member Functions inherited from oomph::ExplicitTimeSteppableObject | |
ExplicitTimeSteppableObject () | |
Empty constructor. More... | |
ExplicitTimeSteppableObject (const ExplicitTimeSteppableObject &)=delete | |
Broken copy constructor. More... | |
void | operator= (const ExplicitTimeSteppableObject &)=delete |
Broken assignment operator. More... | |
virtual | ~ExplicitTimeSteppableObject () |
Empty destructor. More... | |
virtual void | actions_before_explicit_stage () |
Empty virtual function to do anything needed before a stage of an explicit time step (Runge-Kutta steps contain multiple stages per time step, most others only contain one). More... | |
virtual void | actions_after_explicit_stage () |
Empty virtual function that should be overloaded to update any dependent data or boundary conditions that should be advanced after each stage of an explicit time step (Runge-Kutta steps contain multiple stages per time step, most others only contain one). More... | |
Public Attributes | |
double | Max_permitted_error_for_halo_check |
Threshold for error throwing in Problem::check_halo_schemes() More... | |
bool | Shut_up_in_newton_solve |
Boolean to indicate if all output is suppressed in Problem::newton_solve(). Defaults to false. More... | |
Static Public Attributes | |
static bool | Suppress_warning_about_actions_before_read_unstructured_meshes |
Flag to allow suppression of warning messages re reading in unstructured meshes during restart. More... | |
Protected Types | |
enum | Assembly_method { Perform_assembly_using_vectors_of_pairs , Perform_assembly_using_two_vectors , Perform_assembly_using_maps , Perform_assembly_using_lists , Perform_assembly_using_two_arrays } |
Enumerated flags to determine which sparse assembly method is used. More... | |
Protected Member Functions | |
unsigned | setup_element_count_per_dof () |
Function that populates the Element_counter_per_dof vector with the number of elements that contribute to each dof. For example, with linear elements in 1D each dof contains contributions from two elements apart from those on the boundary. Returns the total number of elements in the problem. More... | |
void | setup_dof_halo_scheme () |
Function that is used to setup the halo scheme. More... | |
virtual void | sparse_assemble_row_or_column_compressed (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag) |
Protected helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. More... | |
virtual void | actions_before_newton_solve () |
Any actions that are to be performed before a complete Newton solve (e.g. adjust boundary conditions). CAREFUL: This step should (and if the FD-based LinearSolver FD_LU is used, must) only update values that are pinned! More... | |
virtual void | actions_after_newton_solve () |
Any actions that are to be performed after a complete Newton solve, e.g. post processing. CAREFUL: This step should (and if the FD-based LinearSolver FD_LU is used, must) only update values that are pinned! More... | |
virtual void | actions_before_newton_convergence_check () |
Any actions that are to be performed before the residual is checked in the Newton method, e.g. update any boundary conditions that depend upon variables of the problem; update any ‘dependent’ variables; or perform an update of the nodal positions in SpineMeshes etc. CAREFUL: This step should (and if the FD-based LinearSolver FD_LU is used, must) only update values that are pinned! More... | |
virtual void | actions_before_newton_step () |
Any actions that are to be performed before each individual Newton step. Most likely to be used for diagnostic purposes to doc the solution during a non-converging iteration, say. More... | |
virtual void | actions_after_newton_step () |
Any actions that are to be performed after each individual Newton step. Most likely to be used for diagnostic purposes to doc the solution during a non-converging iteration, say. More... | |
virtual void | actions_before_implicit_timestep () |
Actions that should be performed before each implicit time step. This is needed when one wants to solve a steady problem before timestepping and needs to distinguish between the two cases. More... | |
virtual void | actions_after_implicit_timestep () |
Actions that should be performed after each implicit time step. This is needed when one wants to solve a steady problem before timestepping and needs to distinguish between the two cases. More... | |
virtual void | actions_after_implicit_timestep_and_error_estimation () |
Actions that should be performed after each implicit time step. This is needed if your actions_after_implicit_timestep() modify the solution in a way that affects the error estimate. More... | |
virtual void | actions_before_explicit_timestep () |
Actions that should be performed before each explicit time step. More... | |
virtual void | actions_after_explicit_timestep () |
Actions that should be performed after each explicit time step. More... | |
virtual void | actions_before_read_unstructured_meshes () |
Actions that are to be performed before reading in restart data for problems involving unstructured bulk meshes. If the problem contains such meshes we need to strip out any face elements that are attached to them because restart of unstructured meshes re-creates their elements and nodes from scratch, leading to dangling pointers from the face elements to the old elements and nodes. This function is virtual and (practically) empty but toggles a flag to indicate that it has been called. This is used to issue a warning, prompting the user to consider overloading it if the problem is found to contain unstructured bulk meshes during restarts. More... | |
virtual void | actions_after_read_unstructured_meshes () |
Actions that are to be performed before reading in restart data for problems involving unstructured bulk meshes. Typically used to re-attach FaceElements, say, that were stripped out in actions_before_read_unstructured_meshes(). This function is virtual and (practically) empty but toggles a flag to indicate that it has been called. This is used to issue a warning, prompting the user to consider overloading it if the problem is found to contain unstructured bulk meshes during restarts. More... | |
virtual void | actions_before_distribute () |
Actions to be performed before a (mesh) distribution. More... | |
virtual void | actions_after_distribute () |
Actions to be performed after a (mesh) distribution. More... | |
virtual void | actions_after_change_in_global_parameter (double *const ¶meter_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 ¶meter_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 ¶meter_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 ¶meter_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 ¶meter_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 ¶meter_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 ¶meter_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... | |
LinearAlgebraDistribution * | Dof_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... | |
DoubleVectorHaloScheme * | Halo_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 | Target_error_safety_factor |
Safety factor to ensure we are aiming for a target error, TARGET, that is below our tolerance: TARGET = Target_error_safety_factor * TOL For this to make sense Target_error_safety_factor should be <1.0. If Keep_temporal_error_below_tolerance is set to true (default) then, without this, timesteps suggested by the adaptive time-stepper can be expected to lead to rejection (because the error exceeds TOL) about half of the time. Harier et al. (1993, ISBN:978-3-540-56670-0, p168) suggest a value around 0.25-0.40 to be the most efficient, however this is highly problem and timestepper dependent and sometimes as high as 0.95 may be effective at improving the robustness of timestep prediction. More... | |
double | Minimum_dt_but_still_proceed |
If Minimum_dt_but_still_proceed positive, then dt will not be reduced below this value during adaptive timestepping and the computation will continue with this value, accepting the larger errors that this will incur). Note: This option is disabled by default as this value is initialised to -1.0. More... | |
bool | Scale_arc_length |
Boolean to control whether arc-length should be scaled. More... | |
double | Desired_proportion_of_arc_length |
Proportion of the arc-length to taken by the parameter. More... | |
double | Theta_squared |
Value of the scaling parameter required so that the parameter occupies the desired proportion of the arc length. NOTE: If you wish to change this then make sure to set the value of Scale_arc_length to false to ensure the value of this isn't overwritten during the arc-length process. Instead of changing this variable, it's better to actually update the Desired_proportion_of_arc_length value. More... | |
int | Sign_of_jacobian |
Storage for the sign of the global Jacobian. More... | |
double | Continuation_direction |
The direction of the change in parameter that will ensure that a branch is followed in one direction only. More... | |
double | Parameter_derivative |
Storage for the derivative of the global parameter wrt arc-length. More... | |
double | Parameter_current |
Storage for the present value of the global parameter. More... | |
bool | Use_continuation_timestepper |
Boolean to control original or new storage of dof stuff. More... | |
unsigned | Dof_derivative_offset |
Storage for the offset for the continuation derivatives from the original dofs (default is 1, but this will be differnet when continuing bifurcations and periodic orbits) More... | |
unsigned | Dof_current_offset |
Storage for the offset for the current values of dofs from the original dofs (default is 2, but this will be differnet when continuing bifurcations and periodic orbits) More... | |
Vector< double > | Dof_derivative |
Storage for the derivative of the problem variables wrt arc-length. More... | |
Vector< double > | Dof_current |
Storage for the present values of the variables. More... | |
double | Ds_current |
Storage for the current step value. More... | |
unsigned | Desired_newton_iterations_ds |
The desired number of Newton Steps to reach convergence at each step along the arc. More... | |
double | Minimum_ds |
Minimum desired value of arc-length. More... | |
bool | Bifurcation_detection |
Boolean to control bifurcation detection via determinant of Jacobian. More... | |
bool | Bisect_to_find_bifurcation |
Boolean to control wheter bisection is used to located bifurcation. More... | |
bool | First_jacobian_sign_change |
Boolean to indicate whether a sign change has occured in the Jacobian. More... | |
bool | Arc_length_step_taken |
Boolean to indicate whether an arc-length step has been taken. More... | |
bool | Use_finite_differences_for_continuation_derivatives |
Boolean to specify which scheme to use to calculate the continuation derivatievs. More... | |
bool | Problem_has_been_distributed |
Has the problem been distributed amongst multiple processors? More... | |
bool | Bypass_increase_in_dof_check_during_pruning |
Boolean to bypass check of increase in dofs during pruning. More... | |
OomphCommunicator * | Communicator_pt |
The communicator for this problem. More... | |
bool | Always_take_one_newton_step |
Boolean to indicate whether a Newton step should be taken even if the initial residuals are below the required tolerance. More... | |
double | Timestep_reduction_factor_after_nonconvergence |
What it says: If temporally adaptive Newton solver fails to to converge, reduce timestep by this factor and try again; defaults to 1/2; can be over-written by user in derived problem. More... | |
bool | Keep_temporal_error_below_tolerance |
Boolean to decide if a timestep is to be rejected if the error estimate post-solve (computed by global_temporal_error_norm()) exceeds the tolerance required in the call to adaptive_unsteady_newton_solve(...). Defaults to true. More... | |
Static Protected Attributes | |
static ContinuationStorageScheme | Continuation_time_stepper |
Storage for the single static continuation timestorage object. More... | |
Private Member Functions | |
double | doubly_adaptive_unsteady_newton_solve_helper (const double &dt, const double &epsilon, const unsigned &max_adapt, const unsigned &suppress_resolve_after_spatial_adapt, const bool &first, const bool &shift=true) |
Private helper function that actually performs the unsteady "doubly" adaptive Newton solve. See actual (non-helper) functions for description of parameters. More... | |
void | refine_uniformly_aux (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info, const bool &prune) |
Helper function to do compund refinement of (all) refineable (sub)mesh(es) uniformly as many times as specified in vector and rebuild problem; doc refinement process. Set boolean argument to true if you want to prune immediately after refining the meshes individually. More... | |
void | p_refine_uniformly_aux (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info, const bool &prune) |
Helper function to do compund p-refinement of (all) p-refineable (sub)mesh(es) uniformly as many times as specified in vector and rebuild problem; doc refinement process. Set boolean argument to true if you want to prune immediately after refining the meshes individually. More... | |
void | setup_base_mesh_info_after_pruning () |
Helper function to re-setup the Base_mesh enumeration (used during load balancing) after pruning. More... | |
virtual void | sparse_assemble_row_or_column_compressed_with_vectors_of_pairs (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag) |
Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses vectors of pairs. More... | |
virtual void | sparse_assemble_row_or_column_compressed_with_two_vectors (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag) |
Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses two vectors. More... | |
virtual void | sparse_assemble_row_or_column_compressed_with_maps (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag) |
Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses maps. More... | |
virtual void | sparse_assemble_row_or_column_compressed_with_lists (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag) |
Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses lists. More... | |
virtual void | sparse_assemble_row_or_column_compressed_with_two_arrays (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag) |
Private helper function that is used to assemble the Jacobian matrix in the case when the storage is row or column compressed. The boolean Flag indicates if we want compressed row format (true) or compressed column. This version uses lists. More... | |
void | calculate_continuation_derivatives_helper (const DoubleVector &z) |
A function that performs the guts of the continuation derivative calculation in arc length continuation problems. More... | |
void | calculate_continuation_derivatives_fd_helper (double *const ¶meter_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 ¶meter_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 | |
Mesh * | Mesh_pt |
The mesh pointer. More... | |
Vector< Mesh * > | Sub_mesh_pt |
Vector of pointers to submeshes. More... | |
LinearSolver * | Linear_solver_pt |
Pointer to the linear solver for the problem. More... | |
LinearSolver * | Mass_matrix_solver_for_explicit_timestepper_pt |
Pointer to the linear solver used for explicit time steps (this is likely to be different to the linear solver for newton solves because explicit time steps only involve inverting a mass matrix. This can be done very efficiently by, e.g. CG with a diagonal predconditioner). More... | |
EigenSolver * | Eigen_solver_pt |
Pointer to the eigen solver for the problem. More... | |
AssemblyHandler * | Assembly_handler_pt |
LinearSolver * | Default_linear_solver_pt |
Pointer to the default linear solver. More... | |
EigenSolver * | Default_eigen_solver_pt |
Pointer to the default eigensolver. More... | |
AssemblyHandler * | Default_assembly_handler_pt |
Pointer to the default assembly handler. More... | |
Time * | Time_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... | |
ExplicitTimeStepper * | Explicit_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 |
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
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:
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
|
protected |
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 |
oomph::Problem::Problem | ( | ) |
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 69 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.
|
delete |
Broken copy constructor.
|
virtual |
Virtual destructor to clean up memory.
Destructor to clean up memory.
Definition at line 182 of file problem.cc.
References oomph::TerminateHelper::clean_up_memory(), Communicator_pt, Copy_of_problem_pt, Default_assembly_handler_pt, Default_eigen_solver_pt, Default_linear_solver_pt, Dof_distribution_pt, oomph::Mesh::flush_element_and_node_storage(), Mesh_pt, Sub_mesh_pt, and Time_pt.
|
inlinevirtual |
Actions that are to be performed after a mesh adaptation.
Definition at line 1045 of file problem.h.
Referenced by adapt(), adapt_based_on_error_estimates(), load_balance(), p_adapt(), p_refine_selected_elements(), p_refine_uniformly(), p_refine_uniformly_aux(), p_unrefine_uniformly(), read(), refine_selected_elements(), refine_uniformly(), refine_uniformly_aux(), oomph::MGSolver< DIM >::setup_mg_hierarchy(), oomph::HelmholtzMGPreconditioner< DIM >::setup_mg_hierarchy(), and unrefine_uniformly().
|
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 1171 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().
|
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 1153 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().
|
inlineprotectedvirtual |
Actions to be performed after a (mesh) distribution.
Definition at line 1139 of file problem.h.
Referenced by distribute(), load_balance(), and prune_halo_elements_and_nodes().
|
inlineprotectedvirtual |
Actions that should be performed after each explicit time step.
Reimplemented from oomph::ExplicitTimeSteppableObject.
|
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 1090 of file problem.h.
Referenced by adaptive_unsteady_newton_solve(), unsteady_newton_solve(), and oomph::SegregatableFSIProblem::unsteady_segregated_solve().
|
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 1095 of file problem.h.
Referenced by adaptive_unsteady_newton_solve(), and unsteady_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::SolidICProblem, oomph::BiharmonicFluidProblem< DIM >, and oomph::BiharmonicProblem< DIM >.
Definition at line 1058 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().
|
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 1078 of file problem.h.
Referenced by adaptive_unsteady_newton_solve(), newton_solve(), and newton_solve_continuation().
|
inlineprotectedvirtual |
Empty virtual function; provides hook to perform actions after the increase in the arclength parameter (during continuation)
Definition at line 1181 of file problem.h.
Referenced by arc_length_step_solve_helper().
|
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 1129 of file problem.h.
References Empty_actions_after_read_unstructured_meshes_has_been_called.
Referenced by read().
|
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 1042 of file problem.h.
Referenced by adapt(), adapt_based_on_error_estimates(), load_balance(), p_adapt(), p_refine_selected_elements(), p_refine_uniformly(), p_refine_uniformly_aux(), p_unrefine_uniformly(), read(), refine_selected_elements(), refine_uniformly(), refine_uniformly_aux(), oomph::MGSolver< DIM >::setup_mg_hierarchy(), oomph::HelmholtzMGPreconditioner< DIM >::setup_mg_hierarchy(), and unrefine_uniformly().
|
inlineprotectedvirtual |
Actions to be performed before a (mesh) distribution.
Definition at line 1136 of file problem.h.
Referenced by distribute(), load_balance(), and prune_halo_elements_and_nodes().
|
inlineprotectedvirtual |
Actions that should be performed before each explicit time step.
Reimplemented from oomph::ExplicitTimeSteppableObject.
|
inlineprotectedvirtual |
Actions that should be performed before each implicit time step. This is needed when one wants to solve a steady problem before timestepping and needs to distinguish between the two cases.
Reimplemented in oomph::WomersleyProblem< ELEMENT, DIM >.
Definition at line 1084 of file problem.h.
Referenced by adaptive_unsteady_newton_solve(), unsteady_newton_solve(), and oomph::SegregatableFSIProblem::unsteady_segregated_solve().
|
inlineprotectedvirtual |
Any actions that are to be performed before the residual is checked in the Newton method, e.g. update any boundary conditions that depend upon variables of the problem; update any ‘dependent’ variables; or perform an update of the nodal positions in SpineMeshes etc. CAREFUL: This step should (and if the FD-based LinearSolver FD_LU is used, must) only update values that are pinned!
Definition at line 1068 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().
|
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::NonLinearElasticitySmoothMesh< ELEMENT >, oomph::SolidICProblem, oomph::BiharmonicFluidProblem< DIM >, and oomph::BiharmonicProblem< DIM >.
Definition at line 1052 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().
|
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 1073 of file problem.h.
Referenced by newton_solve(), and newton_solve_continuation().
|
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 1115 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 10149 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 10177 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 10123 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 10238 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 10266 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 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 10208 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().
|
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 2964 of file problem.h.
Referenced by arc_length_step_solve_helper(), doubly_adaptive_unsteady_newton_solve_helper(), newton_solve(), and unsteady_newton_solve().
void oomph::Problem::adapt | ( | unsigned & | n_refined, |
unsigned & | n_unrefined | ||
) |
Adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again.
Definition at line 13729 of file problem.cc.
References actions_after_adapt(), actions_before_adapt(), adapt_based_on_error_estimates(), Assembly_handler_pt, assign_eqn_numbers(), bifurcation_adapt_helper(), oomph::AssemblyHandler::bifurcation_type(), Copy_of_problem_pt, oomph::Global_timings::Doc_comprehensive_timings, Dof_current, dof_current(), Dof_derivative, dof_derivative(), Dof_distribution_pt, get_all_error_estimates(), oomph::ErrorEstimator::get_element_errors(), i, make_copy(), mesh_pt(), oomph::Node::ndim(), ndof(), oomph::LinearAlgebraDistribution::nrow_local(), nsub_mesh(), oomph::oomph_info, rebuild_global_mesh(), oomph::TimingHelpers::timer(), Use_continuation_timestepper, and oomph::Node::x().
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 14591 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().
|
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 3015 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 11086 of file problem.cc.
Referenced by doubly_adaptive_unsteady_newton_solve_helper().
double oomph::Problem::adaptive_unsteady_newton_solve | ( | const double & | dt_desired, |
const double & | epsilon, | ||
const bool & | shift_values | ||
) |
Attempt to advance timestep by dt_desired. If the solution fails the timestep will be halved until convergence is achieved, or the timestep falls below NewtonSolverParameters::Minimum_time_step. The error control parameter epsilon represents the (approximate) desired magnitude of the global error at each timestep. The routine returns a double that is the suggested next timestep and should be passed as dt_desired the next time the routine is called. Once again the boolean flag, shift_values, is used to control whether the time values are shifted.
Attempt to take one timestep forward using the dt_desired. This is the driver for a number of adaptive solvers. If the solution fails to converge at a given timestep, the routine will automatically halve the time step and try again, until the time step falls below the specified minimum value. The routine returns the value an estimate of the next value of dt that should be taken. Timestep is also rejected if the error estimate post-solve (computed by global_temporal_error_norm()) exceeds epsilon. This behaviour can be over-ruled by setting the protected boolean Problem::Keep_temporal_error_below_tolerance to false.
Reject the timestep, if we have an exception
Half the time step
Definition at line 11106 of file problem.cc.
References actions_after_implicit_timestep(), actions_after_implicit_timestep_and_error_estimation(), actions_after_newton_solve(), actions_after_newton_step(), oomph::TimeStepper::actions_after_timestep(), actions_before_implicit_timestep(), actions_before_newton_convergence_check(), oomph::TimeStepper::actions_before_timestep(), calculate_predictions(), dof(), dof_distribution_pt(), oomph::Time::dt(), DTSF_max_increase, DTSF_min_decrease, e, global_temporal_error_norm(), i, Keep_temporal_error_below_tolerance, oomph::NewtonSolverError::linear_solver_error(), Maximum_dt, Minimum_dt, Minimum_dt_but_still_proceed, newton_solve(), oomph::LinearAlgebraDistribution::nrow_local(), ntime_stepper(), oomph::oomph_info, oomph::TimeStepper::set_error_weights(), oomph::TimeStepper::set_predictor_weights(), oomph::TimeStepper::set_weights(), shift_time_values(), oomph::Global_string_for_annotation::string(), synchronise_all_dofs(), Target_error_safety_factor, 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 8760 of file problem.cc.
References dof(), Dof_distribution_pt, ndof(), oomph::DistributableLinearAlgebraObject::nrow(), oomph::DistributableLinearAlgebraObject::nrow_local(), oomph::DoubleVector::redistribute(), and synchronise_all_dofs().
|
inline |
Add Data to the Problem's global data – the Problem will perform equation numbering etc. for such Data.
Definition at line 1680 of file problem.h.
References Global_data_pt, and global_data_pt().
|
inline |
Add a submesh to the problem and return its number, i, by which it can be accessed via mesh_pt(i).
Definition at line 1350 of file problem.h.
References mesh_pt(), and Sub_mesh_pt.
Referenced by oomph::BiharmonicProblem< DIM >::build_global_mesh_and_assign_eqn_numbers(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::SegregatableFSIProblem::rebuild_monolithic_mesh(), oomph::SegregatableFSIProblem::use_only_fluid_elements(), and oomph::SegregatableFSIProblem::use_only_solid_elements().
void oomph::Problem::add_time_stepper_pt | ( | TimeStepper *const & | time_stepper_pt | ) |
Add a timestepper to the problem. The function will automatically create or resize the Time object so that it contains the appropriate number of levels of storage.
Definition at line 1632 of file problem.cc.
References oomph::Time::ndt(), oomph::TimeStepper::ndt(), oomph::oomph_info, oomph::Time::resize(), Time_pt, oomph::TimeStepper::time_pt(), Time_stepper_pt, and time_stepper_pt().
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt(), arc_length_step_solve(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().
|
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 3651 of file problem.cc.
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 10402 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 | ( | 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 10314 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.
|
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 10535 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().
|
inline |
Function to determine whether the hessian products are calculated analytically.
Definition at line 306 of file problem.h.
References Calculate_hessian_products_analytic.
Referenced by get_hessian_vector_products().
|
inline |
Return a pointer to the assembly handler object.
Definition at line 1590 of file problem.h.
References Assembly_handler_pt.
Referenced by activate_pitchfork_tracking(), bifurcation_adapt_helper(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::FpPressureAdvectionDiffusionProblem(), get_hessian_vector_products(), get_inverse_mass_matrix_times_residuals(), get_jacobian(), get_my_eqns(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), get_residuals(), parallel_sparse_assemble(), oomph::HSL_MA42::reorder_elements(), oomph::AugmentedBlockFoldLinearSolver::resolve(), oomph::BlockPitchForkLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::BlockPitchForkLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::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(), and synchronise_all_dofs().
|
inline |
Return a pointer to the assembly handler object (const version)
Definition at line 1596 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 8723 of file problem.cc.
References dof(), Dof_distribution_pt, ndof(), oomph::DistributableLinearAlgebraObject::nrow(), oomph::DistributableLinearAlgebraObject::nrow_local(), oomph::DoubleVector::redistribute(), 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 2076 of file problem.cc.
References oomph::Mesh::assign_global_eqn_numbers(), oomph::Mesh::assign_local_eqn_numbers(), oomph::LinearAlgebraDistribution::build(), Communicator_pt, communicator_pt(), oomph::GeneralisedElement::complete_setup_of_dependencies(), oomph::Global_timings::Doc_comprehensive_timings, Dof_distribution_pt, Dof_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::Mesh::external_halo_element_pt(), Global_data_pt, i, Mesh_pt, mesh_pt(), Must_recompute_load_balance_for_assembly, oomph::Mesh::nelement(), oomph::Mesh::nexternal_halo_element(), nglobal_data(), nsub_mesh(), oomph::oomph_info, Parallel_sparse_assemble_previous_allocation, Problem_has_been_distributed, remove_duplicate_data(), remove_null_pointers_from_external_halo_node_storage(), set_default_first_and_last_element_for_assembly(), Sparse_assemble_with_arrays_previous_allocation, Store_local_dof_pt_in_elements, Sub_mesh_pt, synchronise_eqn_numbers(), and oomph::TimingHelpers::timer().
Referenced by adapt(), adapt_based_on_error_estimates(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), bifurcation_adapt_helper(), oomph::BiharmonicProblem< DIM >::build_global_mesh_and_assign_eqn_numbers(), distribute(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::get_pressure_advection_diffusion_jacobian(), load_balance(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::LinearElasticitySmoothMesh< LINEAR_ELASTICITY_ELEMENT >::operator()(), oomph::PoissonSmoothMesh< POISSON_ELEMENT >::operator()(), p_adapt(), p_refine_selected_elements(), p_refine_uniformly(), p_refine_uniformly_aux(), p_unrefine_uniformly(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), prune_halo_elements_and_nodes(), read(), refine_selected_elements(), refine_uniformly(), refine_uniformly_aux(), oomph::SegregatableFSIProblem::segregated_solve(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::SolidICProblem::set_newmark_initial_condition_directly(), oomph::SolidICProblem::set_static_initial_condition(), set_timestepper_for_all_data(), oomph::MGSolver< DIM >::setup_mg_hierarchy(), oomph::HelmholtzMGPreconditioner< DIM >::setup_mg_hierarchy(), oomph::SolidICProblem::setup_problem(), unrefine_uniformly(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().
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 11562 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 11582 of file problem.cc.
References assign_initial_values_impulsive(), and initialise_dt().
|
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 13711 of file problem.cc.
References bifurcation_adapt_helper().
Referenced by doc_errors().
|
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 13417 of file problem.cc.
References activate_fold_tracking(), activate_hopf_tracking(), activate_pitchfork_tracking(), adapt_based_on_error_estimates(), assembly_handler_pt(), assign_eqn_numbers(), bifurcation_parameter_pt(), Copy_of_problem_pt, deactivate_bifurcation_tracking(), dof(), e, get_all_error_estimates(), get_bifurcation_eigenfunction(), make_copy(), mesh_pt(), ndof(), and oomph::oomph_info.
Referenced by adapt(), bifurcation_adapt_doc_errors(), and p_adapt().
double * oomph::Problem::bifurcation_parameter_pt | ( | ) | const |
Return pointer to the parameter that is used in the bifurcation detection. If we are not tracking a bifurcation then an error will be thrown by the AssemblyHandler.
Definition at line 10101 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 1580 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()().
|
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 1385 of file problem.h.
References oomph::Global_string_for_annotation::string().
Referenced by load_balance().
|
protected |
A function to calculate the derivatives with respect to the arc-length required for continuation. The arguments is the solution of the linear system, Jz = dR/dparameter, that gives du/dparameter and the direction output from the newton_solve_continuation function. The derivatives are stored in the ContinuationParameters namespace.
Definition at line 9812 of file problem.cc.
References calculate_continuation_derivatives_helper(), Desired_proportion_of_arc_length, Parameter_derivative, Scale_arc_length, and Theta_squared.
|
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 9735 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().
|
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 9838 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().
|
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 10024 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().
|
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 9932 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 | ( | ) |
Calculate predictions.
Calculate the predictions of all variables in problem.
Definition at line 11719 of file problem.cc.
References oomph::Mesh::calculate_predictions(), distributed(), dof(), Dof_pt, oomph::Time::dt(), e, oomph::TimeStepper::explicit_predictor_pt(), explicit_time_stepper_pt(), explicit_timestep(), get_dofs(), Global_data_pt, i, Mesh_pt, ndof(), restore_dof_values(), set_dofs(), store_current_dof_values(), oomph::Global_string_for_annotation::string(), time(), time_pt(), Time_stepper_pt, time_stepper_pt(), oomph::StringConversion::to_string(), oomph::TimeStepper::update_predicted_time(), and use_predictor_values_as_initial_guess().
Referenced by adaptive_unsteady_newton_solve().
|
inline |
Check the halo/haloed node/element schemes.
Definition at line 2221 of file problem.h.
References oomph::DocInfo::disable_doc().
Referenced by self_test().
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 16466 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.
|
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 892 of file problem.h.
References Elemental_assembly_time, and Must_recompute_load_balance_for_assembly.
|
inline |
access function to the oomph-lib communicator
Definition at line 1266 of file problem.h.
References Communicator_pt.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), arc_length_step_solve_helper(), assign_eqn_numbers(), oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), copy_haloed_eqn_numbers_helper(), oomph::Multi_domain_functions::create_external_halo_elements(), distribute(), doubly_adaptive_unsteady_newton_solve_helper(), dump(), oomph::FoldHandler::FoldHandler(), get_data_to_be_sent_during_load_balancing(), oomph::Multi_domain_functions::get_dim_helper(), oomph::FoldHandler::get_eigenfunction(), oomph::HopfHandler::get_eigenfunction(), get_hessian_vector_products(), get_inverse_mass_matrix_times_residuals(), get_jacobian(), get_residuals(), oomph::HopfHandler::HopfHandler(), load_balance(), oomph::Multi_domain_functions::locate_zeta_for_missing_coordinates(), newton_solve(), parallel_sparse_assemble(), oomph::METIS::partition_distributed_mesh(), partition_global_mesh(), oomph::METIS::partition_mesh(), oomph::PitchForkHandler::PitchForkHandler(), prune_halo_elements_and_nodes(), read(), recompute_load_balanced_assembly(), remove_duplicate_data(), remove_null_pointers_from_external_halo_node_storage(), oomph::BlockPitchForkLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), oomph::Multi_domain_functions::send_and_receive_located_info(), oomph::Multi_domain_functions::send_and_receive_missing_zetas(), send_data_to_be_sent_during_load_balancing(), send_refinement_info_helper(), set_default_first_and_last_element_for_assembly(), oomph::SolidICProblem::set_static_initial_condition(), setup_base_mesh_info_after_pruning(), setup_element_count_per_dof(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::BlockPitchForkLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::solve(), oomph::GS< MATRIX >::solve(), oomph::GS< CRDoubleMatrix >::solve(), oomph::DampedJacobi< MATRIX >::solve(), oomph::GMRES< MATRIX >::solve(), oomph::AugmentedProblemGMRES::solve(), oomph::SuperLUSolver::solve(), oomph::MumpsSolver::solve(), oomph::HelmholtzGMRESMG< MATRIX >::solve(), oomph::HelmholtzFGMRESMG< MATRIX >::solve(), oomph::FoldHandler::solve_augmented_block_system(), oomph::PitchForkHandler::solve_augmented_block_system(), oomph::FoldHandler::solve_block_system(), oomph::HopfHandler::solve_complex_system(), oomph::LAPACK_QZ::solve_eigenproblem_helper(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), oomph::FoldHandler::solve_full_system(), oomph::PitchForkHandler::solve_full_system(), oomph::HopfHandler::solve_full_system(), oomph::HopfHandler::solve_standard_system(), oomph::SuperLUSolver::solve_transpose(), oomph::PitchForkHandler::synchronise(), synchronise_dofs(), unsteady_newton_solve(), oomph::FoldHandler::~FoldHandler(), and oomph::HopfHandler::~HopfHandler().
|
inline |
access function to the oomph-lib communicator, const version
Definition at line 1272 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 11928 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().
|
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.
Definition at line 17014 of file problem.cc.
References oomph::Data::add_eqn_numbers_to_vector(), oomph::GeneralisedElement::add_internal_eqn_numbers_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_element_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(), nsub_mesh(), oomph::Data::read_eqn_numbers_from_vector(), and oomph::GeneralisedElement::read_internal_eqn_numbers_from_vector().
Referenced by synchronise_eqn_numbers().
void oomph::Problem::create_new_linear_algebra_distribution | ( | LinearAlgebraDistribution *& | dist_pt | ) |
Get new linear algebra distribution (you're in charge of deleting it!)
Build new LinearAlgebraDistribution. Note: you're in charge of deleting it!
Definition at line 300 of file problem.cc.
References Communicator_pt, Default_matrix_distribution, Dist_problem_matrix_distribution, Dof_distribution_pt, ndof(), oomph::LinearAlgebraDistribution::nrow_local(), Problem_has_been_distributed, Problem_matrix_distribution, and Uniform_matrix_distribution.
Referenced by get_eigenproblem_matrices(), get_jacobian(), get_residuals(), and oomph::ANASAZI::solve_eigenproblem().
|
inline |
Deactivate all bifuraction tracking, by reseting the assembly handler to the default.
Definition at line 2458 of file problem.h.
References reset_assembly_handler_to_default().
Referenced by bifurcation_adapt_helper().
|
inlinevirtual |
Hook for debugging. Can be overloaded in driver code; argument allows identification of where we're coming from.
Definition at line 252 of file problem.h.
References i, and 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 16418 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 2446 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.
|
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 1766 of file problem.h.
References Discontinuous_element_formulation.
|
inline |
Disable doc of load imbalance in parallel assembly of distributed problem.
Definition at line 876 of file problem.h.
References Doc_imbalance_in_parallel_assembly.
|
inline |
disable globally convergent Newton method
Definition at line 2114 of file problem.h.
References Use_globally_convergent_newton_method.
|
inline |
Disable the output of information when in the newton solver.
Definition at line 3046 of file problem.h.
References Shut_up_in_newton_solve.
Referenced by oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project().
|
inline |
Disable recycling of Jacobian in Newton iteration.
Definition at line 2087 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 11895 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().
|
inline |
Disable problem distributed.
Definition at line 997 of file problem.h.
References Problem_has_been_distributed.
|
inline |
Insist that local dof pointers are NOT set up in each element when equation numbering takes place (the default)
Definition at line 1733 of file problem.h.
References Store_local_dof_pt_in_elements.
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 416 of file problem.cc.
References oomph::DocInfo::disable_doc(), 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 436 of file problem.cc.
References oomph::DocInfo::disable_doc(), distribute(), and i.
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 491 of file problem.cc.
References actions_after_distribute(), actions_before_distribute(), assign_eqn_numbers(), Base_mesh_element_number_plus_one, Base_mesh_element_pt, communicator_pt(), oomph::Mesh::distribute(), Doc_time_in_distribute, e, oomph::Mesh::element_pt(), Elemental_assembly_time, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::Mesh::nelement(), nglobal_data(), nsub_mesh(), oomph::DocInfo::number(), oomph::oomph_info, partition_global_mesh(), Problem_has_been_distributed, rebuild_global_mesh(), oomph::Mesh::set_communicator_pt(), and oomph::TimingHelpers::timer().
Referenced by distribute().
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 472 of file problem.cc.
References distribute(), mesh_pt(), and oomph::Mesh::nelement().
|
inline |
If we have MPI return the "problem has been distributed" flag, otherwise it can't be distributed so return false.
Definition at line 828 of file problem.h.
References Problem_has_been_distributed.
Referenced by calculate_predictions(), get_dofs(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::PitchForkHandler::PitchForkHandler(), oomph::BlockPitchForkLinearSolver::resolve(), set_dofs(), and oomph::BlockPitchForkLinearSolver::solve().
|
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 862 of file problem.h.
References Dist_problem_matrix_distribution.
|
inline |
Get max and min error for all elements in submeshes.
Definition at line 3031 of file problem.h.
References oomph::DocInfo::disable_doc().
void oomph::Problem::doc_errors | ( | DocInfo & | doc_info | ) |
Get max and min error for all elements in submeshes.
Definition at line 14837 of file problem.cc.
References Assembly_handler_pt, bifurcation_adapt_doc_errors(), oomph::AssemblyHandler::bifurcation_type(), oomph::ErrorEstimator::get_element_errors(), oomph::DocInfo::is_doc_enabled(), mesh_pt(), nsub_mesh(), and oomph::oomph_info.
|
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 9866 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().
|
inline |
i-th dof in the problem
Definition at line 1843 of file problem.h.
Referenced by oomph::IMRByBDF::actions_before_timestep(), adaptive_unsteady_newton_solve(), add_eigenvector_to_dofs(), assign_eigenvector_to_dofs(), bifurcation_adapt_helper(), calculate_predictions(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::get_dofs_for_element(), get_hessian_vector_products(), oomph::AugmentedBlockFoldLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), restore_dof_values(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::set_dofs_for_element(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::set_previous_dofs_to_current_dofs(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), and store_current_dof_values().
|
inline |
|
inlineprotected |
Access function to the current value of the i-th (local) dof at the start of a continuation step.
Definition at line 1202 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().
|
inlineprotected |
Access function to the derivative of the i-th (local) dof with respect to the arc length, used in continuation.
Definition at line 1188 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().
|
inline |
Return the pointer to the dof distribution (read-only)
Definition at line 1698 of file problem.h.
References Dof_distribution_pt.
Referenced by adaptive_unsteady_newton_solve(), and oomph::AdjointProblemBasedShiftInvertOperator::AdjointProblemBasedShiftInvertOperator().
|
inline |
Pointer to i-th dof in the problem.
Definition at line 1855 of file problem.h.
Referenced by oomph::AssemblyHandler::local_problem_dof(), and set_dofs().
|
inline |
|
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 2576 of file problem.h.
References doubly_adaptive_unsteady_newton_solve_helper().
|
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 2609 of file problem.h.
References doubly_adaptive_unsteady_newton_solve_helper().
|
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 11442 of file problem.cc.
References adapt(), adaptive_unsteady_newton_solve(), communicator_pt(), Default_set_initial_condition_called, oomph::Time::dt(), oomph::oomph_info, Problem_has_been_distributed, set_initial_condition(), oomph::Time::time(), time_pt(), and unsteady_newton_solve().
Referenced by doubly_adaptive_unsteady_newton_solve().
|
inline |
Dump refinement pattern of all refineable meshes and all generic Problem data to file for restart.
Definition at line 2183 of file problem.h.
References dump(), and oomph::Global_string_for_annotation::string().
|
virtual |
Dump refinement pattern of all refineable meshes and all generic Problem data to file for restart.
Definition at line 12092 of file problem.cc.
References Base_mesh_element_pt, communicator_pt(), oomph::Time::dt(), oomph::Mesh::dump(), oomph::TriangleMeshBase::dump_distributed_info_for_restart(), oomph::TriangleMeshBase::dump_triangulateio(), e, Global_data_pt, i, oomph::GeneralisedElement::is_halo(), oomph::Mesh::is_mesh_distributed(), mesh_pt(), oomph::Time::ndt(), nsub_mesh(), Problem_has_been_distributed, oomph::Time::time(), time_pt(), and oomph::TriangleMeshBase::use_triangulateio_restart().
Referenced by dump().
|
inline |
Return a pointer to the eigen solver object.
Definition at line 1512 of file problem.h.
References Eigen_solver_pt.
|
inline |
Return a pointer to the eigen solver object (const version)
Definition at line 1518 of file problem.h.
References Eigen_solver_pt.
|
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 884 of file problem.h.
References Elemental_assembly_time.
Referenced by oomph::METIS::partition_distributed_mesh().
|
inline |
Indicate that the problem involves discontinuous elements This allows for a more efficiently assembly and inversion of the mass matrix.
Definition at line 1757 of file problem.h.
References Discontinuous_element_formulation.
|
inline |
Enable doc of load imbalance in parallel assembly of distributed problem.
Definition at line 869 of file problem.h.
References Doc_imbalance_in_parallel_assembly.
|
inline |
enable globally convergent Newton method
Definition at line 2108 of file problem.h.
References Use_globally_convergent_newton_method.
|
inline |
Enable the output of information when in the newton solver (Default)
Definition at line 3040 of file problem.h.
References Shut_up_in_newton_solve.
|
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 2080 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 11870 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().
|
inline |
Enable problem distributed.
Definition at line 991 of file problem.h.
References Problem_has_been_distributed.
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt().
|
inline |
Insist that local dof pointers are set up in each element when equation numbering takes place.
Definition at line 1726 of file problem.h.
References Store_local_dof_pt_in_elements.
|
inline |
Return a pointer to the explicit timestepper.
Definition at line 1575 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 10948 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().
|
inline |
Flush the Problem's global data – resizes container to zero. Data objects are not deleted!
Definition at line 1688 of file problem.h.
References Global_data_pt.
|
inline |
Flush the problem's collection of sub-meshes. Must be followed by call to rebuild_global_mesh().
Definition at line 1359 of file problem.h.
References Sub_mesh_pt.
Referenced by oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), load_balance(), oomph::SegregatableFSIProblem::rebuild_monolithic_mesh(), oomph::SegregatableFSIProblem::use_only_fluid_elements(), and oomph::SegregatableFSIProblem::use_only_solid_elements().
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 14690 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 16440 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.
Definition at line 10111 of file problem.cc.
References Assembly_handler_pt, and oomph::AssemblyHandler::get_eigenfunction().
Referenced by bifurcation_adapt_helper().
|
private |
Load balance helper routine: Get data to be sent to other processors during load balancing and other information about re-distribution.
Where do I come from, where do I go to?
Where do I come from, where do I go to?
Definition at line 19342 of file problem.cc.
References oomph::GeneralisedElement::add_internal_data_values_to_vector(), oomph::Node::add_values_to_vector(), Base_mesh_element_number_plus_one, Base_mesh_element_pt, communicator_pt(), e, oomph::Mesh::element_pt(), i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), oomph::GeneralisedElement::is_halo(), mesh_pt(), oomph::Node::ndim(), oomph::Mesh::nelement(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), nsub_mesh(), oomph::Data::ntstorage(), oomph::Data::nvalue(), oomph::Node::position(), oomph::RefineableElement::root_element_pt(), oomph::Data::set_value(), oomph::Tree::stick_leaves_into_vector(), t, oomph::RefineableElement::tree_pt(), oomph::Node::value(), and oomph::Node::x().
Referenced by load_balance().
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 7865 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().
|
virtual |
Return vector of the t'th history value of all dofs.
Get history values of dofs in a double vector.
Reimplemented from oomph::ExplicitTimeSteppableObject.
Definition at line 2582 of file problem.cc.
References oomph::DoubleVector::build(), distributed(), Dof_distribution_pt, oomph::Mesh::element_pt(), oomph::Data::eqn_number(), Global_data_pt, i, oomph::GeneralisedElement::internal_data_pt(), mesh_pt(), nglobal_data(), oomph::GeneralisedElement::ninternal_data(), oomph::Mesh::node_pt(), oomph::Data::nvalue(), t, oomph::Data::value(), and oomph::Node::value().
|
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 2566 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().
|
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 3771 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().
|
virtual |
Get the matrices required by a eigensolver. If the shift parameter is non-zero the second matrix will be shifted.
Get the matrices required to solve an eigenproblem WARNING: temporarily this method only works with non-distributed matrices.
Definition at line 8429 of file problem.cc.
References Assembly_handler_pt, oomph::CRDoubleMatrix::build(), oomph::CRDoubleMatrix::build_without_copy(), Communicator_pt, create_new_linear_algebra_distribution(), oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distribution_built(), oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::LinearAlgebraDistribution::nrow(), oomph::CRDoubleMatrix::nrow(), parallel_sparse_assemble(), oomph::CRDoubleMatrix::redistribute(), and sparse_assemble_row_or_column_compressed().
Referenced by oomph::AdjointProblemBasedShiftInvertOperator::AdjointProblemBasedShiftInvertOperator(), oomph::ProblemBasedShiftInvertOperator::ProblemBasedShiftInvertOperator(), and oomph::LAPACK_QZ::solve_eigenproblem_helper().
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 7801 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().
|
inline |
Get first and last elements for parallel assembly of non-distributed problem.
Definition at line 1024 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().
|
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:
Definition at line 19898 of file problem.cc.
References Base_mesh_element_number_plus_one, e, oomph::Mesh::element_pt(), oomph::GeneralisedElement::is_halo(), mesh_pt(), oomph::Mesh::nelement(), nsub_mesh(), oomph::RefineableElement::root_element_pt(), oomph::Tree::stick_all_tree_nodes_into_vector(), and oomph::RefineableElement::tree_pt().
Referenced by load_balance().
void oomph::Problem::get_hessian_vector_products | ( | DoubleVectorWithHaloEntries const & | Y, |
Vector< DoubleVectorWithHaloEntries > const & | C, | ||
Vector< DoubleVectorWithHaloEntries > & | product | ||
) |
Return the product of the global hessian (derivative of Jacobian matrix with respect to all variables) with an eigenvector, Y, and any number of other specified vectors C (d(J_{ij})/d u_{k}) Y_{j} C_{k}. This function is used in assembling and solving the augmented systems associated with bifurcation tracking. The default implementation is to use finite differences at the global level.
Alice: My bifurcation tracking converges better with this FD_step as 1.0e-5. The default value remains at 1.0e-8.
Definition at line 7963 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().
|
virtual |
Return the residual vector multiplied by the inverse mass matrix Virtual so that it can be overloaded for mpi problems.
Definition at line 3666 of file problem.cc.
References assembly_handler_pt(), oomph::DoubleVector::build(), communicator_pt(), Default_assembly_handler_pt, Discontinuous_element_formulation, e, oomph::Mesh::element_pt(), oomph::LinearSolver::enable_resolve(), oomph::GeneralisedElement::eqn_number(), oomph::DGElement::get_inverse_mass_matrix_times_residuals(), get_residuals(), i, Mass_matrix_has_been_computed, Mass_matrix_reuse_is_enabled, mass_matrix_solver_for_explicit_timestepper_pt(), mesh_pt(), oomph::GeneralisedElement::ndof(), ndof(), oomph::Mesh::nelement(), oomph::oomph_info, oomph::LinearSolver::resolve(), Shut_up_in_newton_solve, and oomph::LinearSolver::solve().
Referenced by get_dvaluesdt().
|
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 4163 of file problem.cc.
References oomph::DoubleVector::build(), oomph::CCMatrix< T >::build_without_copy(), oomph::DoubleVector::built(), communicator_pt(), oomph::LinearAlgebraDistribution::communicator_pt(), Communicator_pt, oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distribution_pt(), ndof(), oomph::LinearAlgebraDistribution::nrow(), oomph::DoubleVector::set_external_values(), and sparse_assemble_row_or_column_compressed().
|
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.
Definition at line 4029 of file problem.cc.
References oomph::DoubleVector::build(), oomph::CRDoubleMatrix::build(), oomph::CRDoubleMatrix::build_without_copy(), oomph::DoubleVector::built(), Communicator_pt, create_new_linear_algebra_distribution(), oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distribution_built(), oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::LinearAlgebraDistribution::nrow(), parallel_sparse_assemble(), oomph::DoubleVector::redistribute(), oomph::CRDoubleMatrix::redistribute(), oomph::DoubleVector::set_external_values(), and sparse_assemble_row_or_column_compressed().
|
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 3922 of file problem.cc.
References Assembly_handler_pt, assembly_handler_pt(), oomph::DoubleVector::build(), oomph::DoubleVector::built(), oomph::LinearAlgebraDistribution::communicator_pt(), Communicator_pt, oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distribution_pt(), e, oomph::Mesh::element_pt(), oomph::AssemblyHandler::eqn_number(), oomph::AssemblyHandler::get_jacobian(), oomph::DoubleVector::initialise(), oomph::DenseMatrix< T >::initialise(), Mesh_pt, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), oomph::LinearAlgebraDistribution::nrow(), and oomph::DenseMatrix< T >::resize().
Referenced by oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::get_pressure_advection_diffusion_jacobian(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::CG< MATRIX >::solve(), oomph::BiCGStab< MATRIX >::solve(), oomph::GS< MATRIX >::solve(), oomph::GS< CRDoubleMatrix >::solve(), oomph::DampedJacobi< MATRIX >::solve(), oomph::GMRES< MATRIX >::solve(), oomph::AugmentedProblemGMRES::solve(), oomph::DenseLU::solve(), oomph::SuperLUSolver::solve(), oomph::MumpsSolver::solve(), oomph::HelmholtzGMRESMG< MATRIX >::solve(), oomph::HelmholtzFGMRESMG< MATRIX >::solve(), oomph::HypreSolver::solve(), oomph::TrilinosAztecOOSolver::solve(), and oomph::SuperLUSolver::solve_transpose().
|
inlinevirtual |
|
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 6487 of file problem.cc.
References assembly_handler_pt(), e, oomph::Mesh::element_pt(), oomph::AssemblyHandler::eqn_number(), i, oomph::GeneralisedElement::is_halo(), mesh_pt(), and oomph::AssemblyHandler::ndof().
Referenced by parallel_sparse_assemble(), and setup_dof_halo_scheme().
|
virtual |
Return the fully-assembled residuals Vector for the problem: Virtual so it can be overloaded in for mpi problems.
Get the total residuals Vector for the problem.
Definition at line 3801 of file problem.cc.
References Assembly_handler_pt, assembly_handler_pt(), oomph::DoubleVector::build(), oomph::DoubleVector::built(), communicator_pt(), create_new_linear_algebra_distribution(), oomph::DistributableLinearAlgebraObject::distribution_pt(), e, oomph::Mesh::element_pt(), oomph::AssemblyHandler::eqn_number(), oomph::AssemblyHandler::get_residuals(), Mesh_pt, oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), oomph::LinearAlgebraDistribution::nrow(), parallel_sparse_assemble(), and oomph::DoubleVector::set_external_values().
Referenced by get_derivative_wrt_global_parameter(), get_fd_jacobian(), get_inverse_mass_matrix_times_residuals(), globally_convergent_line_search(), newton_solve(), newton_solve_continuation(), oomph::SegregatableFSIProblem::segregated_solve(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::BlockHopfLinearSolver::solve(), and oomph::BlockHopfLinearSolver::solve_for_two_rhs().
|
inline |
Return a pointer to the the i-th global data object.
Definition at line 1673 of file problem.h.
References Global_data_pt, and i.
Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), add_global_data(), and copy().
|
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 1794 of file problem.h.
References oomph::DoubleVectorHaloScheme::distribution_pt(), oomph::LinearAlgebraDistribution::first_row(), Halo_dof_pt, Halo_scheme_pt, i, oomph::DoubleVectorHaloScheme::local_index(), oomph::LinearAlgebraDistribution::nrow_local(), and Problem_has_been_distributed.
Referenced by get_hessian_vector_products(), oomph::PitchForkHandler::get_jacobian(), and oomph::PitchForkHandler::get_residuals().
|
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 1250 of file problem.h.
References oomph::Global_string_for_annotation::string().
Referenced by adaptive_unsteady_newton_solve().
|
private |
Line search helper for globally convergent Newton method.
Helper function for the globally convergent Newton solver.
Definition at line 9166 of file problem.cc.
References Dof_pt, get_residuals(), i, ndof(), and oomph::oomph_info.
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.
Definition at line 13294 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.
Definition at line 13317 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().
|
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().
|
inline |
Is recycling of Jacobian in Newton iteration enabled?
Definition at line 2094 of file problem.h.
References Jacobian_reuse_is_enabled.
|
inline |
Return a pointer to the linear solver object.
Definition at line 1486 of file problem.h.
References Linear_solver_pt.
Referenced by oomph::FoldHandler::FoldHandler(), oomph::HopfHandler::HopfHandler(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::ANASAZI::solve_eigenproblem(), oomph::FoldHandler::~FoldHandler(), oomph::HopfHandler::~HopfHandler(), and oomph::PitchForkHandler::~PitchForkHandler().
|
inline |
Return a pointer to the linear solver object (const version)
Definition at line 1492 of file problem.h.
References Linear_solver_pt.
|
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 1402 of file problem.h.
References oomph::DocInfo::disable_doc().
Referenced by load_balance(), and read().
|
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 1423 of file problem.h.
References oomph::DocInfo::disable_doc(), and load_balance().
|
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 1442 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 17253 of file problem.cc.
References actions_after_adapt(), actions_after_distribute(), actions_before_adapt(), actions_before_distribute(), assign_eqn_numbers(), Base_mesh_element_number_plus_one, Base_mesh_element_pt, build_mesh(), oomph::FaceElement::bulk_element_pt(), Communicator_pt, communicator_pt(), delete_all_external_storage(), oomph::Mesh::distribute(), e, oomph::Mesh::element_pt(), oomph::FaceElement::face_index(), oomph::Mesh::finite_element_pt(), oomph::Mesh::flush_element_and_node_storage(), flush_sub_meshes(), get_data_to_be_sent_during_load_balancing(), get_flat_packed_refinement_pattern_for_load_balancing(), oomph::TreeBasedRefineableMeshBase::get_refinement_levels(), i, oomph::GeneralisedElement::is_halo(), mesh_pt(), ndof(), oomph::Mesh::nelement(), oomph::Mesh::nnon_halo_element(), nsub_mesh(), oomph::DocInfo::number(), oomph::oomph_info, oomph::METIS::partition_distributed_mesh(), Problem_has_been_distributed, oomph::Mesh::prune_halo_elements_and_nodes(), rebuild_global_mesh(), refine_distributed_base_mesh(), oomph::TreeBasedRefineableMeshBase::refine_uniformly(), send_data_to_be_sent_during_load_balancing(), send_refinement_info_helper(), setup_base_mesh_info_after_pruning(), synchronise_all_dofs(), oomph::TimingHelpers::timer(), oomph::TreeBasedRefineableMeshBase::uniform_refinement_level_when_pruned(), and Use_default_partition_in_load_balance.
|
virtual |
Make and return a pointer to the copy of the problem. A virtual function that must be filled in by the user is they wish to perform adaptive refinement in bifurcation tracking or in multigrid problems. ALH: WILL NOT BE NECESSARY IN BIFURCATION TRACKING IN LONG RUN...
Definition at line 12074 of file problem.cc.
Referenced by adapt(), and bifurcation_adapt_helper().
|
inline |
Return whether the mass matrix is being reused.
Definition at line 2673 of file problem.h.
References Mass_matrix_reuse_is_enabled.
|
inline |
Return a pointer to the linear solver object used for explicit time stepping.
Definition at line 1499 of file problem.h.
References Mass_matrix_solver_for_explicit_timestepper_pt.
Referenced by get_inverse_mass_matrix_times_residuals().
|
inline |
Return a pointer to the linear solver object used for explicit time stepping (const version).
Definition at line 1506 of file problem.h.
References Mass_matrix_solver_for_explicit_timestepper_pt.
|
inline |
Access function to max Newton iterations before giving up.
Definition at line 1620 of file problem.h.
References Max_newton_iterations.
|
inline |
Access function to max residuals in Newton iterations before giving up.
Definition at line 1634 of file problem.h.
References Max_residuals.
|
inline |
Access function to max timestep in adaptive timestepping.
Definition at line 1608 of file problem.h.
References Maximum_dt.
|
inline |
Return a pointer to the global mesh.
Definition at line 1300 of file problem.h.
References Mesh_pt.
Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::RefineableGmshTetMesh< ELEMENT >::adapt(), oomph::RefineableTetgenMesh< ELEMENT >::adapt(), oomph::RefineableTriangleMesh< ELEMENT >::adapt(), adapt(), adapt_based_on_error_estimates(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), add_sub_mesh(), assign_eqn_numbers(), oomph::SolidICProblem::backup_original_state(), bifurcation_adapt_helper(), check_halo_schemes(), copy(), copy_haloed_eqn_numbers_helper(), delete_all_external_storage(), disable_mass_matrix_reuse(), distribute(), doc_errors(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::doc_solution(), dump(), enable_mass_matrix_reuse(), oomph::SegregatableFSIProblem::extrapolate_solid_data(), oomph::FoldHandler::FoldHandler(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::FpPressureAdvectionDiffusionProblem(), get_all_error_estimates(), get_all_halo_data(), get_data_to_be_sent_during_load_balancing(), get_dofs(), get_flat_packed_refinement_pattern_for_load_balancing(), get_hessian_vector_products(), get_inverse_mass_matrix_times_residuals(), get_my_eqns(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::FoldHandler::get_residuals(), oomph::HopfHandler::get_residuals(), oomph::HopfHandler::HopfHandler(), load_balance(), oomph::LinearElasticitySmoothMesh< LINEAR_ELASTICITY_ELEMENT >::operator()(), oomph::PoissonSmoothMesh< POISSON_ELEMENT >::operator()(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::orbit_output(), p_adapt(), p_refine_selected_elements(), p_refine_uniformly(), p_refine_uniformly_aux(), p_unrefine_uniformly(), parallel_sparse_assemble(), oomph::METIS::partition_distributed_mesh(), oomph::METIS::partition_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_all(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::pin_all_non_pressure_dofs(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_dofs_of_coordinate(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_dofs_of_field(), oomph::PitchForkHandler::PitchForkHandler(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), prune_halo_elements_and_nodes(), read(), refine_distributed_base_mesh(), refine_selected_elements(), refine_uniformly(), refine_uniformly_aux(), remove_duplicate_data(), remove_null_pointers_from_external_halo_node_storage(), oomph::HSL_MA42::reorder_elements(), oomph::SolidICProblem::reset_original_state(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::reset_pin_status(), oomph::AugmentedBlockFoldLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::restore_positions(), self_test(), send_refinement_info_helper(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_coordinate_for_projection(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_current_field_for_projection(), set_dofs(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_lagrangian_coordinate_for_projection(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::SolidICProblem::set_newmark_initial_condition_directly(), oomph::SolidICProblem::set_static_initial_condition(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_time_level_for_projection(), setup_base_mesh_info_after_pruning(), setup_dof_halo_scheme(), setup_element_count_per_dof(), oomph::SolidICProblem::setup_problem(), oomph::SegregatableFSIProblem::setup_segregated_solver(), oomph::SolidICProblem::SolidICProblem(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::solve(), oomph::MGSolver< DIM >::solve(), oomph::HelmholtzGMRESMG< MATRIX >::solve(), oomph::HelmholtzFGMRESMG< MATRIX >::solve(), oomph::HSL_MA42::solve_for_one_dof(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), sparse_assemble_row_or_column_compressed_with_lists(), sparse_assemble_row_or_column_compressed_with_maps(), sparse_assemble_row_or_column_compressed_with_two_arrays(), sparse_assemble_row_or_column_compressed_with_two_vectors(), sparse_assemble_row_or_column_compressed_with_vectors_of_pairs(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::store_positions(), synchronise_dofs(), synchronise_eqn_numbers(), oomph::METIS::uniform_partition_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_all(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_dofs_of_coordinate(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_dofs_of_field(), unrefine_uniformly(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().
|
inline |
|
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 1313 of file problem.h.
References Mesh_pt, and Sub_mesh_pt.
|
inline |
Return a pointer to the i-th submesh (const version)
Definition at line 1328 of file problem.h.
References Mesh_pt, and Sub_mesh_pt.
|
inline |
Access function to min timestep in adaptive timestepping.
Definition at line 1602 of file problem.h.
References Minimum_dt.
|
inline |
Return the number of dofs.
Definition at line 1704 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(), create_new_linear_algebra_distribution(), distribute(), oomph::FoldHandler::FoldHandler(), get_dofs(), get_fd_jacobian(), get_inverse_mass_matrix_times_residuals(), get_jacobian(), globally_convergent_line_search(), oomph::HopfHandler::HopfHandler(), load_balance(), newton_solve(), oomph::PitchForkHandler::PitchForkHandler(), oomph::MGPreconditioner< DIM >::preconditioner_solve(), prune_halo_elements_and_nodes(), oomph::HSL_MA42::reorder_elements(), oomph::AugmentedBlockFoldLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), restore_dof_values(), set_dofs(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::solve(), oomph::GS< MATRIX >::solve(), oomph::GS< CRDoubleMatrix >::solve(), oomph::DampedJacobi< MATRIX >::solve(), oomph::GMRES< MATRIX >::solve(), oomph::AugmentedProblemGMRES::solve(), oomph::DenseLU::solve(), oomph::FD_LU::solve(), oomph::SuperLUSolver::solve(), oomph::MumpsSolver::solve(), oomph::HelmholtzGMRESMG< MATRIX >::solve(), oomph::HelmholtzFGMRESMG< MATRIX >::solve(), oomph::LAPACK_QZ::solve_eigenproblem(), oomph::LAPACK_QZ::solve_eigenproblem_helper(), oomph::HSL_MA42::solve_for_one_dof(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), oomph::SuperLUSolver::solve_transpose(), sparse_assemble_row_or_column_compressed_with_lists(), sparse_assemble_row_or_column_compressed_with_maps(), sparse_assemble_row_or_column_compressed_with_two_arrays(), sparse_assemble_row_or_column_compressed_with_two_vectors(), sparse_assemble_row_or_column_compressed_with_vectors_of_pairs(), and store_current_dof_values().
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.
.
Definition at line 8803 of file problem.cc.
References actions_after_newton_solve(), actions_after_newton_step(), actions_before_newton_convergence_check(), actions_before_newton_solve(), actions_before_newton_step(), Always_take_one_newton_step, oomph::DoubleVector::clear(), oomph::TimingHelpers::convert_secs_to_formatted_string(), Dof_distribution_pt, Dof_pt, oomph::LinearSolver::enable_computation_of_gradient(), oomph::LinearSolver::enable_resolve(), oomph::LinearSolver::get_gradient(), get_residuals(), globally_convergent_line_search(), i, Jacobian_has_been_computed, Jacobian_reuse_is_enabled, Linear_solver_pt, oomph::DoubleVector::max(), Max_newton_iterations, Max_res, Max_residuals, oomph::MPI_Helpers::mpi_has_been_initialised(), ndof(), Newton_solver_tolerance, Nnewton_iter_taken, oomph::LinearAlgebraDistribution::nrow_local(), oomph::oomph_info, Problem_is_nonlinear, oomph::DoubleVector::redistribute(), Relaxation_factor, oomph::LinearSolver::reset_gradient(), oomph::LinearSolver::resolve(), Shut_up_in_newton_solve, oomph::LinearSolver::solve(), synchronise_all_dofs(), oomph::TimingHelpers::timer(), Use_globally_convergent_newton_method, and oomph::DoubleVector::values_pt().
Referenced by adaptive_unsteady_newton_solve(), newton_solve(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::LinearElasticitySmoothMesh< LINEAR_ELASTICITY_ELEMENT >::operator()(), oomph::PoissonSmoothMesh< POISSON_ELEMENT >::operator()(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), oomph::SegregatableFSIProblem::segregated_solve(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::SolidICProblem::set_newmark_initial_condition_directly(), oomph::SolidICProblem::set_static_initial_condition(), steady_newton_solve(), unsteady_newton_solve(), and oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate().
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.
. Performs at most max_adapt adaptations on all meshes.
Definition at line 16286 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.
|
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 9396 of file problem.cc.
Referenced by arc_length_step_solve_helper().
|
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 9416 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().
|
inline |
Access function to tolererance of the Newton solver, i.e. the maximum value of the residuals that will be accepted.
Definition at line 1647 of file problem.h.
References Newton_solver_tolerance.
|
inline |
Return the number of global data values.
Definition at line 1716 of file problem.h.
References Global_data_pt.
Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), assign_eqn_numbers(), copy(), describe_dofs(), distribute(), get_dofs(), set_dofs(), and set_pinned_values_to_zero().
|
inline |
Return number of submeshes.
Definition at line 1343 of file problem.h.
References Sub_mesh_pt.
Referenced by adapt(), adapt_based_on_error_estimates(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), assign_eqn_numbers(), check_halo_schemes(), copy(), copy_haloed_eqn_numbers_helper(), delete_all_external_storage(), describe_dofs(), distribute(), doc_errors(), does_pointer_correspond_to_problem_data(), dump(), get_all_error_estimates(), get_all_halo_data(), get_data_to_be_sent_during_load_balancing(), get_flat_packed_refinement_pattern_for_load_balancing(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), load_balance(), p_adapt(), p_refine_selected_elements(), p_refine_uniformly(), p_refine_uniformly_and_prune(), p_refine_uniformly_aux(), p_unrefine_uniformly(), oomph::METIS::partition_mesh(), prune_halo_elements_and_nodes(), read(), refine_distributed_base_mesh(), refine_selected_elements(), refine_uniformly(), refine_uniformly_and_prune(), refine_uniformly_aux(), remove_null_pointers_from_external_halo_node_storage(), self_test(), send_data_to_be_sent_during_load_balancing(), send_refinement_info_helper(), set_consistent_pinned_values_for_continuation(), set_timestepper_for_all_data(), setup_base_mesh_info_after_pruning(), oomph::SegregatableFSIProblem::setup_segregated_solver(), synchronise_dofs(), synchronise_eqn_numbers(), and unrefine_uniformly().
|
inline |
Return the number of time steppers.
Definition at line 1710 of file problem.h.
References Time_stepper_pt.
Referenced by oomph::IMRByBDF::actions_before_timestep(), adaptive_unsteady_newton_solve(), arc_length_step_solve(), arc_length_step_solve_helper(), copy(), get_dvaluesdt(), oomph::Multi_domain_functions::get_required_master_nodal_information_helper(), oomph::Multi_domain_functions::get_required_nodal_information_helper(), initialise_dt(), solve_adjoint_eigenproblem(), solve_eigenproblem(), steady_newton_solve(), oomph::SegregatableFSIProblem::steady_segregated_solve(), unsteady_newton_solve(), and oomph::SegregatableFSIProblem::unsteady_segregated_solve().
|
delete |
Broken assignment operator.
|
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]
void oomph::Problem::p_adapt | ( | unsigned & | n_refined, |
unsigned & | n_unrefined | ||
) |
p-adapt problem: Perform mesh adaptation for (all) refineable (sub)mesh(es), based on their own error estimates and the target errors specified in the mesh(es). Following mesh adaptation, update global mesh, and re-assign equation numbers. Return # of refined/unrefined elements. On return from this function, Problem can immediately be solved again.
Definition at line 14306 of file problem.cc.
References actions_after_adapt(), actions_before_adapt(), Assembly_handler_pt, assign_eqn_numbers(), bifurcation_adapt_helper(), oomph::AssemblyHandler::bifurcation_type(), oomph::Global_timings::Doc_comprehensive_timings, oomph::ErrorEstimator::get_element_errors(), mesh_pt(), nsub_mesh(), oomph::oomph_info, rebuild_global_mesh(), and oomph::TimingHelpers::timer().
void oomph::Problem::p_refine_selected_elements | ( | const unsigned & | i_mesh, |
const Vector< PRefineableElement * > & | elements_to_be_refined_pt | ||
) |
p-refine specified submesh by refining the elements identified by their pointers, then rebuild the problem.
Definition at line 15368 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< 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 15316 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< PRefineableElement * > & | elements_to_be_refined_pt | ) |
p-refine (one and only!) mesh by refining the elements identified by their pointers, then rebuild the problem.
Definition at line 15269 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< unsigned > & | elements_to_be_refined | ) |
p-refine (one and only!) mesh by refining the elements identified by their numbers relative to the problems' only mesh, then rebuild the problem.
Definition at line 15222 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< Vector< PRefineableElement * >> & | elements_to_be_refined_pt | ) |
p-refine all submeshes by refining the elements identified by their pointers within each submesh in a Vector of Vectors, then rebuild the problem.
Definition at line 15463 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.
Definition at line 15421 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().
|
inline |
p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem
Definition at line 2842 of file problem.h.
References oomph::DocInfo::disable_doc().
Referenced by p_refine_uniformly().
|
inline |
Do uniform p-refinement for submesh i_mesh without documentation.
Definition at line 2853 of file problem.h.
References oomph::DocInfo::disable_doc(), and 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 15847 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().
|
inline |
p-refine p-refineable sub-meshes, each as many times as specified in the vector and rebuild problem
Definition at line 2765 of file problem.h.
References oomph::DocInfo::disable_doc(), and p_refine_uniformly_aux().
|
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 2775 of file problem.h.
References p_refine_uniformly_aux().
|
inline |
p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process.
Definition at line 2812 of file problem.h.
References nsub_mesh(), and p_refine_uniformly().
|
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 2785 of file problem.h.
References oomph::DocInfo::disable_doc(), and p_refine_uniformly_aux().
Referenced by p_refine_uniformly_and_prune().
|
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 2799 of file problem.h.
References p_refine_uniformly_aux().
|
inline |
p-refine (all) p-refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process.
Definition at line 2825 of file problem.h.
References nsub_mesh(), and p_refine_uniformly_and_prune().
|
private |
Helper function to do compund p-refinement of (all) p-refineable (sub)mesh(es) uniformly as many times as specified in vector and rebuild problem; doc refinement process. Set boolean argument to true if you want to prune immediately after refining the meshes individually.
Definition at line 15655 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 | ( | 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 16082 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 | ( | 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 16023 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().
|
private |
Helper method to assemble CRDoubleMatrices from distributed on multiple processors.
Definition at line 6534 of file problem.cc.
References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, communicator_pt(), Doc_imbalance_in_parallel_assembly, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::LinearAlgebraDistribution::first_row(), oomph::AssemblyHandler::get_all_vectors_and_matrices(), get_my_eqns(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), oomph::LinearAlgebraDistribution::nrow_local(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, Parallel_sparse_assemble_previous_allocation, Problem_has_been_distributed, oomph::LinearAlgebraDistribution::rank_of_global_row(), recompute_load_balanced_assembly(), Sparse_assemble_with_arrays_allocation_increment, Sparse_assemble_with_arrays_initial_allocation, Sparse_assemble_with_arrays_previous_allocation, t, and oomph::TimingHelpers::timer().
Referenced by get_eigenproblem_matrices(), get_jacobian(), and get_residuals().
|
virtual |
Partition the global mesh, return vector specifying the processor number for each element. Virtual so that it can be overloaded by any user; the default is to use METIS to perform the partitioning (with a bit of cleaning up afterwards to sort out "special cases").
Definition at line 965 of file problem.cc.
References communicator_pt(), oomph::DocInfo::directory(), e, oomph::DocInfo::is_doc_enabled(), oomph::DocInfo::number(), oomph::oomph_info, oomph::Mesh::output(), and oomph::METIS::partition_mesh().
Referenced by distribute().
|
inline |
Access to Problem_has_been_distributed flag.
Definition at line 2283 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().
|
inline |
Access function to Problem_is_nonlinear.
Definition at line 1626 of file problem.h.
References Problem_is_nonlinear.
|
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 2272 of file problem.h.
References oomph::DocInfo::disable_doc(), and prune_halo_elements_and_nodes().
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.
Definition at line 1140 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().
|
inlinevirtual |
|
virtual |
Read refinement pattern of all refineable meshes and refine them accordingly, then read all Data and nodal position info from file for restart. Return flag to indicate if the restart was from steady or unsteady solution.
Definition at line 12314 of file problem.cc.
References actions_after_adapt(), actions_after_read_unstructured_meshes(), actions_before_adapt(), actions_before_read_unstructured_meshes(), assign_eqn_numbers(), Base_mesh_element_number_plus_one, Base_mesh_element_pt, oomph::FaceElement::bulk_element_pt(), Communicator_pt, communicator_pt(), oomph::DocInfo::disable_doc(), e, oomph::Mesh::element_pt(), Empty_actions_after_read_unstructured_meshes_has_been_called, Empty_actions_before_read_unstructured_meshes_has_been_called, oomph::TreeBasedRefineableMeshBase::get_refinement_levels(), Global_data_pt, i, initialise_dt(), oomph::GeneralisedElement::is_halo(), oomph::Mesh::is_mesh_distributed(), load_balance(), mesh_pt(), oomph::Mesh::nelement(), nsub_mesh(), oomph::oomph_info, Problem_has_been_distributed, prune_halo_elements_and_nodes(), oomph::Mesh::read(), oomph::TriangleMeshBase::read_distributed_info_for_restart(), rebuild_global_mesh(), oomph::TriangleMeshBase::reestablish_distribution_info_for_restart(), refine_uniformly(), oomph::TriangleMeshBase::remesh_from_triangulateio(), oomph::Time::resize(), oomph::Global_string_for_annotation::string(), Suppress_warning_about_actions_before_read_unstructured_meshes, time(), oomph::Time::time(), time_pt(), and oomph::TriangleMeshBase::use_triangulateio_restart().
Referenced by read().
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 1620 of file problem.cc.
References oomph::Mesh::merge_meshes(), Mesh_pt, and Sub_mesh_pt.
Referenced by adapt(), adapt_based_on_error_estimates(), build_global_mesh(), distribute(), load_balance(), p_adapt(), p_refine_selected_elements(), p_refine_uniformly(), p_refine_uniformly_aux(), p_unrefine_uniformly(), prune_halo_elements_and_nodes(), read(), oomph::SegregatableFSIProblem::rebuild_monolithic_mesh(), refine_distributed_base_mesh(), refine_selected_elements(), refine_uniformly(), refine_uniformly_aux(), send_data_to_be_sent_during_load_balancing(), unrefine_uniformly(), oomph::SegregatableFSIProblem::use_only_fluid_elements(), and oomph::SegregatableFSIProblem::use_only_solid_elements().
|
private |
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 1776 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 parallel_sparse_assemble(), 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 >>> & | to_be_refined_on_each_root, |
const unsigned & | max_level_overall | ||
) |
Load balance helper routine: refine each new base (sub)mesh based upon the elements to be refined within each tree at each root on the current processor.
Load balance helper routine: Function performs max_level_overall successive refinements of the problem's mesh(es) using the following procdure: Given ID of root element, root_element_id, and current refinement level, level, the e-th entry in refinement_info_for_root_elements[root_element_id][level][e] is equal to 2 if the e-th element (using the enumeration when the mesh has been refined to the level-th level) is to be refined during the next refinement; it's 1 if it's not to be refined.
Definition at line 20053 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 unsigned & | i_mesh, |
const Vector< RefineableElement * > & | elements_to_be_refined_pt | ||
) |
Refine specified submesh by splitting the elements identified by their pointers, then rebuild the problem.
Definition at line 15100 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< 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 15053 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< RefineableElement * > & | elements_to_be_refined_pt | ) |
Refine (one and only!) mesh by splitting the elements identified by their pointers, then rebuild the problem.
Definition at line 15007 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< unsigned > & | elements_to_be_refined | ) |
Refine (one and only!) mesh by splitting the elements identified by their numbers relative to the problems' only mesh, then rebuild the problem.
Definition at line 14961 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< Vector< RefineableElement * >> & | elements_to_be_refined_pt | ) |
Refine all submeshes by splitting the elements identified by their pointers within each submesh in a Vector of Vectors, then rebuild the problem.
Definition at line 15185 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.
Definition at line 15148 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().
|
inline |
Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem.
Definition at line 2745 of file problem.h.
References oomph::DocInfo::disable_doc().
Referenced by read(), and refine_uniformly().
|
inline |
Do uniform refinement for submesh i_mesh without documentation.
Definition at line 2756 of file problem.h.
References oomph::DocInfo::disable_doc(), 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 15803 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().
|
inline |
Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem.
Definition at line 2680 of file problem.h.
References oomph::DocInfo::disable_doc(), and refine_uniformly_aux().
|
inline |
Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process.
Definition at line 2690 of file problem.h.
References refine_uniformly_aux().
|
inline |
Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process.
Definition at line 2719 of file problem.h.
References nsub_mesh(), and refine_uniformly().
|
inline |
Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem. Prune after refinements.
Definition at line 2700 of file problem.h.
References oomph::DocInfo::disable_doc(), and refine_uniformly_aux().
Referenced by refine_uniformly_and_prune().
|
inline |
Refine refineable sub-meshes, each as many times as specified in the vector and rebuild problem; doc refinement process.
Definition at line 2710 of file problem.h.
References refine_uniformly_aux().
|
inline |
Refine (all) refineable (sub)mesh(es) uniformly and rebuild problem; doc refinement process.
Definition at line 2732 of file problem.h.
References nsub_mesh(), and refine_uniformly_and_prune().
|
private |
Helper function to do compund refinement of (all) refineable (sub)mesh(es) uniformly as many times as specified in vector and rebuild problem; doc refinement process. Set boolean argument to true if you want to prune immediately after refining the meshes individually.
Definition at line 15508 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().
|
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 2655 of file problem.cc.
References communicator_pt(), e, oomph::Mesh::element_pt(), oomph::Data::eqn_number(), oomph::Mesh::external_halo_element_pt(), oomph::Node::get_boundaries_pt(), oomph::Node::hanging_pt(), i, oomph::Node::is_hanging(), oomph::HangInfo::master_node_pt(), oomph::HangInfo::master_weight(), mesh_pt(), oomph::Node::ndim(), oomph::Mesh::nelement(), oomph::Mesh::nexternal_halo_element(), oomph::HangInfo::nmaster(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Mesh::null_external_halo_node(), oomph::Data::nvalue(), oomph::oomph_info, oomph::FiniteElement::output(), oomph::Mesh::remove_boundary_node(), oomph::HangInfo::set_master_node_pt(), oomph::OomphInfo::stream_pt(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().
Referenced by assign_eqn_numbers().
|
private |
Consolidate external halo node storage by removing nulled out pointers in external halo and haloed schemes for all meshes.
Definition at line 3265 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().
|
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 2514 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 10295 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 8660 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 | ( | ) |
Self-test: Check meshes and global data. Return 0 for OK.
Definition at line 13339 of file problem.cc.
References check_halo_schemes(), oomph::DocInfo::disable_doc(), Global_data_pt, mesh_pt(), nsub_mesh(), oomph::oomph_info, and Problem_has_been_distributed.
Referenced by oomph::BiharmonicProblem< DIM >::actions_before_newton_solve(), and oomph::BiharmonicFluidProblem< DIM >::actions_before_newton_solve().
|
private |
Load balance helper routine: Send data to other processors during load balancing.
Definition at line 19012 of file problem.cc.
References Base_mesh_element_pt, communicator_pt(), e, i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), nsub_mesh(), oomph::Data::nvalue(), oomph::GeneralisedElement::read_internal_data_values_from_vector(), oomph::Node::read_values_from_vector(), rebuild_global_mesh(), oomph::Node::resize(), oomph::Tree::stick_leaves_into_vector(), synchronise_dofs(), and oomph::RefineableElement::tree_pt().
Referenced by load_balance().
|
private |
Send refinement information between processors.
Definition at line 18391 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().
|
inline |
Function to turn on analytic calculation of the parameter derivatives in continuation and bifurcation detection problems.
Definition at line 259 of file problem.h.
References Calculate_dparameter_analytic.
|
inline |
Function to turn on analytic calculation of the parameter derivatives in continuation and bifurcation detection problems.
Definition at line 292 of file problem.h.
References Calculate_hessian_products_analytic.
|
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 10486 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.
Definition at line 1700 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().
|
inline |
Set the use of the default partition in the load balance.
Definition at line 1465 of file problem.h.
References Use_default_partition_in_load_balance.
|
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 3498 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 | ||
) |
Set the history values of the dofs.
Set history values of dofs.
Definition at line 3520 of file problem.cc.
References distributed(), oomph::Mesh::element_pt(), oomph::Data::eqn_number(), Global_data_pt, i, oomph::GeneralisedElement::internal_data_pt(), mesh_pt(), nglobal_data(), oomph::GeneralisedElement::ninternal_data(), oomph::Mesh::node_pt(), oomph::Data::nvalue(), oomph::Data::set_value(), and t.
void oomph::Problem::set_dofs | ( | const unsigned & | t, |
Vector< double * > & | dof_pt | ||
) |
Set history values of dofs from the type of vector stored in problem::Dof_pt.
Definition at line 3584 of file problem.cc.
References distributed(), dof_pt(), oomph::Mesh::element_pt(), oomph::Data::eqn_number(), Global_data_pt, i, oomph::GeneralisedElement::internal_data_pt(), mesh_pt(), nglobal_data(), oomph::GeneralisedElement::ninternal_data(), oomph::Mesh::node_pt(), oomph::Data::nvalue(), oomph::Data::set_value(), and t.
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 1673 of file problem.cc.
References Explicit_time_stepper_pt, explicit_time_stepper_pt(), oomph::oomph_info, and Time_pt.
|
inline |
Manually set first and last elements for parallel assembly of non-distributed problem.
Definition at line 1008 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().
|
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 1218 of file problem.h.
References Default_set_initial_condition_called.
Referenced by doubly_adaptive_unsteady_newton_solve_helper(), and unsteady_newton_solve().
void oomph::Problem::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)
Definition at line 4282 of file problem.cc.
References e, oomph::Mesh::element_pt(), Global_data_pt, i, oomph::GeneralisedElement::internal_data_pt(), oomph::Data::is_pinned(), Mesh_pt, oomph::Node::ndim(), oomph::Mesh::nelement(), nglobal_data(), oomph::GeneralisedElement::ninternal_data(), oomph::Mesh::nnode(), oomph::Mesh::node_pt(), oomph::Node::nposition_type(), oomph::Data::nvalue(), oomph::SolidNode::position_is_pinned(), oomph::Data::set_value(), Sub_mesh_pt, and oomph::Node::x_gen().
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 11635 of file problem.cc.
References assign_eqn_numbers(), Global_data_pt, i, Mesh_pt, nsub_mesh(), Problem_has_been_distributed, oomph::Mesh::set_mesh_level_time_stepper(), oomph::Mesh::set_nodal_and_elemental_time_stepper(), Sub_mesh_pt, and time_stepper_pt().
Referenced by arc_length_step_solve().
|
private |
Helper function to re-setup the Base_mesh enumeration (used during load balancing) after pruning.
Definition at line 20165 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().
|
protected |
Function that is used to setup the halo scheme.
Setup the halo scheme for the degrees of freedom.
Definition at line 387 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().
|
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 231 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().
|
virtual |
Shift all values along to prepare for next timestep.
Shift all time-dependent data along for next timestep.
Definition at line 11697 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().
|
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 2529 of file problem.h.
References Sign_of_jacobian.
Referenced by oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::BlockPitchForkLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::solve(), oomph::DenseLU::solve(), oomph::FD_LU::solve(), oomph::SuperLUSolver::solve(), oomph::HSL_MA42::solve_for_one_dof(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), and oomph::SuperLUSolver::solve_transpose().
|
inline |
Solve an adjoint eigenvalue problem using the same procedure as solve_eigenproblem but only return the eigenvalues, not the eigenvectors. At least n_eval eigenvalues are computed. See the documentation on that function for more details.
Definition at line 2039 of file problem.h.
References solve_adjoint_eigenproblem().
void oomph::Problem::solve_adjoint_eigenproblem | ( | const unsigned & | n_eval, |
Vector< std::complex< double >> & | eigenvalue, | ||
Vector< DoubleVector > & | eigenvector_real, | ||
Vector< DoubleVector > & | eigenvector_imag, | ||
const bool & | steady = true |
||
) |
Solve an adjoint eigenvalue problem using the same procedure as solve_eigenproblem. See the documentation on that function for more details.
Solve the adjoint eigenproblem.
Definition at line 8363 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_adjoint_eigenproblem().
|
inline |
Solve an eigenproblem as assembled by the Problem's constituent elements but only return the eigenvalues, not the eigenvectors. At least n_eval eigenvalues are computed. 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 — this is almost certainly never wanted. Note that the eigenvalues may be infinite and are therefore returned as where is complex while is real. The actual eigenvalues may then be computed by doing the division, checking for zero betas to avoid NaNs.
Definition at line 2014 of file problem.h.
References solve_eigenproblem().
void oomph::Problem::solve_eigenproblem | ( | const unsigned & | n_eval, |
Vector< std::complex< double >> & | alpha, | ||
Vector< double > & | beta, | ||
Vector< DoubleVector > & | eigenvector_real, | ||
Vector< DoubleVector > & | eigenvector_imag, | ||
const bool & | steady = true |
||
) |
Solve an eigenproblem as assembled by the Problem's constituent elements. Calculate (at least) 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. The eigenvalues and eigenvectors are, in general, complex. Eigenvalues may be infinite and are therefore returned as where is complex while is real. The actual eigenvalues may then be computed by doing the division, checking for zero betas to avoid NaNs. There's a convenience wrapper to this function that simply computes these eigenvalues regardless. That version may die in NaN checking is enabled (via the fenv.h header and the associated feenable function).
Solve the eigenproblem.
Definition at line 8232 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().
|
inline |
Solve an eigenproblem as assembled by the Problem's constituent elements but only return the eigenvalues, not the eigenvectors. At least n_eval eigenvalues are computed. 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 — this is almost certainly never wanted. Note that the eigenvalues may be infinite. In this case it's safer to use the other version of this function which returns the eigenvalues in terms of a fractional representation.
Definition at line 1989 of file problem.h.
References solve_eigenproblem().
void oomph::Problem::solve_eigenproblem | ( | const unsigned & | n_eval, |
Vector< std::complex< double >> & | eigenvalue, | ||
Vector< DoubleVector > & | eigenvector_real, | ||
Vector< DoubleVector > & | eigenvector_imag, | ||
const bool & | steady = true |
||
) |
Solve an eigenproblem as assembled by the Problem's constituent elements. Calculate (at least) 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. Note that the eigenvalues and eigenvectors are, in general, complex and the eigenvalues may be infinite. In this case it's safer to use the other version of this function which returns the eigenvalues in terms of a fractional representation.
Solve the eigenproblem.
Definition at line 8299 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().
|
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 4462 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().
|
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 4908 of file problem.cc.
References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::AssemblyHandler::get_all_vectors_and_matrices(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, oomph::pause(), Pause_at_end_of_sparse_assembly, Problem_has_been_distributed, recompute_load_balanced_assembly(), and oomph::TimingHelpers::timer().
Referenced by sparse_assemble_row_or_column_compressed().
|
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 4562 of file problem.cc.
References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::AssemblyHandler::get_all_vectors_and_matrices(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, oomph::pause(), Pause_at_end_of_sparse_assembly, Problem_has_been_distributed, recompute_load_balanced_assembly(), and oomph::TimingHelpers::timer().
Referenced by sparse_assemble_row_or_column_compressed().
|
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 6039 of file problem.cc.
References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::AssemblyHandler::get_all_vectors_and_matrices(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, oomph::pause(), Pause_at_end_of_sparse_assembly, Problem_has_been_distributed, recompute_load_balanced_assembly(), Sparse_assemble_with_arrays_allocation_increment, Sparse_assemble_with_arrays_initial_allocation, Sparse_assemble_with_arrays_previous_allocation, and oomph::TimingHelpers::timer().
Referenced by sparse_assemble_row_or_column_compressed().
|
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 5676 of file problem.cc.
References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::AssemblyHandler::get_all_vectors_and_matrices(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, oomph::pause(), Pause_at_end_of_sparse_assembly, Problem_has_been_distributed, recompute_load_balanced_assembly(), and oomph::TimingHelpers::timer().
Referenced by sparse_assemble_row_or_column_compressed().
|
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 5323 of file problem.cc.
References Assembly_handler_pt, assembly_handler_pt(), Communicator_pt, e, oomph::Mesh::element_pt(), Elemental_assembly_time, oomph::AssemblyHandler::eqn_number(), First_el_for_assembly, oomph::AssemblyHandler::get_all_vectors_and_matrices(), i, oomph::GeneralisedElement::is_halo(), Last_el_plus_one_for_assembly, mesh_pt(), Must_recompute_load_balance_for_assembly, ndof(), oomph::AssemblyHandler::ndof(), oomph::Mesh::nelement(), Numerical_zero_for_sparse_assembly, oomph::oomph_info, oomph::pause(), Pause_at_end_of_sparse_assembly, Problem_has_been_distributed, recompute_load_balanced_assembly(), and oomph::TimingHelpers::timer().
Referenced by sparse_assemble_row_or_column_compressed().
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 9312 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 8614 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().
|
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 10079 of file problem.cc.
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 16502 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.
Definition at line 16525 of file problem.cc.
References oomph::GeneralisedElement::add_internal_data_values_to_vector(), 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_element_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(), nsub_mesh(), oomph::GeneralisedElement::read_internal_data_values_from_vector(), and oomph::Node::read_values_from_vector().
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 | ) |
Classify any non-classified nodes into halo/haloed and synchronise equation numbers. Return the total number of degrees of freedom in the overall problem.
Synchronise equation numbers and return the total number of degrees of freedom in the overall problem.
Definition at line 16768 of file problem.cc.
References oomph::Mesh::assign_local_eqn_numbers(), oomph::LinearAlgebraDistribution::build(), Communicator_pt, copy_haloed_eqn_numbers_helper(), oomph::Global_timings::Doc_comprehensive_timings, Dof_distribution_pt, Dof_pt, e, oomph::Mesh::element_pt(), oomph::Data::eqn_number(), i, oomph::GeneralisedElement::internal_data_pt(), mesh_pt(), oomph::Mesh::nelement(), oomph::GeneralisedElement::ninternal_data(), oomph::Mesh::nnode(), oomph::Mesh::node_pt(), oomph::LinearAlgebraDistribution::nrow(), nsub_mesh(), oomph::Data::nvalue(), oomph::oomph_info, Store_local_dof_pt_in_elements, oomph::TimingHelpers::timer(), and oomph::SolidNode::variable_position_pt().
Referenced by assign_eqn_numbers().
|
inline |
Access function to the safety factor in adaptive timestepping.
Definition at line 1614 of file problem.h.
References Target_error_safety_factor.
|
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 11594 of file problem.cc.
References oomph::Time::time(), and Time_pt.
Referenced by oomph::WomersleyProblem< ELEMENT, DIM >::actions_before_implicit_timestep(), calculate_predictions(), read(), oomph::SolidICProblem::set_static_initial_condition(), and oomph::SegregatableFSIProblem::t_spent_on_actual_solve().
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 11612 of file problem.cc.
References oomph::Time::time(), and Time_pt.
|
inline |
Access function for Time_adaptive_newton_crash_on_solve_fail.
Definition at line 1640 of file problem.h.
References Time_adaptive_newton_crash_on_solve_fail.
|
inline |
Return a pointer to the global time object.
Definition at line 1524 of file problem.h.
References Time_pt.
Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::WomersleyProblem< ELEMENT, DIM >::actions_before_implicit_timestep(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), adaptive_unsteady_newton_solve(), calculate_predictions(), copy(), doubly_adaptive_unsteady_newton_solve_helper(), dump(), explicit_timestep(), read(), unsteady_newton_solve(), and oomph::SegregatableFSIProblem::unsteady_segregated_solve().
|
inlinevirtual |
Return a pointer to the global time object (const version).
Reimplemented from oomph::ExplicitTimeSteppableObject.
Definition at line 1530 of file problem.h.
References Time_pt.
|
inline |
Access function for the pointer to the first (presumably only) timestepper.
Definition at line 1544 of file problem.h.
References Time_stepper_pt.
Referenced by adaptive_unsteady_newton_solve(), add_time_stepper_pt(), arc_length_step_solve(), arc_length_step_solve_helper(), calculate_predictions(), oomph::Multi_domain_functions::construct_new_external_halo_master_node_helper(), oomph::Multi_domain_functions::construct_new_external_halo_node_helper(), copy(), get_dvaluesdt(), oomph::Multi_domain_functions::get_required_master_nodal_information_helper(), oomph::Multi_domain_functions::get_required_nodal_information_helper(), initialise_dt(), set_timestepper_for_all_data(), solve_adjoint_eigenproblem(), solve_eigenproblem(), steady_newton_solve(), oomph::SegregatableFSIProblem::steady_segregated_solve(), unsteady_newton_solve(), oomph::SegregatableFSIProblem::unsteady_segregated_solve(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().
|
inline |
Access function for the pointer to the first (presumably only) timestepper.
Definition at line 1557 of file problem.h.
References Time_stepper_pt.
|
inline |
Return a pointer to the i-th timestepper.
Definition at line 1569 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 15894 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 15965 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().
|
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.
|
inline |
Function to turn off analytic calculation of the parameter derivatives in continuation and bifurcation detection problems.
Definition at line 299 of file problem.h.
References Calculate_hessian_products_analytic.
|
inline |
Do not use the default partition in the load balance.
Definition at line 1471 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 10983 of file problem.cc.
Referenced by doubly_adaptive_unsteady_newton_solve_helper(), and 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 10996 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, | ||
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 16135 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().
|
inline |
Definition at line 2099 of file problem.h.
References Use_predictor_values_as_initial_guess.
Referenced by oomph::IMRByBDF::actions_before_timestep(), and calculate_predictions().
|
friend |
Definition at line 163 of file problem.h.
Referenced by activate_bifurcation_tracking(), and activate_fold_tracking().
|
friend |
|
friend |
Definition at line 165 of file problem.h.
Referenced by activate_hopf_tracking().
|
friend |
Definition at line 162 of file problem.h.
Referenced by activate_pitchfork_tracking().
|
friend |
Definition at line 156 of file problem.h.
Referenced by activate_bifurcation_tracking(), and activate_fold_tracking().
|
friend |
Definition at line 158 of file problem.h.
Referenced by activate_hopf_tracking().
|
friend |
|
friend |
Definition at line 157 of file problem.h.
Referenced by activate_pitchfork_tracking().
|
protected |
Boolean to indicate whether a Newton step should be taken even if the initial residuals are below the required tolerance.
Definition at line 2302 of file problem.h.
Referenced by newton_solve(), and newton_solve_continuation().
|
protected |
Boolean to indicate whether an arc-length step has been taken.
Definition at line 819 of file problem.h.
Referenced by arc_length_step_solve(), arc_length_step_solve_helper(), and reset_arc_length_parameters().
|
private |
Definition at line 188 of file problem.h.
Referenced by activate_bifurcation_tracking(), activate_fold_tracking(), activate_hopf_tracking(), activate_pitchfork_tracking(), adapt(), assembly_handler_pt(), bifurcation_parameter_pt(), doc_errors(), get_bifurcation_eigenfunction(), get_derivative_wrt_global_parameter(), get_eigenproblem_matrices(), get_hessian_vector_products(), get_jacobian(), get_residuals(), p_adapt(), parallel_sparse_assemble(), Problem(), reset_assembly_handler_to_default(), setup_dof_halo_scheme(), setup_element_count_per_dof(), 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().
|
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 541 of file problem.h.
Referenced by distribute(), get_data_to_be_sent_during_load_balancing(), get_flat_packed_refinement_pattern_for_load_balancing(), load_balance(), prune_halo_elements_and_nodes(), read(), refine_distributed_base_mesh(), send_refinement_info_helper(), and setup_base_mesh_info_after_pruning().
|
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 551 of file problem.h.
Referenced by distribute(), dump(), get_data_to_be_sent_during_load_balancing(), load_balance(), prune_halo_elements_and_nodes(), read(), send_data_to_be_sent_during_load_balancing(), and setup_base_mesh_info_after_pruning().
|
protected |
Boolean to control bifurcation detection via determinant of Jacobian.
Definition at line 810 of file problem.h.
Referenced by arc_length_step_solve_helper().
|
protected |
Boolean to control wheter bisection is used to located bifurcation.
Definition at line 813 of file problem.h.
Referenced by arc_length_step_solve_helper().
|
protected |
Boolean to bypass check of increase in dofs during pruning.
Definition at line 987 of file problem.h.
Referenced by p_refine_uniformly_aux(), prune_halo_elements_and_nodes(), and refine_uniformly_aux().
|
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 242 of file problem.h.
Referenced by is_dparameter_calculated_analytically(), set_analytic_dparameter(), and unset_analytic_dparameter().
|
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 247 of file problem.h.
Referenced by are_hessian_products_calculated_analytically(), set_analytic_hessian_products(), and unset_analytic_hessian_products().
|
protected |
The communicator for this problem.
Definition at line 1262 of file problem.h.
Referenced by assign_eqn_numbers(), calculate_continuation_derivatives(), communicator_pt(), create_new_linear_algebra_distribution(), get_eigenproblem_matrices(), get_jacobian(), load_balance(), parallel_sparse_assemble(), Problem(), read(), oomph::SolidICProblem::set_static_initial_condition(), 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(), synchronise_eqn_numbers(), and ~Problem().
|
protected |
The direction of the change in parameter that will ensure that a branch is followed in one direction only.
Definition at line 769 of file problem.h.
Referenced by calculate_continuation_derivatives_helper(), and reset_arc_length_parameters().
|
staticprotected |
Storage for the single static continuation timestorage object.
The continuation timestepper object.
Definition at line 781 of file problem.h.
Referenced by arc_length_step_solve(), and set_consistent_pinned_values_for_continuation().
Vector of pointers to copies of the problem used in adaptive bifurcation tracking problems (ALH: TEMPORARY HACK, WILL BE FIXED)
Definition at line 237 of file problem.h.
Referenced by adapt(), bifurcation_adapt_helper(), and ~Problem().
|
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().
|
private |
Pointer to the default eigensolver.
Definition at line 194 of file problem.h.
Referenced by Problem(), and ~Problem().
|
private |
Pointer to the default linear solver.
Definition at line 191 of file problem.h.
Referenced by Problem(), and ~Problem().
|
private |
Has default set_initial_condition function been called? Default: false.
Definition at line 214 of file problem.h.
Referenced by doubly_adaptive_unsteady_newton_solve_helper(), set_initial_condition(), and unsteady_newton_solve().
|
protected |
The desired number of Newton Steps to reach convergence at each step along the arc.
Definition at line 804 of file problem.h.
Referenced by arc_length_step_solve_helper().
|
protected |
Proportion of the arc-length to taken by the parameter.
Definition at line 754 of file problem.h.
Referenced by calculate_continuation_derivatives(), and calculate_continuation_derivatives_fd().
|
protected |
Is the problem a discontinuous one, i.e. can the elemental contributions be treated independently. Default: false.
Definition at line 703 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().
|
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 976 of file problem.h.
Referenced by create_new_linear_algebra_distribution(), and distributed_problem_matrix_distribution().
|
private |
Boolean to switch on assessment of load imbalance in parallel assembly of distributed problem.
Definition at line 513 of file problem.h.
Referenced by disable_doc_imbalance_in_parallel_assembly(), enable_doc_imbalance_in_parallel_assembly(), and parallel_sparse_assemble().
|
protected |
Protected boolean flag to provide comprehensive timimings during problem distribution. Initialised to false.
Definition at line 640 of file problem.h.
Referenced by distribute().
|
protected |
Storage for the present values of the variables.
Definition at line 797 of file problem.h.
Referenced by adapt(), arc_length_step_solve_helper(), calculate_continuation_derivatives_fd_helper(), and dof_current().
|
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 791 of file problem.h.
Referenced by dof_current().
|
protected |
Storage for the derivative of the problem variables wrt arc-length.
Definition at line 794 of file problem.h.
Referenced by adapt(), arc_length_step_solve_helper(), calculate_continuation_derivatives_helper(), dof_derivative(), and reset_arc_length_parameters().
|
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 786 of file problem.h.
Referenced by dof_derivative().
|
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 463 of file problem.h.
Referenced by adapt(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), add_eigenvector_to_dofs(), arc_length_step_solve_helper(), assign_eigenvector_to_dofs(), assign_eqn_numbers(), calculate_continuation_derivatives_fd_helper(), calculate_continuation_derivatives_helper(), create_new_linear_algebra_distribution(), dof_distribution_pt(), oomph::FoldHandler::FoldHandler(), get_dofs(), get_hessian_vector_products(), 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().
|
protected |
Vector of pointers to dofs.
Definition at line 557 of file problem.h.
Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), add_to_dofs(), arc_length_step_solve_helper(), assign_eqn_numbers(), calculate_continuation_derivatives_fd_helper(), calculate_predictions(), dof(), dof_current(), dof_derivative(), dof_pt(), oomph::FoldHandler::FoldHandler(), get_dofs(), get_fd_jacobian(), oomph::FoldHandler::get_jacobian(), oomph::HopfHandler::get_jacobian(), globally_convergent_line_search(), oomph::HopfHandler::HopfHandler(), newton_solve(), newton_solve_continuation(), oomph::PitchForkHandler::PitchForkHandler(), restore_dof_values(), set_dofs(), 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(), and oomph::PitchForkHandler::~PitchForkHandler().
|
protected |
Storage for the current step value.
Definition at line 800 of file problem.h.
Referenced by arc_length_step_solve_helper(), calculate_continuation_derivatives_fd_helper(), and newton_solve_continuation().
|
protected |
Maximum possible increase of dt between time-steps in adaptive schemes.
Definition at line 716 of file problem.h.
Referenced by adaptive_unsteady_newton_solve().
|
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 721 of file problem.h.
Referenced by adaptive_unsteady_newton_solve().
|
private |
Pointer to the eigen solver for the problem.
Definition at line 185 of file problem.h.
Referenced by eigen_solver_pt(), Problem(), solve_adjoint_eigenproblem(), and solve_eigenproblem().
|
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 563 of file problem.h.
Referenced by setup_element_count_per_dof().
|
protected |
Storage for assembly times (used for load balancing)
Definition at line 576 of file problem.h.
Referenced by assign_eqn_numbers(), clear_elemental_assembly_time(), distribute(), elemental_assembly_time(), parallel_sparse_assemble(), recompute_load_balanced_assembly(), 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().
|
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().
|
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().
|
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().
|
protected |
Definition at line 688 of file problem.h.
Referenced by get_hessian_vector_products().
|
private |
First element to be assembled by given processor for non-distributed problem (only kept up to date when default assignment is used)
Definition at line 522 of file problem.h.
Referenced by get_first_and_last_element_for_assembly(), parallel_sparse_assemble(), recompute_load_balanced_assembly(), set_default_first_and_last_element_for_assembly(), set_first_and_last_element_for_assembly(), 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().
|
protected |
Boolean to indicate whether a sign change has occured in the Jacobian.
Definition at line 816 of file problem.h.
Referenced by arc_length_step_solve_helper(), and reset_arc_length_parameters().
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 428 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().
|
protected |
Storage for the halo degrees of freedom (only required) when accessing via the global equation number in distributed problems.
Definition at line 584 of file problem.h.
Referenced by global_dof_pt(), and setup_dof_halo_scheme().
|
protected |
Pointer to the halo scheme for any global vectors that have the Dof_distribution.
Definition at line 580 of file problem.h.
Referenced by get_hessian_vector_products(), global_dof_pt(), oomph::PitchForkHandler::PitchForkHandler(), oomph::BlockPitchForkLinearSolver::resolve(), setup_dof_halo_scheme(), setup_element_count_per_dof(), and oomph::BlockPitchForkLinearSolver::solve().
|
protected |
Has a Jacobian been computed (and can therefore be re-used if required)? Default: false.
Definition at line 625 of file problem.h.
Referenced by disable_jacobian_reuse(), enable_jacobian_reuse(), and newton_solve().
|
protected |
Is re-use of Jacobian in Newton iteration enabled? Default: false.
Definition at line 621 of file problem.h.
Referenced by disable_jacobian_reuse(), enable_jacobian_reuse(), jacobian_reuse_is_enabled(), and newton_solve().
|
protected |
Boolean to decide if a timestep is to be rejected if the error estimate post-solve (computed by global_temporal_error_norm()) exceeds the tolerance required in the call to adaptive_unsteady_newton_solve(...). Defaults to true.
Definition at line 2314 of file problem.h.
Referenced by adaptive_unsteady_newton_solve().
|
private |
Last element (plus one) to be assembled by given processor for non-distributed problem (only kept up to date when default assignment is used)
Definition at line 527 of file problem.h.
Referenced by get_first_and_last_element_for_assembly(), parallel_sparse_assemble(), recompute_load_balanced_assembly(), set_default_first_and_last_element_for_assembly(), set_first_and_last_element_for_assembly(), 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().
|
private |
Pointer to the linear solver for the problem.
Definition at line 176 of file problem.h.
Referenced by activate_bifurcation_tracking(), activate_fold_tracking(), activate_hopf_tracking(), activate_pitchfork_tracking(), calculate_continuation_derivatives(), linear_solver_pt(), newton_solve(), newton_solve_continuation(), and Problem().
|
protected |
Has the mass matrix been computed (and can therefore be reused) Default: false.
Definition at line 698 of file problem.h.
Referenced by disable_mass_matrix_reuse(), enable_mass_matrix_reuse(), and get_inverse_mass_matrix_times_residuals().
|
protected |
Is re-use of the mass matrix in explicit timestepping enabled Default:false.
Definition at line 694 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().
|
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().
|
protected |
Maximum number of Newton iterations.
Definition at line 602 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 2280 of file problem.h.
Referenced by check_halo_schemes().
|
protected |
Maximum residuals at start and after each newton iteration.
Definition at line 609 of file problem.h.
Referenced by newton_solve().
|
protected |
Maximum desired residual: if the maximum residual exceeds this value, the program will exit.
Definition at line 613 of file problem.h.
Referenced by max_residuals(), newton_solve(), newton_solve_continuation(), steady_newton_solve(), and unsteady_newton_solve().
|
protected |
Maximum desired dt.
Definition at line 712 of file problem.h.
Referenced by adaptive_unsteady_newton_solve(), and maximum_dt().
|
private |
The mesh pointer.
Definition at line 170 of file problem.h.
Referenced by assign_eqn_numbers(), assign_initial_values_impulsive(), build_global_mesh(), calculate_predictions(), describe_dofs(), does_pointer_correspond_to_problem_data(), get_hessian_vector_products(), get_jacobian(), get_residuals(), mesh_pt(), rebuild_global_mesh(), recompute_load_balanced_assembly(), set_consistent_pinned_values_for_continuation(), set_default_first_and_last_element_for_assembly(), set_pinned_values_to_zero(), set_timestepper_for_all_data(), shift_time_values(), and ~Problem().
|
protected |
Minimum desired value of arc-length.
Definition at line 807 of file problem.h.
Referenced by arc_length_step_solve_helper().
|
protected |
Minimum desired dt: if dt falls below this value, exit.
Definition at line 709 of file problem.h.
Referenced by adaptive_unsteady_newton_solve(), and minimum_dt().
|
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 745 of file problem.h.
Referenced by adaptive_unsteady_newton_solve().
|
private |
Boolean indicating that the division of elements over processors during the assembly process must be re-load-balanced. (only used for non-distributed problems)
Definition at line 532 of file problem.h.
Referenced by assign_eqn_numbers(), clear_elemental_assembly_time(), distribute(), parallel_sparse_assemble(), 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().
|
protected |
The Tolerance below which the Newton Method is deemed to have converged.
Definition at line 599 of file problem.h.
Referenced by oomph::SegregatableFSIProblem::assess_convergence_based_on_absolute_solid_change(), oomph::SegregatableFSIProblem::assess_convergence_based_on_max_global_residual(), oomph::SegregatableFSIProblem::assess_convergence_based_on_relative_solid_change(), newton_solve(), newton_solve_continuation(), newton_solver_tolerance(), and oomph::SegregatableFSIProblem::SegregatableFSIProblem().
|
protected |
Actual number of Newton iterations taken during the most recent iteration.
Definition at line 606 of file problem.h.
Referenced by newton_solve().
|
protected |
A tolerance used to determine whether the entry in a sparse matrix is zero. If it is then storage need not be allocated.
Definition at line 674 of file problem.h.
Referenced by parallel_sparse_assemble(), 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().
|
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 980 of file problem.h.
Referenced by assign_eqn_numbers(), and parallel_sparse_assemble().
|
protected |
Storage for the present value of the global parameter.
Definition at line 775 of file problem.h.
Referenced by arc_length_step_solve_helper(), calculate_continuation_derivatives_fd_helper(), and newton_solve_continuation().
|
protected |
Storage for the derivative of the global parameter wrt arc-length.
Definition at line 772 of file problem.h.
Referenced by arc_length_step_solve_helper(), calculate_continuation_derivatives(), calculate_continuation_derivatives_fd(), calculate_continuation_derivatives_fd_helper(), calculate_continuation_derivatives_helper(), newton_solve_continuation(), and reset_arc_length_parameters().
|
protected |
Protected boolean flag to halt program execution during sparse assemble process to assess peak memory usage. Initialised to false (obviously!)
Definition at line 636 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().
|
protected |
Has the problem been distributed amongst multiple processors?
Definition at line 984 of file problem.h.
Referenced by arc_length_step_solve_helper(), assign_eqn_numbers(), create_new_linear_algebra_distribution(), disable_problem_distributed(), distribute(), distributed(), doubly_adaptive_unsteady_newton_solve_helper(), dump(), enable_problem_distributed(), get_fd_jacobian(), get_hessian_vector_products(), global_dof_pt(), load_balance(), newton_solve(), parallel_sparse_assemble(), problem_has_been_distributed(), prune_halo_elements_and_nodes(), read(), restore_dof_values(), self_test(), set_default_first_and_last_element_for_assembly(), oomph::SolidICProblem::set_static_initial_condition(), set_timestepper_for_all_data(), setup_element_count_per_dof(), 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(), store_current_dof_values(), and unsteady_newton_solve().
|
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 631 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().
|
protected |
Relaxation fator for Newton method (only a fractional Newton correction is applied if this is less than 1; default 1).
Definition at line 595 of file problem.h.
Referenced by newton_solve().
|
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().
|
protected |
Boolean to control whether arc-length should be scaled.
Definition at line 751 of file problem.h.
Referenced by calculate_continuation_derivatives(), and calculate_continuation_derivatives_fd().
bool oomph::Problem::Shut_up_in_newton_solve |
Boolean to indicate if all output is suppressed in Problem::newton_solve(). Defaults to false.
Definition at line 2296 of file problem.h.
Referenced by disable_info_in_newton_solve(), enable_info_in_newton_solve(), get_inverse_mass_matrix_times_residuals(), newton_solve(), newton_solve_continuation(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), recompute_load_balanced_assembly(), and set_default_first_and_last_element_for_assembly().
|
protected |
Storage for the sign of the global Jacobian.
Definition at line 765 of file problem.h.
Referenced by arc_length_step_solve_helper(), reset_arc_length_parameters(), and sign_of_jacobian().
|
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 666 of file problem.h.
Referenced by parallel_sparse_assemble(), and sparse_assemble_row_or_column_compressed_with_two_arrays().
|
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 661 of file problem.h.
Referenced by parallel_sparse_assemble(), and sparse_assemble_row_or_column_compressed_with_two_arrays().
the number of elements in each row of a compressed matrix in the previous matrix assembly.
Definition at line 670 of file problem.h.
Referenced by assign_eqn_numbers(), oomph::FoldHandler::FoldHandler(), oomph::HopfHandler::HopfHandler(), parallel_sparse_assemble(), oomph::PitchForkHandler::PitchForkHandler(), recompute_load_balanced_assembly(), 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(), sparse_assemble_row_or_column_compressed_with_two_arrays(), oomph::FoldHandler::~FoldHandler(), oomph::HopfHandler::~HopfHandler(), and oomph::PitchForkHandler::~PitchForkHandler().
|
protected |
Flag to determine which sparse assembly method to use By default we use assembly by vectors of pairs.
Definition at line 644 of file problem.h.
Referenced by sparse_assemble_row_or_column_compressed().
|
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 of pointers to submeshes.
Definition at line 173 of file problem.h.
Referenced by add_sub_mesh(), assign_eqn_numbers(), build_global_mesh(), describe_dofs(), does_pointer_correspond_to_problem_data(), flush_sub_meshes(), mesh_pt(), nsub_mesh(), Problem(), rebuild_global_mesh(), set_consistent_pinned_values_for_continuation(), set_pinned_values_to_zero(), set_timestepper_for_all_data(), and ~Problem().
|
static |
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 320 of file problem.h.
Referenced by read().
|
protected |
Safety factor to ensure we are aiming for a target error, TARGET, that is below our tolerance: TARGET = Target_error_safety_factor * TOL For this to make sense Target_error_safety_factor should be <1.0. If Keep_temporal_error_below_tolerance is set to true (default) then, without this, timesteps suggested by the adaptive time-stepper can be expected to lead to rejection (because the error exceeds TOL) about half of the time. Harier et al. (1993, ISBN:978-3-540-56670-0, p168) suggest a value around 0.25-0.40 to be the most efficient, however this is highly problem and timestepper dependent and sometimes as high as 0.95 may be effective at improving the robustness of timestep prediction.
Note: Despite this, we are setting this to default to 1.0 to prevent introducing any change in the default behaviour of oomph-lib for now.
Definition at line 738 of file problem.h.
Referenced by adaptive_unsteady_newton_solve(), and target_error_safety_factor().
|
protected |
Value of the scaling parameter required so that the parameter occupies the desired proportion of the arc length. NOTE: If you wish to change this then make sure to set the value of Scale_arc_length to false to ensure the value of this isn't overwritten during the arc-length process. Instead of changing this variable, it's better to actually update the Desired_proportion_of_arc_length value.
Definition at line 762 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().
|
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 618 of file problem.h.
Referenced by adaptive_unsteady_newton_solve(), and time_adaptive_newton_crash_on_solve_fail().
|
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().
|
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().
|
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 2307 of file problem.h.
Referenced by adaptive_unsteady_newton_solve().
|
protected |
Boolean to control original or new storage of dof stuff.
Definition at line 778 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().
|
private |
Flag to use "default partition" during load balance. Should only be set to true when run in validation mode.
Definition at line 517 of file problem.h.
Referenced by load_balance(), set_default_partition_in_load_balance(), and unset_default_partition_in_load_balance().
|
protected |
Boolean to specify which scheme to use to calculate the continuation derivatievs.
Definition at line 823 of file problem.h.
Referenced by arc_length_step_solve_helper().
|
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().
|
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().