21 #include "SheafSystem/field_factory.h" 23 #include "SheafSystem/arg_list.h" 24 #include "SheafSystem/assert_contract.h" 25 #include "SheafSystem/block.impl.h" 26 #include "SheafSystem/error_message.h" 27 #include "SheafSystem/fiber_bundles_namespace.h" 28 #include "SheafSystem/namespace_poset_member.h" 29 #include "SheafSystem/sec_at0.h" 30 #include "SheafSystem/sec_at0_space.h" 31 #include "SheafSystem/sec_at1_space.h" 32 #include "SheafSystem/sec_e1.h" 33 #include "SheafSystem/sec_e2.h" 34 #include "SheafSystem/sec_e3.h" 35 #include "SheafSystem/sec_ed_invertible.h" 36 #include "SheafSystem/sec_vd_space.h" 37 #include "SheafSystem/section_space_schema_poset.h" 38 #include "SheafSystem/std_iostream.h" 39 #include "SheafSystem/std_set.h" 40 #include "SheafSystem/std_string.h" 41 #include "SheafSystem/structured_block_1d.h" 42 #include "SheafSystem/structured_block_2d.h" 43 #include "SheafSystem/structured_block_3d.h" 44 #include "SheafSystem/unstructured_block.h" 45 #include "SheafSystem/field_vd.h" 49 #include "vtkConnectivityFilter.h" 50 #include "vtkDelaunay2D.h" 51 #include "vtkDelaunay3D.h" 53 #include "vtkPoints.h" 54 #include "vtkPolyData.h" 55 #include "vtkUnstructuredGrid.h" 68 const std::string& xname,
76 #ifdef DIAGNOSTIC_OUTPUT 77 post_information_message(
"new_scalar_field_1d_points:");
84 require(!xname.empty());
86 require(xlower.
ct() >= 1);
87 require(xupper.
ct() >= 1);
88 require_for_all(i, 0, 1, xlower[i] < xupper[i]);
95 new_0d_point_base_space(xns, xname, xi_size);
100 new_1d_unstructured_coordinates(xns,
106 "sec_rep_descriptors/vertex_vertex_constant");
110 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
120 xfcn = field_vd::property_dof_function_example;
150 const std::string& xname,
158 #ifdef DIAGNOSTIC_OUTPUT 159 post_information_message(
"new_scalar_field_1d_unstructured:");
166 require(!xname.empty());
167 require(xi_size > 0);
168 require(xlower.
ct() >= 1);
169 require(xupper.
ct() >= 1);
170 require_for_all(i, 0, 1, xlower[i] < xupper[i]);
175 post_information_message(
"")
177 new_1d_unstructured_base_space(xns, xname+
"_base_space", xi_size);
182 new_1d_unstructured_coordinates(xns, xname, xi_size, xlower, xupper,
187 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
192 post_information_message(
"")
197 xfcn = field_vd::property_dof_function_example;
206 post_information_message(
"")
227 const std::string& xname,
235 #ifdef DIAGNOSTIC_OUTPUT 236 post_information_message(
"new_scalar_field_1d_uniform:");
243 require(!xname.empty());
244 require(xi_size > 0);
245 require(xlower.
ct() >= 1);
246 require(xupper.
ct() >= 1);
247 require_for_all(i, 0, 1, xlower[i] < xupper[i]);
254 new_1d_structured_base_space(xns, xname+
"_base_space", xi_size);
259 new_1d_uniform_coordinates(xns, xname, xi_size, xlower, xupper,
264 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
274 xfcn = field_vd::property_dof_function_example;
304 const std::string& xname,
313 #ifdef DIAGNOSTIC_OUTPUT 314 post_information_message(
"new_scalar_field_2d_unstructured:");
321 require(!xname.empty());
322 require(xi_size > 0);
323 require(xj_size > 0);
324 require(xlower.
ct() >= 2);
325 require(xupper.
ct() >= 2);
326 require_for_all(i, 0, 2, xlower[i] < xupper[i]);
333 new_0d_point_base_space(xns, xname, xi_size, xj_size);
338 new_2d_unstructured_coordinates(xns,
345 "sec_rep_descriptors/vertex_vertex_constant");
349 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
359 xfcn = field_vd::property_dof_function_example;
389 const std::string& xname,
399 #ifdef DIAGNOSTIC_OUTPUT 400 post_information_message(
"new_scalar_field_2d_unstructured:");
407 require(!xname.empty());
408 require(xi_size > 0);
409 require(xj_size > 0);
410 require(xlower.
ct() >= 2);
411 require(xupper.
ct() >= 2);
412 require_for_all(i, 0, 2, xlower[i] < xupper[i]);
419 new_2d_unstructured_base_space(xns, xname, xi_size, xj_size, xuse_quads);
424 new_2d_unstructured_coordinates(xns, xname, xi_size, xj_size,
425 xlower, xupper, *lbase_space);
429 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
439 xfcn = field_vd::property_dof_function_example;
470 const std::string& xname,
478 #ifdef DIAGNOSTIC_OUTPUT 479 post_information_message(
"new_scalar_field_2d_unstructured:");
486 require(!xname.empty());
488 require(xlower.
ct() >= 2);
489 require(xupper.
ct() >= 2);
490 require_for_all(i, 0, 2, xlower[i] < xupper[i]);
499 new_2d_unstructured_base_space(xns, xname, xpt_ct, lpt_coords);
504 new_2d_unstructured_coordinates(xns,
514 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
524 xfcn = field_vd::property_dof_function_example;
556 const std::string& xname,
565 #ifdef DIAGNOSTIC_OUTPUT 566 post_information_message(
"new_scalar_field_2d_uniform:");
573 require(!xname.empty());
574 require(xi_size > 0);
575 require(xj_size > 0);
576 require(xlower.
ct() >= 2);
577 require(xupper.
ct() >= 2);
578 require_for_all(i, 0, 2, xlower[i] < xupper[i]);
585 new_2d_structured_base_space(xns, xname+
"_base_space", xi_size, xj_size);
590 new_2d_uniform_coordinates(xns, xname, xi_size, xj_size,
591 xlower, xupper, *lbase_space);
595 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
605 xfcn = field_vd::property_dof_function_example;
634 const std::string& xname,
644 #ifdef DIAGNOSTIC_OUTPUT 645 post_information_message(
"new_scalar_field_2d_unstructured:");
652 require(!xname.empty());
653 require(xi_size > 0);
654 require(xj_size > 0);
655 require(xk_size > 0);
656 require(xlower.
ct() >= 3);
657 require(xupper.
ct() >= 3);
658 require_for_all(i, 0, 3, xlower[i] < xupper[i]);
665 new_0d_point_base_space(xns, xname, xi_size, xj_size, xk_size);
670 new_3d_unstructured_coordinates(xns,
678 "sec_rep_descriptors/vertex_vertex_constant");
682 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
692 xfcn = field_vd::property_dof_function_example;
721 const std::string& xname,
732 #ifdef DIAGNOSTIC_OUTPUT 733 post_information_message(
"new_scalar_field_3d_unstructured:");
740 require(!xname.empty());
741 require(xi_size > 0);
742 require(xj_size > 0);
743 require(xk_size > 0);
744 require(xlower.
ct() >= 3);
745 require(xupper.
ct() >= 3);
746 require_for_all(i, 0, 3, xlower[i] < xupper[i]);
753 new_3d_unstructured_base_space(xns, xname, xi_size, xj_size, xk_size, xuse_hexs);
758 new_3d_unstructured_coordinates(xns, xname, xi_size, xj_size, xk_size,
759 xlower, xupper, *lbase_space);
763 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
773 xfcn = field_vd::property_dof_function_example;
804 const std::string& xname,
812 #ifdef DIAGNOSTIC_OUTPUT 813 post_information_message(
"new_scalar_field_2d_unstructured:");
820 require(!xname.empty());
822 require(xlower.
ct() >= 3);
823 require(xupper.
ct() >= 3);
824 require_for_all(i, 0, 3, xlower[i] < xupper[i]);
833 new_3d_unstructured_base_space(xns, xname, xpt_ct, lpt_coords);
838 new_3d_unstructured_coordinates(xns,
848 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
858 xfcn = field_vd::property_dof_function_example;
889 const std::string& xname,
899 #ifdef DIAGNOSTIC_OUTPUT 900 post_information_message(
"new_scalar_field_3d_uniform:");
907 require(!xname.empty());
908 require(xi_size > 0);
909 require(xj_size > 0);
910 require(xk_size > 0);
911 require(xlower.
ct() >= 3);
912 require(xupper.
ct() >= 3);
913 require_for_all(i, 0, 3, xlower[i] < xupper[i]);
920 new_3d_structured_base_space(xns, xname, xi_size, xj_size, xk_size);
925 new_3d_uniform_coordinates(xns, xname, xi_size, xj_size, xk_size,
926 xlower, xupper, *lbase_space);
930 sec_at0* lprop = new_property(xns, xname, *lbase_space, xproperty_rep_path);
940 xfcn = field_vd::property_dof_function_example;
975 const std::string& xname,
979 const std::string& xfcn)
982 #ifdef DIAGNOSTIC_OUTPUT 983 post_information_message(
"new_scalar_field_1d_unstructured:");
989 require(!xname.empty());
990 require(xi_size > 0);
991 require(xlower.
ct() >= 1);
992 require(xupper.
ct() >= 1);
993 require_for_all(i, 0, 1, xlower[i] < xupper[i]);
994 require((xfcn ==
"linear_scalar_fcn") || (xfcn ==
"zero") || (xfcn ==
"property_dof_function_example") || (xfcn ==
"step_fcn"));
999 new_scalar_field_1d_unstructured(xns,
1004 property_dof_function(xfcn));
1008 ensure(result != 0);
1020 const std::string& xname,
1024 const std::string& xfcn)
1027 #ifdef DIAGNOSTIC_OUTPUT 1028 post_information_message(
"new_scalar_field_1d_uniform:");
1034 require(!xname.empty());
1035 require(xi_size > 0);
1036 require(xlower.
ct() >= 1);
1037 require(xupper.
ct() >= 1);
1038 require_for_all(i, 0, 1, xlower[i] < xupper[i]);
1039 require((xfcn ==
"linear_scalar_fcn") || (xfcn ==
"zero") || (xfcn ==
"property_dof_function_example") || (xfcn ==
"step_fcn"));
1044 new_scalar_field_1d_uniform(xns,
1049 property_dof_function(xfcn));
1053 ensure(result != 0);
1065 const std::string& xname,
1071 const std::string& xfcn)
1074 #ifdef DIAGNOSTIC_OUTPUT 1075 post_information_message(
"new_scalar_field_2d_unstructured:");
1081 require(!xname.empty());
1082 require(xi_size > 0);
1083 require(xj_size > 0);
1084 require(xlower.
ct() >= 2);
1085 require(xupper.
ct() >= 2);
1086 require_for_all(i, 0, 2, xlower[i] < xupper[i]);
1087 require((xfcn ==
"linear_scalar_fcn") || (xfcn ==
"zero") || (xfcn ==
"property_dof_function_example") || (xfcn ==
"step_fcn"));
1092 new_scalar_field_2d_unstructured(xns,
1099 property_dof_function(xfcn));
1104 ensure(result != 0);
1117 const std::string& xname,
1121 const std::string& xfcn)
1124 #ifdef DIAGNOSTIC_OUTPUT 1125 post_information_message(
"new_scalar_field_2d_unstructured:");
1131 require(!xname.empty());
1132 require(xpt_ct > 0);
1133 require(xlower.
ct() >= 2);
1134 require(xupper.
ct() >= 2);
1135 require_for_all(i, 0, 2, xlower[i] < xupper[i]);
1136 require((xfcn ==
"linear_scalar_fcn") || (xfcn ==
"zero") || (xfcn ==
"property_dof_function_example") || (xfcn ==
"step_fcn"));
1141 new_scalar_field_2d_unstructured(xns,
1146 property_dof_function(xfcn));
1150 ensure(result != 0);
1163 const std::string& xname,
1168 const std::string& xfcn)
1171 #ifdef DIAGNOSTIC_OUTPUT 1172 post_information_message(
"new_scalar_field_2d_uniform:");
1178 require(!xname.empty());
1179 require(xi_size > 0);
1180 require(xj_size > 0);
1181 require(xlower.
ct() >= 2);
1182 require(xupper.
ct() >= 2);
1183 require_for_all(i, 0, 2, xlower[i] < xupper[i]);
1184 require((xfcn ==
"linear_scalar_fcn") || (xfcn ==
"zero") || (xfcn ==
"property_dof_function_example") || (xfcn ==
"step_fcn"));
1189 new_scalar_field_2d_uniform(xns,
1195 property_dof_function(xfcn));
1199 ensure(result != 0);
1211 const std::string& xname,
1218 const std::string& xfcn)
1221 #ifdef DIAGNOSTIC_OUTPUT 1222 post_information_message(
"new_scalar_field_3d_unstructured:");
1228 require(!xname.empty());
1229 require(xi_size > 0);
1230 require(xj_size > 0);
1231 require(xk_size > 0);
1232 require(xlower.
ct() >= 3);
1233 require(xupper.
ct() >= 3);
1234 require_for_all(i, 0, 3, xlower[i] < xupper[i]);
1235 require((xfcn ==
"linear_scalar_fcn") || (xfcn ==
"zero") || (xfcn ==
"property_dof_function_example") || (xfcn ==
"step_fcn"));
1240 new_scalar_field_3d_unstructured(xns,
1248 property_dof_function(xfcn));
1252 ensure(result != 0);
1265 const std::string& xname,
1269 const std::string& xfcn)
1272 #ifdef DIAGNOSTIC_OUTPUT 1273 post_information_message(
"new_scalar_field_2d_unstructured:");
1279 require(!xname.empty());
1280 require(xpt_ct > 0);
1281 require(xlower.
ct() >= 3);
1282 require(xupper.
ct() >= 3);
1283 require_for_all(i, 0, 3, xlower[i] < xupper[i]);
1284 require((xfcn ==
"linear_scalar_fcn") || (xfcn ==
"zero") || (xfcn ==
"property_dof_function_example") || (xfcn ==
"step_fcn"));
1289 new_scalar_field_3d_unstructured(xns,
1294 property_dof_function(xfcn));
1298 ensure(result != 0);
1311 const std::string& xname,
1317 const std::string& xfcn)
1320 #ifdef DIAGNOSTIC_OUTPUT 1321 post_information_message(
"new_scalar_field_3d_uniform:");
1327 require(!xname.empty());
1328 require(xi_size > 0);
1329 require(xj_size > 0);
1330 require(xk_size > 0);
1331 require(xlower.
ct() >= 3);
1332 require(xupper.
ct() >= 3);
1333 require_for_all(i, 0, 3, xlower[i] < xupper[i]);
1334 require((xfcn ==
"linear_scalar_fcn") || (xfcn ==
"zero") || (xfcn ==
"property_dof_function_example") || (xfcn ==
"step_fcn"));
1339 new_scalar_field_3d_uniform(xns,
1346 property_dof_function(xfcn));
1350 ensure(result != 0);
1362 bool xdelete_coord_fiber,
1363 bool xdelete_prop_fiber)
1381 while(!lmbr_itr.is_done())
1383 lmbr.attach_to_state(lmbr_itr.index());
1385 if(lmbr.is_jim(
false))
1393 lin_links[lprereq_id].insert(lmbr.index().pod());
1400 lmbr.detach_from_state();
1423 lin_links[lprop_schema_host_index.
hub_pod()].erase(lprop_host_index.
hub_pod());
1427 if(lin_links[lprop_schema_host_index.
hub_pod()].empty())
1434 lin_links[lprop_fiber_space_index.
hub_pod()].erase(lprop_schema_host_index.
hub_pod());
1435 lin_links[lbase_host_index.
hub_pod()].erase(lprop_schema_host_index.
hub_pod());
1439 if(lin_links[lprop_fiber_space_index.
hub_pod()].empty() && xdelete_prop_fiber)
1449 lin_links[lcoord_schema_host_index.
hub_pod()].erase(lcoord_host_index.
hub_pod());
1453 if(lin_links[lcoord_schema_host_index.
hub_pod()].empty())
1458 lin_links[lcoord_fiber_space_index.
hub_pod()].erase(lcoord_schema_host_index.
hub_pod());
1459 lin_links[lbase_host_index.
hub_pod()].erase(lcoord_schema_host_index.
hub_pod());
1463 if(lin_links[lcoord_fiber_space_index.
hub_pod()].empty() && xdelete_coord_fiber)
1471 if(lin_links[lbase_host_index.
hub_pod()].empty())
1526 require(!xname.empty());
1527 require(xi_size > 0);
1534 string lbase_name(xname+
"_base_space");
1535 base_space_poset& lhost = unstructured_block::standard_host(lns, lbase_name, 0,
false);
1539 string proto_member_name(
"point");
1541 poset_path lproto_path(base_space_member::prototypes_poset_name(),
1566 result->
put_name(xname +
"_unstructured_block",
true,
false);
1568 #ifdef DIAGNOSTIC_OUTPUT 1569 cout << lhost << endl;
1578 ensure(result != 0);
1590 const std::string& xname,
1597 require(!xname.empty());
1598 require(xi_size > 0);
1599 require(xj_size > 0);
1606 string lbase_name(xname+
"_base_space");
1607 base_space_poset& lhost = unstructured_block::standard_host(lns, lbase_name, 0,
false);
1611 string proto_member_name(
"point");
1613 poset_path lproto_path(base_space_member::prototypes_poset_name(),
1619 size_type lpt_ct = (xi_size+1)*(xj_size+1);
1638 result->
put_name(xname +
"_unstructured_block",
true,
false);
1640 #ifdef DIAGNOSTIC_OUTPUT 1641 cout << lhost << endl;
1650 ensure(result != 0);
1662 const std::string& xname,
1670 require(!xname.empty());
1671 require(xi_size > 0);
1672 require(xj_size > 0);
1673 require(xk_size > 0);
1685 string lbase_name(xname+
"_base_space");
1686 unstructured_block::standard_host(lns, lbase_name, 0,
false);
1691 string proto_member_name(
"point");
1693 poset_path lproto_path(base_space_member::prototypes_poset_name(),
1699 size_type lpt_ct = (xi_size+1)*(xj_size+1)*(xk_size+1);
1718 result->
put_name(xname +
"_unstructured_block",
true,
false);
1720 #ifdef DIAGNOSTIC_OUTPUT 1721 cout << lhost << endl;
1730 ensure(result != 0);
1742 const std::string& xname,
1748 require(!xname.empty());
1749 require(xi_size > 0);
1756 base_space_poset& lhost = unstructured_block::standard_host(lns, xname, 1,
false);
1760 string proto_member_name(
"segment_complex");
1762 poset_path lproto_path(base_space_member::prototypes_poset_name(),
1767 result->
put_name(xname +
"_unstructured_block",
true,
false);
1769 #ifdef DIAGNOSTIC_OUTPUT 1770 cout << lhost << endl;
1779 ensure(result != 0);
1791 const std::string& xname,
1801 require(!xname.empty());
1802 require(xi_size > 0);
1803 require(xlower.
ct() >= 1);
1804 require(xupper.
ct() >= 1);
1805 require_for_all(i, 0, 1, xlower[i] < xupper[i]);
1812 string lname = xname +
"_coordinates_section_space";
1815 sec_e1::standard_host(xns, xbase_space.
path(
true), xrep_path,
"",
"",
false);
1822 result->
put_name(xname +
"_coordinate_field",
true,
false);
1834 lfiber[0] = xlower[0] + i*ldelta0;
1848 ensure(result != 0);
1860 const std::string& xname,
1866 require(!xname.empty());
1867 require(xi_size > 0);
1875 base_space_poset& lhost = structured_block_1d::standard_host(lns, xname,
false);
1881 result->
put_name(xname +
"_structured_block_1d",
true,
false);
1883 #ifdef DIAGNOSTIC_OUTPUT 1884 cout << lhost << endl;
1893 ensure(result != 0);
1904 const std::string& xname,
1913 require(!xname.empty());
1914 require(xi_size > 0);
1915 require(xlower.
ct() >= 1);
1916 require(xupper.
ct() >= 1);
1917 require_for_all(i, 0, 1, xlower[i] < xupper[i]);
1921 #ifdef DIAGNOSTIC_OUTPUT 1923 for(
int c=0; c<xlower.
ub(); ++c)
1925 cout <<
" " << xlower[c];
1930 for(
int c=0; c<xupper.
ub(); ++c)
1932 cout <<
" " << xupper[c];
1940 string lname = xname +
"_coordinates_section_space";
1941 poset_path lpath(
"sec_rep_descriptors",
"vertex_block_uniform");
1944 sec_e1::standard_host(xns, xbase_space.
path(
true), lpath,
"",
"",
false);
1951 result->
put_name(xname +
"_coordinate_field",
true,
false);
1955 put_1d_uniform_coord_dofs(xlower, xupper, result);
1957 #ifdef DIAGNOSTIC_OUTPUT 1958 cout << lhost << endl;
1967 ensure(result != 0);
1978 const std::string& xname,
1986 require(!xname.empty());
1987 require(xi_size > 0);
1988 require(xj_size > 0);
1996 string lbase_name(xname+
"_base_space");
1997 base_space_poset& lhost = unstructured_block::standard_host(lns, lbase_name, 2,
false);
2001 string proto_member_name(xuse_quads ?
"quad_nodes" :
"triangle_nodes");
2003 poset_path lproto_path(base_space_member::prototypes_poset_name(),
2008 result->
put_name(xname +
"_unstructured_block",
true,
false);
2010 #ifdef DIAGNOSTIC_OUTPUT 2011 cout << lhost << endl;
2020 ensure(result != 0);
2032 const std::string& xname,
2043 require(!xname.empty());
2044 require(xi_size > 0);
2045 require(xj_size > 0);
2046 require(xlower.
ct() >= 2);
2047 require(xupper.
ct() >= 2);
2048 require_for_all(i, 0, 2, xlower[i] < xupper[i]);
2055 string lname = xname +
"_coordinates_section_space";
2058 sec_e2::standard_host(xns, xbase_space.
path(
true), xrep_path,
"",
"",
false);
2065 result->
put_name(xname +
"_coordinate_field",
true,
false);
2081 lfiber[0] = xlower[0] + i*ldelta0;
2084 lfiber[1] = xlower[1] + j*ldelta1;
2089 lclient_id = i*j_ub + j;
2095 #ifdef DIAGNOSTIC_OUTPUT 2096 cout << lhost << endl;
2105 ensure(result != 0);
2118 const std::string& xname,
2125 require(!xname.empty());
2126 require(xpt_ct > 0);
2132 vtkPoints* points = vtkPoints::New();
2135 while(count < xpt_ct)
2137 double x = vtkMath::Random(-1.0, 1.0);
2138 double y = vtkMath::Random(-1.0, 1.0);
2141 double r2 = x*x + y*y;
2144 points->InsertPoint(count, x, y, z);
2151 vtkPolyData* profile = vtkPolyData::New();
2152 profile->SetPoints(points);
2154 vtkDelaunay2D* del = vtkDelaunay2D::New();
2155 del->SetInput(profile);
2156 del->SetTolerance(0.001);
2158 vtkConnectivityFilter* cf = vtkConnectivityFilter::New();
2159 cf->SetInput(del->GetOutput());
2162 vtkUnstructuredGrid* ugrid = cf->GetOutput();
2168 double lpt_coords[3];
2171 ugrid->GetPoint(i, lpt_coords);
2178 size_type ltri_ct = ugrid->GetNumberOfCells();
2186 ugrid->GetCellPoints(i, npts, pts);
2196 string lbase_name(xname+
"_base_space");
2197 base_space_poset& lhost = unstructured_block::standard_host(lns, lbase_name, 2,
false);
2201 poset_path lproto_path(base_space_member::prototypes_poset_name(),
"triangle_nodes");
2205 result->
put_name(xname +
"_unstructured_block",
true,
false);
2207 #ifdef DIAGNOSTIC_OUTPUT 2208 cout << lhost << endl;
2217 ensure(result != 0);
2231 const std::string& xname,
2241 require(!xname.empty());
2242 require(xpt_ct > 0);
2243 require(xlower.
ct() >= 2);
2244 require(xupper.
ct() >= 2);
2245 require_for_all(i, 0, 2, xlower[i] < xupper[i]);
2246 require(xpt_coords.
ct() >= 2*xpt_ct);
2252 string lname = xname +
"_coordinates_section_space";
2253 poset_path lpath(
"sec_rep_descriptors",
"vertex_element_dlinear");
2256 sec_e2::standard_host(xns, xbase_space.
path(
true), lpath,
"",
"",
false);
2263 result->
put_name(xname +
"_coordinate_field",
true,
false);
2274 lfiber[0] = (xpt_coords[2*i ] + 1.0)*ldel0 + xlower[0];
2275 lfiber[1] = (xpt_coords[2*i+1] + 1.0)*ldel1 + xlower[1];
2279 #ifdef DIAGNOSTIC_OUTPUT 2280 cout << lhost << endl;
2289 ensure(result != 0);
2301 const std::string& xname,
2308 require(poset_path::is_valid_name(xname));
2310 require(xi_size > 0);
2311 require(xj_size > 0);
2319 base_space_poset& lhost = structured_block_2d::standard_host(lns, xname,
false);
2325 result->
put_name(xname +
"_structured_block_2d",
true,
false);
2327 #ifdef DIAGNOSTIC_OUTPUT 2328 cout << lhost << endl;
2337 ensure(result != 0);
2348 const string& xname,
2358 require(!xname.empty());
2359 require(xi_size > 0);
2360 require(xj_size > 0);
2361 require(xlower.
ct() >= 2);
2362 require(xupper.
ct() >= 2);
2363 require_for_all(i, 0, 2, xlower[i] < xupper[i]);
2367 #ifdef DIAGNOSTIC_OUTPUT 2369 for(
int c=0; c<xlower.
ub(); ++c)
2371 cout <<
" " << xlower[c];
2376 for(
int c=0; c<xupper.
ub(); ++c)
2378 cout <<
" " << xupper[c];
2386 string lname = xname +
"_coordinates_section_space";
2387 poset_path lpath(
"sec_rep_descriptors",
"vertex_block_uniform");
2390 sec_e2::standard_host(xns, xbase_space.
path(
true), lpath,
"",
"",
false);
2397 result->
put_name(xname +
"_coordinate_field",
true,
false);
2401 put_2d_uniform_coord_dofs(xlower, xupper, result);
2403 #ifdef DIAGNOSTIC_OUTPUT 2404 cout << lhost << endl;
2413 ensure(result != 0);
2424 const std::string& xname,
2433 require(!xname.empty());
2434 require(xi_size > 0);
2435 require(xj_size > 0);
2436 require(xk_size > 0);
2444 string lbase_name(xname+
"_base_space");
2445 base_space_poset& lhost = unstructured_block::standard_host(lns, lbase_name, 3,
false);
2449 string proto_member_name(xuse_hexs ?
"hex_nodes" :
"tetra_nodes");
2451 poset_path lproto_path(base_space_member::prototypes_poset_name(),
2456 result->
put_name(xname +
"_unstructured_block",
true,
false);
2458 #ifdef DIAGNOSTIC_OUTPUT 2459 cout << lhost << endl;
2468 ensure(result != 0);
2480 const std::string& xname,
2492 require(!xname.empty());
2493 require(xi_size > 0);
2494 require(xj_size > 0);
2495 require(xk_size > 0);
2496 require(xlower.
ct() >= 3);
2497 require(xupper.
ct() >= 3);
2498 require_for_all(i, 0, 3, xlower[i] < xupper[i]);
2505 string lname = xname +
"_coordinates_section_space";
2508 sec_e3::standard_host(xns, xbase_space.
path(
true), xrep_path,
"",
"",
false);
2515 result->
put_name(xname +
"_coordinate_field",
true,
false);
2533 lfiber[0] = xlower[0] + i*ldelta0;
2536 lfiber[1] = xlower[1] + j*ldelta1;
2540 lfiber[2] = xlower[2] + k*ldelta2;
2545 lclient_id = (i*j_ub + j)*k_ub + k;
2552 #ifdef DIAGNOSTIC_OUTPUT 2553 cout << lhost << endl;
2562 ensure(result != 0);
2575 const std::string& xname,
2582 require(!xname.empty());
2583 require(xpt_ct > 0);
2589 vtkPoints* points = vtkPoints::New();
2592 while(count < xpt_ct)
2594 double x = vtkMath::Random(-1.0, 1.0);
2595 double y = vtkMath::Random(-1.0, 1.0);
2596 double z = vtkMath::Random(-1.0, 1.0);
2598 double r2 = x*x + y*y + z*z;
2601 points->InsertPoint(count, x, y, z);
2608 vtkPolyData* profile = vtkPolyData::New();
2609 profile->SetPoints(points);
2611 vtkDelaunay3D* del = vtkDelaunay3D::New();
2612 del->SetInput(profile);
2613 del->SetTolerance(0.001);
2616 vtkUnstructuredGrid* ugrid = del->GetOutput();
2622 double lpt_coords[3];
2625 ugrid->GetPoint(i, lpt_coords);
2633 size_type ltet_ct = ugrid->GetNumberOfCells();
2641 ugrid->GetCellPoints(i, npts, pts);
2652 string lbase_name(xname+
"_base_space");
2653 base_space_poset& lhost = unstructured_block::standard_host(lns, lbase_name, 3,
false);
2657 poset_path lproto_path(base_space_member::prototypes_poset_name(),
"tetra_nodes");
2662 result->
put_name(xname +
"_unstructured_block",
true,
false);
2664 #ifdef DIAGNOSTIC_OUTPUT 2665 cout << lhost << endl;
2674 ensure(result != 0);
2688 const std::string& xname,
2698 require(!xname.empty());
2699 require(xpt_ct > 0);
2700 require(xlower.
ct() >= 3);
2701 require(xupper.
ct() >= 3);
2702 require_for_all(i, 0, 3, xlower[i] < xupper[i]);
2703 require(xpt_coords.
ct() >= 3*xpt_ct);
2709 string lname = xname +
"_coordinates_section_space";
2710 poset_path lpath(
"sec_rep_descriptors",
"vertex_element_dlinear");
2713 sec_e3::standard_host(xns, xbase_space.
path(
true), lpath,
"",
"",
false);
2720 result->
put_name(xname +
"_coordinate_field",
true,
false);
2732 lfiber[0] = (xpt_coords[3*i ] + 1.0)*ldel0 + xlower[0];
2733 lfiber[1] = (xpt_coords[3*i+1] + 1.0)*ldel1 + xlower[1];
2734 lfiber[2] = (xpt_coords[3*i+2] + 1.0)*ldel2 + xlower[2];
2738 #ifdef DIAGNOSTIC_OUTPUT 2739 cout << lhost << endl;
2748 ensure(result != 0);
2759 const std::string& xname,
2767 require(!xname.empty());
2768 require(xi_size > 0);
2769 require(xj_size > 0);
2770 require(xk_size > 0);
2778 string lbase_name(xname+
"_base_space");
2779 base_space_poset& lhost = structured_block_3d::standard_host(lns, lbase_name,
false);
2785 result->
put_name(xname +
"_structured_block_3d",
true,
false);
2787 #ifdef DIAGNOSTIC_OUTPUT 2788 cout << lhost << endl;
2797 ensure(result != 0);
2808 const std::string& xname,
2819 require(!xname.empty());
2820 require(xi_size > 0);
2821 require(xj_size > 0);
2822 require(xk_size > 0);
2823 require(xlower.
ct() >= 3);
2824 require(xupper.
ct() >= 3);
2825 require_for_all(i, 0, 3, xlower[i] < xupper[i]);
2829 #ifdef DIAGNOSTIC_OUTPUT 2831 for(
int c=0; c<xlower.
ub(); ++c)
2833 cout <<
" " << xlower[c];
2838 for(
int c=0; c<xupper.
ub(); ++c)
2840 cout <<
" " << xupper[c];
2848 string lname = xname +
"_coordinates_section_space";
2849 poset_path lpath(
"sec_rep_descriptors",
"vertex_block_uniform");
2852 sec_e3::standard_host(xns, xbase_space.
path(
true), lpath,
"",
"",
false);
2859 result->
put_name(xname +
"_coordinate_field",
true,
false);
2863 put_3d_uniform_coord_dofs(xlower, xupper, result);
2866 #ifdef DIAGNOSTIC_OUTPUT 2867 cout << lhost << endl;
2876 ensure(result != 0);
2887 const std::string& xname,
2895 require(!xname.empty());
2901 string lname = xname +
"_property_section_space";
2904 sec_at0::standard_host(xns, xbase_space.
path(
true), xrep_path,
"",
"",
false);
2912 result->
put_name(xname+
"_scalar_property",
true,
false);
2921 ensure(result != 0);
2936 require(xglobal_coords.
ct() >= 1);
2937 require(xproperty_dofs.
ct() == 1);
2952 xproperty_dofs[0] = -1.0;
2956 xproperty_dofs[0] = 1.0;
2960 xproperty_dofs[0] = 4.0*x + 1.0;
2978 require(xglobal_coords.
ct() > 0);
2979 require(xproperty_dofs.
ct() == 1);
2985 int ldc = xglobal_coords.
ct();
2986 for(
int i=0; i<ldc; ++i)
2988 lprop_dof += (i+1)*xglobal_coords[i];
2991 xproperty_dofs[0] = lprop_dof;
3009 xproperty_dofs.
assign(0.0);
3013 ensure_for_all(i, 0, xproperty_dofs.
ct(), xproperty_dofs[i] == 0.0);
3024 const std::string& xbase_space_name,
3034 switch(xindex_ubs.
ct())
3037 result = field_factory::new_1d_structured_base_space(xns,
3042 result = field_factory::new_2d_structured_base_space(xns,
3048 result = field_factory::new_3d_structured_base_space(xns,
3073 require( (1 <= xdc) && (xdc <= 3) );
3092 ensure(result != 0);
3118 lfiber[0] = xlower[0];
3123 lfiber[0] = xupper[0];
3158 lfiber[0] = xlower[0];
3159 lfiber[1] = xlower[1];
3164 lfiber[0] = xupper[0];
3165 lfiber[1] = xlower[1];
3170 lfiber[0] = xupper[0];
3171 lfiber[1] = xupper[1];
3176 lfiber[0] = xlower[0];
3177 lfiber[1] = xupper[1];
3212 lfiber[0] = xlower[0];
3213 lfiber[1] = xlower[1];
3214 lfiber[2] = xlower[2];
3219 lfiber[0] = xupper[0];
3220 lfiber[1] = xlower[1];
3221 lfiber[2] = xlower[2];
3226 lfiber[0] = xupper[0];
3227 lfiber[1] = xupper[1];
3228 lfiber[2] = xlower[2];
3233 lfiber[0] = xlower[0];
3234 lfiber[1] = xupper[1];
3235 lfiber[2] = xlower[2];
3240 lfiber[0] = xlower[0];
3241 lfiber[1] = xlower[1];
3242 lfiber[2] = xupper[2];
3247 lfiber[0] = xupper[0];
3248 lfiber[1] = xlower[1];
3249 lfiber[2] = xupper[2];
3254 lfiber[0] = xupper[0];
3255 lfiber[1] = xupper[1];
3256 lfiber[2] = xupper[2];
3261 lfiber[0] = xlower[0];
3262 lfiber[1] = xupper[1];
3263 lfiber[2] = xupper[2];
3291 put_1d_uniform_coord_dofs(xlower, xupper, xcoords);
3294 put_2d_uniform_coord_dofs(xlower, xupper, xcoords);
3297 put_3d_uniform_coord_dofs(xlower, xupper, xcoords);
3320 require((xname ==
"linear_scalar_fcn") || (xname ==
"zero") || (xname ==
"property_dof_function_example") || (xname ==
"step_fcn"));
3324 if(xname ==
"linear_scalar_fcn")
3326 result = linear_scalar_fcn;
3328 else if (xname ==
"step_fcn")
3332 else if (xname ==
"zero")
3336 else if(xname ==
"property_dof_function_example")
3338 result = field_vd::property_dof_function_example;
3343 post_fatal_error_message(
"Unsuppported property dof function name.");
3348 ensure(result != 0);
static field_vd * new_scalar_field_3d_uniform(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, size_type xj_size, size_type xk_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, property_dof_function_type xfcn=0, const poset_path &xproperty_rep_path="sec_rep_descriptors/vertex_element_dlinear")
Creates a scalar field with name xname+"_scalar_property" on a 3D uniform mesh xi_size by xj_size by ...
virtual void get_read_write_access(bool xrelease_read_only_access=false)
Get read write access to the state associated with this. If release_read_only_access is requested...
static field_vd * new_scalar_field_1d_points(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, property_dof_function_type xfcn=0, const poset_path &xproperty_rep_path="sec_rep_descriptors/vertex_vertex_constant")
Creates a scalar field with name xname+"_scalar_property" on a point mesh with coordinates which loca...
static void put_2d_uniform_coord_dofs(const block< sec_vd_dof_type > &xlower, const block< sec_vd_dof_type > &xupper, sec_ed *xcoords)
Sets the dofs for 2D uniform coordinate section xcoords to the bounds specified by xlower and xupper...
virtual void delete_link(pod_index_type xgreater, pod_index_type xlesser)
Delete the cover link between hub id xgreater and hub id xlesser.
static field_vd * new_scalar_field_1d_uniform(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, property_dof_function_type xfcn=0, const poset_path &xproperty_rep_path="sec_rep_descriptors/vertex_element_dlinear")
Creates a scalar field with name xname+"_scalar_property" on a 1D uniform mesh of size xi_size with c...
static field_vd * new_scalar_field_1d_unstructured(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, property_dof_function_type xfcn=0, const poset_path &xproperty_rep_path="sec_rep_descriptors/vertex_element_dlinear")
Creates a scalar field with name xname+"_scalar_property" on a 1D mesh of size xi_size, with cooordinate bounds xlower and xupper, and with property values given by xfcn. If xfcn == 0, then field_vd::property_value_function_example is used.
host_type * host() const
The poset this is a member of.
section_space_schema_poset * host() const
The poset which this is a handle to a component of.
index_type ub() const
The upper bound on the storage array. The number of items current allocated in the storage array...
size_type ct() const
The number of items currently in use.
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
A homogeneous collection of connected quads arranged in an i_size() x j_size() array.
const scoped_index & index() const
The member index of this poset within the namespace host()
namespace_poset & name_space() const
The namespace this resides in.
poset_path path(bool xauto_access=true) const
A path to this component.
static sec_e2 * new_2d_unstructured_coordinates(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, size_type xj_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, unstructured_block &xbase_space, const poset_path &xrep_path="sec_rep_descriptors/vertex_element_dlinear")
Creates 2D cooordinates with bounds xlower and xupper.
Namespace for fields component of sheaf system.
The default name space; a poset which contains other posets as members.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
virtual void get_read_access() const
Get read access to the state associated with this.
static sec_e2 * new_2d_uniform_coordinates(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, size_type xj_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, structured_block_2d &xbase_space)
Creates 2D uniform coordinates with bounds xlower and xupper.
A general antisymmetric tensor of degree 1 over an abstract vector space (volatile version)...
bool contains_poset_member(pod_index_type xposet_hub_id, pod_index_type xmember_hub_id, bool xauto_access=true) const
True if this contains a poset with hub id xposet_hub_id which contains a member with hub id xmember_h...
static sec_ed * new_coord_section_handle(int xdc)
Creates a new unattached instance of sec_e<xdc>.
static field_vd * new_scalar_field_3d_unstructured(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, size_type xj_size, size_type xk_size, bool xuse_hexs, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, property_dof_function_type xfcn=0, const poset_path &xproperty_rep_path="sec_rep_descriptors/vertex_element_dlinear")
Creates a scalar field with name xname+"_scalar_property" on a 3D mesh with general connectivity...
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
static void step_fcn(block< sec_vd_value_type > &xglobal_coords, block< sec_vd_dof_type > &xproperty_dofs)
Step property dof function. Not exactly a step, really a ramp. Test case centers coarse mesh zone on ...
void reserve(index_type xub)
Makes ub() at least xub; if new storage is allocated, it is uninitialized.
host_type * host() const
The poset this is a member of.
poset_state_handle & member_poset(pod_index_type xhub_id, bool xauto_access=true) const
The poset_state_handle object referred to by hub id xhub_id.
OBSOLETE: use zone_nodes_block or point_block_*d. A client handle for a base space member which repre...
static sec_e1 * new_1d_uniform_coordinates(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, structured_block_1d &xbase_space)
Creates 1D uniform coordinates with bounds xlower and xupper.
A homogeneous collection of connected segments arranged in an i_size() array.
static structured_block_2d * new_2d_structured_base_space(namespace_poset &xns, const std::string &xname, size_type xi_size, size_type xj_size)
Creates a 2D structured mesh with xi_size by xj_size.
A client handle for a member of a base space poset.
A client handle for a member of a namespace poset.
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
A section of a fiber bundle with a d-dimensional Euclidean vector space fiber.
static void put_1d_uniform_coord_dofs(const block< sec_vd_dof_type > &xlower, const block< sec_vd_dof_type > &xupper, sec_ed *xcoords)
Sets the dofs for 1D uniform coordinate section xcoords to the bounds specified by xlower and xupper...
poset & fiber_space()
The fiber space for section spaces on this schema.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
static unstructured_block * new_0d_point_base_space(namespace_poset &xns, const std::string &xname, size_type xi_size)
Creates a 0D mesh of (xi_size+1) points, without any higher dimensional cells. Intended to be given c...
void push_back(const_reference_type item)
Insert item at the end of the items in the auto_block.
namespace_poset_member & top()
The top member of the poset (mutable version)
void assign(const_reference_type xitem)
Sets the values of all items to xitem.
bool state_is_read_write_accessible() const
True if this is attached and if the state is accessible for read and write or access control is disab...
poset * host() const
The poset which this is a handle to a member of.
pointer_type base() const
The underlying storage array.
static field_vd * new_scalar_field_2d_uniform(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, size_type xj_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, property_dof_function_type xfcn=0, const poset_path &xproperty_rep_path="sec_rep_descriptors/vertex_element_dlinear")
Creates a scalar field with name xname+"_scalar_property" on a 2D uniform mesh xi_size by xj_size wit...
void set_ct(size_type xct)
Sets ct() == xct.
An index within the external ("client") scope of a given id space.
static structured_block_1d * new_1d_structured_base_space(namespace_poset &xns, const std::string &xname, size_type xi_size)
Creates a 1D structured mesh with xi_size.
static base_space_member * new_structured_base_space(namespace_poset &xns, const std::string &xbase_space_name, const block< int > &xindex_ubs)
Constructs a structured base space in namespace xns, with name xbase_space_name, and index bounds xin...
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
A vd-valued property as a function of global coordinates.
bool cover_is_empty(bool xlower, pod_index_type xmbr_hub_id) const
True if and only if the lower (xlower true) or upper (xlower false) cover set of the member with hub ...
sec_vd & property() const
The dependent variable of this field.
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
static unstructured_block * new_1d_unstructured_base_space(namespace_poset &xns, const std::string &xname, size_type xi_size)
Creates a 1D mesh of size xi_size.
static sec_e3 * new_3d_unstructured_coordinates(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, size_type xj_size, size_type xk_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, unstructured_block &xbase_space, const poset_path &xrep_path="sec_rep_descriptors/vertex_element_dlinear")
Creates 3D cooordinates with bounds xlower and xupper.
static unstructured_block * new_2d_unstructured_base_space(namespace_poset &xns, const std::string &xname, size_type xi_size, size_type xj_size, bool xuse_quads)
Creates a 2D mesh with general connectivity, but arranged in an xi_size by xj_size rectangular array ...
static field_vd * new_scalar_field_3d_points(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, size_type xj_size, size_type xk_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, property_dof_function_type xfcn=0, const poset_path &xproperty_rep_path="sec_rep_descriptors/vertex_vertex_constant")
Creates a scalar field with name xname+"_scalar_property" on a point mesh with coordinates which loca...
virtual void put_name(const std::string &xname, bool xunique, bool xauto_access)
Make xname a name for this; if xunique, make xname the only name.
void(* property_dof_function_type)(block< sec_vd_value_type > &xglobal_coords, block< sec_vd_dof_type > &xproperty_dofs)
The type of the function for computing the property dofs at given global coordinates.
static field_vd * new_scalar_field_2d_unstructured(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, size_type xj_size, bool xuse_quads, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, property_dof_function_type xfcn=0, const poset_path &xproperty_rep_path="sec_rep_descriptors/vertex_element_dlinear")
Creates a scalar field with name xname+"_scalar_property" on a 2D mesh with general connectivity...
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
static sec_e3 * new_3d_uniform_coordinates(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, size_type xj_size, size_type xk_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, structured_block_3d &xbase_space)
Creates 3D uniform coordinates with bounds xlower and xupper.
void delete_poset(pod_index_type xhub_id, bool xauto_access)
Delete the poset with hub id xhub_id.
A section of a fiber bundle with a 3-dimensional Euclidean vector space fiber.
base_space_member & base_space() const
The base space of this field.
static sec_at0 * new_property(fiber_bundles_namespace &xns, const std::string &xname, base_space_member &xbase_space, const poset_path &xrep_path)
Creates a property section with values given by xfcn. If xfcn == 0, then field_vd::property_value_fun...
bool contains_poset(pod_index_type xhub_id, bool xauto_access=true) const
True if this contains a poset with hub id xhub_id..
A homogeneous collection of connected hexahedra arranged in an i_size() x j_size() x k_size() array...
virtual void end_jim_edit_mode(bool xensure_lattice_invariant=true, bool xauto_access=true)
prevent editing of jims and jim order relation
Iterates over the subset of Zn defined by the characteristic function host().
void detach_from_state()
Detaches field from state it is currently attached to.
const bool LOWER
Selector for lower cover.
virtual void detach_from_state()
Detach this handle from its state, if any.
void put_property_dofs(property_dof_function_type xproperty_dofs_fcn, bool xauto_access)
Sets the dofs of property() to values computed by xproperty_dofs_fcn.
virtual void get_read_write_access(bool xrelease_read_only_access=false)
Get read write access to the state associated with this. If release_read_only_access is requested...
static void delete_field_spaces(field_vd *xfield, bool xdelete_coord_fiber, bool xdelete_prop_fiber)
Deletes field xfield and all associated section spaces, section schema spaces, and base space...
bool state_is_not_read_accessible() const
True if this is attached and if the coordinates and property are not accessible for read or access co...
void put_fiber(pod_index_type xdisc_id, const vd_lite &xfiber)
Sets the fiber referred to by discretization id xdisc_id to xfiber.
static void zero(block< sec_vd_value_type > &xglobal_coords, block< sec_vd_dof_type > &xproperty_dofs)
Property dof function with value 0.0.
static field_vd * new_scalar_field_2d_points(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, size_type xj_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, property_dof_function_type xfcn=0, const poset_path &xproperty_rep_path="sec_rep_descriptors/vertex_vertex_constant")
Creates a scalar field with name xname+"_scalar_property" on a point mesh with coordinates which loca...
int_type pod_index_type
The plain old data index type.
A section of a fiber bundle with a 1-dimensional Euclidean vector space fiber.
virtual scoped_index member_index_ub() const
The upper bound on the member_index;.
static void linear_scalar_fcn(block< sec_vd_value_type > &xglobal_coords, block< sec_vd_dof_type > &xproperty_dofs)
Scalar property dof function, linear so it can be fit exactly by both linear and multilinear elements...
static void put_3d_uniform_coord_dofs(const block< sec_vd_dof_type > &xlower, const block< sec_vd_dof_type > &xupper, sec_ed *xcoords)
Sets the dofs for 3D uniform coordinate section xcoords to the bounds specified by xlower and xupper...
static void put_uniform_coord_dofs(int xdc, const block< sec_vd_dof_type > &xlower, const block< sec_vd_dof_type > &xupper, sec_ed *xcoords)
Sets the dofs for dimension xdc uniform coordinate section xcoords to the bounds specified by xlower ...
sec_ed_invertible & coordinates() const
The independent variable of this field.
virtual void delete_member(pod_index_type xmbr_hub_id)
Delete the member with hub id xmbr_hub_id. Warning: this routine does not delete links; it will leave...
index_iterator member_iterator() const
double sec_vd_dof_type
The type of degree of freedom in the section space.
static property_dof_function_type property_dof_function(const std::string &xname)
The property dof function with name xname. Intended to enable passing property_dof_function pointers ...
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
static structured_block_3d * new_3d_structured_base_space(namespace_poset &xns, const std::string &xname, size_type xi_size, size_type xj_size, size_type xk_size)
Creates a 3D structured mesh with xi_size by xj_size by xk_size.
vd_value_type sec_vd_value_type
The type of component in the value of a section at a point.
Antisymetric tensor of degree 0. As the degree is 0 there is nothing to be symmetric or antisymmetric...
bool state_is_not_read_accessible() const
True if this is attached and if the state is accessible for read or if access control is disabled...
static sec_e1 * new_1d_unstructured_coordinates(fiber_bundles_namespace &xns, const std::string &xname, size_type xi_size, block< sec_vd_value_type > &xlower, block< sec_vd_value_type > &xupper, unstructured_block &xbase_space, const poset_path &xrep_path="sec_rep_descriptors/vertex_element_dlinear")
Creates 1D cooordinates with bounds xlower and xupper.
virtual void begin_jim_edit_mode(bool xauto_access=true)
Allow editing of jims and jim order relation.
static unstructured_block * new_3d_unstructured_base_space(namespace_poset &xns, const std::string &xname, size_type xi_size, size_type xj_size, size_type xk_size, bool xuse_hexs)
Creates a 3D mesh with general connectivity, but arranged in an xi_size by xj_size by xk_size cubic a...
const int PREREQ_IDS_UB
Number of prerequisites ids. Must be consistent with PREREQ_ID_*_INDEX below.
virtual const scoped_index & member_id(bool xauto_access) const
An id in the member hub id space; intended for copying to initialize ids to the member id space...
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
A section of a fiber bundle with a 2-dimensional Euclidean vector space fiber.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...