100 this->files_.outputMeshFile);
104 objrocPck->applyFilter(this->opts_.upperThreshold.value_or(0.),
112 objrocPck->assignRefinement(this->opts_.refineLevel.value());
117 objrocPck->shrinkVolumes(this->opts_.scaleValue.value());
120 objrocPck->setMeshSize(this->opts_.meshSize.value());
127 if (periodic3D.customDomain && periodic3D.setPeriodicGeo) {
129 <<
"WARNING!! -> Cannot make geometry periodic using custom bounds." 130 <<
" using remove geometries on boundary option instead for meshing!" 133 objrocPck->translateAll(periodic3D.transferMesh[0],
134 periodic3D.transferMesh[1],
135 periodic3D.transferMesh[2]);
137 objrocPck->setElementOrder(periodic3D.elemOrder);
139 if (periodic3D.createCohesive) {
140 objrocPck->sanityCheckOn();
141 objrocPck->enableCohesiveElements();
144 switch (periodic3D.physGrpOptions) {
147 case PhysGrpOpts::PER_SHAPE:
148 objrocPck->enablePhysicalGroupsPerShape();
153 if (periodic3D.enablePatches) objrocPck->enableSurfacePatches();
155 if (periodic3D.setPeriodicGeo) objrocPck->setPeriodicGeometry();
157 if (periodic3D.customDomain) {
158 const auto &customDomain = periodic3D.customDomain.value();
159 objrocPck->setCustomDomain(
160 {customDomain.initial[0], customDomain.initial[1],
161 customDomain.initial[2], customDomain.length[0],
162 customDomain.length[1], customDomain.length[2]});
163 objrocPck->removeBoundaryVolumes();
164 objrocPck->setPeriodicMesh();
165 objrocPck->rocPack2Periodic3D();
167 objrocPck->setPeriodicGeometry();
168 objrocPck->setPeriodicMesh();
169 objrocPck->rocPack2Periodic3D();
173 objrocPck->rocPack2Surf();
176 if (objrocPck)
delete objrocPck;
bool enableDefaultOut
Enable default output formats.
jsoncons::optional< Periodic3DOpts > periodic3DOpts
If periodic3D has value, then options for the 3D mesh.
This class converts Rockpack output file into periodic geometry and writes into STL, VTK, .MSH, and ExodusII file format.
jsoncons::optional< double > upperThreshold
Upper threshold for filtering (w.r.t mean)
jsoncons::optional< int > refineLevel
Refinement applied to original mesh.
int meshAlgorithm
Meshing algorithm of choice.
jsoncons::optional< double > scaleValue
Value of scaling between 0 to 1 with 1 being no scaling.
jsoncons::optional< double > lowerThreshold
Lower threshold for filtering (w.r.t mean)
jsoncons::optional< double > meshSize
Mesh size.
bool preserveSize
Boolean for preserving pack sizes instead of packing fraction.
bool removeBoundaryPacks
Boolean for removal of volumes intersecting boundary.