Skip to content

Commit

Permalink
added BoostedBHComplexProca example
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunFell committed Mar 20, 2024
1 parent 6bf5db5 commit 02b659c
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions Examples/BoostedBHComplexProca/BoostedBHComplexProcaLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
#include "FixedGridsTaggingCriterion.hpp"

// Problem specific includes
#include "ComplexProcaField.hpp"
#include "EnergyConservation.hpp"
#include "ExcisionDiagnostics.hpp"
#include "ExcisionComplexProcaEvolution.hpp"
#include "ExcisionDiagnostics.hpp"
#include "FluxExtraction.hpp"
#include "InitialComplexProcaData.hpp"
#include "LinearMomConservation.hpp"
#include "ProcaConstraint.hpp"
#include "ComplexProcaField.hpp"

// Diagnostics
#include "ProcaDiagnostic.hpp"
Expand Down Expand Up @@ -155,8 +155,8 @@ void BoostedBHComplexProcaLevel::specificPostTimeStep()

// Things to do in RHS update, at each RK4 step
void BoostedBHComplexProcaLevel::specificEvalRHS(GRLevelData &a_soln,
GRLevelData &a_rhs,
const double a_time)
GRLevelData &a_rhs,
const double a_time)
{
// Calculate right hand side with matter_t = ComplexProcaField
// and background_t = BoostedBH
Expand Down
2 changes: 1 addition & 1 deletion Examples/BoostedBHComplexProca/DiagnosticVariables.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ enum
c_fluxLinMom,
c_sourceLinMom,
c_Zvec_Re_out, // Auxiliary Z field. Used for tracking (minus) the Gauss
// constraint
// constraint
c_Zvec_Im_out,

NUM_DIAGNOSTIC_VARS
Expand Down
18 changes: 9 additions & 9 deletions Examples/BoostedBHComplexProca/InitialComplexProcaData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "ADMFixedBGVars.hpp"
#include "BoostedBH.hpp"
#include "Cell.hpp"
#include "Coordinates.hpp"
#include "ComplexProcaField.hpp"
#include "Coordinates.hpp"
#include "Tensor.hpp"
#include "TensorAlgebra.hpp"
#include "UserVariables.hpp" //This files needs NUM_VARS - total no. components
Expand All @@ -37,13 +37,12 @@ class InitialProcaData
public:
//! The constructor for the class
InitialProcaData(
const double a_amplitude,
const double a_mass,
const double a_amplitude, const double a_mass,
const std::array<double, CH_SPACEDIM> a_center,
const BoostedBH::params_t a_bg_params, const double a_dx,
const std::string a_proca_initial_data_profile = "uniform-x")
: m_dx(a_dx), m_amplitude(a_amplitude), m_mass{a_mass}, m_center(a_center),
m_bg_params(a_bg_params),
: m_dx(a_dx), m_amplitude(a_amplitude), m_mass{a_mass},
m_center(a_center), m_bg_params(a_bg_params),
m_proca_initial_data_profile(a_proca_initial_data_profile)
{
}
Expand Down Expand Up @@ -84,15 +83,16 @@ class InitialProcaData
vars.Avec_Re[2] = m_amplitude;
}

//Since Evec is minus the conjugate momentum to Avec, we set E = - dAvec/dt
// Assuming Avec is a phasor, i.e. Avec[i] ~ e^(-i*w*t)
// Since Evec is minus the conjugate momentum to Avec, we set E = -
// dAvec/dt
// Assuming Avec is a phasor, i.e. Avec[i] ~ e^(-i*w*t)
FOR1(i)
{
vars.Evec_Im[i] = 0;

FOR1(j)
{
vars.Evec_Im[i] += - gamma_UU[i][j] * m_mass * vars.Avec_Re[j];
vars.Evec_Im[i] += -gamma_UU[i][j] * m_mass * vars.Avec_Re[j];
}
}

Expand Down
4 changes: 2 additions & 2 deletions Examples/BoostedBHComplexProca/Main_BoostedBHComplexProca.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ int runGRChombo(int argc, char *argv[])
// (To simulate a different problem, define a new child of AMRLevel
// and an associated LevelFactory)
GRAMR gr_amr;
DefaultLevelFactory<BoostedBHComplexProcaLevel> proca_field_level_fact(gr_amr,
sim_params);
DefaultLevelFactory<BoostedBHComplexProcaLevel> proca_field_level_fact(
gr_amr, sim_params);
setupAMRObject(gr_amr, proca_field_level_fact);

// call this after amr object setup so grids known
Expand Down
11 changes: 5 additions & 6 deletions Examples/BoostedBHComplexProca/ProcaConstraint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "ADMFixedBGVars.hpp"
#include "BoostedBH.hpp"
#include "Cell.hpp"
#include "Coordinates.hpp"
#include "ComplexProcaField.hpp"
#include "Coordinates.hpp"
#include "Tensor.hpp"
#include "UserVariables.hpp" //This files needs NUM_VARS - total no. components
#include "VarsTools.hpp"
Expand Down Expand Up @@ -72,11 +72,10 @@ class ProcaConstraint
Avec0_Re += -d1.Evec_Re[i][i];
Avec0_Im += -d1.Evec_Im[i][i];

FOR1(j)
{
Avec0_Re += -chris_phys.ULL[i][i][j] * vars.Evec_Re[j];
Avec0_Im += -chris_phys.ULL[i][i][j] * vars.Evec_Im[j];

FOR1(j)
{
Avec0_Re += -chris_phys.ULL[i][i][j] * vars.Evec_Re[j];
Avec0_Im += -chris_phys.ULL[i][i][j] * vars.Evec_Im[j];
}
}
Avec0_Re = Avec0_Re / m_mu / m_mu;
Expand Down
2 changes: 1 addition & 1 deletion Examples/BoostedBHComplexProca/ProcaDiagnostic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include "ADMFixedBGVars.hpp"
#include "BoostedBH.hpp"
#include "Cell.hpp"
#include "Coordinates.hpp"
#include "ComplexProcaField.hpp"
#include "Coordinates.hpp"
#include "Tensor.hpp"
#include "UserVariables.hpp" //This files needs NUM_VARS - total no. components
#include "VarsTools.hpp"
Expand Down
3 changes: 2 additions & 1 deletion Examples/BoostedBHComplexProca/SimulationParameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ class SimulationParameters : public FixedBGSimulationParametersBase
}
}

// Problem specific parameters - the radii for the integrations (Should always equal the radii of extraction)
// Problem specific parameters - the radii for the integrations (Should
// always equal the radii of extraction)
double inner_r, outer_r;
double proca_mass, proca_damping, proca_amplitude;
// Collection of parameters necessary for the initial conditions
Expand Down
2 changes: 1 addition & 1 deletion Examples/BoostedBHComplexProca/UserVariables.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static const std::array<std::string, NUM_VARS> variable_names = {

"Evec1_Re", "Evec1_Im", "Evec2_Re", "Evec2_Im", "Evec3_Re", "Evec3_Im",

"Zvec_Re", "Zvec_Im"};
"Zvec_Re", "Zvec_Im"};

} // namespace UserVariables

Expand Down

0 comments on commit 02b659c

Please sign in to comment.