18 self, namespace, output, subdirectory, template_prefix, output_path
20 self.
_build_gemms(namespace, output, subdirectory, template_prefix, output_path)
22 if self.
d[
"IS_LINEAR"]:
24 self.
d[
"TMP_ARRAY_SIZE"] = max(
26 self.
d[
"NUMBER_OF_DOF"] * self.
d[
"NUMBER_OF_UNKNOWNS_PADDED"]
31 self.
d[
"DIMENSIONS"] * self.
d[
"NUMBER_OF_UNKNOWNS_PADDED"]
36 self.
d[
"NAME_SUFFIX"] =
""
38 if self.
d[
"USE_POINT_SOURCE"]:
40 QuadratureWeights, QuadratureNodes = MathUtils.getGaussLegendre(
41 self.
d[
"NUMBER_OF_DOF"]
43 self.
d[
"BASIS_FUNCTIONS"] = MathUtils.assembleBasisFunction(
48 d[
"USE_POINT_SOURCE"] =
False
49 d[
"NAME_SUFFIX"] =
"WithoutPointSources"
53 headfile_template=template_prefix
54 +
"FusedSpaceTimePredictorVolumeIntegral.template.h",
55 cppfile_template=template_prefix
56 +
"FusedSpaceTimePredictorVolumeIntegralLinear.template.cpp",
58 +
"/FusedSpaceTimePredictorVolumeIntegral"
61 subdirectory=subdirectory +
".",
63 default_overwrite=
True,
64 apply_iteratively=
True,
67 output.add(generated_kernels)
68 output.makefile.add_h_file(
70 +
"/FusedSpaceTimePredictorVolumeIntegral"
75 output.makefile.add_cpp_file(
77 +
"/FusedSpaceTimePredictorVolumeIntegral"
84 headfile_template=template_prefix
85 +
"FusedSpaceTimePredictorVolumeIntegral.template.h",
86 cppfile_template=template_prefix
87 +
"FusedSpaceTimePredictorVolumeIntegralLinear.template.cpp"
88 if self.
d[
"IS_LINEAR"]
90 +
"FusedSpaceTimePredictorVolumeIntegralNonlinear.template.cpp",
91 classname=output_path +
"/FusedSpaceTimePredictorVolumeIntegral",
93 subdirectory=subdirectory +
".",
95 default_overwrite=
True,
96 apply_iteratively=
True,
98 output.add(generated_kernels)
99 output.makefile.add_h_file(
100 output_path +
"/FusedSpaceTimePredictorVolumeIntegral.h", generated=
True
102 output.makefile.add_cpp_file(
103 output_path +
"/FusedSpaceTimePredictorVolumeIntegral.cpp", generated=
True
106 def _build_gemms(self, namespace, output, subdirectory, template_prefix, output_path):
109 nDim = self.
d[
"DIMENSIONS"]
110 nDof = self.
d[
"NUMBER_OF_DOF"]
112 nDofPad = self.
d[
"NUMBER_OF_DOF_PADDED"]
113 nUnknowns = self.
d[
"NUMBER_OF_UNKNOWNS"]
114 nUnknownsPad = self.
d[
"NUMBER_OF_UNKNOWNS_PADDED"]
115 nData = self.
d[
"NUMBER_OF_DATA"]
116 nDataPad = self.
d[
"NUMBER_OF_DATA_PADDED"]
118 if self.
d[
"IS_LINEAR"]:
119 if self.
d[
"USE_FLUX"]:
120 self.
d[
"GEMMS"][
"flux_x"] =
Gemms(
134 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
136 self.
d[
"GEMMS"][
"flux_y"] =
Gemms(
150 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
152 if self.
d[
"DIMENSIONS"] >= 3:
153 self.
d[
"GEMMS"][
"flux_z"] =
Gemms(
157 nUnknownsPad * nDof2,
167 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
169 if self.
d[
"USE_NCP"]:
170 self.
d[
"GEMMS"][
"gradQ_x"] =
Gemms(
184 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
186 self.
d[
"GEMMS"][
"gradQ_y"] =
Gemms(
200 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
202 if self.
d[
"DIMENSIONS"] >= 3:
203 self.
d[
"GEMMS"][
"gradQ_z"] =
Gemms(
209 nUnknownsPad * nDof2,
217 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
220 if self.
d[
"USE_FLUX"]:
221 self.
d[
"GEMMS"][
"rhs_x"] =
Gemms(
235 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
237 self.
d[
"GEMMS"][
"rhs_y"] =
Gemms(
251 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
253 if self.
d[
"DIMENSIONS"] >= 3:
254 self.
d[
"GEMMS"][
"rhs_z"] =
Gemms(
258 nUnknownsPad * nDof2,
260 nUnknownsPad * nDof2,
268 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
270 self.
d[
"GEMMS"][
"lduh_x"] =
Gemms(
284 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
286 self.
d[
"GEMMS"][
"lduh_y"] =
Gemms(
300 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
302 if self.
d[
"DIMENSIONS"] >= 3:
303 self.
d[
"GEMMS"][
"lduh_z"] =
Gemms(
317 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
319 if self.
d[
"USE_NCP"]:
320 self.
d[
"GEMMS"][
"gradQ_x"] =
Gemms(
334 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
336 self.
d[
"GEMMS"][
"gradQ_y"] =
Gemms(
350 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
352 if self.
d[
"DIMENSIONS"] >= 3:
353 self.
d[
"GEMMS"][
"gradQ_z"] =
Gemms(
359 nUnknownsPad * nDof2,
367 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
370 self.
d[
"GEMMS"][
"lqi"] =
Gemms(
374 nUnknownsPad * (nDof**nDim),
384 self.
d[
"PREDICTOR_COMPUTATION_PRECISIONS"],
387 if self.
d[
"USE_LIBXSMM"]:
389 output_path=output_path,
390 output_file_name=
"FusedSpaceTimePredictorVolumeIntegral_libxsmm.c",
393 gemm_config_list=self.
d[
"GEMMS"].values(),