 |
| v0.10.0
|
Go to the documentation of this file.
17 #ifndef __CUTMESHINTERFACE_HPP__
18 #define __CUTMESHINTERFACE_HPP__
53 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD,
"cut_",
"MOFEM Cut mesh options",
56 CHKERR PetscOptionsInt(
"-linesearch_steps",
57 "number of bisection steps which line search do to "
58 "find optimal merged nodes position",
61 CHKERR PetscOptionsInt(
"-max_merging_cycles",
62 "number of maximal merging cycles",
"",
65 CHKERR PetscOptionsScalar(
"-project_entities_quality_trashold",
66 "project entities quality trashold",
"",
70 ierr = PetscOptionsEnd();
90 double *shift = NULL,
double *origin = NULL,
92 const std::string save_mesh =
"");
129 const double rel_tol,
130 const double abs_tol, Tag th =
nullptr,
131 const bool debug =
false);
134 const Range fixed_edges,
135 const double rel_tol,
const double abs_tol,
136 Tag th =
nullptr,
const bool debug =
false);
159 const double tol_geometry,
const double tol_cut_close,
160 Range *fixed_edges = NULL, Range *corner_nodes = NULL,
161 const bool update_meshsets =
false,
162 const bool debug =
false);
177 const double tol_trim_close,
178 Range *fixed_edges = NULL, Range *corner_nodes = NULL,
179 const bool update_meshsets =
false,
180 const bool debug =
false);
197 cutAndTrim(
int &first_bit, Tag th,
const double tol_geometry,
198 const double tol_cut_close,
const double tol_trim_close,
199 Range *fixed_edges = NULL, Range *corner_nodes = NULL,
200 const bool update_meshsets =
false,
const bool debug =
false);
221 Tag th,
const double tol_geometry,
222 const double tol_cut_close,
223 const double tol_trim_close,
224 Range &fixed_edges, Range &corner_nodes,
225 const bool update_meshsets =
false,
226 const bool debug =
false);
245 const bool debug =
false);
258 const bool debug =
false);
272 const bool remove_adj_prims_edges,
274 const std::string edges_file_name =
string());
285 const bool debug =
false);
303 const int front_levels,
304 Range *fixed_edges =
nullptr,
int verb =
QUIET,
305 const bool debug =
false);
316 const bool debug =
false);
330 const double geometry_tol = 0,
331 const double close_tol = 0,
332 const int verb =
QUIET,
333 const bool debug =
false);
346 Range &cut_surf, Range &cut_verts,
347 const bool debug =
false);
367 const double tol = 1e-4,
368 const bool debug =
false);
376 const bool debug =
false);
393 const double tol = 1e-4, Tag th = NULL,
394 const bool debug =
false);
420 const Range &ents, Tag th = NULL);
443 const Range &surface,
const Range &fixed_edges,
444 const Range &corner_nodes, Range &merged_nodes,
445 Range &out_tets, Range &new_surf, Tag th,
446 const bool update_meshsets =
false,
448 const bool debug =
false);
460 const Range &surface,
const Range &fixed_edges,
461 const Range &corner_nodes, Tag th = NULL,
462 const bool update_meshsets =
false,
const bool debug =
false);
518 CHKERR moab.create_meshset(MESHSET_SET, meshset);
520 CHKERR moab.write_file(name.c_str(),
"VTK",
"", &meshset, 1);
535 typedef multi_index_container<
540 member<LengthMapData, double, &LengthMapData::lEngth>>,
543 member<LengthMapData, EntityHandle, &LengthMapData::eDge>>,
546 member<LengthMapData, double, &LengthMapData::qUality>>
595 #endif //__CUTMESHINTERFACE_HPP__
static const MOFEMuuid IDD_MOFEMCutMesh
MoFEMErrorCode moveMidNodesOnTrimmedEdges(Tag th=NULL)
move trimmed edges mid nodes
boost::shared_ptr< OrientedBoxTreeTool > & getTreeSurfPtr()
multi_index_container< LengthMapData, indexed_by< ordered_non_unique< member< LengthMapData, double, &LengthMapData::lEngth > >, hashed_unique< member< LengthMapData, EntityHandle, &LengthMapData::eDge > >, ordered_non_unique< member< LengthMapData, double, &LengthMapData::qUality > > > > LengthMapData_multi_index
MoFEMErrorCode setCoords(Tag th, const BitRefLevel bit=BitRefLevel(), const BitRefLevel mask=BitRefLevel().set())
set coords from tag
const Range & getSurface() const
MoFEMErrorCode copySurface(const Range surface, Tag th=NULL, double *shift=NULL, double *origin=NULL, double *transform=NULL, const std::string save_mesh="")
copy surface entities
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
const Range & getNewCutSurfaces() const
const Range & getMergedVolumes() const
MoFEMErrorCode snapSurfaceToEdges(const Range surface_edges, const Range fixed_edges, const double rel_tol, const double abs_tol, Tag th=nullptr, const bool debug=false)
MoFEMErrorCode trimSurface(Range *fixed_edge, Range *corner_nodes, const double tol=1e-4, Tag th=NULL, const bool debug=false)
Trim surface from faces beyond front.
MoFEMErrorCode saveCutEdges(const std::string prefix="")
MoFEMErrorCode findLevelSetVolumes(Tag th, Range &vol_edges, const bool remove_adj_prims_edges, int verb=QUIET, const bool debug=false, const std::string edges_file_name=string())
Find level set volumes.
map< EntityHandle, TreeData > verticesOnTrimEdges
SaveData(moab::Interface &moab)
MoFEMErrorCode cutOnly(Range vol, const BitRefLevel cut_bit, Tag th, const double tol_geometry, const double tol_cut_close, Range *fixed_edges=NULL, Range *corner_nodes=NULL, const bool update_meshsets=false, const bool debug=false)
Cut mesh only.
MoFEMErrorCode moveMidNodesOnCutEdges(Tag th=NULL)
projecting of mid edge nodes on new mesh on surface
const Range & getNewTrimVolumes() const
MoFEMErrorCode clearMap()
DeprecatedCoreInterface Interface
MoFEMErrorCode makeFront(const bool debug=false)
Create front from the surface.
MoFEMErrorCode findEdgesToTrim(Range *fixed_edges, Range *corner_nodes, Tag th=NULL, const double tol=1e-4, const bool debug=false)
Find edges to trimEdges.
const Range & getNewTrimVertices() const
const Range & getTrimEdges() const
MoFEMErrorCode splitSides(const BitRefLevel split_bit, const BitRefLevel bit, const Range &ents, Tag th=NULL)
split sides
MoFEMErrorCode cutTrimAndMerge(int &first_bit, const int fraction_level, Tag th, const double tol_geometry, const double tol_cut_close, const double tol_trim_close, Range &fixed_edges, Range &corner_nodes, const bool update_meshsets=false, const bool debug=false)
Cut, trim and merge.
MoFEMErrorCode getOptions()
Get options from command line.
#define CHKERR
Inline error check.
MoFEMErrorCode createFrontLevelSets(Range vol, Tag th=nullptr, int verb=QUIET, const bool debug=false)
Calculate distance from mesh nodes to surface front.
MoFEMErrorCode saveTrimEdges()
const Range & getNewTrimSurfaces() const
MoFEMErrorCode removePathologicalFrontTris(const BitRefLevel split_bit, Range &ents)
Remove pathological elements on surface internal front.
std::bitset< BITINTERFACEUID_SIZE > BitIntefaceId
const Range & getCutFrontVolumes() const
MoFEMErrorCode getSubInterfaceOptions()
MoFEM interface unique ID.
LengthMapData(const double l, double q, const EntityHandle e)
MoFEMErrorCode cutAndTrim(int &first_bit, Tag th, const double tol_geometry, const double tol_cut_close, const double tol_trim_close, Range *fixed_edges=NULL, Range *corner_nodes=NULL, const bool update_meshsets=false, const bool debug=false)
Cut and trim.
MoFEMErrorCode query_interface(const MOFEMuuid &uuid, UnknownInterface **iface) const
implementation of Data Operators for Forces and Sources
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
MoFEMErrorCode findEdgesToCut(Range vol, int verb=QUIET, const bool debug=false)
find edges to cut
const Range & getVolume() const
MoFEMErrorCode trimEdgesInTheMiddle(const BitRefLevel bit, const bool debug=false)
trim edges
CutMeshInterface(const MoFEM::Core &core)
const Range & getNewCutVertices() const
MoFEMErrorCode snapSurfaceSkinToEdges(const Range fixed_edges, const double rel_tol, const double abs_tol, Tag th=nullptr, const bool debug=false)
const Range & getNewCutVolumes() const
double projectEntitiesQualityTrashold
MoFEMErrorCode mergeVolumes(const Range volume)
merge volume entities
MoFEMErrorCode setFront(const Range surface)
boost::shared_ptr< OrientedBoxTreeTool > treeSurfPtr
MoFEMErrorCode refineMesh(const int init_bit_level, const int surf_levels, const int front_levels, Range *fixed_edges=nullptr, int verb=QUIET, const bool debug=false)
Refine and set level sets.
map< EntityHandle, TreeData > edgesToTrim
MoFEMErrorCode setSurface(const Range surface)
set surface entities
const Range & getMergedSurfaces() const
MoFEMErrorCode cutEdgesInMiddle(const BitRefLevel bit, Range &cut_vols, Range &cut_surf, Range &cut_verts, const bool debug=false)
cut edges
MoFEMErrorCode setVolume(const Range volume)
set volume entities
double aveLength
Average edge length.
MoFEMErrorCode trimOnly(const BitRefLevel trim_bit, Tag th, const double tol_trim_close, Range *fixed_edges=NULL, Range *corner_nodes=NULL, const bool update_meshsets=false, const bool debug=false)
Trim mesh only.
VectorBoundedArray< double, 3 > VectorDouble3
map< EntityHandle, TreeData > edgesToCut
const Range & getCutEdges() const
MoFEMErrorCode createSurfaceLevelSets(int verb=QUIET, const bool debug=false)
Calculate distance from mesh nodes to cut surface.
MoFEMErrorCode mergeBadEdges(const int fraction_level, const Range &tets, const Range &surface, const Range &fixed_edges, const Range &corner_nodes, Range &merged_nodes, Range &out_tets, Range &new_surf, Tag th, const bool update_meshsets=false, const BitRefLevel *bit_ptr=NULL, const bool debug=false)
Merge edges.
const Range & getCutSurfaceVolumes() const
Tensor2_Expr< transform_Tensor2< A, B, T, Dim0, Dim1, i, j >, T, Dim0, Dim1, i, j > transform(const Tensor2_Expr< A, T, Dim0, Dim1, i, j > &a, B function)
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
MoFEMErrorCode setTagData(Tag th, const BitRefLevel bit=BitRefLevel())
set coords to tag
const Range & projectZeroDistanceEnts() const
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
MoFEMErrorCode mergeSurface(const Range surface)
merge surface entities
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
FTensor::Index< 'l', 3 > l
MoFEMErrorCode operator()(const std::string name, const Range &ents)
MoFEMErrorCode buildTree()
build tree
map< EntityHandle, TreeData > verticesOnCutEdges
base class for all interface classes
MoFEMErrorCode setConstrainSurface(const Range surf)
Set the constrain surface object.
const Range & getFront() const
double maxLength
Maximal edge length.