Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
math_ext.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine math_ext::copy_mask (a, b, size, mask, mask_size)
 Copy within a mask. NOTE, this differs from masked_copy in the indexing. \( a_i = b_i, for i in mask \).
 
subroutine math_ext::cadd_mask (a, c, size, mask, mask_size)
 Add a constant to a masked vector. \( a_i = a_i + c, for i in mask \).
 
subroutine math_ext::invcol1_mask (a, size, mask, mask_size)
 Invert a masked vector. \( a_i = 1/a_i, for i in mask \).
 
subroutine math_ext::cmult_mask (a, c, size, mask, mask_size)
 Multiply a masked vector by a constant. \( a_i = c * a_i, for i in mask \).
 
subroutine math_ext::col2_mask (a, b, size, mask, mask_size)
 Multiply 2 masked vectors. Save the result in a new vector. \( a_i = b_i * c_i, for i in mask \).
 
subroutine math_ext::col3_mask (a, b, c, size, mask, mask_size)
 Multiply 2 masked vectors. Save the result in a new vector. \( a_i = b_i * c_i, for i in mask \).
 
subroutine math_ext::sub3_mask (a, b, c, size, mask, mask_size)
 Subtract 2 masked vectors. Save the result in a new vector. \( a_i = b_i - c_i, for i in mask \).
 
real(kind=rp) function math_ext::glsc2_mask (a, b, size, mask, mask_size)
 Weighted inner product \( a^T b \) for indices in the mask.
 

Detailed Description

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the authors nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file math_ext.f90.

Function/Subroutine Documentation

◆ cadd_mask()

subroutine math_ext::cadd_mask ( real(kind=rp), dimension(size), intent(inout a,
real(kind=rp), intent(in c,
integer, intent(in size,
integer, dimension(mask_size), intent(in mask,
integer, intent(in mask_size 
)

Definition at line 61 of file math_ext.f90.

◆ cmult_mask()

subroutine math_ext::cmult_mask ( real(kind=rp), dimension(size), intent(inout a,
real(kind=rp), intent(in c,
integer, intent(in size,
integer, dimension(mask_size), intent(in mask,
integer, intent(in mask_size 
)

Definition at line 90 of file math_ext.f90.

◆ col2_mask()

subroutine math_ext::col2_mask ( real(kind=rp), dimension(size), intent(inout a,
real(kind=rp), dimension(size), intent(in b,
integer, intent(in size,
integer, dimension(mask_size), intent(in mask,
integer, intent(in mask_size 
)

Definition at line 105 of file math_ext.f90.

◆ col3_mask()

subroutine math_ext::col3_mask ( real(kind=rp), dimension(size), intent(inout a,
real(kind=rp), dimension(size), intent(in b,
real(kind=rp), dimension(size), intent(in c,
integer, intent(in size,
integer, dimension(mask_size), intent(in mask,
integer, intent(in mask_size 
)

Definition at line 120 of file math_ext.f90.

◆ copy_mask()

subroutine math_ext::copy_mask ( real(kind=rp), dimension(size), intent(inout a,
real(kind=rp), dimension(size), intent(in b,
integer, intent(in size,
integer, dimension(mask_size), intent(in mask,
integer, intent(in mask_size 
)

Definition at line 46 of file math_ext.f90.

◆ glsc2_mask()

real(kind=rp) function math_ext::glsc2_mask ( real(kind=rp), dimension(size), intent(in a,
real(kind=rp), dimension(size), intent(in b,
integer, intent(in size,
integer, dimension(mask_size), intent(in mask,
integer, intent(in mask_size 
)

Definition at line 150 of file math_ext.f90.

◆ invcol1_mask()

subroutine math_ext::invcol1_mask ( real(kind=rp), dimension(size), intent(inout a,
integer, intent(in size,
integer, dimension(mask_size), intent(in mask,
integer, intent(in mask_size 
)

Definition at line 76 of file math_ext.f90.

◆ sub3_mask()

subroutine math_ext::sub3_mask ( real(kind=rp), dimension(size), intent(inout a,
real(kind=rp), dimension(size), intent(in b,
real(kind=rp), dimension(size), intent(in c,
integer, intent(in size,
integer, dimension(mask_size), intent(in mask,
integer, intent(in mask_size 
)

Definition at line 135 of file math_ext.f90.