|
[Sponsors] |
Is there a global container where all Function1 are stored? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 10, 2020, 04:32 |
Is there a global container where all Function1 are stored?
|
#1 |
Member
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 14 |
Hello,
for a plugin I need an way to manipulate a Function1<scalar> value each time step. I knowing the type of Function1, the patches of interesset and the boundary condition. BC: externalWallHeatFluxTemperatureFvPatchScalarField The function1 for the heat flux is stored in local private member q_. The function1 is of type constant for that example. The way as shown in followed code is not possible. So, perhaps it is a global storage of all Function1-Objects with corresponding patchIds. Do have OpenFOAM an global Function1-Storage? Code:
// get T field auto T_ = const_cast<volScalarField*>(&mesh.lookupObject<volScalarField>(nameTField)) // get bc for path with Id auto bPatch = refCast<const externalWallHeatFluxTemperatureFvPatchScalarField>(T_->boundaryField()[patchID]); // how to access the q_ Function1<...> of patch ...? bPatch.q_[0] = 1.0; |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
pimpleDyMFoam computation randomly stops | babapeti | OpenFOAM Running, Solving & CFD | 5 | January 24, 2018 05:28 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 02:50 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 04:03 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 02:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |