61 "You can only call this if the problem has just one dof!",
77 for (
unsigned long e = 0;
e <
n_el;
e++)
132 std::ostringstream error_message;
134 <<
"HSL_MA42 solver cannot be used in parallel.\n"
135 <<
"Please change to another linear solver.\n"
136 <<
"If you want to use a frontal solver then try MumpsSolver\n";
181 double**
dx =
new double*;
244 for (
unsigned long e = 0;
e <
n_el;
e++)
319 for (
unsigned long e = 0;
e <
n_el;
e++)
429 oomph_info <<
"Using direct access files" << std::endl;
488 oomph_info <<
"Not using direct access files" << std::endl;
522 <<
nfront[0] << std::endl;
553 W =
new (std::nothrow)
double[
Lw];
573 IW =
new (std::nothrow)
int[
Liw];
587 oomph_info <<
"\n ESTIMATED MEMORY USAGE " <<
temp <<
"Mb" << std::endl;
593 for (
unsigned long e = 0;
e <
n_el;
e++)
657 double onlyjac = jacobian(0, 0);
658 jacobian.resize(2, 2);
660 jacobian(1, 0) = 0.0;
661 jacobian(0, 1) = 0.0;
662 jacobian(1, 1) = 0.0;
687 double**
rhs =
new double*[1];
739 oomph_info <<
"lenbuf[] too small -- can recover..."
742 else if (
Info[0] == -12)
745 oomph_info <<
"nfront[] too small -- can recover..."
748 else if (
Info[0] == -17)
751 oomph_info <<
"lenfle[] too small -- can recover..."
758 oomph_info <<
"Can't recover from this error" << std::endl;
845 <<
lenbuf[2] <<
" " << std::endl;
846 oomph_info <<
"lenbuf[] factors required and initially specified:"
855 oomph_info <<
"nfront[] factors required and initially specified:"
864 <<
lenfle[2] <<
" " << std::endl;
865 oomph_info <<
"lenfle[] factors required and initially specified:"
903 if (
n_dof !=
static_cast<int>(
rhs.nrow()))
906 "RHS does not have the same dimension as the linear system",
930 double** b =
new double*;
931 *b =
new double[
n_dof];
939 double** x =
new double*;
940 *x =
new double[
n_dof];
943 MA42CD(
trans,
nrhs,
lx, b, x,
Lw,
W,
Liw,
IW,
Icntl,
Isave,
Info);
953 for (
int i = 0;
i < n_dof; ++
i)
1005 int*
iw =
new int[
liw];
1006 double* w =
new double[
lw];
1017 for (
unsigned long e = 0;
e <
n_el;
e++)
1033 for (
int i = 0;
i <
nvar;
i++)
1114 }
while (
info[0] < 0);
1120 <<
"\tmean " <<
rinfo[1] <<
"\tprofile " <<
rinfo[2];
1122 <<
"\tmean " <<
rinfo[4] <<
"\tprofile " <<
rinfo[5];
1133 for (
unsigned e = 0;
e <
n_el;
e++)
1137 for (
unsigned e = 0;
e <
n_el;
e++)
A class that is used to define the functions used to assemble the elemental contributions to the resi...
virtual unsigned ndof(GeneralisedElement *const &elem_pt)
Return the number of degrees of freedom in the element elem_pt.
virtual unsigned long eqn_number(GeneralisedElement *const &elem_pt, const unsigned &ieqn_local)
Return the global equation number of the local unknown ieqn_local in elem_pt.
virtual void get_jacobian(GeneralisedElement *const &elem_pt, Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the elemental Jacobian matrix "d equation / d variable" for elem_pt.
LinearAlgebraDistribution * distribution_pt() const
access to the LinearAlgebraDistribution
void build_distribution(const LinearAlgebraDistribution *const dist_pt)
setup the distribution of this distributable linear algebra object
A vector in the mathematical sense, initially developed for linear algebra type applications....
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
A Generalised Element class.
int Lw
Size of the workspace array, W.
bool Doc_stats
Doc the solver stats or stay quiet?
double Lenfle_factor
Factor to increase size of direct access files; see MA42 documentation for details.
bool Use_direct_access_files
Use direct access files?
bool Reorder_flag
Reorder elements with Sloan's algorithm?
double Lenbuf_factor2
Factor to increase storage for lenbuf[2]; see MA42 documentation for details.
double Lenbuf_factor1
Factor to increase storage for lenbuf[1]; see MA42 documentation for details.
int Icntl[8]
Control flag for MA42; see MA42 documentation for details.
int Isave[45]
Control flag for MA42; see MA42 documentation for details.
int Liw
Size of the integer workspace array.
void reorder_elements(Problem *const &problem_pt)
Function to reorder the elements based on Sloan's algorithm.
void solve_for_one_dof(Problem *const &problem_pt, DoubleVector &result)
Special solver for problems with 1 dof (MA42 can't handle this case so solve() forwards the "solve" t...
double Front_factor
Factor to increase storage for front size; see MA42 documentation for details.
int Info[23]
Control flag for MA42; see MA42 documentation for details.
double * W
Workspace storage for MA42.
void resolve(const DoubleVector &rhs, DoubleVector &result)
Return the solution to the linear system Ax = result, where A is the most recently factorised jacobia...
double Lenbuf_factor0
Factor to increase storage for lenbuf[0]; see MA42 documentation for details.
void solve(Problem *const &problem_pt, DoubleVector &result)
Solver: Takes pointer to problem and returns the results Vector which contains the solution of the li...
int * IW
Integer workspace storage for MA42.
unsigned long N_dof
Size of the linear system.
Describes the distribution of a distributable linear algebra type object. Typically this is a contain...
bool Enable_resolve
Boolean that indicates whether the matrix (or its factors, in the case of direct solver) should be st...
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
unsigned long nelement() const
Return number of elements in the mesh.
A class to handle errors in the Newton solver.
An OomphLibError object which should be thrown when an run-time error is encountered....
////////////////////////////////////////////////////////////////// //////////////////////////////////...
unsigned long ndof() const
Return the number of dofs.
OomphCommunicator * communicator_pt()
access function to the oomph-lib communicator
Mesh *& mesh_pt()
Return a pointer to the global mesh.
AssemblyHandler *& assembly_handler_pt()
Return a pointer to the assembly handler object.
int & sign_of_jacobian()
Access function for the sign of the global jacobian matrix. This will be set by the linear solver,...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...