33 #ifndef __H__LIB_DISC__OPERATOR__COMPOSITE_CONVERGENCE_CHECK__
34 #define __H__LIB_DISC__OPERATOR__COMPOSITE_CONVERGENCE_CHECK__
65 template <
class TVector,
class TDomain>
98 const std::vector<number>& vMinDefect,
99 const std::vector<number>& vRelReduction);
102 const std::vector<number>& vMinDefect,
103 const std::vector<number>& vRelReduction);
107 const number relReduction);
111 const number relReduction);
116 const number relReduction);
122 const number relReduction);
126 const number relReduction);
131 void start(
const TVector& d);
133 void update(
const TVector& d);
171 std::stringstream ss;
172 ss <<
"CompositeConvCheck( max steps = " <<
m_maxSteps <<
")";
173 ss <<
" Components:\n";
185 template <
typename TBaseElem>
192 number norm(
const TVector& vec,
const std::vector<DoFIndex>& index);
255 std::stringstream ss;
256 if(
isRest) ss <<
"[Remaining Components]";
257 else ss <<
"Component " <<
name;
location name
Definition: checkpoint_util.lua:128
Definition: smart_pointer.h:296
Definition: smart_pointer.h:108
base class for approximation spaces without type of algebra or dof distribution
Definition: approximation_space.h:279
Definition: composite_conv_check.h:67
number defect() const
returns the current defect
Definition: composite_conv_check.h:139
void set_group_check(const std::vector< std::string > &vFctName, const number minDefect, const number relReduction)
Definition: composite_conv_check_impl.h:300
void set_level(int level)
set level of grid, where defect vectors come from
Definition: composite_conv_check_impl.h:74
void set_info(std::string info)
sets info string
Definition: composite_conv_check.h:149
CompositeConvCheck(SmartPtr< ApproximationSpace< TDomain > > approx)
Definition: composite_conv_check_impl.h:48
void set_rest_check(number minDefect, number relReduction)
sets default values for non-explicitly specified cmps
Definition: composite_conv_check.h:86
const std::string & fctName(size_t i)
Definition: composite_conv_check.h:182
void start(const TVector &d)
computes the start defect and set it
Definition: composite_conv_check_impl.h:428
number last_defect_all() const
returns last defect for all components
Definition: composite_conv_check.h:221
std::vector< NativCmpInfo > m_vNativCmpInfo
info on natural components
Definition: composite_conv_check.h:209
void set_supress_unsuccessful(bool bsupress)
set whether always to report success when max iter is reached (useful for LIMEX)
Definition: composite_conv_check.h:155
int m_maxSteps
maximum number of steps to be performed
Definition: composite_conv_check.h:277
char m_symbol
symbol for output appearance
Definition: composite_conv_check.h:290
int get_offset() const
output
Definition: composite_conv_check.h:145
void print_offset()
Definition: composite_conv_check_impl.h:701
number rate() const
Definition: composite_conv_check.h:141
virtual ~CompositeConvCheck()
destructor
Definition: composite_conv_check.h:77
bool m_verbose
verbose level
Definition: composite_conv_check.h:281
void set_symbol(char symbol)
sets the symbol used for output
Definition: composite_conv_check.h:147
void disable_rest_check()
disables rest check
Definition: composite_conv_check.h:93
virtual std::string config_string() const
returns information about configuration parameters
Definition: composite_conv_check.h:169
void set_time_measurement(bool yesOrNo)
enables time measurement
Definition: composite_conv_check.h:158
std::string m_info
info for iteration (e.g. preconditioner type)
Definition: composite_conv_check.h:296
number m_restRelReduction
Definition: composite_conv_check.h:270
bool is_valid_number(number value)
Definition: composite_conv_check_impl.h:719
void set_component_check(const std::string &vFctName, const std::vector< number > &vMinDefect, const std::vector< number > &vRelReduction)
Definition: composite_conv_check_impl.h:225
Stopwatch m_stopwatch
a stopwatch
Definition: composite_conv_check.h:303
void set_name(std::string name)
sets the name of the iteration
Definition: composite_conv_check.h:148
void set_adaptive(bool adapt)
whether or not the underlying approximatioon space is adaptive
Definition: composite_conv_check.h:161
bool m_bCheckRest
default Values
Definition: composite_conv_check.h:268
void print_line(std::string line)
prints a line using prefixes
Definition: composite_conv_check_impl.h:711
void extract_dof_indices(ConstSmartPtr< DoFDistribution > dd)
extracts multi-indices for a fct-comp on a element type
Definition: composite_conv_check_impl.h:86
number avg_rate() const
Definition: composite_conv_check.h:142
void update_rest_check()
Definition: composite_conv_check_impl.h:362
size_t m_numAllDoFs
Definition: composite_conv_check.h:210
number norm(const TVector &vec, const std::vector< DoFIndex > &index)
calculates the 2-norm of the entries of the vector vec specified by index
Definition: composite_conv_check_impl.h:153
SmartPtr< ApproximationSpace< TDomain > > m_spApprox
ApproxSpace.
Definition: composite_conv_check.h:196
void set_verbose(bool level)
sets if verbose
Definition: composite_conv_check.h:152
bool m_bTimeMeas
enables time measurement
Definition: composite_conv_check.h:300
bool m_bAdaptive
adaptivity flag
Definition: composite_conv_check.h:307
void update(const TVector &d)
computes the defect and sets it a the next defect value
Definition: composite_conv_check_impl.h:536
number defect_all() const
returns defect for all components
Definition: composite_conv_check.h:213
void set_offset(int offset)
sets the number of spaces printed before output information
Definition: composite_conv_check.h:146
bool m_supress_unsuccessful
whether to always report success once max iter is reached
Definition: composite_conv_check.h:284
int m_currentStep
current step
Definition: composite_conv_check.h:274
std::string m_name
name of iteration
Definition: composite_conv_check.h:293
void set_maximum_steps(int maxSteps)
sets maximum number of iteration steps
Definition: composite_conv_check.h:83
void update_defect(number newDefect)
sets the update for the current defect
Definition: composite_conv_check_impl.h:526
bool iteration_ended()
Definition: composite_conv_check_impl.h:597
number initial_defect_all() const
returns initial defect for all components
Definition: composite_conv_check.h:229
number reduction() const
Definition: composite_conv_check.h:140
virtual SmartPtr< IConvergenceCheck< TVector > > clone()
clones this instance
Definition: composite_conv_check_impl.h:199
void start_defect(number initialDefect)
defect control
Definition: composite_conv_check_impl.h:404
int m_offset
number of spaces inserted before output
Definition: composite_conv_check.h:287
void set_all_component_check(const number minDefect, const number relReduction)
sets check for all components in approximation space
Definition: composite_conv_check_impl.h:245
int step() const
information about current status
Definition: composite_conv_check.h:138
bool post()
Definition: composite_conv_check_impl.h:622
std::vector< CmpInfo > m_CmpInfo
infos for each component
Definition: composite_conv_check.h:265
number m_restMinDefect
Definition: composite_conv_check.h:269
Definition: convergence_check.h:72
Stopwatch class for quickly taking times.
Definition: stopwatch.h:124
double number
Definition: types.h:124
stopwatch class for quickly taking times
Definition: composite_conv_check.h:238
number relReduction
Relative reduction required for component.
Definition: composite_conv_check.h:249
CmpInfo()
Definition: composite_conv_check.h:239
std::vector< int > vFct
Index of components.
Definition: composite_conv_check.h:241
number currDefect
Current Defect of component.
Definition: composite_conv_check.h:245
std::string name
Name of components.
Definition: composite_conv_check.h:242
std::string config_string() const
Definition: composite_conv_check.h:253
number initDefect
Initial Defect of component.
Definition: composite_conv_check.h:244
number minDefect
Minimal required Defect of component.
Definition: composite_conv_check.h:248
number lastDefect
Last Defect if component.
Definition: composite_conv_check.h:246
bool isRest
Shows, that this is group of remaining cmps.
Definition: composite_conv_check.h:251
Definition: composite_conv_check.h:198
std::vector< DoFIndex > vMultiIndex
associated indices
Definition: composite_conv_check.h:205
number currDefect
Current Defect of component.
Definition: composite_conv_check.h:202
number initDefect
Initial Defect of component.
Definition: composite_conv_check.h:201
std::string name
Name of components.
Definition: composite_conv_check.h:199
number lastDefect
Last Defect if component.
Definition: composite_conv_check.h:203