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

Function CreateGridFunction

comp/gridfunction.cpp:1186–1204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1184 */
1185
1186 shared_ptr<GridFunction> CreateGridFunction (shared_ptr<FESpace> space,
1187 const string & name, const Flags & flags)
1188 {
1189 /*
1190 shared_ptr<GridFunction> gf =
1191 CreateSharedVecObject<T_GridFunction, GridFunction>
1192 (space->GetDimension() * int(flags.GetNumFlag("cacheblocksize",1)),
1193 space->IsComplex(), space, name, flags);
1194 */
1195 shared_ptr<GridFunction> gf;
1196 if (space->IsComplex())
1197 gf = make_shared<S_GridFunction<Complex>> (space, name, flags);
1198 else
1199 gf = make_shared<S_GridFunction<double>> (space, name, flags);
1200
1201 gf->SetCacheBlockSize(int(flags.GetNumFlag("cacheblocksize",1)));
1202
1203 return gf;
1204 }
1205
1206
1207

Callers 3

UpdateMethod · 0.70
ExportReadAnsysFunction · 0.70

Calls 1

IsComplexMethod · 0.45

Tested by

no test coverage detected