Xyce
6.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
N_NLS_ReturnCodes.C
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------
2
// Copyright Notice
3
//
4
// Copyright 2002 Sandia Corporation. Under the terms
5
// of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6
// Government retains certain rights in this software.
7
//
8
// Xyce(TM) Parallel Electrical Simulator
9
// Copyright (C) 2002-2015 Sandia Corporation
10
//
11
// This program is free software: you can redistribute it and/or modify
12
// it under the terms of the GNU General Public License as published by
13
// the Free Software Foundation, either version 3 of the License, or
14
// (at your option) any later version.
15
//
16
// This program is distributed in the hope that it will be useful,
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
// GNU General Public License for more details.
20
//
21
// You should have received a copy of the GNU General Public License
22
// along with this program. If not, see <http://www.gnu.org/licenses/>.
23
//-----------------------------------------------------------------------------
24
25
//-------------------------------------------------------------------------
26
// Filename : $RCSfile: N_NLS_ReturnCodes.C,v $
27
//
28
// Purpose : This is a simple container class for different convergence
29
// status "return codes".
30
//
31
// Special Notes : This point of having a class like this is to make the
32
// code more flexible in terms of what is considered to be
33
// a successful Newton solve.
34
//
35
// In the class N_NLS_DampedNewton, the function
36
// "converged_" performs a series of tests to determine
37
// convergence status, and depending on the results of
38
// these tests, it returns a value. If the value is
39
// positive, then the solve is considered to be converged,
40
// and if it is <=0, it isn't.
41
//
42
// This convention is used both inside the damped newton
43
// class, and outside. It is used inside when the solver
44
// is trying to determine for itself whether or not to
45
// continue with the solve, or exit. It is used outside
46
// by the time integrator, and also by continuation loops
47
// in the 2-level solver, in determining if the step was
48
// successful.
49
//
50
// Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
51
//
52
// Creation Date : 03/27/03
53
//
54
// Revision Information:
55
// ----------------------
56
//
57
// Revision Number: $Revision: 1.7 $
58
//
59
// Revision Date : $Date: 2015/04/08 19:18:29 $
60
//
61
// Current Owner : $Author $
62
//-------------------------------------------------------------------------
63
64
#include <Xyce_config.h>
65
66
#include <iostream>
67
68
#include <
N_NLS_ReturnCodes.h
>
69
#include <N_ERH_ErrorMgr.h>
70
71
namespace
Xyce
{
72
namespace
Nonlinear {
73
74
//-----------------------------------------------------------------------------
75
// Function : ReturnCodes::operator<<
76
// Purpose : "<<" operator
77
// Special Notes :
78
// Scope : public
79
// Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
80
// Creation Date : 7/02/03
81
//-----------------------------------------------------------------------------
82
std::ostream &
operator<<
(std::ostream & os,
const
ReturnCodes
& rc)
83
{
84
os <<
"\n\n-----------------------------------------"
<< std::endl
85
<<
"\tNonlinear Solver Return Codes:\n"
86
<<
"\t\tnormTooSmall = "
<< rc.
normTooSmall
<<
"\n"
87
<<
"\t\tnormalConvergence = "
<< rc.
normalConvergence
<<
"\n"
88
<<
"\t\tnearConvergence = "
<< rc.
nearConvergence
<<
"\n"
89
<<
"\t\tsmallUpdate = "
<< rc.
smallUpdate
<<
"\n"
90
<<
"\t\tnanFail = "
<< rc.
nanFail
<<
"\n"
91
<<
"\t\ttooManySteps = "
<< rc.
tooManySteps
<<
"\n"
92
<<
"\t\ttooManyTranSteps = "
<< rc.
tooManyTranSteps
<<
"\n"
93
<<
"\t\tupdateTooBig = "
<< rc.
updateTooBig
<<
"\n"
94
<<
"\t\tstalled = "
<< rc.
stalled
<<
"\n"
95
<<
"\t\twrmsExactZero = "
<< rc.
wrmsExactZero
<<
"\n"
96
<< section_divider << std::endl
97
<< std::endl;
98
99
return
os;
100
}
101
102
}
// namespace Nonlinear
103
}
// namespace Xyce
N_NLS_ReturnCodes.h
Xyce
Pure virtual class to augment a linear system.
Definition:
AnalysisPKG/index.dox:4
Xyce::Nonlinear::ReturnCodes::updateTooBig
int updateTooBig
Definition:
N_NLS_ReturnCodes.h:109
Xyce::Nonlinear::ReturnCodes::stalled
int stalled
Definition:
N_NLS_ReturnCodes.h:110
Xyce::Nonlinear::operator<<
std::ostream & operator<<(std::ostream &os, const ReturnCodes &rc)
Definition:
N_NLS_ReturnCodes.C:82
Xyce::Nonlinear::ReturnCodes::smallUpdate
int smallUpdate
Definition:
N_NLS_ReturnCodes.h:105
Xyce::Nonlinear::ReturnCodes::nanFail
int nanFail
Definition:
N_NLS_ReturnCodes.h:106
Xyce::Nonlinear::ReturnCodes::wrmsExactZero
int wrmsExactZero
Definition:
N_NLS_ReturnCodes.h:111
Xyce::Nonlinear::ReturnCodes::normalConvergence
int normalConvergence
Definition:
N_NLS_ReturnCodes.h:103
Xyce::Nonlinear::ReturnCodes::nearConvergence
int nearConvergence
Definition:
N_NLS_ReturnCodes.h:104
Xyce::Nonlinear::ReturnCodes
Definition:
N_NLS_ReturnCodes.h:83
Xyce::Nonlinear::ReturnCodes::tooManyTranSteps
int tooManyTranSteps
Definition:
N_NLS_ReturnCodes.h:108
Xyce::Nonlinear::ReturnCodes::normTooSmall
int normTooSmall
Definition:
N_NLS_ReturnCodes.h:102
Xyce::Nonlinear::ReturnCodes::tooManySteps
int tooManySteps
Definition:
N_NLS_ReturnCodes.h:107
src
NonlinearSolverPKG
src
N_NLS_ReturnCodes.C
Generated by
1.8.10