mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Minor tweaks
This commit is contained in:
parent
149180ec7f
commit
c21f03daa3
2 changed files with 11 additions and 16 deletions
|
|
@ -374,55 +374,52 @@ public:
|
|||
//==============================================================================
|
||||
//! A toroidal surface described by the quartic torus lies in the x direction
|
||||
//
|
||||
//! \f$(x-x_0)^2 + (\sqrt{(y-y_0)^2 + (z-z_0)^2}-A)^2/C^2 -1 \f$
|
||||
//! \f$(x-x_0)^2 + (\sqrt{(y-y_0)^2 + (z-z_0)^2} - A)^2/C^2 -1 \f$
|
||||
//==============================================================================
|
||||
|
||||
class SurfaceXTorus : public CSGSurface {
|
||||
// (x-x0)^2/B^2 + (((y-y0)^2 + (z-z0)^2)^-1/2 -A))^2/C^2 -1 = 0
|
||||
double x0_, y0_, z0_, A_, B_, C_;
|
||||
|
||||
public:
|
||||
explicit SurfaceXTorus(pugi::xml_node surf_node);
|
||||
double evaluate(Position r) const;
|
||||
double distance(Position r, Direction u, bool coincident) const;
|
||||
Direction normal(Position r) const;
|
||||
void to_hdf5_inner(hid_t group_id) const;
|
||||
|
||||
double x0_, y0_, z0_, A_, B_, C_;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
//! A toroidal surface described by the quartic torus lies in the y direction
|
||||
//
|
||||
//! \f$(x-x_0)^2 + (\sqrt{(y-y_0)^2 + (z-z_0)^2}-A)^2/C^2 -1 \f$
|
||||
//! \f$(x-x_0)^2 + (\sqrt{(y-y_0)^2 + (z-z_0)^2} - A)^2/C^2 -1 \f$
|
||||
//==============================================================================
|
||||
|
||||
class SurfaceYTorus : public CSGSurface {
|
||||
// (y-y0)^2/B^2 + (((x-x0)^2 + (z-z0)^2)^-1/2 -A))^2/C^2 -1 = 0
|
||||
double x0_, y0_, z0_, A_, B_, C_;
|
||||
|
||||
public:
|
||||
explicit SurfaceYTorus(pugi::xml_node surf_node);
|
||||
double evaluate(Position r) const;
|
||||
double distance(Position r, Direction u, bool coincident) const;
|
||||
Direction normal(Position r) const;
|
||||
void to_hdf5_inner(hid_t group_id) const;
|
||||
|
||||
double x0_, y0_, z0_, A_, B_, C_;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
//! A toroidal surface described by the quartic torus lies in the z direction
|
||||
//
|
||||
//! \f$(x-x_0)^2 + (\sqrt{(y-y_0)^2 + (z-z_0)^2}-A)^2/C^2 -1 \f$
|
||||
//! \f$(x-x_0)^2 + (\sqrt{(y-y_0)^2 + (z-z_0)^2} - A)^2/C^2 -1 \f$
|
||||
//==============================================================================
|
||||
|
||||
class SurfaceZTorus : public CSGSurface {
|
||||
// (z-z0)^2/B^2 + (((x-x0)^2 + (y-y0)^2)^-1/2 -A))^2/C^2 -1 = 0
|
||||
double x0_, y0_, z0_, A_, B_, C_;
|
||||
|
||||
public:
|
||||
explicit SurfaceZTorus(pugi::xml_node surf_node);
|
||||
double evaluate(Position r) const;
|
||||
double distance(Position r, Direction u, bool coincident) const;
|
||||
Direction normal(Position r) const;
|
||||
void to_hdf5_inner(hid_t group_id) const;
|
||||
|
||||
double x0_, y0_, z0_, A_, B_, C_;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -94,10 +94,8 @@ void read_coeffs(pugi::xml_node surf_node, int surf_id, double& c1, double& c2,
|
|||
std::string coeffs = get_node_value(surf_node, "coeffs");
|
||||
int n_words = word_count(coeffs);
|
||||
if (n_words != 6) {
|
||||
std::stringstream err_msg;
|
||||
err_msg << "Surface " << surf_id << " expects 6 coeffs but was given "
|
||||
<< n_words;
|
||||
fatal_error(err_msg);
|
||||
fatal_error(fmt::format(
|
||||
"Surface {} expects 6 coeffs but was given {}", surf_id, n_words));
|
||||
}
|
||||
|
||||
// Parse the coefficients.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue