22 #include "MooseTypes.h" 33 #include "libmesh/point.h" 48 static int build_only;
92 std::vector<dfloat>
yPlus(
const std::vector<int> & boundary_id);
99 std::vector<dfloat>
viscousDrag(
const std::vector<int> & boundary);
166 const std::string & prefix,
169 const bool & write_coords);
177 void write_field_file(
const std::string & prefix,
const dfloat time,
const int & step);
362 template <
typename T>
363 void allgatherv(
const std::vector<int> & base_counts,
366 const int multiplier = 1);
378 const int multiplier);
399 double * scratch,
const double * I,
double * x,
int N,
double * Ix,
int M);
408 Point
centroidFace(
int local_elem_id,
int local_face_id);
423 Point
gllPoint(
int local_elem_id,
int local_node_id);
433 Point
gllPointFace(
int local_elem_id,
int local_face_id,
int local_node_id);
443 const std::vector<int> & boundary,
459 void scaleUsrwrk(
const unsigned int & slot,
const dfloat & value);
526 const std::vector<int> & boundary_id,
547 double massFlowrate(
const std::vector<int> & boundary_id,
705 validBoundaryIDs(
const std::vector<int> & boundary_id,
int & first_invalid_id,
int & n_boundaries);
760 double get_scalar01(
const int id,
const int surf_offset);
767 double get_scalar02(
const int id,
const int surf_offset);
774 double get_scalar03(
const int id,
const int surf_offset);
781 double get_usrwrk00(
const int id,
const int surf_offset);
788 double get_usrwrk01(
const int id,
const int surf_offset);
795 double get_usrwrk02(
const int id,
const int surf_offset);
809 double get_pressure(
const int id,
const int surf_offset);
816 double get_unity(
const int id,
const int surf_offset);
844 double get_velocity(
const int id,
const int surf_offset);
949 template <
typename T>
959 template <
typename T>
961 allgatherv(
const std::vector<int> & base_counts,
const T * input, T *
output,
const int multiplier)
963 int * recvCounts = (
int *)calloc(
commSize(),
sizeof(int));
964 int * displacement = (
int *)calloc(
commSize(),
sizeof(int));
967 MPI_Allgatherv(input,
971 (
const int *)recvCounts,
972 (
const int *)displacement,
974 platform->comm.mpiComm());
983 std::tuple<dfloat *, dfloat *, dfloat *>
host_xyz();
984 std::vector<dfloat> &
host_U();
985 std::vector<dfloat> &
host_P();
986 std::vector<dfloat> &
host_S();
Cardinal-specific nekRS API.
Definition: NekUility.C:21
MPI_Datatype resolveType()
std::vector< dfloat > & host_U()
void setStartTime(const double &start)
Definition: NekInterface.h:718
double sideMassFluxWeightedIntegral(const std::vector< int > &boundary_id, const field::NekFieldEnum &integrand, const nek_mesh::NekMeshEnum pp_mesh)
bool endControlNumSteps()
double get_velocity(const int id, const int surf_offset)
double ds03_ref
Definition: NekInterface.h:737
void storeBoundaryCoupling(const std::vector< int > &boundary_id, int &N)
double get_scalar01(const int id, const int surf_offset)
std::tuple< dfloat *, dfloat *, dfloat * > host_xyz()
void initializeScratch(const unsigned int &n_slots)
double get_usrwrk01(const int id, const int surf_offset)
double massFlowrate(const std::vector< int > &boundary_id, const nek_mesh::NekMeshEnum pp_mesh)
NekWriteEnum
Enumeration of possible fields to write in nekRS.
Definition: CardinalEnums.h:117
double P_ref
Definition: NekInterface.h:723
double get_velocity_x_squared(const int id, const int surf_offset)
double A_ref
Definition: NekInterface.h:725
void dimensionalizeVolume(double &integral)
Point centroidFace(int local_elem_id, int local_face_id)
double volumeExtremeValue(const field::NekFieldEnum &field, const nek_mesh::NekMeshEnum pp_mesh, const bool max)
double V_ref
Definition: NekInterface.h:726
bool isMovingMeshBoundary(const int boundary)
double volumeIntegral(const field::NekFieldEnum &integrand, const double &volume, const nek_mesh::NekMeshEnum pp_mesh)
std::vector< dfloat > & host_S()
void displacementAndCounts(const std::vector< int > &base_counts, int *counts, int *displacement, const int multiplier)
double get_velocity_x(const int id, const int surf_offset)
double source_ref
Definition: NekInterface.h:730
Definition: CardinalEnums.h:92
double T_ref
Definition: NekInterface.h:721
bool isTemperatureBoundary(const int boundary)
Real nondimensionalAdditive(const field::NekFieldEnum &field)
double(*)(int, int) solutionPointer(const field::NekFieldEnum &field)
Definition: NekInterface.h:745
void copyDeformationToDevice()
Copy the deformation from host to device.
void setRelativeTol(double tol)
void dimensionalizeArea(double &integral)
void interpolateSurfaceFaceHex3D(double *scratch, const double *I, double *x, int N, double *Ix, int M)
bool hasTemperatureSolve()
NekMeshEnum
Definition: CardinalEnums.h:51
void initializeDimensionalScales(const double U, const double T, const double dT, const double L, const double rho, const double Cp, const double s01, const double ds01, const double s02, const double ds02, const double s03, const double ds03)
void scaleUsrwrk(const unsigned int &slot, const dfloat &value)
double get_velocity_z_squared(const int id, const int surf_offset)
bool hasHeatSourceKernel()
int scalarSlot(const int id)
double L_ref
Definition: NekInterface.h:724
Definition: CardinalEnums.h:151
double volume(const nek_mesh::NekMeshEnum pp_mesh)
void limitTemperature(const double *min_T, const double *max_T)
double get_scalar03(const int id, const int surf_offset)
double sideIntegral(const std::vector< int > &boundary_id, const field::NekFieldEnum &integrand, const nek_mesh::NekMeshEnum pp_mesh)
std::vector< dfloat > & host_P()
const std::string temperatureBoundaryType(const int boundary)
double ds02_ref
Definition: NekInterface.h:735
double pressureSurfaceForce(const std::vector< int > &boundary_id, const Point &direction, const nek_mesh::NekMeshEnum pp_mesh)
void write_field_file(const std::string &prefix, const dfloat time, const int &step)
double get_velocity_y(const int id, const int surf_offset)
double flux_ref
Definition: NekInterface.h:729
bool hasTemperatureVariable()
void allgatherv(const std::vector< int > &base_counts, const T *input, T *output, const int multiplier=1)
Definition: NekInterface.h:961
Point gllPointFace(int local_elem_id, int local_face_id, int local_node_id)
bool isHeatFluxBoundary(const int boundary)
void initializeNekHostArrays()
std::vector< dfloat > viscousDrag(const std::vector< int > &boundary)
double get_unity(const int id, const int surf_offset)
double area(const std::vector< int > &boundary_id, const nek_mesh::NekMeshEnum pp_mesh)
double get_usrwrk02(const int id, const int surf_offset)
void write_usrwrk_field_file(const int &size, const int &index, const int &slot, const std::string &prefix, const dfloat &time, const int &step, const bool &write_coords)
mesh_t * temperatureMesh()
Point gllPoint(int local_elem_id, int local_node_id)
int velocityFieldOffset()
int NfaceVertices()
Number of vertices required to define an element face Vertices refer to the points required to place ...
double t_ref
Definition: NekInterface.h:731
double Cp_ref
Definition: NekInterface.h:728
NekFieldEnum
Enumeration of possible fields to read from nekRS.
Definition: CardinalEnums.h:95
double s01_ref
Definition: NekInterface.h:732
void buildOnly(int buildOnly)
double ds01_ref
Definition: NekInterface.h:733
void updateHostMeshParameters()
Update the mesh parameters on host.
Real scratchUnits(const int slot)
void freeScratch()
Free the scratch space.
Real nondimensionalDivisor(const field::NekFieldEnum &field)
Return the reference divisor scale that defines the non-dimensional field.
void dimensionalizeVolumeIntegral(const field::NekFieldEnum &integrand, const Real &volume, double &integral)
double s02_ref
Definition: NekInterface.h:734
void checkFieldValidity(const field::NekFieldEnum &field)
double heatFluxIntegral(const std::vector< int > &boundary_id, const nek_mesh::NekMeshEnum pp_mesh)
mesh_t * createMesh2(mesh_t *_mesh, int Nc)
double get_pressure(const int id, const int surf_offset)
void interpolationMatrix(double *I, int starting_points, int ending_points)
void initializeHostMeshParameters()
Allocate memory for the host mesh parameters.
double U_ref
Definition: NekInterface.h:720
void setNekSetupTime(const double &time)
void setAbsoluteTol(double tol)
bool validBoundaryIDs(const std::vector< int > &boundary_id, int &first_invalid_id, int &n_boundaries)
double get_temperature(const int id, const int surf_offset)
double s03_ref
Definition: NekInterface.h:736
void nondimensional(const bool n)
void computeWallDistance(const std::vector< int > &boundary_id)
bool endControlElapsedTime()
double get_usrwrk00(const int id, const int surf_offset)
mesh_t * getMesh(const nek_mesh::NekMeshEnum pp_mesh)
double rho_ref
Definition: NekInterface.h:727
bool hasScalarVariable(int scalarId)
Definition: CardinalEnums.h:130
std::vector< double > usrwrkSideIntegral(const unsigned int &slot, const std::vector< int > &boundary, const nek_mesh::NekMeshEnum pp_mesh)
double dT_ref
Definition: NekInterface.h:722
double usrwrkVolumeIntegral(const unsigned int &slot, const nek_mesh::NekMeshEnum pp_mesh)
std::vector< dfloat > yPlus(const std::vector< int > &boundary_id)
double get_scalar02(const int id, const int surf_offset)
Point centroid(int local_elem_id)
double get_velocity_z(const int id, const int surf_offset)
void interpolateVolumeHex3D(const double *I, double *x, int N, double *Ix, int M)
void gradient(const int offset, const int e, const double *f, double *grad_f, const nek_mesh::NekMeshEnum pp_mesh)
void dimensionalizeSideIntegral(const field::NekFieldEnum &integrand, const Real &area, double &integral)
double sideExtremeValue(const std::vector< int > &boundary_id, const field::NekFieldEnum &field, const nek_mesh::NekMeshEnum pp_mesh, const bool max)
double get_velocity_y_squared(const int id, const int surf_offset)