From 18ffb1ad07855c9a06d42e1b39fe39cb60a3a681 Mon Sep 17 00:00:00 2001 From: sergio <s.ferraris@opencfd.co.uk> Date: Mon, 12 Jul 2021 17:32:35 +0100 Subject: [PATCH] ENH: KirchhoffShell: replace read() by init() --- .../KirchhoffShell/KirchhoffShell.C | 16 +++++----------- .../KirchhoffShell/KirchhoffShell.H | 16 ++++++---------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/regionFaModels/KirchhoffShell/KirchhoffShell.C b/src/regionFaModels/KirchhoffShell/KirchhoffShell.C index 577a5262e11..39c64de6a07 100644 --- a/src/regionFaModels/KirchhoffShell/KirchhoffShell.C +++ b/src/regionFaModels/KirchhoffShell/KirchhoffShell.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -44,14 +44,15 @@ defineTypeNameAndDebug(KirchhoffShell, 0); addToRunTimeSelectionTable(vibrationShellModel, KirchhoffShell, dictionary); -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -bool KirchhoffShell::read(const dictionary& dict) +bool KirchhoffShell::init(const dictionary& dict) { this->solution().readEntry("nNonOrthCorr", nNonOrthCorr_); return true; } +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void KirchhoffShell::solveDisplacement() { @@ -249,16 +250,11 @@ KirchhoffShell::KirchhoffShell dimensionedScalar(inv(pow3(dimLength)), Zero) ) { - init(); + init(dict); } - // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -void KirchhoffShell::init() -{} - - void KirchhoffShell::preEvolveRegion() {} @@ -306,11 +302,9 @@ const tmp<areaScalarField> KirchhoffShell::rho() const ); } - void KirchhoffShell::info() {} - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace regionModels diff --git a/src/regionFaModels/KirchhoffShell/KirchhoffShell.H b/src/regionFaModels/KirchhoffShell/KirchhoffShell.H index 0a7762bedb4..24fe3c7a978 100644 --- a/src/regionFaModels/KirchhoffShell/KirchhoffShell.H +++ b/src/regionFaModels/KirchhoffShell/KirchhoffShell.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -33,10 +33,10 @@ Usage \verbatim <patchName> { - // Mandatory/Optional (inherited) entries + // Mandatory/Optional entries ... - // Mandatory entries (unmodifiable) + // Mandatory entries vibrationShellModel KirchhoffShell; f0 0.04; f1 0.0; @@ -46,7 +46,7 @@ Usage where the entries mean: \table - Property | Description | Type | Reqd | Dflt + Property | Description | Type | Reqd | Deflt vibrationShellModel | Type name: KirchhoffShell | word | yes | - f0 | Damping coefficient [1/s] | scalar | yes | - f1 | Damping coefficient [1/s] | scalar | yes | - @@ -94,8 +94,8 @@ class KirchhoffShell // Private Member Functions - //- Initialize KirchhoffShell - void init(); + //- Initialise KirchhoffShell + bool init(const dictionary& dict); protected: @@ -140,10 +140,6 @@ protected: // Protected Member Functions - //- Read control parameters from dictionary - virtual bool read(const dictionary& dict); - - // Equations //- Solve energy equation -- GitLab