public class FemFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FemFactory.FemElementType |
static class |
FemFactory.FemShapingType |
Constructor and Description |
---|
FemFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
addFem(FemModel3d fem0,
FemModel3d fem1)
Adds a copy of the nodes, elements, markers and attachments from
fem1 to fem0 . |
static void |
addFem(FemModel3d fem0,
FemModel3d fem1,
double nodeMergeDist)
Adds a copy of the nodes, elements, markers and attachments from
fem1 to fem0 . |
static FemModel3d |
createCylinder(FemModel3d model,
double l,
double r,
int nt,
int nl,
int nr)
Creates a cylinder made of mostly hex elements, with wedges in the centre
column.
|
static FemModel3d |
createEllipsoid(FemModel3d model,
double rl,
double rs1,
double rs2,
int nt,
int nl,
int ns)
Creates an ellipsoidal model using a combination of hex, wedge, and tet
elements.
|
static FemModel3d |
createExtrusion(FemModel3d model,
FemFactory.FemElementType type,
int n,
double d,
double zOffset,
PolygonalMesh surface)
Creates a shell-based FEM model by extruding a surface mesh along the
normal direction of its faces.
|
static FemModel3d |
createExtrusion(FemModel3d model,
int n,
double d,
double zOffset,
PolygonalMesh surface)
Creates a shell-based FEM model by extruding a surface mesh along the
normal direction of its faces.
|
static void |
createFromElementList(FemModel3d out,
java.util.Collection<FemElement3d> elemList)
Creates a new model by duplicating nodes and elements
|
static FemModel3d |
createFromMesh(FemModel3d model,
PolygonalMesh surface,
double quality)
Creates a tetrahedral FEM model from a triangular surface mesh.
|
static FemModel3d |
createFromMeshAndPoints(FemModel3d model,
PolygonalMesh surface,
double quality,
Point3d[] pnts)
Constrained Delaunay, including the supplied list of points if they fall
inside the surface
|
static FemModel3d |
createGrid(FemModel3d model,
FemFactory.FemElementType type,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ)
Creates a regular grid, composed of elements of the type specified by
type , centered on the origin, with specified widths and grid
resolutions along each axis. |
static FemModel3d |
createHexExtrusion(FemModel3d model,
int n,
double d,
double zOffset,
PolygonalMesh surface)
Creates a shell-based FEM model made of hex elements by extruding a
surface mesh along the normal direction of its faces.
|
static FemModel3d |
createHexGrid(FemModel3d model,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ)
Creates a regular grid composed of hex elements.
|
static FemModel3d |
createHexTorus(FemModel3d model,
double R,
double rin,
double rout,
int nt,
int nl,
int nr)
Creates a hollow torus made of hex elements.
|
static FemModel3d |
createHexTube(FemModel3d model,
double l,
double rin,
double rout,
int nt,
int nl,
int nr)
Creates a tube made of hex elements.
|
static FemModel3d |
createHexWedgeCylinder(FemModel3d model,
double l,
double r,
int nt,
int nl,
int nr)
Creates a cylinder made of mostly hex elements, with wedges in the centre
column.
|
static FemModel3d |
createHexWedgeExtrusion(FemModel3d model,
int n,
double d,
double zOffset,
PolygonalMesh surface,
FemModel3d surfaceFem)
Creates a shell-based FEM model by extruding a surface mesh along the
normal direction of its faces.
|
static FemModel3d |
createIcosahedralSphere(FemModel3d model,
double r,
int ndivisions,
double quality)
Creates a tet-based spherical model based on a icosahedron.
|
static FemModel3d |
createPartialCylinder(FemModel3d model,
double l,
double r,
double theta,
int nl,
int nr,
int ntheta)
Creates a partial cylinder made of mostly hex elements, with wedges in
the centre column
|
static FemModel3d |
createPartialHexTube(FemModel3d model,
double l,
double rin,
double rout,
double theta,
int nl,
int nr,
int ntheta)
Creates a partial tube made of hex elements.
|
static FemModel3d |
createPartialHexWedgeCylinder(FemModel3d model,
double l,
double r,
double theta,
int nl,
int nr,
int ntheta) |
static FemModel3d |
createPartialTetTube(FemModel3d model,
double l,
double rin,
double rout,
double theta,
int nl,
int nr,
int ntheta)
Creates a partial tube made of tet elements.
|
static FemModel3d |
createPartialTube(FemModel3d model,
FemFactory.FemElementType type,
double l,
double rin,
double rout,
double theta,
int nl,
int nr,
int ntheta)
Creates a partial tube made of either tet or hex elements, as specified by
type . |
static FemModel3d |
createPyramidGrid(FemModel3d model,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ)
Creates a regular grid composed of pyramid elements.
|
static FemModel3d |
createQuadhexExtrusion(FemModel3d model,
int n,
double d,
double zOffset,
PolygonalMesh surface)
Creates a shell-based FEM model made of quadratic hex elements by
extruding a surface mesh along the normal direction of its faces.
|
static FemModel3d |
createQuadhexGrid(FemModel3d model,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ)
Creates a regular grid composed of quadratic hex elements.
|
static FemModel3d |
createQuadhexTorus(FemModel3d model,
double R,
double rin,
double rout,
int nt,
int nl,
int nr)
Creates a hollow torus made of quadratic hex elements.
|
static FemModel3d |
createQuadhexTube(FemModel3d model,
double l,
double rin,
double rout,
int nt,
int nl,
int nr)
Creates a tube made of quadratic hex elements.
|
static FemModel3d |
createQuadpyramidGrid(FemModel3d model,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ)
Creates a regular grid composed of quadratic pyramid elements.
|
static FemModel3d |
createQuadraticModel(FemModel3d quadMod,
FemModel3d linMod)
Takes a FemModel3d containing linear elements, and creates a quadratic
model whose elements are the corresponding quadratic elements, with new
nodes inserted along the edges as required.
|
static FemModel3d |
createQuadtetExtrusion(FemModel3d model,
int n,
double d,
double zOffset,
PolygonalMesh surface)
Creates a shell-based FEM model made of quadratic tet elements by
extruding a surface mesh along the normal direction of its faces.
|
static FemModel3d |
createQuadtetGrid(FemModel3d model,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ)
Creates a regular grid composed of quadratic tet elements.
|
static FemModel3d |
createQuadtetTorus(FemModel3d model,
double R,
double rin,
double rout,
int nt,
int nl,
int nr)
Creates a hollow torus made of quadratic tet elements.
|
static FemModel3d |
createQuadtetTube(FemModel3d model,
double l,
double rin,
double rout,
int nt,
int nl,
int nr)
Creates a tube made of quadratic tet elements.
|
static FemModel3d |
createQuadwedgeExtrusion(FemModel3d model,
int n,
double d,
double zOffset,
PolygonalMesh surface)
Creates a shell-based FEM model made of quadratic wedge elements by
extruding a surface mesh along the normal direction of its faces.
|
static FemModel3d |
createQuadwedgeGrid(FemModel3d model,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ)
Creates a regular grid composed of quadratic wedge elements.
|
static FemModel3d |
createSphere(FemModel3d model,
double r,
int nt,
int nl,
int ns)
Convenience method to create a symmetric hex/wedge dominant sphere
using
createEllipsoid(artisynth.core.femmodels.FemModel3d, double, double, double, int, int, int) . |
static FemModel3d |
createTetExtrusion(FemModel3d model,
int n,
double d,
double zOffset,
PolygonalMesh surface)
Creates a shell-based FEM model made of tet elements by
extruding a surface mesh along the normal direction of its faces.
|
static FemModel3d |
createTetGrid(FemModel3d model,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ)
Creates a regular grid composed of tet elements.
|
static FemModel3d |
createTetTorus(FemModel3d model,
double R,
double rin,
double rout,
int nt,
int nl,
int nr)
Creates a hollow torus made of tet elements.
|
static FemModel3d |
createTetTube(FemModel3d model,
double l,
double rin,
double rout,
int nt,
int nl,
int nr)
Creates a tube made of tet elements.
|
static FemModel3d |
createTorus(FemModel3d model,
FemFactory.FemElementType type,
double R,
double rin,
double rout,
int nt,
int nl,
int nr)
Creates a hollow torus made of either tet, hex, quadTet, or quadHex
elements, as specified by
type . |
static FemModel3d |
createTube(FemModel3d model,
FemFactory.FemElementType type,
double l,
double rin,
double rout,
int nt,
int nl,
int nr)
Creates a tube made of either tet, hex, quadTet, or quadHex elements, as
specified by
type . |
static FemModel3d |
createWedgeExtrusion(FemModel3d model,
int n,
double d,
double zOffset,
PolygonalMesh surface)
Creates a shell-based FEM model made of wedge elements by extruding a
surface mesh along the normal direction of its faces.
|
static FemModel3d |
createWedgeGrid(FemModel3d model,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ)
Creates a regular grid composed of wedge elements.
|
static FemModel3d |
mergeCollapsedNodes(FemModel3d model,
FemModel3d orig,
double epsilon) |
static FemModel3d |
refineFem(FemModel3d model,
FemModel3d input,
double quality)
Creates a refined version of a an existing tetrahedral FEM model using
tetgen.
|
static FemModel3d |
refineFem(FemModel3d model,
FemModel3d input,
double quality,
Point3d[] pnts)
Creates a refined version of a an existing tetrahedral FEM model using
tetgen and a list of supplemental node locations.
|
static void |
setPlanarNodesFixed(FemModel fem,
Point3d center,
Vector3d normal,
boolean fixed) |
static FemModel3d |
subdivideFem(FemModel3d femr,
FemModel3d fem0)
Creates a subdvided FEM model by subdividing all the elements of an
existing model into eight sub-elements, adding additional nodes as
required.
|
static FemModel3d |
subdivideFem(FemModel3d femr,
FemModel3d fem0,
boolean addMarkers) |
public static FemModel3d createTetGrid(FemModel3d model, double widthX, double widthY, double widthZ, int numX, int numY, int numZ)
createGrid(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.Tet
.public static FemModel3d createPyramidGrid(FemModel3d model, double widthX, double widthY, double widthZ, int numX, int numY, int numZ)
createGrid(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.Pyramid
.public static FemModel3d createHexGrid(FemModel3d model, double widthX, double widthY, double widthZ, int numX, int numY, int numZ)
createGrid(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.Hex
.public static FemModel3d createWedgeGrid(FemModel3d model, double widthX, double widthY, double widthZ, int numX, int numY, int numZ)
createGrid(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.Wedge
.public static FemModel3d mergeCollapsedNodes(FemModel3d model, FemModel3d orig, double epsilon)
public static FemModel3d createIcosahedralSphere(FemModel3d model, double r, int ndivisions, double quality)
model
- empty FEM model to which elements are added; if
null
then a new model is allocatedr
- radiusndivisions
- number of divisions used in creating the surface mesh.
Typical values are 1 or 2.quality
- quality parameter passed to tetgen. See
createFromMesh(artisynth.core.femmodels.FemModel3d, maspack.geometry.PolygonalMesh, double)
for a full description.model
if
model
is not null
).public static FemModel3d createSphere(FemModel3d model, double r, int nt, int nl, int ns)
createEllipsoid(artisynth.core.femmodels.FemModel3d, double, double, double, int, int, int)
.model
- empty FEM model to which elements are added; if
null
then a new model is allocatedr
- radiusnt
- number of nodes in each ring parallel to the equatornl
- number of nodes in each quarter ring perpendicular to the
equator (including end nodes)ns
- number of nodes in each radial line extending out from
the polar axis (including end nodes)model
if
model
is not null
).public static FemModel3d createEllipsoid(FemModel3d model, double rl, double rs1, double rs2, int nt, int nl, int ns)
rl
should be the longest
radius, and corresponds to the polar axis.model
- empty FEM model to which elements are added; if
null
then a new model is allocatedrl
- longest radius (also the polar radius)rs1
- first radius perpendicular to the polar axisrs2
- second radius perpendicular to the polar axisnt
- number of nodes in each ring parallel to the equatornl
- number of nodes in each quarter ring perpendicular to the
equator (including end nodes)ns
- number of nodes in each radial line extending out from
the polar axis (including end nodes)model
if
model
is not null
).public static FemModel3d createCylinder(FemModel3d model, double l, double r, int nt, int nl, int nr)
model
- model to which the elements should be added, or
null
if the model is to be created from scratch.l
- length along the z axisr
- radius in the x-y planent
- element resolution around the center axisnl
- element resolution along the lengthnr
- element resolution along the radiuspublic static FemModel3d createHexWedgeCylinder(FemModel3d model, double l, double r, int nt, int nl, int nr)
createCylinder(FemModel3d,double,double,int,int,int)
.public static FemModel3d createPartialCylinder(FemModel3d model, double l, double r, double theta, int nl, int nr, int ntheta)
model
- model to which the elements should be added, or
null
if the model is to be created from scratch.l
- length along the z axisr
- radius in the x-y planetheta
- size of the slice, in radiansnl
- element resolution along the lengthnr
- element resolution along the radiusntheta
- element resolution around the slicepublic static FemModel3d createPartialHexWedgeCylinder(FemModel3d model, double l, double r, double theta, int nl, int nr, int ntheta)
public static FemModel3d createHexTube(FemModel3d model, double l, double rin, double rout, int nt, int nl, int nr)
createTube(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.Hex
.public static FemModel3d createTetTube(FemModel3d model, double l, double rin, double rout, int nt, int nl, int nr)
createTube(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.Tet
.public static FemModel3d createPartialHexTube(FemModel3d model, double l, double rin, double rout, double theta, int nl, int nr, int ntheta)
createPartialTube(FemModel3d,FemElementType,double,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.Hex
.public static FemModel3d createPartialTetTube(FemModel3d model, double l, double rin, double rout, double theta, int nl, int nr, int ntheta)
createPartialTube(FemModel3d,FemElementType,double,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.Tet
.public static FemModel3d createHexTorus(FemModel3d model, double R, double rin, double rout, int nt, int nl, int nr)
createTorus(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.Hex
.public static FemModel3d createTetTorus(FemModel3d model, double R, double rin, double rout, int nt, int nl, int nr)
createTorus(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.Tet
.public static FemModel3d createQuadraticModel(FemModel3d quadMod, FemModel3d linMod)
linMod
- A FemModel3d previously inialized with only linear elements.public static FemModel3d createQuadtetGrid(FemModel3d model, double widthX, double widthY, double widthZ, int numX, int numY, int numZ)
createGrid(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.QuadTet
.public static FemModel3d createQuadtetTube(FemModel3d model, double l, double rin, double rout, int nt, int nl, int nr)
createTube(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.QuadTet
.public static FemModel3d createQuadtetTorus(FemModel3d model, double R, double rin, double rout, int nt, int nl, int nr)
createTorus(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.QuadTet
.public static FemModel3d createQuadtetExtrusion(FemModel3d model, int n, double d, double zOffset, PolygonalMesh surface)
createExtrusion(FemModel3d,FemElementType,int,double,double,PolygonalMesh)
with the element type set to FemFactory.FemElementType.QuadTet
.public static FemModel3d createQuadhexGrid(FemModel3d model, double widthX, double widthY, double widthZ, int numX, int numY, int numZ)
createGrid(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.QuadHex
.public static FemModel3d createQuadwedgeGrid(FemModel3d model, double widthX, double widthY, double widthZ, int numX, int numY, int numZ)
createGrid(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.QuadWedge
.public static FemModel3d createQuadpyramidGrid(FemModel3d model, double widthX, double widthY, double widthZ, int numX, int numY, int numZ)
createGrid(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.QuadPyramid
.public static FemModel3d createQuadhexTube(FemModel3d model, double l, double rin, double rout, int nt, int nl, int nr)
createTube(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.QuadHex
.public static FemModel3d createQuadhexTorus(FemModel3d model, double R, double rin, double rout, int nt, int nl, int nr)
createTorus(FemModel3d,FemElementType,double,double,double,int,int,int)
with the element type set to FemFactory.FemElementType.QuadHex
.public static FemModel3d createQuadhexExtrusion(FemModel3d model, int n, double d, double zOffset, PolygonalMesh surface)
createExtrusion(FemModel3d,FemElementType,int,double,double,PolygonalMesh)
with the element type set to FemFactory.FemElementType.QuadHex
.public static FemModel3d createQuadwedgeExtrusion(FemModel3d model, int n, double d, double zOffset, PolygonalMesh surface)
createExtrusion(FemModel3d,FemElementType,int,double,double,PolygonalMesh)
with the element type set to FemFactory.FemElementType.Wedge
.public static FemModel3d createHexExtrusion(FemModel3d model, int n, double d, double zOffset, PolygonalMesh surface)
createExtrusion(FemModel3d,FemElementType,int,double,double,PolygonalMesh)
with the element type set to FemFactory.FemElementType.Hex
.public static FemModel3d createWedgeExtrusion(FemModel3d model, int n, double d, double zOffset, PolygonalMesh surface)
createExtrusion(FemModel3d,FemElementType,int,double,double,PolygonalMesh)
with the element type set to FemFactory.FemElementType.Wedge
.public static FemModel3d createHexWedgeExtrusion(FemModel3d model, int n, double d, double zOffset, PolygonalMesh surface, FemModel3d surfaceFem)
n
.model
- model to which the elements should be added, or
null
if the model is to be created from scratch. Note that
model
must be different from surfaceFem
n
- number of layersd
- layer thicknesszOffset
- offset from the surfacesurface
- surface mesh to extrudesurfaceFem
- FEM associated with the surface mesh, or
null
if there is no associated FEM.model
if
that argument is not null
.public static FemModel3d createExtrusion(FemModel3d model, int n, double d, double zOffset, PolygonalMesh surface)
n
.model
- model to which the elements should be added, or
null
if the model is to be created from scratch.n
- number of layersd
- layer thicknesszOffset
- offset from the surfacesurface
- surface mesh to extrudemodel
if that
argument is not null
java.lang.IllegalArgumentException
- if the specified element type is not
supported, or if the surface faces are not triangles or quads.public static FemModel3d createTetExtrusion(FemModel3d model, int n, double d, double zOffset, PolygonalMesh surface)
createExtrusion(FemModel3d,FemElementType,int,double,double,PolygonalMesh)
with the element type set to FemFactory.FemElementType.Tet
.public static FemModel3d createGrid(FemModel3d model, FemFactory.FemElementType type, double widthX, double widthY, double widthZ, int numX, int numY, int numZ)
type
, centered on the origin, with specified widths and grid
resolutions along each axis.model
- model to which the hex elements be added, or
null
if the model is to be created from scratch.type
- desired element typewidthX
- x axis model widthwidthY
- y axis model widthwidthZ
- z axis model widthnumX
- element resolution along the x axisnumY
- element resolution along the y axisnumZ
- element resolution along the z axisjava.lang.IllegalArgumentException
- if the specified element type
is not supportedpublic static FemModel3d createTube(FemModel3d model, FemFactory.FemElementType type, double l, double rin, double rout, int nt, int nl, int nr)
type
. Note that the element resolution
nt
around the central axis will be rounded up to
an even number for tet or quadTet models.model
- model to which the elements should be added, or
null
if the model is to be created from scratch.type
- desired element typel
- length along the z axisrin
- inner radiusrout
- outer radiusnt
- element resolution around the central axis (will be
rounded up to an even number for tet or quadTet models)nl
- element resolution along the lengthnr
- element resolution along the thicknessjava.lang.IllegalArgumentException
- if the specified element type
is not supportedpublic static FemModel3d createPartialTube(FemModel3d model, FemFactory.FemElementType type, double l, double rin, double rout, double theta, int nl, int nr, int ntheta)
type
.model
- model to which the elements should be added, or
null
if the model is to be created from scratch.type
- desired element typel
- length along the z axisrin
- inner radiusrout
- outer radiustheta
- size of the partial tube slice, in radiansnl
- element resolution along the lengthnr
- element resolution along the thicknessntheta
- element resolution along the slicejava.lang.IllegalArgumentException
- if the specified element type
is not supportedpublic static FemModel3d createTorus(FemModel3d model, FemFactory.FemElementType type, double R, double rin, double rout, int nt, int nl, int nr)
type
. The result is essentially
a tube, with inner and outer radii given by rin
and rout
, bent around the major radius R and connected.
For tet or quadTet models, the element resolutions nt
and nl
will be rounded up to an even number.model
- model to which the elements should be added, or
null
if the model is to be created from scratch.type
- desired element typeR
- major radiusrin
- inner part of the minor radiusrout
- outer part of the minor radiusnt
- element resolution around the major radius (will be rounded
up to an even number for tet or quadTet models)nl
- element resolution around the minor radius (will be rounded
up to an even number for tet or quadTet models)nr
- element resolution along the inner thicknessjava.lang.IllegalArgumentException
- if the specified element type
is not supportedpublic static FemModel3d createExtrusion(FemModel3d model, FemFactory.FemElementType type, int n, double d, double zOffset, PolygonalMesh surface)
type
. The shell
can have multiple layers; the number of layers is n
.model
- model to which the elements should be added, or
null
if the model is to be created from scratch.type
- desired element typen
- number of layersd
- layer thicknesszOffset
- offset from the surfacesurface
- surface mesh to extrudemodel
if
that argument is not null
java.lang.IllegalArgumentException
- if the specified element type is not
supported, or if the surface faces are incompatible with the element
type.public static FemModel3d createFromMesh(FemModel3d model, PolygonalMesh surface, double quality)
model
), or a newly created FemModel3d
(if model
is null
).
The tessellation is done using tetgen, which is called through a JNI
interface. The tessellation quality is controlled using the
quality
variable, described below.
model
- model to which the tetrahedra should be added, or null
if the
model is to be created from scratch.surface
- triangular surface mesh used to define the tessellation.quality
- If 0, then only the
mesh nodes will be used to form the tessellation. However, this may result
in highly degenerate tetrahedra. Otherwise, if >
0, tetgen will add additional nodes to ensure that the minimum edge-radius
ratio does not exceed quality
. A good default value for
quality
is 2. If set too small (such as less then 1), then
tetgen may not terminate.public static FemModel3d createFromMeshAndPoints(FemModel3d model, PolygonalMesh surface, double quality, Point3d[] pnts)
public static FemModel3d refineFem(FemModel3d model, FemModel3d input, double quality, Point3d[] pnts)
model
- model in which the refined model be built, or
null
if the model is to be created from scratch.input
- original FEM model which is to be refinedquality
- quality factor used by tetgen to refine the modelpnts
- locations of the supplemental nodepublic static FemModel3d refineFem(FemModel3d model, FemModel3d input, double quality)
model
- model in which the refined model be built, or
null
if the model is to be created from scratch.input
- original FEM model which is to be refinedquality
- quality factor used by tetgen to refine the modelpublic static void addFem(FemModel3d fem0, FemModel3d fem1)
fem1
to fem0
. Nodes in fem1 are merged with
nodes in fem0 that are within TOL distance of each other, where TOL is
1e-8 times the maximum radius of fem0 and fem1. For precise control of
node merging, use addFem(FemModel3d,FemModel3d,double)
.fem0
- FEM model to which components should be addedfem1
- FEM model providing componentspublic static void addFem(FemModel3d fem0, FemModel3d fem1, double nodeMergeDist)
fem1
to fem0
.fem0
- FEM model to which components should be addedfem1
- FEM model providing componentsnodeMergeDist
- If >= 0, causes nearby nodes of fem1
and fem0
to
be merged: any node of fem1
that is within
nodeMergeDist
of a node in fem0
is replaced by
the nearest node in fem0
.public static FemModel3d subdivideFem(FemModel3d femr, FemModel3d fem0)
femr
- model in which refined FEM is to be constructed, or null
if
the model is to be created from scratch.fem0
- existing FEM model to be refined.public static FemModel3d subdivideFem(FemModel3d femr, FemModel3d fem0, boolean addMarkers)
public static void createFromElementList(FemModel3d out, java.util.Collection<FemElement3d> elemList)
out
- model to fillelemList
- elements to build model from