-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating Doc String: Address Issue #258 #263
base: devel
Are you sure you want to change the base?
Conversation
Updating the docstings in Zapdos is in progress with the following objects completed: - Actions - Auxkernels - bcs - constraits - indicators - interfacekernels - postprocessors - userobjects Also minor edits of head and body files were done, which involved removing out dated parameters
The PR for updating Zapdos Doc Sting is ready for review. @gsgall is the primary reviewer, but I included @cticenhour in case he would like to look at this PR too. |
Job Documentation, step Sync to remote on c4b976a wanted to post the following: View the site here This comment will be updated on new commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, a few typos and some missing documentation, and lack of detail in comments but thank you for doing this @csdechant.
/* | ||
* Helper function that supplies the Kernels for drift-diffusion for the electrons, | ||
* energy independent charged particles, neutral particles, and | ||
* electron mean energy depending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence seems incomplete. Is this suppose to be mean electron energy dependent particles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should read "electron mean energy density". Will edit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been addressed in 4b5a202
virtual void addADKernels(const std::string & name, | ||
const std::string & potential_name, | ||
const bool & Using_offset, | ||
const bool & charged, | ||
const bool & energy); | ||
|
||
/// Helper function that supplies the Aux kernels to convert scaled position units |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the scaled position units in this case referring to? Is this for when the user is using a non-dimensioqnalized spatial domain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct. For clarity, I can add edit to:
/// Helper function that supplies the Aux kernels to convert scaled position units when parameter position_units is set to non-unity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been addressed in 4b5a202
Real _period; | ||
/// The number of cycles to calculate the difference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description is unclear to me. Can you add some more detail here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, a probably better description is "The number of cycles PeriodicRelativeNodalDifference is active"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been addressed in 4b5a202
@@ -56,13 +56,12 @@ AddPeriodicRelativeNodalDifference::validParams() | |||
params.addParam<Real>( | |||
"starting_cycle", 0.0, "The number of the cycles before starting the difference calculation"); | |||
params.addRequiredParam<Real>("cycle_frequency", "The cycle's frequency in Hz"); | |||
params.addParam<Real>( | |||
"num_cycles", 2000.0, "The number of cycles to calculation the difference for."); | |||
params.addParam<Real>("num_cycles", 2000.0, "The number of cycles to calculate the difference."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit unclear to me. Does this mean the number of cycles for which the difference between the current and previous cycle is calculated. Or is this something like the number of cycles between cycles that are being compared?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the former description. I can edit it to simply say "The number of cycles this object is active".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been addressed in 4b5a202
|
||
/* | ||
* Helper function that supplies the Kernels for drift-diffusion for the electrons, | ||
* energy independent charged particles, neutral particles, and | ||
* electron mean energy depending | ||
*/ | ||
virtual void addADKernels(const std::string & name, | ||
const std::string & potential_name, | ||
const bool & Using_offset, | ||
const bool & charged, | ||
const bool & energy); | ||
|
||
/// Helper function that supplies the Aux kernels to convert scaled position units | ||
virtual void addPosition(const std::string & position_name, const int & component); | ||
|
||
/// Helper function that supplies the Aux kernels to convert densities from log form | ||
virtual void addDensityLog(const std::string & particle_name); | ||
|
||
/// Helper function that supplies the Aux kernels for current | ||
virtual void addCurrent(const std::string & particle_name, const std::string & potential_name); | ||
|
||
/// Helper function that supplies the Aux kernels for the electric field | ||
virtual void addEfield(const std::string & Efield_name, | ||
const std::string & potential_name, | ||
const int & component); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cticenhour correct me if I am wrong but I believe the MOOSE standard should be to have a description for each of the parameters of every custom function. In the style of
@param name description
This comment is also applicable for the rest of the actions that do not have the parameter doc strings for their internal functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true for most MOOSE header files I have seen and should add them regardless for better documentation. This was an oversight and will edit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been addressed in 4b5a202
Co-authored-by: Grayson Gall <[email protected]>
@gsgall everything should be addressed now, and this PR is ready for a re-review. |
@csdechant @cticenhour Is there something weird going on with the civit build. I would like to review the website but when I try to use the most recent link to the site preview I am getting a 404 error. |
@gsgall It's because the website was built almost 3 weeks ago. CIVET regularly cleans out old PR websites on the order of weekly. So @csdechant will need to push again to trigger a new one. |
@gsgall just push a no edit commit (using the |
Thank you @csdechant! I am working on the review now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @csdechant there are only a few small types and grammar issues I found this time around
/** | ||
* This is called before execute so you can reset any internal data. | ||
*/ | ||
virtual void initialize(); | ||
/** | ||
* Called on every "object" (like every element or node). | ||
* In this case, it is called at every quadrature point on every element. | ||
*/ | ||
virtual void execute(); | ||
|
||
/** | ||
* Implement this function to compute Jacobian terms for this UserObject. The | ||
* shape function index _j and its corrsponding global DOF index _j_global | ||
* will be provided. | ||
*/ | ||
virtual void executeJacobian(unsigned int jvar); | ||
/** | ||
* Called _once_ after execute has been called all all "objects". | ||
*/ | ||
virtual void finalize(); | ||
/** | ||
* Called when using threading. You need to combine the data from "y" | ||
* into _this_ object. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These descriptions seem like they are almost the same as the ones for base object. They should probably be more descriptive of this objects behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gsgall which base object are you looking at? I looked at ShapeSideUserObject
and ShapeUserObject
, and I didn't see a description for this functions. If these are already defined somewhere in the hierarchy, and I don't think they need to be redefined here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base object I am referencing is the UserObject. These descriptions just seem to echo what a general user object would do with these methods but there are object specific implementations for all of them. I would be my preference that some description which is specific to what this object does are used rather than just describing what the general use of these methods is.
If this is not the standard in other MOOSE applications I am fine with these descriptions.
/** | ||
* This is called before execute so you can reset any internal data. | ||
*/ | ||
virtual void initialize(); | ||
|
||
/** | ||
* Called on every "object" (like every element or node). | ||
* In this case, it is called at every quadrature point on every element. | ||
*/ | ||
virtual void execute(); | ||
|
||
/** | ||
* Called _once_ after execute has been called on all "objects". | ||
*/ | ||
virtual void finalize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to my comment on the other user object. This is really generic and doesn't really say anything about this specific object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe these docstring comments will be inherited by UserObject.h
, so I can remove them. As for why the comments are generic, it is because these are generic functions and are not custom made for the specific object (i.e. all userobjects need an initialize, execute, and finalize function).
Co-authored-by: Grayson Gall <[email protected]>
Job Precheck, step Clang format on dab4f0f wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gsgall All grammar fixes should be applied now. As for the comments involving docstrings, if a generic function is already defined somewhere in the hierarchy somewhere, I don't believe it needs to be redefined since they are not object specific (e.g. functions such as initialize, execute, finalize). I added those comments because I must of overlooked their inclusion elsewhere. If you have an objection removing those comments, please let me know.
MaterialProperty<Real> & _Avogadro; | ||
MaterialProperty<Real> & _vthermal_em; | ||
MaterialProperty<Real> & _vthermal_ip; | ||
MaterialProperty<Real> & _iz_coeff_efield_a; | ||
MaterialProperty<Real> & _iz_coeff_efield_b; | ||
MaterialProperty<Real> & _iz_coeff_efield_c; | ||
MaterialProperty<Real> & _iz_coeff_energy_a; | ||
MaterialProperty<Real> & _iz_coeff_energy_b; | ||
MaterialProperty<Real> & _iz_coeff_energy_c; | ||
/// Avogadro's number (reduced significant figures) | ||
MaterialProperty<Real> & _N_A; | ||
MaterialProperty<Real> & _el_coeff_energy_a; | ||
MaterialProperty<Real> & _el_coeff_energy_b; | ||
MaterialProperty<Real> & _el_coeff_energy_c; | ||
|
||
/// Charge sign of electrons |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | ||
* This is called before execute so you can reset any internal data. | ||
*/ | ||
virtual void initialize(); | ||
/** | ||
* Called on every "object" (like every element or node). | ||
* In this case, it is called at every quadrature point on every element. | ||
*/ | ||
virtual void execute(); | ||
|
||
/** | ||
* Implement this function to compute Jacobian terms for this UserObject. The | ||
* shape function index _j and its corrsponding global DOF index _j_global | ||
* will be provided. | ||
*/ | ||
virtual void executeJacobian(unsigned int jvar); | ||
/** | ||
* Called _once_ after execute has been called all all "objects". | ||
*/ | ||
virtual void finalize(); | ||
/** | ||
* Called when using threading. You need to combine the data from "y" | ||
* into _this_ object. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gsgall which base object are you looking at? I looked at ShapeSideUserObject
and ShapeUserObject
, and I didn't see a description for this functions. If these are already defined somewhere in the hierarchy, and I don't think they need to be redefined here.
/** | ||
* This is called before execute so you can reset any internal data. | ||
*/ | ||
virtual void initialize(); | ||
|
||
/** | ||
* Called on every "object" (like every element or node). | ||
* In this case, it is called at every quadrature point on every element. | ||
*/ | ||
virtual void execute(); | ||
|
||
/** | ||
* Called _once_ after execute has been called on all "objects". | ||
*/ | ||
virtual void finalize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe these docstring comments will be inherited by UserObject.h
, so I can remove them. As for why the comments are generic, it is because these are generic functions and are not custom made for the specific object (i.e. all userobjects need an initialize, execute, and finalize function).
This PR updates the Zapdos header files to include previously missing Doc String, which will close Issue #258. This PR also includes minor edits that remove previously unused parameters in Zapdos objects.