Skip to content

Commit

Permalink
OpenFOAM6-specific changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisH committed Apr 26, 2024
1 parent f5e5064 commit 5584f5e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
7 changes: 2 additions & 5 deletions Adapter.C
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ bool preciceAdapter::Adapter::configFileRead()
{
CHTenabled_ = true;
}

if (module == "FSI")
{
FSIenabled_ = true;
}

if (module == "FF")
{
FFenabled_ = true;
Expand Down Expand Up @@ -500,8 +498,7 @@ void preciceAdapter::Adapter::execute()
return;
}


void preciceAdapter::Adapter::adjustTimeStep()
void preciceAdapter::Adapter::setTimeStep()
{
adjustSolverTimeStepAndReadData();

Expand Down Expand Up @@ -689,7 +686,7 @@ void preciceAdapter::Adapter::adjustSolverTimeStepAndReadData()
// Update the solver's timestep (but don't trigger the adjustDeltaT(),
// which also triggers the functionObject's adjustTimeStep())
// TODO: Keep this in mind if any relevant problem appears.
const_cast<Time&>(runTime_).setDeltaT(timestepSolver_, false);
const_cast<Time&>(runTime_).setDeltaTNoAdjust(timestepSolver_);

DEBUG(adapterInfo("Reading coupling data associated to the calculated time-step size..."));

Expand Down
4 changes: 2 additions & 2 deletions Adapter.H
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ public:
//- Called by the functionObject's execute()
void execute();

//- Called by the functionObject's adjustTimeStep()
void adjustTimeStep();
//- Called by the functionObject's setTimeStep()
void setTimeStep();

//- Called by the functionObject's end()
void end();
Expand Down
4 changes: 2 additions & 2 deletions preciceAdapterFunctionObject.C
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ bool Foam::functionObjects::preciceAdapterFunctionObject::write()
return true;
}

bool Foam::functionObjects::preciceAdapterFunctionObject::adjustTimeStep()
bool Foam::functionObjects::preciceAdapterFunctionObject::setTimeStep()
{
#ifdef ADAPTER_ENABLE_TIMINGS
clockValue clock;
clock.update();
#endif

adapter_.adjustTimeStep();
adapter_.setTimeStep();

#ifdef ADAPTER_ENABLE_TIMINGS
timeInAll_ += clock.elapsed();
Expand Down
2 changes: 1 addition & 1 deletion preciceAdapterFunctionObject.H
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public:
bool write() final;

//- Called at the end of Time::adjustDeltaT() if adjustTime is true
bool adjustTimeStep() final;
bool setTimeStep() final;

/*
// NOTE: If you add a new module that needs to execute methods
Expand Down

0 comments on commit 5584f5e

Please sign in to comment.