Skip to content

Commit

Permalink
[WIP] Sewing with Phoebus, define z4c related vars
Browse files Browse the repository at this point in the history
  • Loading branch information
hlim88 committed Oct 25, 2023
1 parent 9a29e1f commit 743ae08
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 14 deletions.
14 changes: 11 additions & 3 deletions src/Z4c/z4c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,19 @@ std::shared_ptr<StateDescriptor> Initialize(ParameterInput *pin) {
Metadata m_constraint_vector({Metadata::Cell, Metadata::Metadata::Derived, Metadata::OneCopy}, std::vector<int>{3});
z4c->AddField<constraint::H>(m_constraint_scalar);
z4c->AddField<constraint::M>(m_constraint_vector);
z4c->AddField<constraint::Z>(m_constraint_scalar);

Metadata m_evolution_scalar({Metadata::Cell, Metadata::Metadata::Derived, Metadata::OneCopy});
Metadata m_evolution_vector({Metadata::Cell, Metadata::Metadata::Derived, Metadata::OneCopy}, std::vector<int>{3});
Metadata m_evolution_rank2({Metadata::Cell, Metadata::Metadata::Derived, Metadata::OneCopy}, std::vector<int>{3,3});
z4c->AddField<evolution::At>(m_evolution_rank2);


z4c->AddField<evolution_z4c::chi>(m_evolution_scalar);
z4c->AddField<evolution_z4c::g>(m_evolution_rank2);
z4c->AddField<evolution_z4c::Khat>(m_evolution_scalar);
z4c->AddField<evolution_z4c::A>(m_evolution_rank2);
z4c->AddField<evolution_z4c::Gam>(m_evolution_vector);
z4c->AddField<evolution_z4c::Theta>(m_evolution_scalar);
z4c->AddField<evolution_z4c::alpha>(m_evolution_scalar);
z4c->AddField<evolution_z4c::beta>(m_evolution_vector);

return z4c
}
Expand Down
42 changes: 31 additions & 11 deletions src/Z4c/z4c.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Breif: General header for Z4c formulation
Bernuzzi & Hilditch (2010) and Hilditch et al. (2013).
The Z4c system is comprised of dynamical variable:
chi: Conformal factor (scalar)
gt : Induced 3-metric (rank-2)
Kh : Trace of extrinsic curvature (scalar)
At : Traceless of extrinsic curvature (rank-2)
g : Induced 3-metric (rank-2)
Khat : Trace of extrinsic curvature (scalar)
A : Traceless of extrinsic curvature (rank-2)
Theta : Temporal projection of Z4 vector (scalar)
Gt : Conformaly-related function (3-vector)
Gam : Conformaly-related function (3-vector)
In addtion, we follow typical gauge choice:
Bona-Masso for lapse, alpha (scalar) \TODO :maybe 1+log?
Expand Down Expand Up @@ -49,15 +49,35 @@ Author : Hyun Lim

namespace z4c { // fix consistencty with namespace everywhere
namespace constraint{
VARIABLE(z4c.c, H);
VARIABLE(z4c.c, M);
VARIABLE(z4c.c, H); // Hamiltoninan constraint
VARIABLE(z4c.c, M); // Momentum constraint
VARIABLE(z4c.c, Z); // Z-vector constraint
} // constraint
namespace evolution{
VARIABLE(z4c.c, At);
} // evolution
namespace evolution_z4c{
VARIABLE(z4c.c, chi); // Conformal factor
VARIABLE(z4c.c, g); // Induced 3 metric
VARIABLE(z4c.c, Khat); // Trace of extrinsic curvature
VARIABLE(z4c.c, A); // Traceless of extrinsic curvature
VARIABLE(z4c.c, Gam); // Conformally related function
VARIABLE(z4c.c, Theta); // Temporal projection of Z4 vector
VARIABLE(z4c.c, alpha); // Lapse
VARIABLE(z4c.c, beta); // Shift
} // evolution_z4c
namespace evolution_adm{
VARIABLE(z4c.c, g); // Induced 3 metric
VARIABLE(z4c.c, K); // Extrinsic curvature
VARIABLE(z4c.c, psi); // Psi scalar function
} // evolution_adm
namespace matter_source{ // TODO : this is not really the varialbe. We may not want them as like this
VARIABLE(z4c.c, rho);
VARIABLE(z4c.c, Si);
VARIABLE(z4c.c, Sij);
} // matter_source

// Prototype for package init
std::shared_ptr<parthenon::StateDescriptor> Initialize(ParameterInput *pin);
// TODO: add psi4 for GW extraction

// Prototype for package init
std::shared_ptr<parthenon::StateDescriptor> Initialize(ParameterInput *pin);

} // z4c

Expand Down

0 comments on commit 743ae08

Please sign in to comment.