Skip to content

Commit aa2b097

Browse files
committed
internals: a few docu fixes/additions
1 parent 06d388f commit aa2b097

File tree

2 files changed

+46
-14
lines changed

2 files changed

+46
-14
lines changed

include/pfasst/interfaces.hpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ namespace pfasst
3333
* @param[in] msg component or algorithm the throwing function is required for
3434
*/
3535
explicit NotImplementedYet(const string& msg);
36-
37-
/**
38-
* message string is prepended by the string `Not implemented/supported yet, required for: `
39-
*/
4036
virtual const char* what() const throw();
4137
};
4238

@@ -54,10 +50,6 @@ namespace pfasst
5450

5551
public:
5652
explicit ValueError(const string& msg);
57-
58-
/**
59-
* message string is prepended by the string `ValueError: `
60-
*/
6153
virtual const char* what() const throw();
6254
};
6355

@@ -121,9 +113,9 @@ namespace pfasst
121113
/**
122114
* set the sweepers controller.
123115
*/
124-
void set_controller(Controller<time>* ctrl);
116+
virtual void set_controller(Controller<time>* ctrl);
125117

126-
Controller<time>* get_controller();
118+
virtual Controller<time>* get_controller();
127119
//! @}
128120

129121
//! @{

include/pfasst/interfaces_impl.hpp

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ namespace pfasst
1414
: runtime_error(msg)
1515
{}
1616

17+
/**
18+
* @internal message string is prepended by the string
19+
* `Not implemented/supported yet, required for: `
20+
*/
1721
const char* NotImplementedYet::what() const throw()
1822
{
1923
return (string("Not implemented/supported yet, required for: ") + this->msg).c_str();
@@ -24,6 +28,9 @@ namespace pfasst
2428
: invalid_argument(msg)
2529
{}
2630

31+
/**
32+
* @internal message string is prepended by the string `ValueError: `
33+
*/
2734
const char* ValueError::what() const throw()
2835
{
2936
return (string("ValueError: ") + this->msg).c_str();
@@ -50,6 +57,12 @@ namespace pfasst
5057
return !this->get_converged(this->comm->rank()-1);
5158
}
5259

60+
/**
61+
* @internal Returning logic depends on current process' rank.
62+
* In case it is not the master process, both the converged state of this and the previous rank
63+
* are checked.
64+
* @see `IStatus::get_converged()`
65+
*/
5366
bool IStatus::keep_iterating()
5467
{
5568
if (this->comm->rank() == 0) {
@@ -74,6 +87,11 @@ namespace pfasst
7487
this->controller = ctrl;
7588
}
7689

90+
/**
91+
* @internal
92+
* @note Asserts presense of a controller if `NDEBUG` is not defined.
93+
* @endinternal
94+
*/
7795
template<typename time>
7896
Controller<time>* ISweeper<time>::get_controller()
7997
{
@@ -97,13 +115,19 @@ namespace pfasst
97115
return false;
98116
}
99117

118+
/**
119+
* @throws NotImplementedYet This function is required by MLSDC and PFASST
120+
*/
100121
template<typename time>
101122
void ISweeper<time>::save(bool initial_only)
102123
{
103124
UNUSED(initial_only);
104125
throw NotImplementedYet("mlsdc/pfasst");
105126
}
106127

128+
/**
129+
* @throws NotImplementedYet This function is required by PFASST
130+
*/
107131
template<typename time>
108132
void ISweeper<time>::spread()
109133
{
@@ -126,22 +150,31 @@ namespace pfasst
126150
void ISweeper<time>::post(ICommunicator* comm, int tag)
127151
{
128152
UNUSED(comm); UNUSED(tag);
129-
};
153+
}
130154

155+
/**
156+
* @throws NotImplementedYet This function is required by PFASST
157+
*/
131158
template<typename time>
132159
void ISweeper<time>::send(ICommunicator* comm, int tag, bool blocking)
133160
{
134161
UNUSED(comm); UNUSED(tag); UNUSED(blocking);
135162
throw NotImplementedYet("pfasst");
136163
}
137164

165+
/**
166+
* @throws NotImplementedYet This function is required by PFASST
167+
*/
138168
template<typename time>
139169
void ISweeper<time>::recv(ICommunicator* comm, int tag, bool blocking)
140170
{
141171
UNUSED(comm); UNUSED(tag); UNUSED(blocking);
142172
throw NotImplementedYet("pfasst");
143173
}
144174

175+
/**
176+
* @throws NotImplementedYet This function is required by PFASST
177+
*/
145178
template<typename time>
146179
void ISweeper<time>::broadcast(ICommunicator* comm)
147180
{
@@ -154,18 +187,25 @@ namespace pfasst
154187
ITransfer<time>::~ITransfer()
155188
{}
156189

190+
/**
191+
* @throws NotImplementedYet This function is required by PFASST
192+
*/
157193
template<typename time>
158-
void ITransfer<time>::interpolate_initial(shared_ptr<ISweeper<time>> dst, shared_ptr<const ISweeper<time>> src)
194+
void ITransfer<time>::interpolate_initial(shared_ptr<ISweeper<time>> dst,
195+
shared_ptr<const ISweeper<time>> src)
159196
{
160197
UNUSED(dst); UNUSED(src);
161198
throw NotImplementedYet("pfasst");
162199
}
163200

201+
/**
202+
* @throws NotImplementedYet This function is required by PFASST
203+
*/
164204
template<typename time>
165-
void ITransfer<time>::restrict_initial(shared_ptr<ISweeper<time>> dst, shared_ptr<const ISweeper<time>> src)
205+
void ITransfer<time>::restrict_initial(shared_ptr<ISweeper<time>> dst,
206+
shared_ptr<const ISweeper<time>> src)
166207
{
167208
UNUSED(dst); UNUSED(src);
168209
throw NotImplementedYet("pfasst");
169210
}
170-
171211
} // ::pfasst

0 commit comments

Comments
 (0)