MCPcopy Create free account
hub / github.com/SeisSol/SeisSol / addTimeIntegratedPointSources

Method addTimeIntegratedPointSources

src/Kernels/PointSourceClusterOnHost.cpp:25–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 : clusterMapping_(std::move(mapping)), sources_(std::move(sources)) {}
24
25void PointSourceClusterOnHost::addTimeIntegratedPointSources(
26 double from, double to, seissol::parallel::runtime::StreamRuntime& runtime) {
27 auto& mapping = clusterMapping_->cellToSources;
28 if (mapping.size() > 0) {
29#ifdef _OPENMP
30#pragma omp parallel for schedule(static)
31#endif
32 for (unsigned m = 0; m < mapping.size(); ++m) {
33 const unsigned startSource = mapping[m].pointSourcesOffset;
34 const unsigned endSource = mapping[m].pointSourcesOffset + mapping[m].numberOfPointSources;
35 if (sources_->mode == sourceterm::PointSourceMode::Nrf) {
36 for (unsigned source = startSource; source < endSource; ++source) {
37 addTimeIntegratedPointSourceNRF(source, from, to, *mapping[m].dofs);
38 }
39 } else {
40 for (unsigned source = startSource; source < endSource; ++source) {
41 addTimeIntegratedPointSourceFSRM(source, from, to, *mapping[m].dofs);
42 }
43 }
44 }
45 }
46}
47
48unsigned PointSourceClusterOnHost::size() const { return sources_->numberOfSources; }
49

Callers 1

computeSourcesMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected