MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / GenerateCode

Method GenerateCode

fem/coefficient_geo.cpp:287–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285 res.Row(i).Range(D) = fac * static_cast<const DimMappedIntegrationPoint<D>&>(ir[i]).GetNV();
286 }
287 virtual void GenerateCode(Code &code, FlatArray<int> inputs, int index) const override {
288 if (inverted_faces.Size())
289 throw Exception("Not implemented");
290 /*
291 string miptype;
292 if(code.is_simd)
293 miptype = "SIMD<DimMappedIntegrationPoint<"+ToLiteral(D)+">>*";
294 else
295 miptype = "DimMappedIntegrationPoint<"+ToLiteral(D)+">*";
296 auto nv_expr = CodeExpr("static_cast<const "+miptype+">(&ip)->GetNV()");
297 auto nv = Var("tmp", index);
298 code.body += nv.Assign(nv_expr);
299
300 code.Declare (index, this->Dimensions(), this->IsComplex());
301 for( int i : Range(D))
302 code.body += Var(index,i).Assign(nv(i), false);
303 */
304
305 code.Declare (index, this->Dimensions(), this->IsComplex());
306 for( int i : Range(D))
307 code.body += Var(index,i).Assign(CodeExpr("normals(i,"+ToLiteral(i)+")"), false);
308 }
309
310 virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir, BareSliceMatrix<SIMD<double>> values) const override
311 {

Callers

nothing calls this directly

Calls 9

VarFunction · 0.85
CodeExprClass · 0.85
ToLiteralFunction · 0.85
DeclareMethod · 0.80
DimensionsMethod · 0.80
RangeFunction · 0.50
SizeMethod · 0.45
IsComplexMethod · 0.45
AssignMethod · 0.45

Tested by

no test coverage detected