COSMOS
Public Member Functions | List of all members
Fmv Class Reference

Derived class from Fmv0, implementing specific boundary conditions and initial data routines for the COSMOS simulation. More...

#include <cosmos_d.h>

Inheritance diagram for Fmv:
Inheritance graph
Collaboration diagram for Fmv:
Collaboration graph

Public Member Functions

 Fmv ()
 Constructor for the Fmv class.
 
virtual ~Fmv ()
 Destructor for the Fmv class.
 
virtual void set_boundary ()
 Sets the boundary conditions for all evolved grid functions.
 
void initial_data (double t, double mu, double kk, double xi2, double xi3, double w3)
 Sets up the initial data for the simulation.
 
void initial_nonsph (double t, double mu, double kk, double xi2, double xi3, double w3)
 Sets the initial data for the geometric (BSSN) variables with non-spherical perturbations.
 
void set_initial_scalar (double mus, double kks, double xi2s, double xi3s)
 Sets the initial data for the scalar field variables.
 
void set_initial_fluid (double t)
 Sets the initial data for the fluid variables (if enabled).
 
- Public Member Functions inherited from Fmv0
 Fmv0 (int tabs, int jupper, int jlower, int kupper, int klower, int lupper, int llower, double xupper, double xlower, double yupper, double ylower, double zupper, double zlower, double cfl_in, double etaa_in, double etab_in, double etabb_in, double KOep_in, int exg_in, double Hb_in, double fluidw_in, double kap_MUSCL_in, double b_minmod_in, double amp_in)
 Constructor for the Fmv0 class.
 
virtual ~Fmv0 ()
 Destructor for the Fmv0 class. Frees allocated memory.
 
virtual void rhs (double dt, double t)
 Calculates the right-hand sides (RHS) of the BSSN evolution equations.
 
void KOdiss (double ***q, double ***f)
 Applies Kreiss-Oliger numerical dissipation to evolved variables.
 
double funcf (double x)
 Coordinate mapping function from logical coordinate (e.g., j*dx) to physical coordinate.
 
double df (double x)
 First derivative of the coordinate mapping function funcf.
 
double ddf (double x)
 Second derivative of the coordinate mapping function funcf.
 
double dddf (double x)
 Third derivative of the coordinate mapping function funcf.
 
int get_tab () const
 Get the number of buffer zones.
 
double get_cfl () const
 Get the CFL factor.
 
bool get_fluidevo () const
 Check if fluid evolution is enabled (based on fluidw perhaps).
 
int & set_bflag (int l, int k, int j)
 Set the boundary flag at a specific grid point. Returns a reference.
 
int get_bflag (int l, int k, int j) const
 Get the boundary flag at a specific grid point.
 
double *** matrix (long nrl, long nrh, long ncl, long nch, long ndl, long ndh)
 Allocates memory for a 3D grid function array.
 
void free_matrix (double ***m, long nrl, long nrh, long ncl, long nch, long ndl, long ndh)
 Frees memory allocated by matrix().
 

Additional Inherited Members

- Public Attributes inherited from Fmv0
int tab
 Number of buffer/ghost zones.
 
int jmin
 Minimum physical grid index in x.
 
int jmax
 Maximum physical grid index in x.
 
double xmin
 Minimum coordinate value in x.
 
double xmax
 Maximum coordinate value in x.
 
double dx
 Grid spacing in x (uniform logical grid).
 
double cfl
 CFL factor for time step calculation.
 
double etaa
 Gauge parameter eta for 1+log lapse.
 
double etab
 Gauge parameter eta for Gamma-driver shift.
 
double etabb
 Gauge parameter eta_b (or similar) for Gamma-driver shift.
 
double KOep
 Kreiss-Oliger dissipation coefficient epsilon.
 
double Hb
 Initial Hubble parameter.
 
double fluidw
 Fluid equation of state parameter w (if fluid enabled).
 
double kap_MUSCL
 MUSCL reconstruction parameter kappa (if fluid enabled).
 
double b_minmod
 Minmod limiter parameter b (if fluid enabled).
 
int exg
 Grid size for excision region (if enabled).
 
double tmax
 Maximum simulation time.
 
double amp
 Grid stretching parameter for coordinate mapping.
 
double *** alp
 Pointer to the lapse function grid data.
 
double *** betax
 Pointer to the shift vector component beta^x grid data.
 
- Protected Member Functions inherited from Fmv0
double D1x (double ***f, int l, int k, int j)
 Calculates spatial derivatives (e.g., first derivative in x).
 
void calculate_christoffel (int l, int k, int j)
 Calculates Christoffel symbols or connection functions.
 
void calculate_ricci (int l, int k, int j)
 Calculates Ricci tensor components.
 
void calculate_matter_sources (int l, int k, int j)
 Calculates matter source terms (Stress-Energy Tensor T_munu).
 

Detailed Description

Derived class from Fmv0, implementing specific boundary conditions and initial data routines for the COSMOS simulation.

Overrides virtual functions like set_boundary and provides methods like initial_data or initial_nonsph.

Constructor & Destructor Documentation

◆ Fmv()

Fmv::Fmv ( )

Constructor for the Fmv class.

Passes most parameters up to the Fmv0 constructor. May add specific parameters for this class if needed.

Parameters
[in]paramsParameters identical to Fmv0 constructor.

◆ ~Fmv()

virtual Fmv::~Fmv ( )
virtual

Destructor for the Fmv class.

Member Function Documentation

◆ initial_data()

void Fmv::initial_data ( double t,
double mu,
double kk,
double xi2,
double xi3,
double w3 )

Sets up the initial data for the simulation.

Parameters
tInitial time (usually 0).
muInitial geometric perturbation amplitude.
kkInitial geometric perturbation scale/wavenumber.
xi2Initial geometric perturbation non-spherical parameter.
xi3Initial geometric perturbation non-spherical parameter.
w3Initial geometric perturbation additional parameter.
Note
Calls helper functions like initial_nonsph, set_initial_scalar.

◆ initial_nonsph()

void Fmv::initial_nonsph ( double t,
double mu,
double kk,
double xi2,
double xi3,
double w3 )

Sets the initial data for the geometric (BSSN) variables with non-spherical perturbations.

Parameters
tInitial time.
muAmplitude parameter.
kkScale/wavenumber parameter.
xi2Non-spherical parameter.
xi3Non-spherical parameter.
w3Additional parameter.
Here is the caller graph for this function:

◆ set_boundary()

virtual void Fmv::set_boundary ( )
virtual

Sets the boundary conditions for all evolved grid functions.

Implements the specific boundary logic (e.g., periodic, reflection, outflow) for the COSMOS simulation setup. Called typically after each RK step.

◆ set_initial_fluid()

void Fmv::set_initial_fluid ( double t)

Sets the initial data for the fluid variables (if enabled).

Parameters
tInitial time. // Add parameters relevant to fluid initial data if needed

◆ set_initial_scalar()

void Fmv::set_initial_scalar ( double mus,
double kks,
double xi2s,
double xi3s )

Sets the initial data for the scalar field variables.

Parameters
musAmplitude parameter for scalar field perturbation.
kksScale/wavenumber parameter for scalar field perturbation.
xi2sNon-spherical parameter for scalar field perturbation.
xi3sNon-spherical parameter for scalar field perturbation.

The documentation for this class was generated from the following file: