Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
bf14e44b
Commit
bf14e44b
authored
May 19, 2016
by
Henry Weller
Browse files
Updated code comments
parent
f2432865
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C
View file @
bf14e44b
...
...
@@ -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
);
//
r
emove leading 'lib' from name
libName
.
erase
(
0
,
3
);
//
R
emove leading 'lib' from name
return
libName
;
}
...
...
@@ -127,8 +127,8 @@ void Foam::dynamicCode::copyAndFilter
{
is
.
getLine
(
line
);
//
e
xpand according to mapping
//
e
xpanding according to env variables might cause too many
//
E
xpand according to mapping
.
//
E
xpanding 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
)
{
//
t
ry to get template from FOAM_CODESTREAM_TEMPLATES
//
T
ry to get template from FOAM_CODESTREAM_TEMPLATES
const
fileName
templateDir
(
Foam
::
getEnv
(
codeTemplateEnvName
));
bool
allOkay
=
true
;
...
...
@@ -162,7 +162,7 @@ bool Foam::dynamicCode::resolveTemplates
}
}
//
n
ot found - fallback to ~OpenFOAM expansion
//
N
ot 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
());
//
p
rovide default Make/options
//
P
rovide default Make/options
makeOptions_
=
"EXE_INC = -g
\n
"
"
\n\n
LIB_LIBS = "
;
...
...
@@ -408,7 +408,7 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
DynamicList
<
fileName
>
resolvedFiles
(
nFiles
);
DynamicList
<
fileName
>
badFiles
(
nFiles
);
//
r
esolve template, or add to bad-files
//
R
esolve template, or add to bad-files
resolveTemplates
(
compileFiles_
,
resolvedFiles
,
badFiles
);
resolveTemplates
(
copyFiles_
,
resolvedFiles
,
badFiles
);
...
...
src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C
View file @
bf14e44b
...
...
@@ -52,7 +52,7 @@ void Foam::codedFixedValuePointPatchField<Type>::setFieldTemplates
{
word
fieldType
(
pTraits
<
Type
>::
typeName
);
//
t
emplate type for pointPatchField
//
T
emplate 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
{
//
t
ake no chances - typeName must be identical to name_
//
T
ake no chances - typeName must be identical to name_
dynCode
.
setFilterVariable
(
"typeName"
,
name_
);
//
s
et TemplateType and FieldType filter variables
//
S
et TemplateType and FieldType filter variables
// (for pointPatchField)
setFieldTemplates
(
dynCode
);
//
c
ompile filtered C template
//
C
ompile filtered C template
dynCode
.
addCompileFile
(
codeTemplateC
);
//
c
opy filtered H template
//
C
opy filtered H template
dynCode
.
addCopyFile
(
codeTemplateH
);
//
d
ebugging: make BC verbose
// dynCode.setFilterVariable("verbose", "true");
// Info<<"compile " << name_ << " sha1: "
// << context.sha1() << endl;
//
D
ebugging: make BC verbose
//
dynCode.setFilterVariable("verbose", "true");
//
Info<<"compile " << name_ << " sha1: "
//
<< context.sha1() << endl;
//
d
efine Make/options
//
D
efine Make/options
dynCode
.
setMakeOptions
(
"EXE_INC = -g
\\\n
"
...
...
@@ -144,7 +144,7 @@ template<class Type>
const
Foam
::
dictionary
&
Foam
::
codedFixedValuePointPatchField
<
Type
>::
codeDict
()
const
{
//
u
se system/codeDict or in-line
//
U
se 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
{
//
r
emove instantiation of pointPatchField provided by library
//
R
emove instantiation of pointPatchField provided by library
redirectPatchFieldPtr_
.
clear
();
}
...
...
src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H
View file @
bf14e44b
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment