Skip to content

Commit

Permalink
move the body of constructor function to .C
Browse files Browse the repository at this point in the history
  • Loading branch information
moreff committed Jan 30, 2022
1 parent 993f21b commit 9436442
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,72 @@ namespace fv

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

template<class Type>
gaussScaleSelectiveConvectionScheme<Type>::gaussScaleSelectiveConvectionScheme
(
const fvMesh& mesh,
const surfaceScalarField& faceFlux,
const tmp<laplacianScheme<Type, scalar>> laplacianFiter,
const scalar& filterScope,
const tmp<surfaceInterpolationScheme<Type>>& loResScheme,
const tmp<surfaceInterpolationScheme<Type>>& hiResScheme
)
:
convectionScheme<Type>(mesh, faceFlux),
mesh_(mesh),
thiPassFilter_(laplacianFiter),
filterScope_(filterScope),
tloResInterpScheme_(loResScheme),
thiResInterpScheme_(hiResScheme),
DxDyDz_(
"DxDyDz_",
filterScope_*filterScope_
* Foam::pow(mesh_.surfaceInterpolation::deltaCoeffs() ,-2.0)
/ (4.0*constant::mathematical::pi*constant::mathematical::pi)
)
{}


template<class Type>
gaussScaleSelectiveConvectionScheme<Type>::gaussScaleSelectiveConvectionScheme
(
const fvMesh& mesh,
const surfaceScalarField& faceFlux,
Istream& is
)
:
convectionScheme<Type>(mesh, faceFlux),
mesh_(mesh),
thiPassFilter_(nullptr),
filterScope_(0),
tloResInterpScheme_(nullptr),
thiResInterpScheme_(nullptr),
DxDyDz_(nullptr)
{

thiPassFilter_ = tmp<laplacianScheme<Type, scalar>>
(
laplacianScheme<Type, scalar>::New(mesh, is)
);

is >> filterScope_;

tloResInterpScheme_ = tmp<surfaceInterpolationScheme<Type>>
(
surfaceInterpolationScheme<Type>::New(mesh, faceFlux, is)
);

thiResInterpScheme_ = tmp<surfaceInterpolationScheme<Type>>
(
surfaceInterpolationScheme<Type>::New(mesh, faceFlux, is)
);

DxDyDz_ = filterScope_*filterScope_
* Foam::pow(mesh_.surfaceInterpolation::deltaCoeffs() ,-2.0)
/ (4.0*constant::mathematical::pi*constant::mathematical::pi);
}


template<class Type>
const surfaceInterpolationScheme<Type>&
gaussScaleSelectiveConvectionScheme<Type>::interpScheme() const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,60 +100,15 @@ public:
const scalar& filterScope,
const tmp<surfaceInterpolationScheme<Type>>& loResScheme,
const tmp<surfaceInterpolationScheme<Type>>& hiResScheme
)
:
convectionScheme<Type>(mesh, faceFlux),
mesh_(mesh),
thiPassFilter_(laplacianFiter),
filterScope_(filterScope),
tloResInterpScheme_(loResScheme),
thiResInterpScheme_(hiResScheme),
DxDyDz_(
"DxDyDz_",
filterScope_*filterScope_
* Foam::pow(mesh_.surfaceInterpolation::deltaCoeffs() ,-2.0)
/ (4.0*constant::mathematical::pi*constant::mathematical::pi)
)
{}
);

//- Construct from flux and Istream
gaussScaleSelectiveConvectionScheme
(
const fvMesh& mesh,
const surfaceScalarField& faceFlux,
Istream& is
)
:
convectionScheme<Type>(mesh, faceFlux),
mesh_(mesh),
thiPassFilter_(nullptr),
filterScope_(0),
tloResInterpScheme_(nullptr),
thiResInterpScheme_(nullptr),
DxDyDz_(nullptr)
{

thiPassFilter_ = tmp<laplacianScheme<Type, scalar>>
(
laplacianScheme<Type, scalar>::New(mesh, is)
);

is >> filterScope_;

tloResInterpScheme_ = tmp<surfaceInterpolationScheme<Type>>
(
surfaceInterpolationScheme<Type>::New(mesh, faceFlux, is)
);

thiResInterpScheme_ = tmp<surfaceInterpolationScheme<Type>>
(
surfaceInterpolationScheme<Type>::New(mesh, faceFlux, is)
);

DxDyDz_ = filterScope_*filterScope_
* Foam::pow(mesh_.surfaceInterpolation::deltaCoeffs() ,-2.0)
/ (4.0*constant::mathematical::pi*constant::mathematical::pi);
}
);


// Member Functions
Expand Down

0 comments on commit 9436442

Please sign in to comment.