MCPcopy Create free account
hub / github.com/GollyGang/ready / MakeDefaultMeshSystemFromMesh

Method MakeDefaultMeshSystemFromMesh

src/gui/frame.cpp:2700–2715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2698// ---------------------------------------------------------------------
2699
2700void MyFrame::MakeDefaultMeshSystemFromMesh(vtkUnstructuredGrid* ug)
2701{
2702 // at some point we would want the user to decide what data type to use on the imported mesh
2703 const int data_type = VTK_FLOAT;
2704
2705 unique_ptr<MeshRD> mesh_sys;
2706 if (this->is_opencl_available)
2707 mesh_sys = make_unique<FormulaOpenCLMeshRD>(opencl_platform, opencl_device, data_type);
2708 else
2709 mesh_sys = make_unique<GrayScottMeshRD>();
2710 mesh_sys->CopyFromMesh(ug);
2711 mesh_sys->SetNumberOfChemicals(2);
2712 mesh_sys->CreateDefaultInitialPatternGenerator(2);
2713 mesh_sys->GenerateInitialPattern();
2714 this->SetCurrentRDSystem(move(mesh_sys));
2715}
2716
2717// ---------------------------------------------------------------------
2718

Callers

nothing calls this directly

Calls 5

SetCurrentRDSystemMethod · 0.95
CopyFromMeshMethod · 0.45
SetNumberOfChemicalsMethod · 0.45

Tested by

no test coverage detected