Commit bf14e44b authored by Henry Weller's avatar Henry Weller
Browse files

Updated code comments

parent f2432865
......@@ -92,7 +92,7 @@ void Foam::dynamicCode::checkSecurity
Foam::word Foam::dynamicCode::libraryBaseName(const fileName& libPath)
{
word libName(libPath.name(true));
libName.erase(0, 3); // remove leading 'lib' from name
libName.erase(0, 3); // Remove leading 'lib' from name
return libName;
}
......@@ -127,8 +127,8 @@ void Foam::dynamicCode::copyAndFilter
{
is.getLine(line);
// expand according to mapping
// expanding according to env variables might cause too many
// Expand according to mapping.
// Expanding according to env variables might cause too many
// surprises
stringOps::inplaceExpand(line, mapping);
os.writeQuoted(line, false) << nl;
......@@ -144,7 +144,7 @@ bool Foam::dynamicCode::resolveTemplates
DynamicList<fileName>& badFiles
)
{
// try to get template from FOAM_CODESTREAM_TEMPLATES
// Try to get template from FOAM_CODESTREAM_TEMPLATES
const fileName templateDir(Foam::getEnv(codeTemplateEnvName));
bool allOkay = true;
......@@ -162,7 +162,7 @@ bool Foam::dynamicCode::resolveTemplates
}
}
// not found - fallback to ~OpenFOAM expansion
// Not found - fallback to ~OpenFOAM expansion
if (file.empty())
{
file = findEtcFile(codeTemplateDirName/templateName);
......@@ -329,7 +329,7 @@ void Foam::dynamicCode::clear()
filterVars_.set("typeName", codeName_);
filterVars_.set("SHA1sum", SHA1Digest().str());
// provide default Make/options
// Provide default Make/options
makeOptions_ =
"EXE_INC = -g\n"
"\n\nLIB_LIBS = ";
......@@ -408,7 +408,7 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
DynamicList<fileName> resolvedFiles(nFiles);
DynamicList<fileName> badFiles(nFiles);
// resolve template, or add to bad-files
// Resolve template, or add to bad-files
resolveTemplates(compileFiles_, resolvedFiles, badFiles);
resolveTemplates(copyFiles_, resolvedFiles, badFiles);
......
......@@ -52,7 +52,7 @@ void Foam::codedFixedValuePointPatchField<Type>::setFieldTemplates
{
word fieldType(pTraits<Type>::typeName);
// template type for pointPatchField
// Template type for pointPatchField
dynCode.setFilterVariable("TemplateType", fieldType);
// Name for pointPatchField - eg, ScalarField, VectorField, ...
......@@ -107,26 +107,26 @@ void Foam::codedFixedValuePointPatchField<Type>::prepare
const dynamicCodeContext& context
) const
{
// take no chances - typeName must be identical to name_
// Take no chances - typeName must be identical to name_
dynCode.setFilterVariable("typeName", name_);
// set TemplateType and FieldType filter variables
// Set TemplateType and FieldType filter variables
// (for pointPatchField)
setFieldTemplates(dynCode);
// compile filtered C template
// Compile filtered C template
dynCode.addCompileFile(codeTemplateC);
// copy filtered H template
// Copy filtered H template
dynCode.addCopyFile(codeTemplateH);
// debugging: make BC verbose
// dynCode.setFilterVariable("verbose", "true");
// Info<<"compile " << name_ << " sha1: "
// << context.sha1() << endl;
// Debugging: make BC verbose
// dynCode.setFilterVariable("verbose", "true");
// Info<<"compile " << name_ << " sha1: "
// << context.sha1() << endl;
// define Make/options
// Define Make/options
dynCode.setMakeOptions
(
"EXE_INC = -g \\\n"
......@@ -144,7 +144,7 @@ template<class Type>
const Foam::dictionary& Foam::codedFixedValuePointPatchField<Type>::codeDict()
const
{
// use system/codeDict or in-line
// Use system/codeDict or in-line
return
(
dict_.found("code")
......@@ -168,7 +168,7 @@ Foam::string Foam::codedFixedValuePointPatchField<Type>::description() const
template<class Type>
void Foam::codedFixedValuePointPatchField<Type>::clearRedirect() const
{
// remove instantiation of pointPatchField provided by library
// Remove instantiation of pointPatchField provided by library
redirectPatchFieldPtr_.clear();
}
......
......@@ -114,6 +114,7 @@ class codedFixedValuePointPatchField
mutable autoPtr<pointPatchField<Type>> redirectPatchFieldPtr_;
// Private Member Functions
const IOdictionary& dict() const;
......@@ -136,6 +137,7 @@ class codedFixedValuePointPatchField
// Get the dictionary to initialize the codeContext
virtual const dictionary& codeDict() const;
public:
// Static data members
......@@ -218,7 +220,6 @@ public:
}
// Member functions
//- Get reference to the underlying patch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment