OpenFAST
Wind turbine multiphysics simulator
Data Types | Functions/Subroutines | Variables
modmesh_mapping Module Reference

This code implements the spatial mapping algorithms described in the following papers. More...

Data Types

type  maptype
 Type that describes characteristics of the mapping between two meshes. More...
 
type  meshmaplinearizationtype
 data structures (for linearization) containing jacobians of mapping between fields on different meshes More...
 
type  meshmaptype
 data structures to determine full mapping between fields on different meshes More...
 

Functions/Subroutines

subroutine, public meshmapcreate (Src, Dest, MeshMap, ErrStat, ErrMsg)
 This subroutine takes two meshes, determines the sizes required for the mapping data structure, and then allocates the mappings (different for loads and motions/scalars). More...
 
subroutine, public meshmapdestroy (MeshMap, ErrStat, ErrMsg)
 This routine destroys the elements of the MeshMapType.
 
subroutine, public meshmapwrbin (UnIn, Src, Dest, MeshMap, ErrStat, ErrMsg, FileName)
 This creates a matrix to write to a binary file (for debugging) More...
 
subroutine, public transfer_line2_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp)
 Routine for transfering data from Line2 mesh to Point Mesh. More...
 
subroutine, public linearize_line2_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp)
 Routine for computing linearization matrices for data transfer from Line2 mesh to Point Mesh. More...
 
subroutine formmatrix_fulllinearization (dM, M_A, M_SL_fm, M_SL_uSm, M_SL_li, ErrStat, ErrMsg)
 Routine that forms the final linearization matrices for of loads from line2 meshes to either line2 or point matrices. More...
 
subroutine transfer_motions_line2_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg)
 Given a mapping, this routine transfers the motions from nodes on Line2 elements to nodes on another mesh. More...
 
subroutine linearize_motions_line2_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg)
 Given a mapping, this routine transfers the motions from nodes on Line2 elements to nodes on another mesh. More...
 
subroutine createmapping_projecttoline2 (Mesh1, Mesh2, NodeMap, Mesh1_TYPE, ErrStat, ErrMsg)
 This routine projects Mesh1 onto a Line2 mesh (Mesh2) to find the element mappings between the two meshes. More...
 
subroutine create_pointmesh (Src, Temp_Point_Src, ErrStat, ErrMsg)
 This routine creates a new mesh with the same positions as the Src mesh, except all of the elements are points. More...
 
subroutine createloadmap_l2_to_p (Src, Dest, MeshMap, ErrStat, ErrMsg)
 routine that creats a map of line2 loads to points More...
 
subroutine createmotionmap_l2_to_p (Src, Dest, MeshMap, ErrStat, ErrMsg)
 routine that creats a map of line2 motions to points More...
 
subroutine, public transfer_point_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp)
 Routine that transfers data from a point mesh to a line2 mesh. More...
 
subroutine, public linearize_point_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp)
 Routine that creates linearization matricies for data tranfer from a point mesh to a line2 mesh. More...
 
subroutine createloadmap_p_to_l2 (Src, Dest, MeshMap, ErrStat, ErrMsg)
 
subroutine createmotionmap_p_to_l2 (Src, Dest, MeshMap, ErrStat, ErrMsg)
 
subroutine, public transfer_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp)
 Given two point meshes, this routine transfers the source mesh values to the destination mesh using appropriate math. More...
 
subroutine createmapping_nearestneighbor (Mesh1, Mesh2, NodeMap, Mesh1_TYPE, Mesh2_TYPE, ErrStat, ErrMsg)
 This routine creates the node-to-node (nearest neighbor). More...
 
subroutine transfer_motions_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg)
 Given a nearest-neighbor mapping, this routine transfers motions between nodes on the mesh. More...
 
subroutine linearize_motions_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg)
 Given a nearest-neighbor mapping, this routine forms the linearization matrices of motion transfer between nodes on the mesh. More...
 
subroutine transfer_loads_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp, LoadsScaleFactor)
 Given a nearest-neighbor mapping, this routine transfers loads between point nodes on the meshes. More...
 
subroutine linearize_loads_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp)
 Given a nearest-neighbor mapping, this routine generates the linearization matrices for loads transfer between point nodes on the meshes. More...
 
real(reki) function getloadsscalefactor (Src)
 
subroutine createloadmap_p_to_p (Src, Dest, MeshMap, ErrStat, ErrMsg)
 
subroutine createmotionmap_p_to_p (Src, Dest, MeshMap, ErrStat, ErrMsg)
 
subroutine, public transfer_line2_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp)
 Routine that transfers data from a line2 mesh to another line2 mesh. More...
 
subroutine, public linearize_line2_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp)
 Routine that computes the linearization matrices for data transfers from a mesh to a line2 mesh. More...
 
subroutine transfer_loads_point_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp, LoadsScaleFactor)
 Given a mapping, this routine transfers the loads from nodes on a point-element mesh to nodes on another Line2 mesh. More...
 
subroutine linearize_loads_point_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp)
 Given a mapping, this routine contains the linearization matrices of the load transfers from nodes on a point-element mesh to nodes on another Line2 mesh. More...
 
subroutine convert_point_to_line2_loads (Dest, MeshMap, ErrStat, ErrMsg, DestDisp)
 This routine takes the lumped loads on nodes of a (line2) mesh and converts them to loads distributed across the line2 elements. More...
 
subroutine linearize_convert_point_to_line2_loads (Dest, MeshMap, ErrStat, ErrMsg, DestDisp)
 This routine calculates the linearized matrices that convert the lumped (point) loads on nodes of a (line2) mesh to loads distributed across the line2 elements. More...
 
subroutine create_augmented_ln2_src_mesh (Src, Dest, MeshMap, Dest_TYPE, ErrStat, ErrMsg)
 
subroutine transfer_src_to_augmented_ln2_src (Src, MeshMap, ErrStat, ErrMsg, SrcDisp, LoadsScaleFactor)
 This routine takes the loads from a line2 mesh and transfers them to an augmented line2 mesh (the src mesh with extra/augmented nodes). More...
 
subroutine linearize_src_to_augmented_ln2_src (Src, MeshMap, ErrStat, ErrMsg, SrcDisp)
 This routine linearizes Transfer_Src_To_Augmented_Ln2_Src (modmesh_mapping::transfer_src_to_augmented_ln2_src). More...
 
subroutine create_inverselumping_matrix (Dest, MeshMap, ErrStat, ErrMsg)
 This routine creates a matrix used to "unlump" loads later (needs to have element connectivity information to create it) More...
 
subroutine createloadmap_l2_to_l2 (Src, Dest, MeshMap, ErrStat, ErrMsg)
 This subroutine creates the mapping from a line2 mesh with loads to another line2 mesh. More...
 
subroutine createmotionmap_l2_to_l2 (Src, Dest, MeshMap, ErrStat, ErrMsg)
 This routine creates the mapping of motions between two meshes. More...
 
subroutine lump_line2_to_point (Line2_Src, Point_Dest, ErrStat, ErrMsg, SrcDisp, LoadsScaleFactor)
 This subroutine takes a Line2 mesh (SRC) with distributed forces and/or moments and lumps those to the concentrated forces and/or moments at the endpoints (nodes) of the Line2 mesh. More...
 
subroutine linearize_lump_line2_to_point (Line2_Src, Point_Dest, dM, ErrStat, ErrMsg)
 This subroutine linearizes the lumping of distributed loads to point loads. More...
 
subroutine formmatrix_lump_line2_to_point (Mesh, dM, ErrStat, ErrMsg, DispMesh)
 
subroutine, public linearize_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp)
 This routine creates the linearization matrices for transfer of fields between point meshes. More...
 
subroutine, public writemappingtransfertofile (Mesh1_I, Mesh1_O, Mesh2_I, Mesh2_O, Map_Mod1_Mod2, Map_Mod2_Mod1, BinOutputName)
 This routine is used for debugging mesh mappings. More...
 
subroutine, public nwtc_library_copymaptype (SrcMapTypeData, DstMapTypeData, CtrlCode, ErrStat, ErrMsg)
 
subroutine, public nwtc_library_destroymaptype (MapTypeData, ErrStat, ErrMsg)
 
subroutine, public nwtc_library_packmaptype (ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMsg, SizeOnly)
 
subroutine, public nwtc_library_unpackmaptype (ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, ErrMsg)
 
subroutine nwtc_library_copymeshmaplinearizationtype (SrcMeshMapLinearizationTypeData, DstMeshMapLinearizationTypeData, CtrlCode, ErrStat, ErrMsg)
 
subroutine nwtc_library_destroymeshmaplinearizationtype (MeshMapLinearizationTypeData, ErrStat, ErrMsg)
 
subroutine nwtc_library_packmeshmaplinearizationtype (ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMsg, SizeOnly)
 
subroutine nwtc_library_unpackmeshmaplinearizationtype (ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, ErrMsg)
 
subroutine, public nwtc_library_copymeshmaptype (SrcMeshMapTypeData, DstMeshMapTypeData, CtrlCode, ErrStat, ErrMsg)
 
subroutine, public nwtc_library_destroymeshmaptype (MeshMapTypeData, ErrStat, ErrMsg)
 
subroutine, public nwtc_library_packmeshmaptype (ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMsg, SizeOnly)
 
subroutine, public nwtc_library_unpackmeshmaptype (ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, ErrMsg)
 

Variables

integer(intki), parameter node_not_mapped = -1
 constant that indicates a node is not mapped
 

Detailed Description

This code implements the spatial mapping algorithms described in the following papers.

Function/Subroutine Documentation

◆ convert_point_to_line2_loads()

subroutine modmesh_mapping::convert_point_to_line2_loads ( type(meshtype), intent(inout)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in)  DestDisp 
)
private

This routine takes the lumped loads on nodes of a (line2) mesh and converts them to loads distributed across the line2 elements.

Parameters
[in,out]destThe mesh (on input, the nodal loads values are lumped; on output they are distributed along the element)
[in]destdispThe mesh that contains the translation displacement for these loads
[in,out]meshmapThe mapping data
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ create_inverselumping_matrix()

subroutine modmesh_mapping::create_inverselumping_matrix ( type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This routine creates a matrix used to "unlump" loads later (needs to have element connectivity information to create it)

Parameters
[in]destdestination mesh
[in,out]meshmapmesh mapping data
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ create_pointmesh()

subroutine modmesh_mapping::create_pointmesh ( type(meshtype), intent(in)  Src,
type(meshtype), intent(inout)  Temp_Point_Src,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This routine creates a new mesh with the same positions as the Src mesh, except all of the elements are points.

It adds fields for forces, moments, and/or TranslationDisp, if they are part of the Src mesh.

Parameters
[in]srcThe source mesh
[in,out]temp_point_srcA blank mesh to be created
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ createloadmap_l2_to_l2()

subroutine modmesh_mapping::createloadmap_l2_to_l2 ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This subroutine creates the mapping from a line2 mesh with loads to another line2 mesh.

Parameters
[in]srcThe source mesh
[in]destThe destination mesh
[in,out]meshmapmapping data
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
  • Create a matrix used to "unlump" loads later (needs to have element connectivity information to create it)
  • An augmented Line2-element source mesh is formed by splitting the original Line2-element source mesh at each location where a destination-mesh Line2-element node projects orthogonally from the destination mesh
  • For each Line2-element node of the augmented source mesh, a nearest-neighbor Line2 element of the destination mesh is found (else aborted) in the reference configuration, for which the source Line2-element node projects orthogonally onto the destination Line2-element domain. A destination-mesh Line2 element may be associated with multiple source-mesh Line2-element nodes.
  • Create a temporary mesh for lumped point elements of the line2 source

◆ createloadmap_l2_to_p()

subroutine modmesh_mapping::createloadmap_l2_to_p ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

routine that creats a map of line2 loads to points

Parameters
[in]srcThe source mesh
[in]destThe destination mesh
[in,out]meshmapmapping structure
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ createmapping_nearestneighbor()

subroutine modmesh_mapping::createmapping_nearestneighbor ( type(meshtype), intent(in)  Mesh1,
type(meshtype), intent(in)  Mesh2,
type(maptype), dimension(:), intent(inout)  NodeMap,
integer(intki), intent(in)  Mesh1_TYPE,
integer(intki), intent(in)  Mesh2_TYPE,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This routine creates the node-to-node (nearest neighbor).

We map FROM Mesh1 to Mesh2

Parameters
[in]mesh1The mesh in the outer mapping loop (Dest for Motions/Scalars; Src for Loads)
[in]mesh2The mesh in the inner mapping loop (Src for Motions/Scalars; Dest for Loads)
[in,out]nodemapThe mapping from Src to Dest
[in]mesh1_typeType of Mesh1 elements to map
[in]mesh2_typeType of Mesh2 elements on map
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ createmapping_projecttoline2()

subroutine modmesh_mapping::createmapping_projecttoline2 ( type(meshtype), intent(in)  Mesh1,
type(meshtype), intent(in)  Mesh2,
type(maptype), dimension(:), intent(inout)  NodeMap,
integer(intki), intent(in)  Mesh1_TYPE,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This routine projects Mesh1 onto a Line2 mesh (Mesh2) to find the element mappings between the two meshes.

Parameters
[in]mesh1The mesh in the outer mapping loop (Dest for Motions/Scalars; Src for Loads)
[in]mesh2The mesh in the inner mapping loop (Src for Motions/Scalars; Dest for Loads)
[in,out]nodemapThe mapping from Src to Dest
[in]mesh1_typeType of Mesh1 elements to map
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ createmotionmap_l2_to_l2()

subroutine modmesh_mapping::createmotionmap_l2_to_l2 ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This routine creates the mapping of motions between two meshes.

Parameters
[in]srcThe source mesh
[in]destThe destination mesh
[in,out]meshmapstructure that contains data necessary to map these two meshes
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ createmotionmap_l2_to_p()

subroutine modmesh_mapping::createmotionmap_l2_to_p ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

routine that creats a map of line2 motions to points

Parameters
[in]srcThe source mesh
[in]destThe destination mesh
[in,out]meshmapmapping data structure
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ formmatrix_fulllinearization()

subroutine modmesh_mapping::formmatrix_fulllinearization ( type(meshmaplinearizationtype), intent(inout)  dM,
real(r8ki), dimension(:,:), intent(inout), allocatable  M_A,
real(r8ki), dimension(:,:), intent(inout), allocatable  M_SL_fm,
real(r8ki), dimension(:,:), intent(inout), allocatable  M_SL_uSm,
real(r8ki), dimension(:,:), intent(inout), allocatable  M_SL_li,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

Routine that forms the final linearization matrices for of loads from line2 meshes to either line2 or point matrices.

Parameters
[in,out]dmlinearization data type currently filled with values from point-to-point or point-to-line2 linearization
[in,out]m_alinearization matrix for augmented source mesh
[in,out]m_sl_fmlinearization matrix for source-mesh lumped force component of moment
[in,out]m_sl_usmlinearization matrix for source-mesh lumped source translational displacement component of moment
[in,out]m_sl_lilinearization matrix for source-mesh lumped load "identity" component
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

Matrix \( M_{uSm} = \left[ M_{uSm}^D + M_{li}^D M_{uSm}^{SL} \right] M^A \).

Matrix \( M_{uDm} = M_{uDm}^D \)

Matrix \( M_{fm} = \left[ M_{fm}^D M_{li}^{SL} + M_{li}^D M_{fm}^{SL} \right] M^A \)

Matrix \( M_{li} = M_{li}^D M_{li}^{SL} M^A \)

◆ formmatrix_lump_line2_to_point()

subroutine modmesh_mapping::formmatrix_lump_line2_to_point ( type(meshtype), intent(in)  Mesh,
type(meshmaplinearizationtype), intent(inout)  dM,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in)  DispMesh 
)
private
Parameters
[in]meshmesh that has loads being lumped
[in]dispmeshmesh that has displaced position of Mesh
[in,out]dmdata structure for linearization
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

Matrix \( M_{uDm}^{L} \), stored in modmesh_mapping::meshmaplinearizationtype::m_ud, is allocated to be size Mesh%NNodes*3, Mesh%NNodes*3 (a square matrix). This is the block matrix that relates the destination translational displacement (u) to the lumped moment.

Matrix \( M_{fm}^{L} \), stored in modmesh_mapping::meshmaplinearizationtype::m_f, is allocated to be size Mesh%NNodes*3, Mesh%NNodes*3 (a square matrix). This is the block matrix that relates the force (f) to the lumped moment.

◆ getloadsscalefactor()

real(reki) function modmesh_mapping::getloadsscalefactor ( type(meshtype), intent(in)  Src)
private
Parameters
[in]srcThe source mesh with loads fields allocated
Returns
scaling factor for loads fields

◆ linearize_convert_point_to_line2_loads()

subroutine modmesh_mapping::linearize_convert_point_to_line2_loads ( type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in)  DestDisp 
)
private

This routine calculates the linearized matrices that convert the lumped (point) loads on nodes of a (line2) mesh to loads distributed across the line2 elements.

(i.e., inverse lumping)

Parameters
[in]destThe mesh (on linearization input the loads are distributed along the line2 element)
[in,out]meshmapThe mapping data
[in]destdispThe mesh that contains the translation displacement for these loads
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

Matrix \( \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} \), stored in modmesh_mapping::meshmaplinearizationtype::li, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the block matrix that maps the individual load fields of the source mesh to the corresponding field in the destination mesh. This matrix also forms part of the terms of modmesh_mapping::meshmaplinearizationtype::m_uS and modmesh_mapping::meshmaplinearizationtype::m_f.

However, since this is easier done with a solve, we are not actually going to form the matrix here.

Matrix \( M_{uDm}^{DLinv} = - \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{uDm}^{DL} \), stored in modmesh_mapping::meshmaplinearizationtype::m_us, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the block matrix that relates the destination translational displacement field to the moment field.

However, since this is easier done with a solve, we are not actually going to form the matrix here. Instead, I'll return \( M_{uDm}^{DL} \)

Matrix \( M_{fm}^{DLinv} = - \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{fm}^{DL} \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1}\), stored in modmesh_mapping::meshmaplinearizationtype::m_f, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the block matrix that relates the force field to the moment field.

However, since this is easier done with a solve, we are not actually going to form the matrix here. Instead, I'll return \( M_{fm}^{DL} \)

◆ linearize_line2_to_line2()

subroutine, public modmesh_mapping::linearize_line2_to_line2 ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in), optional  SrcDisp,
type(meshtype), intent(in), optional  DestDisp 
)

Routine that computes the linearization matrices for data transfers from a mesh to a line2 mesh.

Mapping equations are as follows:

Rotational Displacement: \( \frac{\partial M_\Lambda}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \( \left\{ \vec{\theta}^S\right\}\)

Translational Displacement: \( \frac{\partial M_u}{\partial x} = \begin{bmatrix} M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^S \\ \vec{\theta}^S \end{matrix} \right\} \)

Rotational Velocity: \( \frac{\partial M_\omega}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\omega}^S\right\}\)

Translational Velocity: \( \frac{\partial M_v}{\partial x} = \begin{bmatrix} M_{tv\_uD} & M_{tv\_uS} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{v}^S \\ \vec{\omega}^S \end{matrix} \right\} \)

Rotational Acceleration: \( \frac{\partial M_\alpha}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\alpha}^S\right\}\)

Translational Acceleration: \( \frac{\partial M_a}{\partial x} = \begin{bmatrix} M_{ta\_uD} & M_{ta\_uS} & M_{ta\_rv} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{\omega}^S \\ \vec{a}^S \\ \vec{\alpha}^S \end{matrix} \right\} \)

Scalar quantities: \( \frac{\partial M_S}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{S}^S\right\}\)

Forces: \( \frac{\partial M_f}{\partial x} = \begin{bmatrix} M_{li} \end{bmatrix} \) for source fields \(\left\{\vec{f}^S\right\}\)

Moments: \( \frac{\partial M_m}{\partial x} = \begin{bmatrix} M_{uDm} & M_{uSm} & M_{fm} & M_{li} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{f}^S \\ \vec{m}^S \end{matrix} \right\} \)

\(M_{mi}\) is modmesh_mapping::meshmaplinearizationtype::mi
\(M_{f_{\times p}}\) is modmesh_mapping::meshmaplinearizationtype::fx_p
\(M_{tv\_uD}\) is modmesh_mapping::meshmaplinearizationtype::tv_uD
\(M_{tv\_uS}\) is modmesh_mapping::meshmaplinearizationtype::tv_uS
\(M_{ta\_uD}\) is modmesh_mapping::meshmaplinearizationtype::ta_uD
\(M_{ta\_uS}\) is modmesh_mapping::meshmaplinearizationtype::ta_uS
\(M_{ta\_rv}\) is modmesh_mapping::meshmaplinearizationtype::ta_rv
\(M_{li}\) is modmesh_mapping::meshmaplinearizationtype::li
\(M_{uSm}\) is modmesh_mapping::meshmaplinearizationtype::m_us
\(M_{uDm}\) is modmesh_mapping::meshmaplinearizationtype::m_ud
\(M_{fm}\) is modmesh_mapping::meshmaplinearizationtype::m_f

Parameters
[in]srcsource Line2 mesh
[in]destdestination mesh
[in]srcdispa "functional" sibling of the source mesh; Src contains loads and SrcDisp contains TranslationDisp and Orientation
[in]destdispa "functional" sibling of the destination mesh; Dest contains loads and DestDisp contains TranslationDisp and Orientation
[in,out]meshmapmapping between Src and Dest meshes
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
  • Create mapping (if remap is true)
  • Get linearization matrices of data transfer
  • Create mapping (if remap is true)
  • Linearize data
    • Get individual transformation matrices:
      1. Get the matrix that transfers the source fields to the augmented source mesh. (We're also taking the force field and and (source) translational displacement field and putting them on our [intermediate] augmented mesh.)
      2. Get the matrices that lump the loads on the augmented source mesh. (We're also taking the force field and putting it on our lumped mesh.)
      3. (and 4) Get the matrices transfering the lumped (point) loads to line2 loads.
    • Multiply individual transformation matrices to get full linearization matrices

◆ linearize_line2_to_point()

subroutine, public modmesh_mapping::linearize_line2_to_point ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in), optional  SrcDisp,
type(meshtype), intent(in), optional  DestDisp 
)

Routine for computing linearization matrices for data transfer from Line2 mesh to Point Mesh.

Mapping equations are as follows:

Rotational Displacement: \( \frac{\partial M_\Lambda}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \( \left\{ \vec{\theta}^S\right\}\)

Translational Displacement: \( \frac{\partial M_u}{\partial x} = \begin{bmatrix} M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^S \\ \vec{\theta}^S \end{matrix} \right\} \)

Rotational Velocity: \( \frac{\partial M_\omega}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\omega}^S\right\}\)

Translational Velocity: \( \frac{\partial M_v}{\partial x} = \begin{bmatrix} M_{tv\_uD} & M_{tv\_uS} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{v}^S \\ \vec{\omega}^S \end{matrix} \right\} \)

Rotational Acceleration: \( \frac{\partial M_\alpha}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\alpha}^S\right\}\)

Translational Acceleration: \( \frac{\partial M_a}{\partial x} = \begin{bmatrix} M_{ta\_uD} & M_{ta\_uS} & M_{ta\_rv} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{\omega}^S \\ \vec{a}^S \\ \vec{\alpha}^S \end{matrix} \right\} \)

Scalar quantities: \( \frac{\partial M_S}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{S}^S\right\}\)

Forces: \( \frac{\partial M_f}{\partial x} = \begin{bmatrix} M_{li} \end{bmatrix} \) for source fields \(\left\{\vec{f}^S\right\}\)

Moments: \( \frac{\partial M_m}{\partial x} = \begin{bmatrix} M_{uDm} & M_{uSm} & M_{fm} & M_{li} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{f}^S \\ \vec{m}^S \end{matrix} \right\} \)

\(M_{mi}\) is modmesh_mapping::meshmaplinearizationtype::mi
\(M_{f_{\times p}}\) is modmesh_mapping::meshmaplinearizationtype::fx_p
\(M_{tv\_uD}\) is modmesh_mapping::meshmaplinearizationtype::tv_uD
\(M_{tv\_uS}\) is modmesh_mapping::meshmaplinearizationtype::tv_uS
\(M_{ta\_uD}\) is modmesh_mapping::meshmaplinearizationtype::ta_uD
\(M_{ta\_uS}\) is modmesh_mapping::meshmaplinearizationtype::ta_uS
\(M_{ta\_rv}\) is modmesh_mapping::meshmaplinearizationtype::ta_rv
\(M_{li}\) is modmesh_mapping::meshmaplinearizationtype::li
\(M_{uSm}\) is modmesh_mapping::meshmaplinearizationtype::m_us
\(M_{uDm}\) is modmesh_mapping::meshmaplinearizationtype::m_ud
\(M_{fm}\) is modmesh_mapping::meshmaplinearizationtype::m_f

Parameters
[in]srcsource Line2 mesh
[in]destdestination mesh
[in]srcdispa "functional" sibling of the source mesh; Src contains loads and SrcDisp contains TranslationDisp and Orientation
[in]destdispa "functional" sibling of the destination mesh; Dest contains loads and DestDisp contains TranslationDisp and Orientation
[in,out]meshmapmapping between Src and Dest meshes
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
  • Create Mapping data (if remap is true)
  • Get linearization matrices of data transfer
  • Create mapping (including the temporary src mesh)
  • Linearize data
    • Get individual transformation matrices
      1. Get the matrix that transfers the source fields to the augmented source mesh. (We're also taking the force field and and translational displacement field and putting them on our [intermediate] augmented mesh.)
      2. Get the matrices that lump the loads on the augmented source mesh. (We're also taking the force field and putting it on our [intermediate] lumped mesh.)
      3. Get the matrices that transfer point meshes to other point meshes.
    • Multiply individual transformation matrices to form full linearization matrices

◆ linearize_loads_point_to_line2()

subroutine modmesh_mapping::linearize_loads_point_to_line2 ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in)  SrcDisp,
type(meshtype), intent(in)  DestDisp 
)
private

Given a mapping, this routine contains the linearization matrices of the load transfers from nodes on a point-element mesh to nodes on another Line2 mesh.

At the end of this routine, the MeshMap data structure will contain the four matrices for loads transfer from a point to line2 mesh: \( M_{um}\), \( M_{tm}\), \(M_{fm}\), and \(M_{li}\), where

\begin{equation} \begin{aligned} \left\{ \begin{matrix} \Delta\vec{u}^D \\ \Delta\vec{\theta}^D \\ \Delta\vec{f}^D \\ \Delta\vec{m}^D \end{matrix} \right\} & = \begin{bmatrix} M_{mi} & M_{f_{\times p}} & 0 & 0 \\ 0 & M_{mi} & 0 & 0 \\ 0 & 0 & M_{li} & 0 \\ M_{um} & M_{tm} & M_{fm} & M_{li} \\ \end{bmatrix} \left\{ \begin{matrix} \Delta\vec{u}^S \\ \Delta\vec{\theta}^S \\ \Delta\vec{F}^S \\ \Delta\vec{M}^S \end{matrix} \right\} \\ & = \begin{bmatrix} I & 0 & 0 & 0 \\ 0 & I & 0 & 0 \\ 0 & 0 & \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} & 0 \\ -\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1}M_{um}^{DL} & 0 & -\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1}M_{fm}^{DL}\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} & \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} \\ \end{bmatrix} \begin{bmatrix} M_{mi} & M_{f_{\times p}} & 0 & 0 \\ 0 & M_{mi} & 0 & 0 \\ 0 & 0 & M_{li}^D & 0 \\ 0 & M_{tm}^D & M_{fm}^D & M_{li}^D \\ \end{bmatrix} \left\{ \begin{matrix} \Delta\vec{u}^S \\ \Delta\vec{\theta}^S \\ \Delta\vec{F}^S \\ \Delta\vec{M}^S \end{matrix} \right\} \end{aligned} \end{equation}

"S" refers to the source (point) mesh;"D" refers to the destination (line2) mesh; "DL" refers to the destination mesh with lumped (point) loads.
\(M_{li}\) is modmesh_mapping::meshmaplinearizationtype::li
\(M_{M_u}\) is modmesh_mapping::meshmaplinearizationtype::m_us
\(M_{M_t}\) is modmesh_mapping::meshmaplinearizationtype::m_ud
\(M_{M_f}\) is modmesh_mapping::meshmaplinearizationtype::m_f

Parameters
[in]srcThe source (Line2) mesh with loads fields allocated
[in]destThe destination mesh
[in,out]meshmapThe mapping data from Src to Dest
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
[in]srcdispThe source mesh's cooresponding position mesh
[in]destdispThe destination mesh's cooresponding position mesh

Start by determining how the point load is split based on its projected location in the mapped destination Line2 element. (This is like Linearize_Loads_Point_to_Point, except we need to loop on elements instead of nodes [because of nearest neighbor mapping routine])

Matrix \( M_{li}^D \), stored in li_D, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the matrix that maps each field of the source point mesh to another point mesh.

Matrix \( M_{uD}^D \), stored in muD_D, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the block matrix that maps the u (translational displacement) field of the destination mesh to the moment field of the destination mesh.

Matrix \( M_{uS}^D \), stored in muS_D, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the block matrix that maps the u (translational displacement) field of the source mesh to the moment field of the destination mesh.

Matrix \( M_{fm}^D \), stored in mf_D, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the block matrix that maps the force field of the source mesh to the moment field of the destination mesh.

Then we can obtain the matrices that convert the lumped loads on the dest (line2) mesh into distributed loads on the same mesh: For linearization analysis, we assume this destination mesh already contains the distributed loads (i.e., values at the operating point).

Finally, we multiply the matrices together and return the non-zero block matrices that remain.

Matrix \( M_{li} = \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{li}^{D} \), stored in modmesh_mapping::meshmaplinearizationtype::li, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the matrix that maps each field of the source mesh to an augmented mesh.
Note that we solve the equation \( M_{li}^{DL} M_{li} = M_{li}^{D} \) for \( M_{li} \).

Matrix \( M_{uSm} = -\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{uSm}^{DL} \) stored in modmesh_mapping::meshmaplinearizationtype::m_us, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the matrix that maps the source u (translational displacement) to the destination moment.
Note that we solve the equation \( M_{li}^{DL} M_{uSm} = M_{uSm}^{DL} \) for \( M_{uSm} \).

Matrix \( M_{uDm} = -\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{uDm}^{DL} + \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{uDm}^D \) stored in modmesh_mapping::meshmaplinearizationtype::m_ud, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the matrix that maps the destination u (translational displacement) to the destination moment.
Note that we solve the equation \( M_{li}^{DL} M_{uDm} = M_{uDm}^D - M_{uDm}^{DL} \) for \( M_{uDm} \).

Matrix \( M_{fm} \) is stored in modmesh_mapping::meshmaplinearizationtype::m_f and is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the matrix that maps the force to the moment.
\( \begin{aligned} M_{fm} & = - \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{fm}^{DL}\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1}M_{li}^D + \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{fm}^D \\ & = \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} \left( - M_{fm}^{DL} M_{li} + M_{fm}^D \right) \end{aligned}\),
Note that we solve the equation \( M_{li}^{DL} M_{fm} = M_{fm}^D - M_{fm}^{DL} M_{li} \) for \( M_{fm} \).

◆ linearize_loads_point_to_point()

subroutine modmesh_mapping::linearize_loads_point_to_point ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in)  SrcDisp,
type(meshtype), intent(in)  DestDisp 
)
private

Given a nearest-neighbor mapping, this routine generates the linearization matrices for loads transfer between point nodes on the meshes.

Parameters
[in]srcThe source mesh with loads fields allocated
[in]destThe destination mesh
[in]srcdispA mesh that contains the displacements associated with the source mesh
[in]destdispA mesh that contains the displacements associated with the destination mesh
[in,out]meshmapThe mapping data structure (from Dest to Src)
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

Matrix \( M_{li}^D = M_{li} \), stored in modmesh_mapping::meshmaplinearizationtype::li, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the matrix that maps each field of the source mesh to an augmented mesh.

Matrix \( M_{uD}^D \), stored in modmesh_mapping::meshmaplinearizationtype::m_ud, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the block matrix that maps the destination translation displacement field of the source mesh to the moment field of the destination mesh.

Matrix \( M_{uS}^D \), stored in modmesh_mapping::meshmaplinearizationtype::m_us, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the block matrix that maps the source translation displacement field of the source mesh to the moment field of the destination mesh.

Matrix \( M_{fm}^D \), stored in modmesh_mapping::meshmaplinearizationtype::m_f, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the block matrix that maps the force field of the source mesh to the moment field of the destination mesh.

◆ linearize_lump_line2_to_point()

subroutine modmesh_mapping::linearize_lump_line2_to_point ( type(meshtype), intent(in)  Line2_Src,
type(meshtype), intent(inout)  Point_Dest,
type(meshmaplinearizationtype), intent(inout)  dM,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This subroutine linearizes the lumping of distributed loads to point loads.

Parameters
[in]line2_srcline2 source mesh
[in,out]point_destpoint destination mesh
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
[in,out]dmdata structure for linearization

Matrix \( M_{li}^{SL} \), stored in modmesh_mapping::meshmaplinearizationtype::li, is allocated to be size Point_Dest%NNodes*3, Line2_Src%NNodes*3 (a square matrix). This is the block matrix that maps each field of the distributed source mesh to its identical field on the point (lumped) mesh. (i.e., force component of force; moment component of moment).

Matrix \( M_{um}^{SL} \), stored in modmesh_mapping::meshmaplinearizationtype::m_ud, is allocated to be size Point_Dest%NNodes*3, Line2_Src%NNodes*3 (a square matrix). This is the block matrix that relates the translational displacement (u) to the lumped moment.

Note this could be considered either m_ud or m_us, depending on context.

Matrix \( M_{fm}^{SL} \), stored in modmesh_mapping::meshmaplinearizationtype::m_f, is allocated to be size Point_Dest%NNodes*3, Line2_Src%NNodes*3 (a square matrix). This is the block matrix that relates the force (f) to the lumped moment.

We also transfer the force to the destination mesh so that we can use these values for creating the appropriate matrices later

◆ linearize_motions_line2_to_point()

subroutine modmesh_mapping::linearize_motions_line2_to_point ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

Given a mapping, this routine transfers the motions from nodes on Line2 elements to nodes on another mesh.

Parameters
[in]srcThe source (Line2) mesh with motion fields allocated
[in]destThe destination mesh
[in,out]meshmapThe mapping data
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ linearize_motions_point_to_point()

subroutine modmesh_mapping::linearize_motions_point_to_point ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

Given a nearest-neighbor mapping, this routine forms the linearization matrices of motion transfer between nodes on the mesh.

Parameters
[in]srcThe source mesh with motion fields allocated
[in]destThe destination mesh
[in,out]meshmapdata for the mesh mapping
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ linearize_point_to_line2()

subroutine, public modmesh_mapping::linearize_point_to_line2 ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in), optional  SrcDisp,
type(meshtype), intent(in), optional  DestDisp 
)

Routine that creates linearization matricies for data tranfer from a point mesh to a line2 mesh.

Mapping equations are as follows:

Rotational Displacement: \( \frac{\partial M_\Lambda}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \( \left\{ \vec{\theta}^S\right\}\)

Translational Displacement: \( \frac{\partial M_u}{\partial x} = \begin{bmatrix} M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^S \\ \vec{\theta}^S \end{matrix} \right\} \)

Rotational Velocity: \( \frac{\partial M_\omega}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\omega}^S\right\}\)

