| /libCEED/examples/solids/src/ |
| H A D | boundary.c | 23 PetscErrorCode BCMMS(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt num… in BCMMS() argument 24 PetscScalar x = coords[0]; in BCMMS() 25 PetscScalar y = coords[1]; in BCMMS() 26 PetscScalar z = coords[2]; in BCMMS() 42 PetscErrorCode BCClamp(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt n… in BCClamp() argument 43 PetscScalar x = coords[0]; in BCClamp() 44 PetscScalar y = coords[1]; in BCClamp() 45 PetscScalar z = coords[2]; in BCClamp()
|
| /libCEED/examples/rust/ex3-volume/src/ |
| H A D | transform.rs | 29 let mut coords = mesh_coords.view_mut()?; in transform_mesh_coordinates() localVariable 33 let u = coords[i] + 1.; in transform_mesh_coordinates() 34 let v = coords[i + num_nodes] * std::f64::consts::PI / 2.; in transform_mesh_coordinates() 35 coords[i] = u * v.cos(); in transform_mesh_coordinates() 36 coords[i + num_nodes] = u * v.sin(); in transform_mesh_coordinates()
|
| /libCEED/examples/rust/ex3-volume-vector/src/ |
| H A D | transform.rs | 29 let mut coords = mesh_coords.view_mut()?; in transform_mesh_coordinates() localVariable 33 let u = coords[i] + 1.; in transform_mesh_coordinates() 34 let v = coords[i + num_nodes] * std::f64::consts::PI / 2.; in transform_mesh_coordinates() 35 coords[i] = u * v.cos(); in transform_mesh_coordinates() 36 coords[i + num_nodes] = u * v.sin(); in transform_mesh_coordinates()
|
| /libCEED/examples/rust/ex1-volume/src/ |
| H A D | transform.rs | 25 let mut coords = mesh_coords.view_mut()?; in transform_mesh_coordinates() localVariable 30 let u = 1.0 + coords[i]; in transform_mesh_coordinates() 31 let v = std::f64::consts::PI as libceed::Scalar / 2.0 * coords[i + num_nodes]; in transform_mesh_coordinates() 32 coords[i] = u * v.cos(); in transform_mesh_coordinates() 33 coords[i + num_nodes] = u * v.sin(); in transform_mesh_coordinates()
|
| /libCEED/examples/rust/ex1-volume-vector/src/ |
| H A D | transform.rs | 25 let mut coords = mesh_coords.view_mut()?; in transform_mesh_coordinates() localVariable 30 let u = 1.0 + coords[i]; in transform_mesh_coordinates() 31 let v = std::f64::consts::PI as libceed::Scalar / 2.0 * coords[i + num_nodes]; in transform_mesh_coordinates() 32 coords[i] = u * v.cos(); in transform_mesh_coordinates() 33 coords[i + num_nodes] = u * v.sin(); in transform_mesh_coordinates()
|
| /libCEED/examples/python/ |
| H A D | ex_common.py | 181 coords = np.zeros(scalar_size * dim) 188 coords[gs_node + scalar_size * d] = (elem_id + nodes[node_id]) / num_xyz[d] 191 mesh_coords.set_array(coords, cmode=libceed.COPY_VALUES) 212 with mesh_coords.array_write() as coords: 215 x = coords[i] - 0.5 216 coords[i] = 0.5 + (1.0 / np.sqrt(3.0)) * np.sin((2.0 / 3.0) * np.pi * x) 220 u = 1. + coords[i] 221 v = np.pi / 2. * coords[i + num_nodes] 222 coords[i] = u * np.cos(v) 223 coords[i + num_nodes] = u * np.sin(v) [all …]
|
| /libCEED/examples/solids/qfunctions/ |
| H A D | manufactured-true.h | 21 const CeedScalar *coords = in[0]; in MMSTrueSoln() local 29 CeedScalar x = coords[i + 0 * Q], y = coords[i + 1 * Q], z = coords[i + 2 * Q]; in MMSTrueSoln()
|
| H A D | manufactured-force.h | 30 const CeedScalar *coords = in[0], *q_data = in[1]; in SetupMMSForce() local 43 CeedScalar x = coords[i + 0 * Q], y = coords[i + 1 * Q], z = coords[i + 2 * Q]; in SetupMMSForce()
|
| /libCEED/examples/ceed/ |
| H A D | ex1-volume-f.f90 | 162 real*8 coords(mesh_size) local 176 coords(i) = 0.5d0 + (1.d0/sqrt(3.d0)) * sin((2.d0/3.d0) * m_pi * (coords(i) - 0.5d0)) 182 u = 1.d0 + coords(i) 183 v = m_pi_2 * coords(i + scalar_size) 185 coords(i) = u * cos(v) 186 coords(i + scalar_size) = u * sin(v) 211 real*8, dimension (:), allocatable :: coords local 223 allocate (coords(coords_size)) 239 … coords(scalar_size * (j - 1) + i) = ((d_1d/(p - 1)) + nodes(mod(d_1d, p - 1) + 1))/num_xyz(j) 245 call transformmeshcoords(fe_dim, coords_size, coords, exact_volume, err) [all …]
|
| H A D | ex3-volume.c | 364 CeedScalar *coords; in SetCartesianMeshCoords() local 366 CeedVectorGetArrayWrite(mesh_coords, CEED_MEM_HOST, &coords); in SetCartesianMeshCoords() 377 coords[gs_nodes + scalar_size * d] = ((d_1d / (p - 1)) + nodes[d_1d % (p - 1)]) / num_xyz[d]; in SetCartesianMeshCoords() 382 CeedVectorRestoreArray(mesh_coords, &coords); in SetCartesianMeshCoords() 393 CeedScalar *coords; in TransformMeshCoords() local 395 CeedVectorGetArray(mesh_coords, CEED_MEM_HOST, &coords); in TransformMeshCoords() 399 coords[i] = 0.5 + 1. / sqrt(3.) * sin((2. / 3.) * M_PI * (coords[i] - 0.5)); in TransformMeshCoords() 407 CeedScalar u = coords[i], v = coords[i + num_nodes]; in TransformMeshCoords() 411 coords[i] = u * cos(v); in TransformMeshCoords() 412 coords[i + num_nodes] = u * sin(v); in TransformMeshCoords() [all …]
|
| H A D | ex1-volume.c | 373 CeedScalar *coords; in SetCartesianMeshCoords() local 375 CeedVectorGetArrayWrite(mesh_coords, CEED_MEM_HOST, &coords); in SetCartesianMeshCoords() 387 coords[gs_nodes + scalar_size * d] = ((d_1d / (p - 1)) + nodes[d_1d % (p - 1)]) / num_xyz[d]; in SetCartesianMeshCoords() 392 CeedVectorRestoreArray(mesh_coords, &coords); in SetCartesianMeshCoords() 403 CeedScalar *coords; in TransformMeshCoords() local 405 CeedVectorGetArray(mesh_coords, CEED_MEM_HOST, &coords); in TransformMeshCoords() 409 coords[i] = 0.5 + 1. / sqrt(3.) * sin((2. / 3.) * M_PI * (coords[i] - 0.5)); in TransformMeshCoords() 418 CeedScalar u = coords[i], v = coords[i + num_nodes]; in TransformMeshCoords() 422 coords[i] = u * cos(v); in TransformMeshCoords() 423 coords[i + num_nodes] = u * sin(v); in TransformMeshCoords() [all …]
|
| H A D | ex2-surface.c | 397 CeedScalar *coords; in SetCartesianMeshCoords() local 399 CeedVectorGetArrayWrite(mesh_coords, CEED_MEM_HOST, &coords); in SetCartesianMeshCoords() 411 coords[gs_nodes + scalar_size * d] = ((d1d / (p - 1)) + nodes[d1d % (p - 1)]) / num_xyz[d]; in SetCartesianMeshCoords() 416 CeedVectorRestoreArray(mesh_coords, &coords); in SetCartesianMeshCoords() 426 CeedScalar *coords; in TransformMeshCoords() local 428 CeedVectorGetArray(mesh_coords, CEED_MEM_HOST, &coords); in TransformMeshCoords() 431 coords[i] = 0.5 + 1. / sqrt(3.) * sin((2. / 3.) * M_PI * (coords[i] - 0.5)); in TransformMeshCoords() 433 CeedVectorRestoreArray(mesh_coords, &coords); in TransformMeshCoords()
|
| /libCEED/examples/rust-qfunctions/ |
| H A D | ex1-volume.c | 383 CeedScalar *coords; in SetCartesianMeshCoords() local 385 CeedVectorGetArrayWrite(mesh_coords, CEED_MEM_HOST, &coords); in SetCartesianMeshCoords() 397 coords[gs_nodes + scalar_size * d] = ((d_1d / (p - 1)) + nodes[d_1d % (p - 1)]) / num_xyz[d]; in SetCartesianMeshCoords() 402 CeedVectorRestoreArray(mesh_coords, &coords); in SetCartesianMeshCoords() 413 CeedScalar *coords; in TransformMeshCoords() local 415 CeedVectorGetArray(mesh_coords, CEED_MEM_HOST, &coords); in TransformMeshCoords() 419 coords[i] = 0.5 + 1. / sqrt(3.) * sin((2. / 3.) * M_PI * (coords[i] - 0.5)); in TransformMeshCoords() 428 CeedScalar u = coords[i], v = coords[i + num_nodes]; in TransformMeshCoords() 432 coords[i] = u * cos(v); in TransformMeshCoords() 433 coords[i + num_nodes] = u * sin(v); in TransformMeshCoords() [all …]
|
| /libCEED/examples/fluids/problems/ |
| H A D | blasius.c | 184 PetscScalar(*coords)[dim] = (PetscScalar(*)[dim])arr_coords; in ModifyMesh() local 205 PetscInt y_box_index = round(coords[i][1] / dybox); in ModifyMesh() 207 coords[i][1] = in ModifyMesh() 208 …(1 - (coords[i][0] - domain_min[0]) * angle_coeff / domain_max[1]) * dy1 * (pow(growth, coords[i][… in ModifyMesh() 211 …coords[i][1] = (1 - (coords[i][0] - domain_min[0]) * angle_coeff / domain_max[1]) * exp(log(refine… in ModifyMesh() 213 …if (coords[i][0] == domain_min[0] && coords[i][2] == domain_min[2]) temp_node_locs[y_box_index] = … in ModifyMesh() 231 PetscInt y_box_index = round(coords[i][1] / dybox); in ModifyMesh() 232 …coords[i][1] = (1 - (coords[i][0] - domain_min[0]) * angle_coeff / max_y) * (*node_locs)[y… in ModifyMesh()
|
| /libCEED/julia/LibCEED.jl/examples/ |
| H A D | ex1-volume.jl | 6 @witharray coords = mesh_coords begin 10 coords[i] = 0.5 + 1.0/sqrt(3.0)*sin((2.0/3.0)*pi*(coords[i] - 0.5)) 18 u = coords[i] 19 v = coords[i+num_nodes] 22 coords[i] = u*cos(v) 23 coords[i+num_nodes] = u*sin(v)
|
| H A D | ex3-volume.jl | 6 @witharray coords = mesh_coords begin 10 coords[i] = 0.5 + 1.0/sqrt(3.0)*sin((2.0/3.0)*pi*(coords[i] - 0.5)) 18 u = coords[i] 19 v = coords[i+num_nodes] 22 coords[i] = u*cos(v) 23 coords[i+num_nodes] = u*sin(v)
|
| H A D | ex1-volume-c.jl | 168 coords = unsafe_wrap(Array, coords_ref[], scalar_size*dim) 178 coords[gsnodes+scalar_size*(d-1)+1] = (div(d1d, p) + nodes[d1d%p+1])/nxyz[d] 188 coords = unsafe_wrap(Array, coords_ref[], mesh_size) 193 coords[i] = 0.5 + 1.0/sqrt(3.0)*sin((2.0/3.0)*pi*(coords[i] - 0.5)) 201 u = coords[i] 202 v = coords[i+num_nodes] 205 coords[i] = u*cos(v) 206 coords[i+num_nodes] = u*sin(v)
|
| /libCEED/examples/solids/include/ |
| H A D | boundary.h | 23 PetscErrorCode BCMMS(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt num… 27 PetscErrorCode BCClamp(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt n…
|
| /libCEED/examples/fluids/qfunctions/ |
| H A D | strong_boundary_conditions.h | 12 const CeedScalar(*coords)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[0]; in SetupStrongBC() local 20 for (int j = 0; j < 3; j++) coords_stored[j][i] = coords[j][i]; in SetupStrongBC()
|
| /libCEED/include/ceed/jit-source/cuda/ |
| H A D | cuda-ref-basis-tensor-at-points.h | 44 … const CeedInt *__restrict__ points_per_elem, const CeedScalar *__restrict__ coords, in InterpAtPoints() argument 108 …ChebyshevPolynomialsAtPoint<BASIS_Q_1D>(coords[elem * v_stride + d * v_comp_stride + p], chebyshev… in InterpAtPoints() 127 … const CeedInt *__restrict__ points_per_elem, const CeedScalar *__restrict__ coords, in InterpTransposeAtPoints() argument 175 …ChebyshevPolynomialsAtPoint<BASIS_Q_1D>(coords[elem * u_stride + d * u_comp_stride + p], chebyshev… in InterpTransposeAtPoints() 223 … const CeedInt *__restrict__ points_per_elem, const CeedScalar *__restrict__ coords, in GradAtPoints() argument 291 …if (dim_1 == dim_2) ChebyshevDerivativeAtPoint<BASIS_Q_1D>(coords[elem * v_stride + dim_2 * v_comp… in GradAtPoints() 292 …else ChebyshevPolynomialsAtPoint<BASIS_Q_1D>(coords[elem * v_stride + dim_2 * v_comp_stride + p], … in GradAtPoints() 312 … const CeedInt *__restrict__ points_per_elem, const CeedScalar *__restrict__ coords, in GradTransposeAtPoints() argument 364 …if (dim_1 == dim_2) ChebyshevDerivativeAtPoint<BASIS_Q_1D>(coords[elem * u_stride + dim_2 * u_comp… in GradTransposeAtPoints() 365 …else ChebyshevPolynomialsAtPoint<BASIS_Q_1D>(coords[elem * u_stride + dim_2 * u_comp_stride + p], … in GradTransposeAtPoints()
|
| H A D | cuda-types.h | 30 const CeedScalar *coords; member
|
| /libCEED/include/ceed/jit-source/hip/ |
| H A D | hip-ref-basis-tensor-at-points.h | 44 … const CeedInt *__restrict__ points_per_elem, const CeedScalar *__restrict__ coords, in InterpAtPoints() argument 108 …ChebyshevPolynomialsAtPoint<BASIS_Q_1D>(coords[elem * v_stride + d * v_comp_stride + p], chebyshev… in InterpAtPoints() 127 … const CeedInt *__restrict__ points_per_elem, const CeedScalar *__restrict__ coords, in InterpTransposeAtPoints() argument 175 …ChebyshevPolynomialsAtPoint<BASIS_Q_1D>(coords[elem * u_stride + d * u_comp_stride + p], chebyshev… in InterpTransposeAtPoints() 223 … const CeedInt *__restrict__ points_per_elem, const CeedScalar *__restrict__ coords, in GradAtPoints() argument 291 …if (dim_1 == dim_2) ChebyshevDerivativeAtPoint<BASIS_Q_1D>(coords[elem * v_stride + dim_2 * v_comp… in GradAtPoints() 292 …else ChebyshevPolynomialsAtPoint<BASIS_Q_1D>(coords[elem * v_stride + dim_2 * v_comp_stride + p], … in GradAtPoints() 312 … const CeedInt *__restrict__ points_per_elem, const CeedScalar *__restrict__ coords, in GradTransposeAtPoints() argument 364 …if (dim_1 == dim_2) ChebyshevDerivativeAtPoint<BASIS_Q_1D>(coords[elem * u_stride + dim_2 * u_comp… in GradTransposeAtPoints() 365 …else ChebyshevPolynomialsAtPoint<BASIS_Q_1D>(coords[elem * u_stride + dim_2 * u_comp_stride + p], … in GradTransposeAtPoints()
|
| H A D | hip-types.h | 30 const CeedScalar *coords; member
|
| /libCEED/examples/petsc/src/ |
| H A D | libceedsetup.c | 46 Vec coords; in SetupLibceedByDegree() local 77 PetscCall(DMGetCoordinatesLocal(dm, &coords)); in SetupLibceedByDegree() 78 PetscCall(VecGetArrayRead(coords, &coord_array)); in SetupLibceedByDegree() 82 PetscCall(VecRestoreArrayRead(coords, &coord_array)); in SetupLibceedByDegree() 244 Vec coords; in SetupErrorOperator() local 275 PetscCall(DMGetCoordinatesLocal(dm, &coords)); in SetupErrorOperator() 276 PetscCall(VecGetArrayRead(coords, &coord_array)); in SetupErrorOperator() 280 PetscCall(VecRestoreArrayRead(coords, &coord_array)); in SetupErrorOperator()
|
| /libCEED/examples/rust/mesh/src/ |
| H A D | lib.rs | 148 let mut coords = mesh_coords.view_mut()?; localVariable 154 coords[gs_nodes + scalar_size * d] = ((d_1d / (p - 1)) as libceed::Scalar
|