Home
last modified time | relevance | path

Searched refs:nv (Results 1 – 25 of 70) sorted by relevance

123

/petsc/src/mat/impls/h2opus/
H A Dmath2opussampler.hpp80 void PetscMatrixSampler::VerifyBuffers(int nv) in VerifyBuffers() argument
85 if (hbuffer_in.size() < (size_t)n * nv) hbuffer_in.resize(n * nv); in VerifyBuffers()
86 if (hbuffer_out.size() < (size_t)n * nv) hbuffer_out.resize(n * nv); in VerifyBuffers()
89 if (dbuffer_in.size() < (size_t)n * nv) dbuffer_in.resize(n * nv); in VerifyBuffers()
90 if (dbuffer_out.size() < (size_t)n * nv) dbuffer_out.resize(n * nv); in VerifyBuffers()
96 void PetscMatrixSampler::PermuteBuffersIn(int nv, H2Opus_Real *v, H2Opus_Real **w, H2Opus_Real *ov,… in PermuteBuffersIn() argument
100 VerifyBuffers(nv); in PermuteBuffersIn()
104 …permute_vectors(v, this->hbuffer_in.data(), n, nv, this->hindexmap.data(), 1, H2OPUS_HWTYPE_CPU, t… in PermuteBuffersIn()
109 …permute_vectors(v, this->dbuffer_in.data(), n, nv, this->dindexmap.data(), 1, H2OPUS_HWTYPE_GPU, t… in PermuteBuffersIn()
117 void PetscMatrixSampler::PermuteBuffersOut(int nv, H2Opus_Real *v) in PermuteBuffersOut() argument
[all …]
/petsc/src/vec/vec/impls/mpi/
H A Dpvec2.c21 PetscErrorCode VecMDot_MPI(Vec xin, PetscInt nv, const Vec y[], PetscScalar *z) in VecMDot_MPI() argument
24 PetscCall(VecMXDot_MPI_Default(xin, nv, y, z, VecMDot_Seq)); in VecMDot_MPI()
28 PetscErrorCode VecMDot_MPI_GEMV(Vec xin, PetscInt nv, const Vec y[], PetscScalar *z) in VecMDot_MPI_GEMV() argument
31 PetscCall(VecMXDot_MPI_Default(xin, nv, y, z, VecMDot_Seq_GEMV)); in VecMDot_MPI_GEMV()
35 PetscErrorCode VecMTDot_MPI(Vec xin, PetscInt nv, const Vec y[], PetscScalar *z) in VecMTDot_MPI() argument
38 PetscCall(VecMXDot_MPI_Default(xin, nv, y, z, VecMTDot_Seq)); in VecMTDot_MPI()
42 PetscErrorCode VecMTDot_MPI_GEMV(Vec xin, PetscInt nv, const Vec y[], PetscScalar *z) in VecMTDot_MPI_GEMV() argument
45 PetscCall(VecMXDot_MPI_Default(xin, nv, y, z, VecMTDot_Seq_GEMV)); in VecMTDot_MPI_GEMV()
/petsc/src/dm/impls/plex/
H A Dplexnatural.c296 PetscErrorCode DMPlexGlobalToNaturalBegin(DM dm, Vec gv, Vec nv) in DMPlexGlobalToNaturalBegin() argument
313 PetscCall(VecGetLocalSize(nv, &n)); in DMPlexGlobalToNaturalBegin()
321 PetscCall(VecGetArray(nv, &outarray)); in DMPlexGlobalToNaturalBegin()
325 PetscCall(VecRestoreArray(nv, &outarray)); in DMPlexGlobalToNaturalBegin()
327 PetscCall(VecCopy(gv, nv)); in DMPlexGlobalToNaturalBegin()
355 PetscErrorCode DMPlexGlobalToNaturalEnd(DM dm, Vec gv, Vec nv) in DMPlexGlobalToNaturalEnd() argument
366 PetscCall(VecGetArray(nv, &outarray)); in DMPlexGlobalToNaturalEnd()
369 PetscCall(VecRestoreArray(nv, &outarray)); in DMPlexGlobalToNaturalEnd()
398 PetscErrorCode DMPlexNaturalToGlobalBegin(DM dm, Vec nv, Vec gv) in DMPlexNaturalToGlobalBegin() argument
413 PetscCall(VecGetArrayRead(nv, &inarray)); in DMPlexNaturalToGlobalBegin()
[all …]
/petsc/src/dm/impls/plex/tests/
H A Dex15.c10 Vec v, nv, rv, coord; in main() local
71 PetscCall(DMPlexCreateNaturalVector(dm, &nv)); in main()
72 PetscCall(PetscObjectSetName((PetscObject)nv, "NV")); in main()
73 PetscCall(DMPlexGlobalToNaturalBegin(dm, v, nv)); in main()
74 PetscCall(DMPlexGlobalToNaturalEnd(dm, v, nv)); in main()
79 PetscCall(VecGetSize(nv, &size)); in main()
80 PetscCall(VecGetBlockSize(nv, &bs)); in main()
82 PetscCall(VecView(nv, PETSC_VIEWER_STDOUT_WORLD)); in main()
126 PetscCall(VecEqual(rv, nv, &flg)); in main()
138 PetscCall(VecDestroy(&nv)); in main()
/petsc/src/dm/partitioner/tests/
H A Dex33.c12 PetscInt nv = 4; in main() local
38 PetscCall(PetscSectionSetChart(vertexSection, 0, nv)); in main()
39 for (i = 0; i < nv; i++) PetscCall(PetscSectionSetDof(vertexSection, i, 1)); in main()
87 …PetscCall(PetscPartitionerPartition(p, nparts, nv, vv, vadj, vertexSection, NULL, targetSection, p… in main()
106 PetscInt i, totv = nv * ((size + 1) / 2), *pvadj; in main()
108 PetscCall(PetscMalloc1(2 * nv, &pvadj)); in main()
109 for (i = 0; i < nv; i++) { in main()
110 pvadj[2 * i] = (nv * (rank / 2) + totv + i - 1) % totv; in main()
111 pvadj[2 * i + 1] = (nv * (rank / 2) + totv + i + 1) % totv; in main()
113 …PetscCall(PetscPartitionerPartition(p, nparts, nv, vv, pvadj, NULL, NULL, targetSection, partSecti… in main()
/petsc/src/snes/tutorials/network/
H A Dex1.c91 PetscInt nv, ne, i, j, offset, nvar, row; in FormJacobian_subPower() local
111 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in FormJacobian_subPower()
112 PetscCall(FormJacobian_Power_private(networkdm, localX, J, nv, ne, vtx, edges, appctx)); in FormJacobian_subPower()
115 PetscCall(DMNetworkGetSubnetwork(networkdm, 1, &nv, &ne, &vtx, &edges)); in FormJacobian_subPower()
116 for (i = 0; i < nv; i++) { in FormJacobian_subPower()
135 PetscErrorCode FormFunction_Dummy(DM networkdm, Vec localX, Vec localF, PetscInt nv, PetscInt ne, c… in FormFunction_Dummy() argument
149 for (i = 0; i < nv; i++) { in FormFunction_Dummy()
168 PetscInt nv, ne, v; in FormFunction() local
190 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in FormFunction()
192 PetscCall(FormFunction_Dummy(networkdm, localX, localF, nv, ne, vtx, edges, user)); in FormFunction()
[all …]
/petsc/src/vec/vec/impls/seq/
H A Ddvec2.c10 PetscErrorCode VecMDot_Seq(Vec xin, PetscInt nv, const Vec yin[], PetscScalar *z) in VecMDot_Seq() argument
13 PetscInt i = nv, nv_rem = nv & 0x3; in VecMDot_Seq()
78 PetscCall(PetscLogFlops(PetscMax(nv * (2.0 * n - 1), 0.0))); in VecMDot_Seq()
83 PetscErrorCode VecMDot_Seq(Vec xin, PetscInt nv, const Vec yin[], PetscScalar *z) in VecMDot_Seq() argument
86 PetscInt i = nv, j = n, nv_rem = nv & 0x3, j_rem; in VecMDot_Seq()
93 PetscCall(PetscArrayzero(z, nv)); in VecMDot_Seq()
296 PetscCall(PetscLogFlops(PetscMax(nv * (2.0 * n - 1), 0.0))); in VecMDot_Seq()
301 PetscErrorCode VecMTDot_Seq(Vec xin, PetscInt nv, const Vec yin[], PetscScalar *z) in VecMTDot_Seq() argument
304 PetscInt i = nv, j = n, nv_rem = nv & 0x3, j_rem; in VecMTDot_Seq()
511 PetscCall(PetscLogFlops(PetscMax(nv * (2.0 * n - 1), 0.0))); in VecMTDot_Seq()
[all …]
/petsc/src/ts/event/tests/output/
H A Dex1.out7 Transfer -> step 1 nv 1
20 Transfer -> step 3 nv 1
30 Transfer -> step 5 nv 1
44 Transfer -> step 7 nv 1
58 Transfer -> step 9 nv 1
78 Transfer -> step 1 nv 1
91 Transfer -> step 3 nv 1
101 Transfer -> step 5 nv 1
115 Transfer -> step 7 nv 1
129 Transfer -> step 9 nv 1
H A Dex1_bdf.out7 Transfer -> step 1 nv 4
20 Transfer -> step 3 nv 6
30 Transfer -> step 5 nv 8
44 Transfer -> step 7 nv 8
58 Transfer -> step 9 nv 8
78 Transfer -> step 1 nv 4
91 Transfer -> step 3 nv 6
101 Transfer -> step 5 nv 8
115 Transfer -> step 7 nv 8
129 Transfer -> step 9 nv 8
H A Dex1_alpha.out7 Transfer -> step 1 nv 2
20 Transfer -> step 3 nv 2
30 Transfer -> step 5 nv 2
44 Transfer -> step 7 nv 2
58 Transfer -> step 9 nv 2
78 Transfer -> step 1 nv 2
91 Transfer -> step 3 nv 2
101 Transfer -> step 5 nv 2
115 Transfer -> step 7 nv 2
129 Transfer -> step 9 nv 2
H A Dex1_theta.out7 Transfer -> step 1 nv 2
20 Transfer -> step 3 nv 2
30 Transfer -> step 5 nv 2
44 Transfer -> step 7 nv 2
58 Transfer -> step 9 nv 2
78 Transfer -> step 1 nv 2
91 Transfer -> step 3 nv 2
101 Transfer -> step 5 nv 2
115 Transfer -> step 7 nv 2
129 Transfer -> step 9 nv 2
H A Dex1_arkimex.out7 Transfer -> step 1 nv 1
20 Transfer -> step 3 nv 1
30 Transfer -> step 5 nv 1
44 Transfer -> step 7 nv 1
58 Transfer -> step 9 nv 1
78 Transfer -> step 1 nv 1
91 Transfer -> step 3 nv 1
101 Transfer -> step 5 nv 1
115 Transfer -> step 7 nv 1
129 Transfer -> step 9 nv 1
/petsc/src/ksp/ksp/tutorials/network/
H A Dex3.c18 …PetscInt i, j, net, Nsubnet, nsubnet, ne, nv, nvar, v, ncomp, compkey0, compkey1, compkey, … in main() local
100 PetscCall(DMNetworkGetSubnetwork(dmnetwork, net, &nv, &ne, &vtx, &edges)); in main()
101 for (v = 0; v < nv; v++) { in main()
114 PetscCall(DMNetworkGetSharedVertices(dmnetwork, &nv, &vtx)); in main()
115 for (v = 0; v < nv; v++) { in main()
145 PetscCall(DMNetworkGetSharedVertices(dmnetwork, &nv, &vtx)); in main()
146 for (v = 0; v < nv; v++) { in main()
173 PetscCall(DMNetworkGetSubnetwork(dmnetwork, net, &nv, &ne, &vtx, &edges)); in main()
174 …"[%d] subnet %" PetscInt_FMT ": nv %" PetscInt_FMT ", ne %" PetscInt_FMT "\n", rank, net, nv, ne)); in main()
178 for (i = 0; i < nv; i++) { in main()
H A Dex4.c9 PetscInt i, j, net, Nsubnet, ne, nv, nvar, v, goffset, row, compkey0, compkey1, compkey; in main() local
85 PetscCall(DMNetworkGetSubnetwork(dmnetwork, net, &nv, &ne, &vtx, &edges)); in main()
86 for (v = 0; v < nv; v++) { in main()
101 PetscCall(DMNetworkGetSharedVertices(dmnetwork, &nv, &vtx)); in main()
102 for (v = 0; v < nv; v++) { in main()
132 PetscCall(DMNetworkGetSharedVertices(dmnetwork, &nv, &vtx)); in main()
133 for (v = 0; v < nv; v++) { in main()
/petsc/src/snes/tutorials/network/water/
H A Dwaterreaddata.c129 PetscInt i, j, nv = 0, ne = 0, ncurve = 0, ntitle = 0, nlines, ndata, curve_id; in WaterReadData() local
192 vert[nv].type = VERTEX_TYPE_JUNCTION; in WaterReadData()
193 junction = &vert[nv].junc; in WaterReadData()
196 vert[nv].id = id; in WaterReadData()
201 junction->id = vert[nv].id; in WaterReadData()
202 nv++; in WaterReadData()
210 vert[nv].type = VERTEX_TYPE_RESERVOIR; in WaterReadData()
211 reservoir = &vert[nv].res; in WaterReadData()
214 vert[nv].id = id; in WaterReadData()
217 reservoir->id = vert[nv].id; in WaterReadData()
[all …]
H A Dwaterfunctions.c21 PetscErrorCode FormFunction_Water(DM networkdm, Vec localX, Vec localF, PetscInt nv, PetscInt ne, c… in FormFunction_Water() argument
76 for (i = 0; i < nv; i++) { in FormFunction_Water()
105 PetscInt nv, ne; in WaterFormFunction() local
112 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &v, &e)); in WaterFormFunction()
126 PetscCall(FormFunction_Water(networkdm, localX, localF, nv, ne, v, e, NULL)); in WaterFormFunction()
138 PetscInt nv, ne; in WaterSetInitialGuess() local
150 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in WaterSetInitialGuess()
151 PetscCall(SetInitialGuess_Water(networkdm, localX, nv, ne, vtx, edges, NULL)); in WaterSetInitialGuess()
198 PetscErrorCode SetInitialGuess_Water(DM networkdm, Vec localX, PetscInt nv, PetscInt ne, const Pets… in SetInitialGuess_Water() argument
207 for (i = 0; i < nv; i++) { in SetInitialGuess_Water()
H A Dwater.c18 PetscInt nv, ne, i; in main() local
64 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in main()
68 …for (i = 0; i < nv; i++) PetscCall(DMNetworkAddComponent(networkdm, vtx[i], appctx.compkey_vtx, &w… in main()
/petsc/src/snes/tutorials/network/power/
H A Dpower2.c11 PetscErrorCode FormFunction_Subnet(DM networkdm, Vec localX, Vec localF, PetscInt nv, PetscInt ne, … in FormFunction_Subnet() argument
23 for (v = 0; v < nv; v++) { in FormFunction_Subnet()
127 PetscInt nv, ne; in FormFunction() local
143 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in FormFunction()
144 PetscCall(FormFunction_Subnet(networkdm, localX, localF, nv, ne, vtx, edges, appctx)); in FormFunction()
147 PetscCall(DMNetworkGetSubnetwork(networkdm, 1, &nv, &ne, &vtx, &edges)); in FormFunction()
148 PetscCall(FormFunction_Subnet(networkdm, localX, localF, nv, ne, vtx, edges, appctx)); in FormFunction()
158 PetscErrorCode FormJacobian_Subnet(DM networkdm, Vec localX, Mat J, Mat Jpre, PetscInt nv, PetscInt… in FormJacobian_Subnet() argument
170 for (v = 0; v < nv; v++) { in FormJacobian_Subnet()
343 PetscInt ne, nv; in FormJacobian() local
[all …]
H A Dpower.c17 PetscInt nv, ne; in FormFunction() local
30 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in FormFunction()
31 PetscCall(FormFunction_Power(networkdm, localX, localF, nv, ne, vtx, edges, User)); in FormFunction()
43 PetscInt vStart, vEnd, nv, ne; in SetInitialValues() local
57 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in SetInitialValues()
58 PetscCall(SetInitialGuess_Power(networkdm, localX, nv, ne, vtx, edges, user_power)); in SetInitialValues()
/petsc/src/sys/classes/viewer/impls/ascii/
H A Dvcreatea.c187 PetscViewerLink *vlink, *nv; in PetscViewerASCIIOpen() local
226 PetscCall(PetscNew(&nv)); in PetscViewerASCIIOpen()
227 nv->viewer = *viewer; in PetscViewerASCIIOpen()
229 PetscCallMPI(MPI_Comm_set_attr(comm, Petsc_Viewer_keyval, nv)); in PetscViewerASCIIOpen()
234 vlink->next = nv; in PetscViewerASCIIOpen()
236 PetscCallMPI(MPI_Comm_set_attr(comm, Petsc_Viewer_keyval, nv)); in PetscViewerASCIIOpen()
/petsc/src/vec/vec/utils/
H A Dcomb.c597 PetscErrorCode VecMDotBegin(Vec x, PetscInt nv, const Vec y[], PetscScalar result[]) in VecMDotBegin() argument
607 PetscCall(VecMDot(x, nv, y, result)); in VecMDotBegin()
612 for (i = 0; i < nv; i++) { in VecMDotBegin()
618 PetscUseTypeMethod(x, mdot_local, nv, y, sr->lvalues + sr->numopsbegin); in VecMDotBegin()
620 sr->numopsbegin += nv; in VecMDotBegin()
643 PetscErrorCode VecMDotEnd(Vec x, PetscInt nv, const Vec y[], PetscScalar result[]) in VecMDotEnd() argument
658 for (i = 0; i < nv; i++) result[i] = sr->gvalues[sr->numopsend++]; in VecMDotEnd()
688 PetscErrorCode VecMTDotBegin(Vec x, PetscInt nv, const Vec y[], PetscScalar result[]) in VecMTDotBegin() argument
698 PetscCall(VecMTDot(x, nv, y, result)); in VecMTDotBegin()
703 for (i = 0; i < nv; i++) { in VecMTDotBegin()
[all …]
/petsc/src/dm/tests/
H A Dex10.c14 PetscInt e, ne, nv, v, ecompkey, vcompkey; in main() local
64 PetscCall(DMNetworkGetSubnetwork(network, 0, &nv, &ne, &nodes, &edges)); in main()
69 for (v = 0; v < nv; v++) PetscCall(DMNetworkAddComponent(network, nodes[v], vcompkey, NULL, 2)); in main()
/petsc/src/sys/objects/
H A Daoptions.c677 const PetscInt nv = *n; in PetscOptionsEnumArray_Private() local
680 for (PetscInt i = 1; i < nv; ++i) PetscCall((*PetscHelpPrintf)(comm, ",%s", list[value[i]])); in PetscOptionsEnumArray_Private()
1021 const PetscInt nv = *n; in PetscOptionsRealArray_Private() local
1026 PetscCall(PetscMalloc(nv * sizeof(*vals), &vals)); in PetscOptionsRealArray_Private()
1027 for (PetscInt i = 0; i < nv; ++i) vals[i] = value[i]; in PetscOptionsRealArray_Private()
1028 amsopt->arraylength = nv; in PetscOptionsRealArray_Private()
1034 const PetscInt nv = *n; in PetscOptionsRealArray_Private() local
1038 for (PetscInt i = 1; i < nv; ++i) PetscCall((*PetscHelpPrintf)(comm, ",%g", (double)value[i])); in PetscOptionsRealArray_Private()
1055 const PetscInt nv = *n; in PetscOptionsScalarArray_Private() local
1060 PetscCall(PetscMalloc(nv * sizeof(*vals), &vals)); in PetscOptionsScalarArray_Private()
[all …]
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A Dpetscvec.pxi375 cdef PetscInt ni=0, nv=0
379 cdef object unused2 = iarray_s(ov, &nv, &v)
380 if ni*bs != nv: raise ValueError(
381 "incompatible array sizes: ni=%d, nv=%d, bs=%d" %
382 (toInt(ni), toInt(nv), toInt(bs)))
391 cdef PetscInt ni=0, nv=0
398 values = oarray_s(values, &nv, &v)
399 if (ni != nv): raise ValueError(
401 "ni=%d, nv=%d") % (toInt(ni), toInt(nv)))
424 cdef PetscInt na=0, nv=0, i=0
[all …]
/petsc/src/vec/vec/impls/seq/kokkos/
H A Dveckok.kokkos.cxx343 PetscErrorCode VecMultiDot_Private(Vec xin, PetscInt nv, const Vec yin[], PetscScalar *z) in VecMultiDot_Private() argument
345 PetscInt i, j, cur = 0, ngroup = nv / 8, rem = nv % 8, N = xin->map->n; in VecMultiDot_Private()
347 PetscScalarKokkosViewHost zv(z, nv); in VecMultiDot_Private()
386 static PetscErrorCode VecMultiDot_Verbose(Vec xin, PetscInt nv, const Vec yin[], PetscScalar *z) in VecMultiDot_Verbose() argument
388 PetscInt ngroup = nv / 8, rem = nv % 8, N = xin->map->n; in VecMultiDot_Verbose()
506 PetscErrorCode VecMDot_SeqKokkos(Vec xin, PetscInt nv, const Vec yin[], PetscScalar *z) in VecMDot_SeqKokkos() argument
512 PetscCall(VecMultiDot_Private<ConjugateDotTag>(xin, nv, yin, z)); in VecMDot_SeqKokkos()
514 PetscCall(VecMultiDot_Verbose(xin, nv, yin, z)); in VecMDot_SeqKokkos()
516 PetscCall(PetscLogGpuFlops(PetscMax(nv * (2.0 * xin->map->n - 1), 0.0))); in VecMDot_SeqKokkos()
521 PetscErrorCode VecMTDot_SeqKokkos(Vec xin, PetscInt nv, const Vec yin[], PetscScalar *z) in VecMTDot_SeqKokkos() argument
[all …]

123