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
c111b59e
Commit
c111b59e
authored
Aug 08, 2013
by
mattijs
Browse files
ENH: fvPatchField: store patchType if construct from words
parent
f5abba4d
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
View file @
c111b59e
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
2
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
3
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -278,6 +278,18 @@ public:
return
internalField_
;
}
//- Optional patch type
const
word
&
patchType
()
const
{
return
patchType_
;
}
//- Optional patch type
word
&
patchType
()
{
return
patchType_
;
}
//- Return true if this patch field fixes a value
virtual
bool
fixesValue
()
const
{
...
...
src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C
View file @
c111b59e
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield |2011 OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -89,6 +89,13 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
return
patchTypeCstrIter
()(
p
,
iF
);
}
}
else
{
if
(
pointPatchConstructorTablePtr_
->
found
(
p
.
type
()))
{
pfPtr
().
patchType
()
=
actualPatchType
;
}
}
return
pfPtr
;
}
...
...
src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H
View file @
c111b59e
...
...
@@ -308,6 +308,18 @@ public:
return
internalField_
;
}
//- Optional patch type
const
word
&
patchType
()
const
{
return
patchType_
;
}
//- Optional patch type
word
&
patchType
()
{
return
patchType_
;
}
//- Return the type of the calculated for of fvPatchField
static
const
word
&
calculatedType
();
...
...
src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C
View file @
c111b59e
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -60,15 +60,15 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
<<
exit
(
FatalError
);
}
typename
patchConstructorTable
::
iterator
patchTypeCstrIter
=
patchConstructorTablePtr_
->
find
(
p
.
type
());
if
(
actualPatchType
==
word
::
null
||
actualPatchType
!=
p
.
type
()
)
{
typename
patchConstructorTable
::
iterator
patchTypeCstrIter
=
patchConstructorTablePtr_
->
find
(
p
.
type
());
if
(
patchTypeCstrIter
!=
patchConstructorTablePtr_
->
end
())
{
return
patchTypeCstrIter
()(
p
,
iF
);
...
...
@@ -80,7 +80,14 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
}
else
{
return
cstrIter
()(
p
,
iF
);
tmp
<
fvPatchField
<
Type
>
>
tfvp
=
cstrIter
()(
p
,
iF
);
// Check if constraint type override and store patchType if so
if
((
patchTypeCstrIter
!=
patchConstructorTablePtr_
->
end
()))
{
tfvp
().
patchType
()
=
actualPatchType
;
}
return
tfvp
;
}
}
...
...
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