IgANet
IgANets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
GismoPoissonModel.hpp
Go to the documentation of this file.
1
15#pragma once
16
17#include <GismoPdeModel.hpp>
18
19using namespace std::string_literals;
20
21namespace iganet {
22
23namespace webapp {
24
26template <short_t d, typename T>
27class GismoPoissonModel : public GismoPdeModel<d, T> {
28
29 static_assert(d >= 1 && d <= 3, "Spatial dimension must be between 1 and 3");
30
31private:
34
36 using geometryMap_type = typename gismo::gsExprAssembler<T>::geometryMap;
37
39 using variable_type = typename gismo::gsExprAssembler<T>::variable;
40
42 using space_type = typename gismo::gsExprAssembler<T>::space;
43
45 using solution_type = typename gismo::gsExprAssembler<T>::solution;
46
48 gismo::gsMultiBasis<T> basis_;
49
51 gismo::gsBoundaryConditions<T> bc_;
52
54 gismo::gsFunctionExpr<T> rhsFunc_;
55
59
62
64 gismo::gsExprAssembler<T> assembler_;
65
67 void solve() {
68
69 // Set up expression assembler
70 auto G = assembler_.getMap(Base::geo_);
71 auto u = assembler_.getSpace(basis_);
72
73 // Impose boundary conditions
74 u.setup(bc_, gismo::dirichlet::l2Projection, 0);
75
76 // Set up system
77 assembler_.initSystem();
79 auto f = assembler_.getCoeff(rhsFunc_);
80 assembler_.assemble(igrad(u, G) * igrad(u, G).tr() * meas(G) // matrix
81 ,
82 u * f * meas(G) // rhs vector
83 );
84 } else {
85 auto f = assembler_.getCoeff(rhsFunc_, G);
86 assembler_.assemble(igrad(u, G) * igrad(u, G).tr() * meas(G) // matrix
87 ,
88 u * f * meas(G) // rhs vector
89 );
90 }
91
92 // Compute the Neumann terms defined on physical space
93 auto bcNeumann = bc_.get("Neumann");
94 if (!bcNeumann.empty()) {
95 auto g = assembler_.getBdrFunction(G);
96 assembler_.assembleBdr(bcNeumann, u * g * meas(G));
97 }
98
99 // Compute the Neumann terms defined on parametric space
100 auto bcNeumannParametric = bc_.get("NeumannParametric");
101 if (!bcNeumannParametric.empty()) {
102 auto g = assembler_.getBdrFunction();
103 assembler_.assembleBdr(bcNeumannParametric, u * g * meas(G));
104 }
105
106 // Solve system
107 typename gismo::gsSparseSolver<T>::CGDiagonal solver;
108 solver.compute(assembler_.matrix());
109
110 gismo::gsMatrix<T> solutionVector;
111 solution_type solution = assembler_.getSolution(u, solutionVector);
112 solutionVector = solver.solve(assembler_.rhs());
113
114 // Extract solution
115 solution.extract(Base::solution_);
116 }
117
118public:
121
123 GismoPoissonModel(const std::array<short_t, d> degrees,
124 const std::array<int64_t, d> ncoeffs,
125 const std::array<int64_t, d> npatches,
126 const std::array<T, d> dimensions)
127 : Base(degrees, ncoeffs, npatches, dimensions), basis_(Base::geo_, true),
129 rhsFunc_(d == 1 ? "2*pi^2*sin(pi*x)"
130 : d == 2 ? "2*pi^2*sin(pi*x)*sin(pi*y)"
131 : "2*pi^2*sin(pi*x)*sin(pi*y)*sin(pi*z)",
132 /* rhsFuncParametric_ == false */ d),
133 assembler_(1, 1) {
134
135 // Specify assembler options
136 gismo::gsOptionList Aopt = gismo::gsExprAssembler<>::defaultOptions();
137
138 // Set assembler options
139 assembler_.setOptions(Aopt);
140
141 // Set assembler basis
142 assembler_.setIntegrationElements(basis_);
143
144 // Initialize boundary conditions
145 for (auto const &bdr : Base::geo_.boundaries()) {
146 auto patch = bdr.patch;
147 auto side = bdr.side();
148 auto bc = bcMap_[patch][side] = { gismo::gsFunctionExpr<T>("0", d),
149 gismo::condition_type::dirichlet,
150 true };
151 }
152
153 // Set boundary conditions
154 for (auto const & p : bcMap_) {
155 std::size_t patch = p.first;
156
157 for (auto const & bc : p.second) {
158 auto side = static_cast<gismo::boundary::side>(bc.first);
159
160 bc_.addCondition(patch, side, bc.second.type, bc.second.function, 0, bc.second.isParametric);
161 }
162 }
163
164 // Set geometry
165 bc_.setGeoMap(Base::geo_);
166
167 // Regenerate solution
168 solve();
169 }
170
173
175 std::string getName() const override {
176 return "GismoPoisson" + std::to_string(d) + "d";
177 }
178
180 std::string getDescription() const override {
181 return "G+Smo Poisson model in " + std::to_string(d) + " dimensions";
182 };
183
185 nlohmann::json getOutputs() const override {
186 auto json = R"([{
187 "name" : "Solution",
188 "description" : "Solution of the Poisson equation",
189 "type" : 1},{
190 "name" : "Rhs",
191 "description" : "Right-hand side function",
192 "type" : 1}])"_json;
193
194 for (auto const &output : Base::getOutputs())
195 json.push_back(output);
196
197 return json;
198 }
199
201 nlohmann::json getParameters() const override {
202
203 auto json = nlohmann::json::array();
204 int uiid = 0;
205
206 // Lambda expression to add a JSON entry
207 auto add_json = [&json, &uiid]<typename Type, typename Value>(int patch,
208 const std::string &name,
209 const std::string &label,
210 const std::string &group,
211 const std::string &description,
212 const Type &type,
213 const Value &value) {
214 nlohmann::json item;
215 item["patch"] = patch;
216 item["name"] = name;
217 item["label"] = label;
218 item["description"] = description;
219 item["group"] = group;
220 item["type"] = type;
221 item["value"] = value;
222 item["default"] = value;
223 item["uuid"] = uiid++;
224 json.push_back(item);
225 };
226
227 // Lambda expression to add a JSON entry with different default type
228 auto add_json_default =
229 [&json, &uiid]<typename Type, typename Value, typename DefaultValue>(int patch,
230 const std::string &name, const std::string &label,
231 const std::string &group, const std::string &description,
232 const Type &type, const Value &value,
233 const DefaultValue &defaultValue) {
234 nlohmann::json item;
235 item["patch"] = patch;
236 item["name"] = name;
237 item["label"] = label;
238 item["description"] = description;
239 item["group"] = group;
240 item["type"] = type;
241 item["value"] = value;
242 item["default"] = defaultValue;
243 item["uuid"] = uiid++;
244 json.push_back(item);
245 };
246
247 add_json(0, "rhs", "Rhs function", "rhs", "Right-hand side function", "text",
248 rhsFunc_.expression(0));
249 add_json(0, "rhs_parametric", "Parametric", "rhs",
250 "Right-hand side function defined in parametric domain", "bool",
252
253 for (auto const & p : bcMap_) {
254 std::size_t patch = p.first;
255
256 for (auto const & bc : p.second) {
257 auto side = static_cast<gismo::boundary::side>(bc.first);
258 std::string str = *(GismoBoundarySideStrings<d>.begin()+side-1);
259
260 add_json(patch, "bc["s + std::to_string(patch) + ":" + str + "]"s, "Value", str,
261 "Boundary value at the "s + str + " boundary of patch "s + std::to_string(patch), "text",
262 bc.second.function.expression(0));
263 add_json(patch, "bc_parametric["s + std::to_string(patch) + ":" + str + "]", "Parametric", str,
264 "Boundary value at the "s + str +
265 " boundary of patch "s + std::to_string(patch) + "defined in parametric domain"s,
266 "bool", bc.second.isParametric);
267 add_json_default(patch, "bc_type["s + std::to_string(patch) + ":" + str + "]", "Type", str,
268 "Type of boundary condition at the "s + str + " boundary of patch "s + std::to_string(patch), "select",
269 R"([ "Dirichlet", "Neumann" ])"_json,
270 bc.second.type == gismo::condition_type::dirichlet ? "Dirichlet" : "Neumann");
271 }
272 }
273
274 return json;
275 }
276
278 nlohmann::json updateAttribute(const std::string &patch,
279 const std::string &component,
280 const std::string &attribute,
281 const nlohmann::json &json) override {
282
283 bool updateBC(false);
284 nlohmann::json result = R"({})"_json;
285
286 for (auto & p : bcMap_) {
287 std::size_t patch = p.first;
288
289 for (auto & bc : p.second) {
290 auto side = static_cast<gismo::boundary::side>(bc.first);
291 std::string str = *(GismoBoundarySideStrings<d>.begin()+side-1);
292
293 // bc_parametric[*]
294 if (attribute == "bc_parametric["s + std::to_string(patch) + ":" + str + "]"s) {
295 if (!json.contains("data"))
297 if (!json["data"].contains("bc_parametric["s + std::to_string(patch) + ":" + str + "]"s))
299
300 bc.second.isParametric =
301 json["data"]["bc_parametric["s + std::to_string(patch) + ":" + str + "]"s].template get<bool>();
302
303 bc.second.function =
304 gismo::give(gismo::gsFunctionExpr<T>(bc.second.function.expression(0),
305 bc.second.isParametric ? d : 3));
306
307 updateBC = true;
308 break;
309 }
310
311 // bc_type[*]
312 else if (attribute == "bc_type["s + std::to_string(patch) + ":" + str + "]"s) {
313 if (!json.contains("data"))
315 if (!json["data"].contains("bc_type["s + std::to_string(patch) + ":" + str + "]"s))
317
318 std::string bc_type =
319 json["data"]["bc_type["s + std::to_string(patch) + ":" + str + "]"s].template get<std::string>();
320
321 if (bc_type == "Dirichlet")
322 bc.second.type = gismo::condition_type::type::dirichlet;
323 else if (bc_type == "Neumann")
324 bc.second.type = gismo::condition_type::type::neumann;
325 else
327
328 updateBC = true;
329 break;
330 }
331
332 // bc[*]
333 else if (attribute == "bc["s + std::to_string(patch) + ":" + str + "]"s) {
334 if (!json.contains("data"))
336 if (!json["data"].contains("bc["s + std::to_string(patch) + ":" + str + "]"s))
338
339 bc.second.function =gismo::give(gismo::gsFunctionExpr<T>(
340 json["data"]["bc["s + std::to_string(patch) + ":" + str + "]"s].template get<std::string>(),
341 bc.second.isParametric ? d : 3));
342
343 updateBC = true;
344 break;
345 }
346 }
347 }
348
349 // rhs_parametric
350 if (attribute == "rhs_parametric") {
351 if (!json.contains("data"))
353 if (!json["data"].contains("rhs_parametric"))
355 rhsFuncParametric_ = json["data"]["rhs_parametric"].get<bool>();
356 rhsFunc_ = gismo::give(gismo::gsFunctionExpr<T>(rhsFunc_.expression(0),
357 rhsFuncParametric_ ? d : 3));
358 }
359
360 // rhs
361 else if (attribute == "rhs") {
362 if (!json.contains("data"))
364 if (!json["data"].contains("rhs"))
366 rhsFunc_ = gismo::give(gismo::gsFunctionExpr<T>(
367 json["data"]["rhs"].get<std::string>(), rhsFuncParametric_ ? d : 3));
368 }
369
370 else if (!updateBC)
372
373 if (updateBC) {
374 bc_.clear();
375
376 // Set boundary conditions
377 for (auto & p : bcMap_) {
378 std::size_t patch = p.first;
379
380 for (auto & bc : p.second) {
381 auto side = static_cast<gismo::boundary::side>(bc.first);
382
383 bc_.addCondition(patch, side, bc.second.type, bc.second.function, 0, bc.second.isParametric);
384 }
385 }
386 }
387
388 // Solve updated problem
389 solve();
390
391 return result;
392 }
393
395 nlohmann::json eval(const std::string &patch, const std::string &component,
396 const nlohmann::json &json) const override {
397
398 int patchIndex(-1);
399
400 try {
401 patchIndex = stoi(patch);
402 } catch (...) {
403 // Invalid patchIndex
404 return R"({ INVALID REQUEST })"_json;
405 }
406
407 if (component == "Solution" || component == "Rhs") {
408
409 nlohmann::json result;
410
411 // degrees
412 result["degrees"] = nlohmann::json::array();
413
414 for (std::size_t i = 0; i < Base::solution_.patch(patchIndex).parDim(); ++i)
416
417 // ncoeffs
418 result["ncoeffs"] = nlohmann::json::array();
419
420 if (auto bspline =
421 dynamic_cast<const gismo::gsBSpline<T> *>(&Base::solution_.patch(patchIndex)))
422 for (std::size_t i = 0; i < bspline->parDim(); ++i)
423 result["ncoeffs"].push_back(bspline->basis().size(i));
424 else if (auto bspline = dynamic_cast<const gismo::gsTensorBSpline<d, T> *>(
426 for (std::size_t i = 0; i < bspline->parDim(); ++i)
427 result["ncoeffs"].push_back(bspline->basis().size(i));
428 else
429 return R"({ INVALID REQUEST })"_json;
430
431 // nknots
432 result["nknots"] = nlohmann::json::array();
433
434 if (auto bspline =
435 dynamic_cast<const gismo::gsBSpline<T> *>(&Base::solution_.patch(patchIndex)))
436 for (std::size_t i = 0; i < bspline->parDim(); ++i)
437 result["nknots"].push_back(bspline->knots(i).size());
438 else if (auto bspline = dynamic_cast<const gismo::gsTensorBSpline<d, T> *>(
440 for (std::size_t i = 0; i < bspline->parDim(); ++i)
441 result["nknots"].push_back(bspline->knots(i).size());
442 else
443 return R"({ INVALID REQUEST })"_json;
444
445 // knots
446 result["knots"] = nlohmann::json::array();
447
448 if (auto bspline =
449 dynamic_cast<const gismo::gsBSpline<T> *>(&Base::solution_.patch(patchIndex)))
450 for (std::size_t i = 0; i < bspline->parDim(); ++i)
451 result["knots"].push_back(bspline->knots(i));
452 else if (auto bspline = dynamic_cast<const gismo::gsTensorBSpline<d, T> *>(
454 for (std::size_t i = 0; i < bspline->parDim(); ++i)
455 result["knots"].push_back(bspline->knots(i));
456 else
457 return R"({ INVALID REQUEST })"_json;
458
459 // coeffs
460 if (component == "Solution") {
461 result["coeffs"] = utils::to_json(Base::solution_.patch(patchIndex).coefs(), true, false);
462 } else {
463 if (rhsFuncParametric_) {
464 auto &basis = Base::solution_.patch(patchIndex).basis();
465 auto pts = rhsFunc_.eval(basis.anchors());
466 auto rhs = basis.interpolateAtAnchors(pts);
467 result["coeffs"] = utils::to_json(rhs->coefs(), true, false);
468 } else {
469 // This needs to be fixed
470 auto &basis = Base::solution_.patch(patchIndex).basis();
471 auto pts = rhsFunc_.eval(basis.anchors());
472 auto rhs = basis.interpolateAtAnchors(pts);
473 result["coeffs"] = utils::to_json(rhs->coefs(), true, false);
474 }
475 }
476
477 return result;
478 }
479
480 else
481 return Base::eval(patch, component, json);
482 }
483
485 void elevate(const nlohmann::json &json = NULL) override {
486
487 bool geometry = true;
488
489 if (json.contains("data"))
490 if (json["data"].contains("num"))
491 geometry = json["data"]["geometry"].get<bool>();
492
493 if (geometry) {
494 // Elevate geometry
496
497 // Set geometry
498 bc_.setGeoMap(Base::geo_);
499 }
500
501 int num(1), dim(-1), patchIndex(-1);
502
503 if (json.contains("data")) {
504 if (json["data"].contains("num"))
505 num = json["data"]["num"].get<int>();
506
507 if (json["data"].contains("dim"))
508 dim = json["data"]["dim"].get<int>();
509
510 if (json["data"].contains("patch"))
511 patchIndex = json["data"]["patch"].get<int>();
512 }
513
514 // Degree elevate basis of solution space
515 if (patchIndex == -1)
516 basis_.degreeElevate(num, dim);
517 else
518 basis_.basis(patchIndex).degreeElevate(num, dim);
519
520 // Set assembler basis
521 assembler_.setIntegrationElements(basis_);
522
523 // Regenerate solution
524 solve();
525 }
526
528 void increase(const nlohmann::json &json = NULL) override {
529
530 bool geometry = true;
531
532 if (json.contains("data"))
533 if (json["data"].contains("num"))
534 geometry = json["data"]["geometry"].get<bool>();
535
536 if (geometry) {
537 // Increase geometry
539
540 // Set geometry
541 bc_.setGeoMap(Base::geo_);
542 }
543
544 int num(1), dim(-1), patchIndex(-1);
545
546 if (json.contains("data")) {
547 if (json["data"].contains("num"))
548 num = json["data"]["num"].get<int>();
549
550 if (json["data"].contains("dim"))
551 dim = json["data"]["dim"].get<int>();
552
553 if (json["data"].contains("patch"))
554 patchIndex = json["data"]["patch"].get<int>();
555 }
556
557 // Degree increase basis of solution space
558 if (patchIndex == -1)
559 basis_.degreeIncrease(num, dim);
560 else
561 basis_.basis(patchIndex).degreeIncrease(num, dim);
562
563 // Set assembler basis
564 assembler_.setIntegrationElements(basis_);
565
566 // Regenerate solution
567 solve();
568 }
569
571 void refine(const nlohmann::json &json = NULL) override {
572
573 bool geometry = true;
574
575 if (json.contains("data"))
576 if (json["data"].contains("num"))
577 geometry = json["data"]["geometry"].get<bool>();
578
579 if (geometry) {
580 // Refine geometry
582
583 // Set geometry
584 bc_.setGeoMap(Base::geo_);
585 }
586
587 int num(1), dim(-1), patchIndex(-1);
588
589 if (json.contains("data")) {
590 if (json["data"].contains("num"))
591 num = json["data"]["num"].get<int>();
592
593 if (json["data"].contains("dim"))
594 dim = json["data"]["dim"].get<int>();
595
596 if (json["data"].contains("patch"))
597 patchIndex = json["data"]["patch"].get<int>();
598 }
599
600 // Refine basis of solution space
601 if (patchIndex == -1)
602 basis_.uniformRefine(num, 1, dim);
603 else
604 basis_.basis(patchIndex).uniformRefine(num, 1, dim);
605
606 // Set assembler basis
607 assembler_.setIntegrationElements(basis_);
608
609 // Regenerate solution
610 solve();
611 }
612
614 void addPatch(const nlohmann::json &json = NULL) override {
615
616 // Add patch from geometry
618
619 // Set geometry
620 bc_.setGeoMap(Base::geo_);
621
622 throw std::runtime_error("Adding patches is not yet implemented in G+Smo");
623
624 // Regenerate solution
625 solve();
626 }
627
629 void removePatch(const std::string &patch,
630 const nlohmann::json &json = NULL) override {
631
632 // Remove patch from geometry
633 Base::removePatch(patch, json);
634
635 // Set basis
636 basis_ = gismo::gsMultiBasis<T>(Base::geo_, true);
637
638 // Set assembler basis
639 assembler_.setIntegrationElements(basis_);
640
641 // Clear boundary conditions map
642 bcMap_.clear();
643
644 // Initialize boundary conditions
645 for (auto const &bdr : Base::geo_.boundaries()) {
646 auto patch = bdr.patch;
647 auto side = bdr.side();
648 auto bc = bcMap_[patch][side] = { gismo::gsFunctionExpr<T>("0", d),
649 gismo::condition_type::dirichlet,
650 true };
651 }
652
653 // Clear boundary conditions
654 bc_.clear();
655
656 // Set boundary conditions
657 for (auto const & p : bcMap_) {
658 std::size_t patch = p.first;
659
660 for (auto const & bc : p.second) {
661 auto side = static_cast<gismo::boundary::side>(bc.first);
662
663 bc_.addCondition(patch, side, bc.second.type, bc.second.function, 0, bc.second.isParametric);
664 }
665 }
666
667 // Set geometry
668 bc_.setGeoMap(Base::geo_);
669
670 int patchIndex(-1);
671
672 try {
673 patchIndex = stoi(patch);
674 } catch (...) {}
675
676 // Regenerate solution
677 solve();
678 }
679};
680
681} // namespace webapp
682} // namespace iganet
G+Smo PDE model.
virtual void addPatch(const nlohmann::json &json)=0
Adds a patch to a model.
virtual void elevate(const nlohmann::json &json)=0
Elevates the model's degrees, preserves smoothness.
virtual nlohmann::json eval(const std::string &patch, const std::string &component, const nlohmann::json &json) const =0
Evaluates model.
virtual nlohmann::json getOutputs() const =0
Returns the model's outputs.
virtual nlohmann::json updateAttribute(const std::string &patch, const std::string &component, const std::string &attribute, const nlohmann::json &json)
Updates the attributes of the model.
Definition model.hpp:297
virtual void increase(const nlohmann::json &json)=0
Increases the model's degrees, preserves multiplicity.
virtual void refine(const nlohmann::json &json)=0
Refines model.
virtual void removePatch(const std::string &patch, const nlohmann::json &json)=0
Adds a patch to a model.
gismo::gsMultiPatch< T > geo_
Multi-patch geometry.
Definition GismoGeometryModel.hpp:39
G+Smo PDE model.
Definition GismoPdeModel.hpp:58
gismo::gsMultiPatch< T > solution_
Solution.
Definition GismoPdeModel.hpp:190
G+Smo Poisson model.
Definition GismoPoissonModel.hpp:27
~GismoPoissonModel()
Destructor.
Definition GismoPoissonModel.hpp:172
void refine(const nlohmann::json &json=NULL) override
Refines the model.
Definition GismoPoissonModel.hpp:571
typename gismo::gsExprAssembler< T >::solution solution_type
Type of the solution.
Definition GismoPoissonModel.hpp:45
void elevate(const nlohmann::json &json=NULL) override
Elevates the model's degrees, preserves smoothness.
Definition GismoPoissonModel.hpp:485
gismo::gsExprAssembler< T > assembler_
Expression assembler.
Definition GismoPoissonModel.hpp:64
void addPatch(const nlohmann::json &json=NULL) override
Add new patch to the model.
Definition GismoPoissonModel.hpp:614
gismo::gsBoundaryConditions< T > bc_
Boundary conditions.
Definition GismoPoissonModel.hpp:51
GismoPoissonModel()=delete
Default constructor.
void removePatch(const std::string &patch, const nlohmann::json &json=NULL) override
Remove existing patch from the model.
Definition GismoPoissonModel.hpp:629
typename gismo::gsExprAssembler< T >::space space_type
Type of the function space.
Definition GismoPoissonModel.hpp:42
nlohmann::json eval(const std::string &patch, const std::string &component, const nlohmann::json &json) const override
Evaluates the model.
Definition GismoPoissonModel.hpp:395
nlohmann::json getParameters() const override
Returns the model's parameters.
Definition GismoPoissonModel.hpp:201
void increase(const nlohmann::json &json=NULL) override
Increases the model's degrees, preserves multiplicity.
Definition GismoPoissonModel.hpp:528
gismo::gsFunctionExpr< T > rhsFunc_
Right-hand side function.
Definition GismoPoissonModel.hpp:54
gismo::gsMultiBasis< T > basis_
Multi-patch basis.
Definition GismoPoissonModel.hpp:48
void solve()
Solve the Poisson problem.
Definition GismoPoissonModel.hpp:67
nlohmann::json updateAttribute(const std::string &patch, const std::string &component, const std::string &attribute, const nlohmann::json &json) override
Updates the attributes of the model.
Definition GismoPoissonModel.hpp:278
bool rhsFuncParametric_
Right-hand side function defined on parametric domain (default false)
Definition GismoPoissonModel.hpp:58
typename gismo::gsExprAssembler< T >::geometryMap geometryMap_type
Type of the geometry mapping.
Definition GismoPoissonModel.hpp:36
std::string getDescription() const override
Returns the model's description.
Definition GismoPoissonModel.hpp:180
GismoPoissonModel(const std::array< short_t, d > degrees, const std::array< int64_t, d > ncoeffs, const std::array< int64_t, d > npatches, const std::array< T, d > dimensions)
Constructor for equidistant knot vectors.
Definition GismoPoissonModel.hpp:123
std::string getName() const override
Returns the model's name.
Definition GismoPoissonModel.hpp:175
nlohmann::json getOutputs() const override
Returns the model's outputs.
Definition GismoPoissonModel.hpp:185
GismoBoundaryConditionMap< T > bcMap_
Boundary condition look-up table.
Definition GismoPoissonModel.hpp:61
typename gismo::gsExprAssembler< T >::variable variable_type
Type of the variable.
Definition GismoPoissonModel.hpp:39
auto to_json(const torch::TensorAccessor< T, N > &accessor)
Converts a torch::TensorAccessor object to a JSON object.
Definition serialize.hpp:41
degree
Enumerator for specifying the degree of B-splines.
Definition BSplineModel.hpp:23
std::map< int, std::map< int, GismoBoundaryCondition< T > > > GismoBoundaryConditionMap
G+Smo boundary condition look-up table.
Definition GismoPdeModel.hpp:39
Definition boundary.hpp:22
constexpr bool is_SplineType_v
Alias to the value of is_SplineType.
Definition bspline.hpp:3243
side
Identifiers for topological sides.
Definition boundary.hpp:25
InvalidModelAttribute exception.
Definition model.hpp:42