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
f187dd8a
Commit
f187dd8a
authored
Dec 19, 2017
by
Andrew Heather
Browse files
ENH: finiteArea - integration updates
parent
d20b981f
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
applications/utilities/parallelProcessing/decomposePar/Make/options
View file @
f187dd8a
...
...
@@ -15,7 +15,6 @@ EXE_LIBS = \
-ldecompositionMethods \
-L$(FOAM_LIBBIN)/dummy \
-lkahipDecomp -lmetisDecomp -lscotchDecomp \
-lfiniteArea \
-llagrangian \
-ldynamicMesh \
-lregionModels
src/Allwmake
View file @
f187dd8a
...
...
@@ -40,9 +40,8 @@ wmakeLnInclude -u fvOptions
wmake
$targetType
finiteVolume
wmake
$targetType
lagrangian/basic
wmake
$targetType
lagrangian/distributionModels
wmake
$targetType
genericPatchFields
wmake
$targetType
finiteArea
wmake
$targetType
genericPatchFields
conversion/Allwmake
$targetType
$*
wmake
$targetType
mesh/extrudeModel
...
...
src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C
View file @
f187dd8a
...
...
@@ -140,8 +140,8 @@ Foam::calculatedFaPatchField<Type>::valueInternalCoeffs
FatalErrorInFunction
<<
"valueInternalCoeffs cannot be called for a calculatedFaPatchField"
<<
"
\n
on patch "
<<
this
->
patch
().
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
"
\n
You are probably trying to solve for a field with a "
"default boundary condition."
<<
exit
(
FatalError
);
...
...
@@ -160,8 +160,8 @@ Foam::calculatedFaPatchField<Type>::valueBoundaryCoeffs
FatalErrorInFunction
<<
"valueBoundaryCoeffs cannot be called for a calculatedFaPatchField"
<<
"
\n
on patch "
<<
this
->
patch
().
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
"
\n
You are probably trying to solve for a field with a "
"default boundary condition."
<<
exit
(
FatalError
);
...
...
@@ -178,8 +178,8 @@ Foam::calculatedFaPatchField<Type>::gradientInternalCoeffs() const
<<
"gradientInternalCoeffs cannot be called for a "
"calculatedFaPatchField"
<<
"
\n
on patch "
<<
this
->
patch
().
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
"
\n
You are probably trying to solve for a field with a "
"default boundary condition."
<<
exit
(
FatalError
);
...
...
@@ -197,8 +197,8 @@ Foam::calculatedFaPatchField<Type>::gradientBoundaryCoeffs() const
"gradientBoundaryCoeffs cannot be called for a "
"calculatedFaPatchField"
<<
"
\n
on patch "
<<
this
->
patch
().
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
"
\n
You are probably trying to solve for a field with a "
"default boundary condition."
<<
exit
(
FatalError
);
...
...
src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C
View file @
f187dd8a
...
...
@@ -59,8 +59,8 @@ Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
<<
"
\n
patch type '"
<<
p
.
type
()
<<
"' not constraint type '"
<<
typeName
<<
"'"
<<
"
\n
for patch "
<<
p
.
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
exit
(
FatalIOError
);
}
}
...
...
@@ -83,8 +83,8 @@ Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
<<
"
\n
patch type '"
<<
p
.
type
()
<<
"' not constraint type '"
<<
typeName
<<
"'"
<<
"
\n
for patch "
<<
p
.
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
exit
(
FatalIOError
);
}
...
...
@@ -122,7 +122,7 @@ template<class Type>
Foam
::
tmp
<
Foam
::
Field
<
Type
>>
Foam
::
cyclicFaPatchField
<
Type
>::
patchNeighbourField
()
const
{
const
Field
<
Type
>&
iField
=
this
->
internal
Field
();
const
Field
<
Type
>&
iField
=
this
->
primitive
Field
();
const
labelUList
&
faceCells
=
cyclicPatch_
.
faceCells
();
tmp
<
Field
<
Type
>>
tpnf
(
new
Field
<
Type
>
(
this
->
size
()));
...
...
src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.C
View file @
f187dd8a
...
...
@@ -59,8 +59,8 @@ Foam::emptyFaPatchField<Type>::emptyFaPatchField
<<
"
\n
patch type '"
<<
p
.
type
()
<<
"' not constraint type '"
<<
typeName
<<
"'"
<<
"
\n
for patch "
<<
p
.
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
exit
(
FatalIOError
);
}
}
...
...
@@ -82,8 +82,8 @@ Foam::emptyFaPatchField<Type>::emptyFaPatchField
<<
"
\n
patch type '"
<<
p
.
type
()
<<
"' not constraint type '"
<<
typeName
<<
"'"
<<
"
\n
for patch "
<<
p
.
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
exit
(
FatalIOError
);
}
}
...
...
@@ -98,7 +98,7 @@ Foam::emptyFaPatchField<Type>::emptyFaPatchField
faPatchField
<
Type
>
(
ptf
.
patch
(),
ptf
.
dimensionedI
nternalField
(),
ptf
.
i
nternalField
(),
Field
<
Type
>
(
0
)
)
{}
...
...
@@ -120,12 +120,12 @@ Foam::emptyFaPatchField<Type>::emptyFaPatchField
template
<
class
Type
>
void
Foam
::
emptyFaPatchField
<
Type
>::
updateCoeffs
()
{
if
(
this
->
dimensionedI
nternalField
().
mesh
().
nFaces
())
if
(
this
->
i
nternalField
().
mesh
().
nFaces
())
{
if
(
this
->
patch
().
faPatch
::
size
()
%
this
->
dimensionedI
nternalField
().
mesh
().
nFaces
()
%
this
->
i
nternalField
().
mesh
().
nFaces
()
)
{
FatalErrorInFunction
...
...
src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C
View file @
f187dd8a
...
...
@@ -76,8 +76,8 @@ Foam::processorFaPatchField<Type>::processorFaPatchField
<<
"
\n
patch type '"
<<
p
.
type
()
<<
"' not constraint type '"
<<
typeName
<<
"'"
<<
"
\n
for patch "
<<
p
.
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
exit
(
FatalIOError
);
}
}
...
...
@@ -100,8 +100,8 @@ Foam::processorFaPatchField<Type>::processorFaPatchField
<<
"
\n
patch type '"
<<
p
.
type
()
<<
"' not constraint type '"
<<
typeName
<<
"'"
<<
"
\n
for patch "
<<
p
.
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
exit
(
FatalIOError
);
}
}
...
...
src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.C
View file @
f187dd8a
...
...
@@ -57,8 +57,8 @@ Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
<<
"
\n
patch type '"
<<
p
.
type
()
<<
"' not constraint type '"
<<
typeName
<<
"'"
<<
"
\n
for patch "
<<
p
.
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
exit
(
FatalIOError
);
}
}
...
...
@@ -80,8 +80,8 @@ Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
<<
"
\n
patch type '"
<<
p
.
type
()
<<
"' not constraint type '"
<<
typeName
<<
"'"
<<
"
\n
for patch "
<<
p
.
name
()
<<
" of field "
<<
this
->
dimensionedI
nternalField
().
name
()
<<
" in file "
<<
this
->
dimensionedI
nternalField
().
objectPath
()
<<
" of field "
<<
this
->
i
nternalField
().
name
()
<<
" in file "
<<
this
->
i
nternalField
().
objectPath
()
<<
exit
(
FatalIOError
);
}
}
...
...
src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H
View file @
f187dd8a
...
...
@@ -270,14 +270,13 @@ public:
}
//- Return dimensioned internal field reference
const
DimensionedField
<
Type
,
areaMesh
>&
dimensionedInternalField
()
const
const
DimensionedField
<
Type
,
areaMesh
>&
internalField
()
const
{
return
internalField_
;
}
//- Return internal field reference
const
Field
<
Type
>&
internal
Field
()
const
const
Field
<
Type
>&
primitive
Field
()
const
{
return
internalField_
;
}
...
...
src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.C
View file @
f187dd8a
...
...
@@ -93,7 +93,7 @@ Foam::emptyFaePatchField<Type>::emptyFaePatchField
faePatchField
<
Type
>
(
ptf
.
patch
(),
ptf
.
dimensionedI
nternalField
(),
ptf
.
i
nternalField
(),
Field
<
Type
>
(
0
)
)
{}
...
...
src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H
View file @
f187dd8a
...
...
@@ -270,14 +270,13 @@ public:
}
//- Return dimensioned internal field reference
const
DimensionedField
<
Type
,
edgeMesh
>&
dimensionedInternalField
()
const
const
DimensionedField
<
Type
,
edgeMesh
>&
internalField
()
const
{
return
internalField_
;
}
//- Return internal field reference
const
Field
<
Type
>&
internal
Field
()
const
const
Field
<
Type
>&
primitive
Field
()
const
{
return
internalField_
;
}
...
...
src/genericPatchFields/Make/files
View file @
f187dd8a
genericFaPatchField/genericFaPatchFields.C
genericFvPatchField/genericFvPatchFields.C
genericPointPatchField/genericPointPatchFields.C
...
...
src/genericPatchFields/Make/options
View file @
f187dd8a
EXE_INC = \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
LIB_LIBS = \
-lfiniteArea \
-lfiniteVolume
src/genericPatchFields/genericFaPatchField/genericFaPatchField.C
0 → 100644
View file @
f187dd8a
This diff is collapsed.
Click to expand it.
src/genericPatchFields/genericFaPatchField/genericFaPatchField.H
0 → 100644
View file @
f187dd8a
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::genericFaPatchField
Description
This boundary condition provides a generic version of the \c calculated
condition, useful as a fallback for handling unknown patch types. Not
generally applicable as a user-specified condition.
See also
Foam::calculatedFaPatchField
SourceFiles
genericFaPatchField.C
\*---------------------------------------------------------------------------*/
#ifndef genericFaPatchField_H
#define genericFaPatchField_H
#include
"calculatedFaPatchField.H"
#include
"HashPtrTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
/*---------------------------------------------------------------------------*\
Class genericFaPatch Declaration
\*---------------------------------------------------------------------------*/
template
<
class
Type
>
class
genericFaPatchField
:
public
calculatedFaPatchField
<
Type
>
{
// Private data
const
word
actualTypeName_
;
dictionary
dict_
;
HashPtrTable
<
scalarField
>
scalarFields_
;
HashPtrTable
<
vectorField
>
vectorFields_
;
HashPtrTable
<
sphericalTensorField
>
sphericalTensorFields_
;
HashPtrTable
<
symmTensorField
>
symmTensorFields_
;
HashPtrTable
<
tensorField
>
tensorFields_
;
public:
//- Runtime type information
TypeName
(
"generic"
);
// Constructors
//- Construct from patch and internal field
genericFaPatchField
(
const
faPatch
&
,
const
DimensionedField
<
Type
,
areaMesh
>&
);
//- Construct from patch, internal field and dictionary
genericFaPatchField
(
const
faPatch
&
,
const
DimensionedField
<
Type
,
areaMesh
>&
,
const
dictionary
&
);
//- Construct by mapping given patchField<Type> onto a new patch
genericFaPatchField
(
const
genericFaPatchField
<
Type
>&
,
const
faPatch
&
,
const
DimensionedField
<
Type
,
areaMesh
>&
,
const
faPatchFieldMapper
&
);
//- Construct as copy
genericFaPatchField
(
const
genericFaPatchField
<
Type
>&
);
//- Construct and return a clone
virtual
tmp
<
faPatchField
<
Type
>>
clone
()
const
{
return
tmp
<
faPatchField
<
Type
>>
(
new
genericFaPatchField
<
Type
>
(
*
this
)
);
}
//- Construct as copy setting internal field reference
genericFaPatchField
(
const
genericFaPatchField
<
Type
>&
,
const
DimensionedField
<
Type
,
areaMesh
>&
);
//- Construct and return a clone setting internal field reference
virtual
tmp
<
faPatchField
<
Type
>>
clone
(
const
DimensionedField
<
Type
,
areaMesh
>&
iF
)
const
{
return
tmp
<
faPatchField
<
Type
>>
(
new
genericFaPatchField
<
Type
>
(
*
this
,
iF
)
);
}
// Member functions
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual
void
autoMap
(
const
faPatchFieldMapper
&
);
//- Reverse map the given faPatchField onto this faPatchField
virtual
void
rmap
(
const
faPatchField
<
Type
>&
,
const
labelList
&
);
// Evaluation functions
//- Return the matrix diagonal coefficients corresponding to the
// evaluation of the value of this patchField with given weights
virtual
tmp
<
Field
<
Type
>>
valueInternalCoeffs
(
const
tmp
<
scalarField
>&
)
const
;
//- Return the matrix source coefficients corresponding to the
// evaluation of the value of this patchField with given weights
virtual
tmp
<
Field
<
Type
>>
valueBoundaryCoeffs
(
const
tmp
<
scalarField
>&
)
const
;
//- Return the matrix diagonal coefficients corresponding to the
// evaluation of the gradient of this patchField
tmp
<
Field
<
Type
>>
gradientInternalCoeffs
()
const
;
//- Return the matrix source coefficients corresponding to the
// evaluation of the gradient of this patchField
tmp
<
Field
<
Type
>>
gradientBoundaryCoeffs
()
const
;
//- Return the actual type
const
word
&
actualType
()
const
;
//- Write
virtual
void
write
(
Ostream
&
)
const
;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include
"genericFaPatchField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
src/genericPatchFields/genericFaPatchField/genericFaPatchFields.C
0 → 100644
View file @
f187dd8a
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include
"genericFaPatchFields.H"
#include
"addToRunTimeSelectionTable.H"
#include
"areaFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makeFaPatchFields
(
generic
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// ************************************************************************* //
src/genericPatchFields/genericFaPatchField/genericFaPatchFields.H
0 → 100644
View file @
f187dd8a
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#ifndef genericFaPatchFields_H
#define genericFaPatchFields_H
#include
"genericFaPatchField.H"
#include
"fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeFaPatchTypeFieldTypedefs
(
generic
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
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