Translational Velocity: \( \frac{\partial M_v}{\partial x} = \begin{bmatrix} M_{tv\_uD} & M_{tv\_uS} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{v}^S \\ \vec{\omega}^S \end{matrix} \right\} \)

Rotational Acceleration: \( \frac{\partial M_\alpha}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\alpha}^S\right\}\)

Translational Acceleration: \( \frac{\partial M_a}{\partial x} = \begin{bmatrix} M_{ta\_uD} & M_{ta\_uS} & M_{ta\_rv} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{\omega}^S \\ \vec{a}^S \\ \vec{\alpha}^S \end{matrix} \right\} \)

Scalar quantities: \( \frac{\partial M_S}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{S}^S\right\}\)

Forces: \( \frac{\partial M_F}{\partial x} = \begin{bmatrix} M_{li} \end{bmatrix} \) for source fields \(\left\{\vec{F}^S\right\}\)

Moments: \( \frac{\partial M_M}{\partial x} = \begin{bmatrix} M_{uDm} & M_{uSm} & M_{fm} & M_{li} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{F}^S \\ \vec{M}^S \end{matrix} \right\} \)

\(M_{mi}\) is modmesh_mapping::meshmaplinearizationtype::mi
\(M_{f_{\times p}}\) is modmesh_mapping::meshmaplinearizationtype::fx_p
\(M_{tv\_uD}\) is modmesh_mapping::meshmaplinearizationtype::tv_uD
\(M_{tv\_uS}\) is modmesh_mapping::meshmaplinearizationtype::tv_uS
\(M_{ta\_uD}\) is modmesh_mapping::meshmaplinearizationtype::ta_uD
\(M_{ta\_uS}\) is modmesh_mapping::meshmaplinearizationtype::ta_uS
\(M_{ta\_rv}\) is modmesh_mapping::meshmaplinearizationtype::ta_rv
\(M_{li}\) is modmesh_mapping::meshmaplinearizationtype::li
\(M_{uSm}\) is modmesh_mapping::meshmaplinearizationtype::m_us
\(M_{uDm}\) is modmesh_mapping::meshmaplinearizationtype::m_ud
\(M_{fm}\) is modmesh_mapping::meshmaplinearizationtype::m_f

Parameters
[in]srcsource point mesh
[in]destdestination mesh
[in]srcdispan optional mesh, which contains the displacements associated with the source if the source contains load information
[in]destdispan optional mesh, which contains the displacements associated with the destination if the destination contains load information
[in,out]meshmapMapping(s) between Src and Dest meshes; also contains jacobian of this mapping
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
  • Create mapping
  • Get linearization matrices for data transfer
  • Create mapping
    • We need a motion mapping structure from the SrcDisp to DestDisp meshes so that we can form the proper matrices for moment linearizaiton. (This is because we have both the source translational displacement and rotational displacement on the right side of the equation; alternatively we'd have to have the source AND destination translational displacements on the right hand side.)
  • Get linearization matrices for data transfer

◆ linearize_point_to_point()

subroutine, public modmesh_mapping::linearize_point_to_point ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in), optional  SrcDisp,
type(meshtype), intent(in), optional  DestDisp 
)

This routine creates the linearization matrices for transfer of fields between point meshes.

Mapping equations are as follows:

Rotational Displacement: \( \frac{\partial M_\Lambda}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \( \left\{ \vec{\theta}^S\right\}\)

Translational Displacement: \( \frac{\partial M_u}{\partial x} = \begin{bmatrix} M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^S \\ \vec{\theta}^S \end{matrix} \right\} \)

Rotational Velocity: \( \frac{\partial M_\omega}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\omega}^S\right\}\)

Translational Velocity: \( \frac{\partial M_v}{\partial x} = \begin{bmatrix} M_{tv\_uD} & M_{tv\_uS} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{v}^S \\ \vec{\omega}^S \end{matrix} \right\} \)

Rotational Acceleration: \( \frac{\partial M_\alpha}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\alpha}^S\right\}\)

Translational Acceleration: \( \frac{\partial M_a}{\partial x} = \begin{bmatrix} M_{ta\_uD} & M_{ta\_uS} & M_{ta\_rv} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{\omega}^S \\ \vec{a}^S \\ \vec{\alpha}^S \end{matrix} \right\} \)

Scalar quantities: \( \frac{\partial M_S}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{S}^S\right\}\)

Forces: \( \frac{\partial M_F}{\partial x} = \begin{bmatrix} M_{li} \end{bmatrix} \) for source fields \(\left\{\vec{F}^S\right\}\)

Moments: \( \frac{\partial M_M}{\partial x} = \begin{bmatrix} M_{uDm} & M_{uSm} & M_{fm} & M_{li} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{F}^S \\ \vec{M}^S \end{matrix} \right\} \)

\(M_{mi}\) is modmesh_mapping::meshmaplinearizationtype::mi
\(M_{f_{\times p}}\) is modmesh_mapping::meshmaplinearizationtype::fx_p
\(M_{tv\_uD}\) is modmesh_mapping::meshmaplinearizationtype::tv_uD
\(M_{tv\_uS}\) is modmesh_mapping::meshmaplinearizationtype::tv_uS
\(M_{ta\_uD}\) is modmesh_mapping::meshmaplinearizationtype::ta_uD
\(M_{ta\_uS}\) is modmesh_mapping::meshmaplinearizationtype::ta_uS
\(M_{ta\_rv}\) is modmesh_mapping::meshmaplinearizationtype::ta_rv
\(M_{li}\) is modmesh_mapping::meshmaplinearizationtype::li
\(M_{uSm}\) is modmesh_mapping::meshmaplinearizationtype::m_us
\(M_{uDm}\) is modmesh_mapping::meshmaplinearizationtype::m_ud
\(M_{fm}\) is modmesh_mapping::meshmaplinearizationtype::m_f

Parameters
[in]srcsource point mesh
[in]destdestination mesh
[in]srcdispan optional mesh, which contains the displacements associated with the source if the source contains load information
[in]destdispan optional mesh, which contains the displacements associated with the destination if the destination contains load information
[in,out]meshmapMapping(s) between Src and Dest meshes; also contains jacobian of this mapping
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
  • Create mapping (if remapFlag)
  • Create linearization matrices for motions
  • Create mapping (if RemapFlag)
  • Create linearization matrices for loads

◆ linearize_src_to_augmented_ln2_src()

subroutine modmesh_mapping::linearize_src_to_augmented_ln2_src ( type(meshtype), intent(in)  Src,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in)  SrcDisp 
)
private

This routine linearizes Transfer_Src_To_Augmented_Ln2_Src (modmesh_mapping::transfer_src_to_augmented_ln2_src).

Parameters
[in]srcThe source mesh containing line2 loads
[in,out]meshmapmesh mapping data, including the augmented source mesh
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
[in]srcdispThe displacements associated with the source mesh

Matrix \( M_{li}^A = M_{mi}^A = M^A \), stored in modmesh_mapping::meshmaplinearizationtype::li, is allocated to be size MeshMap%Augmented_Ln2_Src%NNodes*3, Src%NNodes*3. This is the matrix that maps each field of the source mesh to an augmented mesh.

