Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
15c7d501
Commit
15c7d501
authored
Dec 06, 2010
by
mattijs
Browse files
ENH: surfaceInterpolateFields : enable writing
parent
d730150e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C
View file @
15c7d501
...
...
@@ -24,7 +24,6 @@ License
\*---------------------------------------------------------------------------*/
#include "surfaceInterpolateFields.H"
//#include "dictionary.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -89,20 +88,21 @@ void Foam::surfaceInterpolateFields::read(const dictionary& dict)
void
Foam
::
surfaceInterpolateFields
::
execute
()
{
//Info<< type() << " " << name_ << ":" << nl;
// Clear out any previously loaded fields
ssf_
.
clear
();
svf_
.
clear
();
sSpheretf_
.
clear
();
sSymmtf_
.
clear
();
stf_
.
clear
();
interpolateFields
<
scalar
>
(
ssf_
);
interpolateFields
<
vector
>
(
svf_
);
interpolateFields
<
sphericalTensor
>
(
sSpheretf_
);
interpolateFields
<
symmTensor
>
(
sSymmtf_
);
interpolateFields
<
tensor
>
(
stf_
);
if
(
active_
)
{
// Clear out any previously loaded fields
ssf_
.
clear
();
svf_
.
clear
();
sSpheretf_
.
clear
();
sSymmtf_
.
clear
();
stf_
.
clear
();
interpolateFields
<
scalar
>
(
ssf_
);
interpolateFields
<
vector
>
(
svf_
);
interpolateFields
<
sphericalTensor
>
(
sSpheretf_
);
interpolateFields
<
symmTensor
>
(
sSymmtf_
);
interpolateFields
<
tensor
>
(
stf_
);
}
}
...
...
@@ -114,7 +114,32 @@ void Foam::surfaceInterpolateFields::end()
void
Foam
::
surfaceInterpolateFields
::
write
()
{
// Do nothing
if
(
active_
)
{
Info
<<
"Writing interpolated surface fields to "
<<
obr_
.
time
().
timeName
()
<<
endl
;
forAll
(
ssf_
,
i
)
{
ssf_
[
i
].
write
();
}
forAll
(
svf_
,
i
)
{
svf_
[
i
].
write
();
}
forAll
(
sSpheretf_
,
i
)
{
sSpheretf_
[
i
].
write
();
}
forAll
(
sSymmtf_
,
i
)
{
sSymmtf_
[
i
].
write
();
}
forAll
(
stf_
,
i
)
{
stf_
[
i
].
write
();
}
}
}
...
...
src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H
View file @
15c7d501
...
...
@@ -27,9 +27,24 @@ Class
Description
Linear interpolates volFields to surfaceFields
Note: gets executed every time step. Could move it to write() but then
you'd have problems if you have different write frequencies for different
function objects.
- at write it writes the fields
- it executes every time step
so it can either be used to calculate and write the interpolate or
(since the interpolates are registered) use some other functionObject
to work on them.
sampleSomeFields
{
type surfaceInterpolateFields;
..
enabled true;
outputControl outputTime;
..
// Name of volField and corresponding surfaceField
fields ((p pInterpolate)(U UInterpolate));
}
SourceFiles
surfaceInterpolateFields.C
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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