CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

New PatchInteractionModel for different cloudTypes

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 30, 2019, 15:18
Default New PatchInteractionModel for different cloudTypes
  #1
New Member
 
Eduardo Cruz
Join Date: Oct 2018
Posts: 13
Rep Power: 8
ECruz is on a distinguished road
Hi everyone,


I created a different PatchInteractionModel, and I need to use it with different cloudTypes. If I have a makeMyPatchInteractionModel.C like this


Code:
namespace Foam
{
    makePacthInteractionModelType(myPatchInteractionModel, basicKinematicCloud);
    makePacthInteractionModelType(myPatchInteractionModel, basicThermoCloud);
    makePacthInteractionModelType(myPatchInteractionModel, basicReactingCloud);
};
It gives an error of conflicting declarations of typedef Foam::CloudType::kinematicCloudType kinematicCloudType. This doesn't happen if I compile it with just one of the cloudTypes. Also if I define


Code:
#define makeMyPacthInteractionModelType(SS, CloudType)                         \
                                                                               \
    defineNamedTemplateTypeNameAndDebug                                        \
    (                                                                          \
        Foam::SS<Foam::CloudType::kinematicCloudType>,                         \
        0                                                                      \
    );                                                                         \
                                                                               \
    Foam::PatchInteractionModel<Foam::CloudType::kinematicCloudType>::         \
        adddictionaryConstructorToTable<Foam::SS                               \
        <Foam::CloudType::kinematicCloudType>>                                 \
           add##SS##CloudType##kinematicCloudType##ConstructorToTable_;
that is, the same as makePatchInteractionModelType as defined in PatchInteractionModel.H, but without using typedef, it compiles without errors. Is this supposed to happen? If yes, should I define a new function like I did or do something else?


Regards,


ECruz
ECruz is offline   Reply With Quote

Old   September 13, 2019, 10:39
Default
  #2
New Member
 
Eduardo Cruz
Join Date: Oct 2018
Posts: 13
Rep Power: 8
ECruz is on a distinguished road
No idea? I'm still doing the new definition. It works, but I'd really like to know if it is the best option.


ECruz
ECruz is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:55.