We need the distributed forces on the augmented mesh, so we transfer them in the linearization, too. Note that this is done without the LoadsScaleFactor.

◆ lump_line2_to_point()

subroutine modmesh_mapping::lump_line2_to_point ( type(meshtype), intent(in)  Line2_Src,
type(meshtype), intent(inout)  Point_Dest,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in), optional  SrcDisp,
real(reki), intent(in)  LoadsScaleFactor 
)
private

This subroutine takes a Line2 mesh (SRC) with distributed forces and/or moments and lumps those to the concentrated forces and/or moments at the endpoints (nodes) of the Line2 mesh.

These are placed in a Point mesh (DEST) where the Points are assumed to be colocated with the nodes of the Line2 Mesh.

This routine is expected to be used in the transfer of HydroDyn Output (distributed force/moment) to the SubDyn Input (concentrated force/moment); routine is to be called from the Input_Ouput routine for HydroDyn to SubDyn.

Formulation: Distrbuted quantities are integrated over the element with two-point nodal (Gauss-Lobatto) quadrature.

F(x_j) = int_{-1}^{1} f(xi) phi_j(xi) J dxi (exact)

F(x_1) =~ f(-1) phi_1(-1) J w_1 + f(+1) phi_1(+1) J w_2 (two-point quadrature) F(x_2) =~ f(-1) phi_2(-1) J w_1 + f(+1) phi_2(+1) J w_2 (two-point quadrature)

which can be simplified to

F(x_1) =~ f(-1) J F(x_2) =~ f(+1) J

since w_1 = w_2 = 1, phi_j(xi_i) = Delta_{j,i} (Kronecker Delta)

where x_j is the jth node in 3D physical coordinates, xi_i is the ith node in 1D element coordinates, j in {1,2}, xi in [-1,1] is the element natural coordinate, f(xi) is the distributed quantity, phi_j(xi) is the basis function for the jth node, J is the determinant of the Jacobian in the mapping from [X_1,X_2] to [-1,1] (X_j is the 3D location of the jth point)

For Line2 elements, J = DIST(X_1,X_2) / 2

Parameters
[in]line2_srcline2 source mesh
[in,out]point_destpoint destination mesh
[in]srcdispAnother mesh that may contain the source's TranslationDisp field
[in]loadsscalefactorScaling factor for loads (to help with numerical issues)
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ meshmapcreate()

subroutine, public modmesh_mapping::meshmapcreate ( type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This subroutine takes two meshes, determines the sizes required for the mapping data structure, and then allocates the mappings (different for loads and motions/scalars).

Parameters
[in]srcsource mesh
[in]destdestination mesh
[in,out]meshmapmapping data structure
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ meshmapwrbin()

subroutine, public modmesh_mapping::meshmapwrbin ( integer, intent(inout)  UnIn,
type(meshtype), intent(in)  Src,
type(meshtype), intent(in)  Dest,
type(meshmaptype), intent(in)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
character(*), intent(in), optional  FileName 
)

This creates a matrix to write to a binary file (for debugging)

Parameters
[in,out]uninfortran output unit
[in]srcsource mesh
[in]destdestination mesh
[in]meshmapmapping data structure
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
[in]filenameName of the file to write the output in

◆ transfer_line2_to_line2()

subroutine, public modmesh_mapping::transfer_line2_to_line2 ( type(meshtype), intent(in)  Src,
type(meshtype), intent(inout)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in), optional  SrcDisp,
type(meshtype), intent(in), optional  DestDisp 
)

Routine that transfers data from a line2 mesh to another line2 mesh.

Parameters
[in]srcsource Line2 mesh
[in,out]destdestination Line2 mesh
[in]srcdispa "functional" sibling of the source mesh; Src contains loads and SrcDisp contains TranslationDisp and Orientation
[in]destdispa "functional" sibling of the destination mesh; Dest contains loads and DestDisp contains TranslationDisp and Orientation
[in,out]meshmapmapping between Src and Dest meshes
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ transfer_line2_to_point()

subroutine, public modmesh_mapping::transfer_line2_to_point ( type(meshtype), intent(in)  Src,
type(meshtype), intent(inout)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in), optional  SrcDisp,
type(meshtype), intent(in), optional  DestDisp 
)

Routine for transfering data from Line2 mesh to Point Mesh.

Parameters
[in]srcsource mesh
[in,out]destdestination mesh
[in]srcdispa "functional" sibling of the source mesh required for loads transfer; Src contains loads and SrcDisp contains TranslationDisp and Orientation
[in]destdispa "functional" sibling of the destination mesh required for loads transfer; Dest contains loads and DestDisp contains TranslationDisp and Orientation
[in,out]meshmapmapping data structure
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ transfer_loads_point_to_line2()

subroutine modmesh_mapping::transfer_loads_point_to_line2 ( type(meshtype), intent(in)  Src,
type(meshtype), intent(inout)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in)  SrcDisp,
type(meshtype), intent(in)  DestDisp,
real(reki), intent(in)  LoadsScaleFactor 
)
private

Given a mapping, this routine transfers the loads from nodes on a point-element mesh to nodes on another Line2 mesh.

Parameters
[in]srcThe source (Line2) mesh with loads fields allocated
[in,out]destThe destination mesh
[in,out]meshmapThe mapping data
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
[in]srcdispThe source mesh's cooresponding position mesh
[in]destdispThe destination mesh's cooresponding position mesh
[in]loadsscalefactorScaling factor for loads (to help with numerical issues)

Start with transferring the loads like point-to-point (except split between two nodes of the dest element).

now we can convert the lumped loads on the dest (line2) mesh into distributed loads on the same mesh:

◆ transfer_loads_point_to_point()

subroutine modmesh_mapping::transfer_loads_point_to_point ( type(meshtype), intent(in)  Src,
type(meshtype), intent(inout)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in)  SrcDisp,
type(meshtype), intent(in)  DestDisp,
real(reki), intent(in)  LoadsScaleFactor 
)
private

Given a nearest-neighbor mapping, this routine transfers loads between point nodes on the meshes.

Parameters
[in]srcThe source mesh with loads fields allocated
[in,out]destThe destination mesh
[in]srcdispA mesh that contains the displacements associated with the source mesh
[in]destdispA mesh that contains the displacements associated with the destination mesh
[in,out]meshmapThe mapping data structure (from Dest to Src)
[in]loadsscalefactorScaling factor for loads (to help with numerical issues)
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

Force: \(\vec{F}^D = \sum\limits_{eS} \vec{F}^S \)

