Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
master.h File Reference

Go to the source code of this file.

Functions

double slave_interpolate (const char *name, double xp=0, double yp=0, double zp=0, bool linear=false)
 
void event_slave (void)
 Event: slave (i++)
 
void event_slave_end (void)
 Event: slave_end (t = end)
 

Variables

double slave_start = 0.
 

Function Documentation

◆ event_slave()

void event_slave ( void  )

Event: slave (i++)

Synchronization events

Definition at line 21 of file master.h.

References slave_start, t, and x.

◆ event_slave_end()

void event_slave_end ( void  )

Event: slave_end (t = end)

Definition at line 27 of file master.h.

References x.

◆ slave_interpolate()

double slave_interpolate ( const char name,
double  xp,
double  yp,
double  zp,
bool  linear 
)
extern

Coupled slave

This can be used in combination with [master.h]() to couple two Basilisk solvers.

Example of coupling function

This is a simple function which can be called by the master to retrieve (interpolated) field values from the slave.

Using this model, it should be easy to write more sophisticated coupling functions, if necessary.

Note that new coupling functions must be added to the list of symbols which are exported. See the recipe for slave.o in the examples Makefile for details.

Definition at line 21 of file slave.h.

References grid, scalar::i, interpolate(), lookup_field(), s, and x.

Here is the call graph for this function:

Variable Documentation

◆ slave_start

double slave_start = 0.

Coupling interface for master/slave simulations

This is used in combination with [slave.h]().

The user interface is just slave_start which defines the starting time of the slave simulation and the interface of coupling functions: here only slave_interpolate().

Definition at line 12 of file master.h.

Referenced by event_slave().