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

Function GetWireframePoints

comp/webgui.cpp:155–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155IntegrationRule GetWireframePoints(ngfem::ELEMENT_TYPE etype, int order) {
156 int n = order + 1;
157 IntegrationRule ir;
158 if (etype == ET_TRIG) {
159 for (auto i : Range(n)) ir.Append(IntegrationPoint{1. * i / order, 0., 0.});
160 for (auto i : Range(n)) ir.Append(IntegrationPoint{0., 1. * i / order, 0.});
161 for (auto i : Range(n))
162 ir.Append(IntegrationPoint{1. * i / order, 1. - 1. * i / order, 0.});
163 }
164 if (etype == ET_QUAD) {
165 for (auto i : Range(n)) ir.Append(IntegrationPoint{1. * i / order, 0., 0.});
166 for (auto i : Range(n)) ir.Append(IntegrationPoint{0., 1. * i / order, 0.});
167 for (auto i : Range(n)) ir.Append(IntegrationPoint{1. * i / order, 1., 0.});
168 for (auto i : Range(n)) ir.Append(IntegrationPoint{1., 1. * i / order, 0.});
169 }
170
171 return ir;
172}
173
174vector<string> MapBernstein(FlatTensor<3, double> input, ngfem::ELEMENT_TYPE eltype,
175 int order, int n_components) {

Callers 1

GenerateWireframeDataFunction · 0.85

Calls 2

RangeFunction · 0.50
AppendMethod · 0.45

Tested by

no test coverage detected