Moment: \(\vec{M}^D = \sum\limits_{eS} \left\{ \vec{M}^S + \left\{ \left\{ \vec{p}^{OSR} + \vec{u}^S \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{F}^S \right\}\)

◆ transfer_motions_line2_to_point()

subroutine modmesh_mapping::transfer_motions_line2_to_point ( type(meshtype), intent(in)  Src,
type(meshtype), intent(inout)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

Given a mapping, this routine transfers the motions from nodes on Line2 elements to nodes on another mesh.

Parameters
[in]srcThe source (Line2) mesh with motion fields allocated
[in,out]destThe destination mesh
[in,out]meshmapThe mapping data
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

Define \( \phi_1 = 1-\bar{l}^S \) and \( \phi_2 = \bar{l}^S \).

Translational Displacement: \(\vec{u}^D = \sum\limits_{i=1}^{2}\left( \vec{u}^S_{eSn_i} + \left[\left[\theta^S_{eSn_i}\right]^T \theta^{SR}_{eSn_i} - I\right]\left\{\vec{p}^{ODR}-\vec{p}^{OSR}_{eSn_i}\right\} \right) \phi_i\)

Orientation: \(\theta^D = \Lambda\left( \sum\limits_{i=1}^{2} \log\left( \theta^{DR}\left[\theta^{SR}_{eSn_i}\right]^T\theta^S_{eSn_i} \right) \phi_i \right)\) where \(\log()\) is nwtc_num::dcm_logmap and \(\Lambda()\) is nwtc_num::dcm_exp

Translational Velocity: \(\vec{v}^D = \sum\limits_{i=1}^{2}\left( \vec{v}^S_{eSn_i} + \left\{ \left\{ \vec{p}^{OSR}_{eSn_i} + \vec{u}^S_{eSn_i} \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\omega}^S_{eSn_i} \right) \phi_i\)

Rotational Velocity: \(\vec{\omega}^D = \sum\limits_{i=1}^{2} \vec{\omega}^S_{eSn_i} \phi_i\)

Translational Acceleration: \(\vec{a}^D = \sum\limits_{i=1}^{2}\left( \vec{a}^S_{eSn_i} + \left\{ \left\{ \vec{p}^{OSR}_{eSn_i} + \vec{u}^S_{eSn_i} \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\alpha}^S_{eSn_i} + \vec{\omega}^S_{eSn_i} \times \left\{ \left\{ \left\{ \vec{p}^{OSR}_{eSn_i} + \vec{u}^S_{eSn_i} \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\omega}^S_{eSn_i} \right\} \right) \phi_i\)

Rotational Acceleration: \(\vec{\alpha}^D = \sum\limits_{i=1}^{2} \vec{\alpha}^S_{eSn_i} \phi_i\)

Scalar: \(S^D = \sum\limits_{i=1}^{2} S^S_{eSn_i} \phi_i\)

◆ transfer_motions_point_to_point()

subroutine modmesh_mapping::transfer_motions_point_to_point ( type(meshtype), intent(in)  Src,
type(meshtype), intent(inout)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

Given a nearest-neighbor mapping, this routine transfers motions between nodes on the mesh.

Parameters
[in]srcThe source mesh with motion fields allocated
[in,out]destThe destination mesh
[in,out]meshmapdata for the mesh mapping
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

Translational Displacement: \(\vec{u}^D = \vec{u}^S + \left[\left[\theta^S\right]^T \theta^{SR} - I\right]\left\{\vec{p}^{ODR}-\vec{p}^{OSR}\right\}\)

Orientation: \(\theta^D = \theta^{DR}\left[\theta^{SR}\right]^T\theta^S\)

Translational Velocity: \(\vec{v}^D = \vec{v}^S + \left\{ \left\{ \vec{p}^{OSR} + \vec{u}^S \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\omega}^S\)

Rotational Velocity: \(\vec{\omega}^D = \vec{\omega}^S\)

Translational Acceleration: \(\vec{a}^D = \vec{a}^S + \left\{ \left\{ \vec{p}^{OSR} + \vec{u}^S \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\alpha}^S + \vec{\omega}^S \times \left\{ \left\{ \left\{ \vec{p}^{OSR} + \vec{u}^S \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\omega}^S \right\} \)

Rotational Acceleration: \(\vec{\alpha}^D = \vec{\alpha}^S\)

Scalars: \(S^D = S^S\)

◆ transfer_point_to_line2()

subroutine, public modmesh_mapping::transfer_point_to_line2 ( type(meshtype), intent(in)  Src,
type(meshtype), intent(inout)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in), optional  SrcDisp,
type(meshtype), intent(in), optional  DestDisp 
)

Routine that transfers data from a point mesh to a line2 mesh.

Parameters
[in]srcsource (point) mesh
[in,out]destdestination (line2) mesh
[in,out]meshmapmapping data structure
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
[in]srcdispa "functional" sibling of the source mesh for load mapping; Src contains loads and SrcDisp contains TranslationDisp and Orientation
[in]destdispa "functional" sibling of the destination mesh for load mapping; Dest contains loads and DestDisp contains TranslationDisp and Orientation

◆ transfer_point_to_point()

subroutine, public modmesh_mapping::transfer_point_to_point ( type(meshtype), intent(in)  Src,
type(meshtype), intent(inout)  Dest,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in), optional  SrcDisp,
type(meshtype), intent(in), optional  DestDisp 
)

Given two point meshes, this routine transfers the source mesh values to the destination mesh using appropriate math.

Parameters
[in]srcsource point mesh
[in,out]destdestination point mesh
[in]srcdispan optional mesh, which contains the displacements associated with the source if the source contains load information
[in]destdispan optional mesh, which contains the displacements associated with the destination if the destination contains load information
[in,out]meshmapMapping(s) between Src and Dest meshes
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

If Src is displacements/velocities then loop over the Destination Mesh; each motion/scalar in the destination mesh needs to be interpolated from the source mesh.


IF Src is forces and/or moments, loop over Src Mesh; each load in the source mesh needs to be placed somewhere in the destination mesh.

◆ transfer_src_to_augmented_ln2_src()

subroutine modmesh_mapping::transfer_src_to_augmented_ln2_src ( type(meshtype), intent(in)  Src,
type(meshmaptype), intent(inout)  MeshMap,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
type(meshtype), intent(in)  SrcDisp,
real(reki), intent(in)  LoadsScaleFactor 
)
private

This routine takes the loads from a line2 mesh and transfers them to an augmented line2 mesh (the src mesh with extra/augmented nodes).

It also transfers the translation displacement field to this augmented mesh so that we have only one mesh to deal with instead of two. The first NNodes values of the two meshes are equal, and the additional, augmented nodes are split between nodes on a line2 element.

Parameters
[in]srcThe source mesh containing line2 loads
[in,out]meshmapmesh mapping data, including the augmented source mesh
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None
[in]srcdispThe displacements associated with the source mesh
[in]loadsscalefactorScaling factor for loads (to help with numerical issues)

◆ writemappingtransfertofile()

subroutine, public modmesh_mapping::writemappingtransfertofile ( type(meshtype), intent(in)  Mesh1_I,
type(meshtype), intent(in)  Mesh1_O,
type(meshtype), intent(in)  Mesh2_I,
type(meshtype), intent(in)  Mesh2_O,
type(meshmaptype), intent(in)  Map_Mod1_Mod2,
type(meshmaptype), intent(in)  Map_Mod2_Mod1,
character(*), intent(in)  BinOutputName 
)

This routine is used for debugging mesh mappings.

It checks to see that the sum of the loads on each mesh is the same as when all the loads from each mesh are lumped to a single point.

Parameters
[in]mesh1_imesh 1 inputs
[in]mesh1_omesh 1 outputs
[in]mesh2_imesh 2 inputs
[in]mesh2_omesh 2 outputs
[in]map_mod1_mod2Data for mapping meshes from mesh 1 (outputs) to mesh 2 (inputs)
[in]map_mod2_mod1Data for mapping meshes from mesh 2 (outputs) to mesh 1 (inputs)
[in]binoutputnamename of binary output file