Skip to content
Snippets Groups Projects

Lbm

Merged Lbm
3 unresolved threads
Merged Tomáš Oberhuber requested to merge lbm into develop
3 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
14 14 #include <TNL/Devices/Cuda.h>
15 15 #include <TNL/ParallelFor.h>
16 16 #include <TNL/Containers/StaticVector.h>
17 #include <TNL/Communicators/MPIPrint.h>
  • 86 const RealType& time = 0.0,
    87 const RealType& outFunctionMultiplicator = 0.0,
    88 const RealType& inFunctionMultiplicator = 1.0 );
    86 const RealType& time = ( RealType ) 0.0,
    87 const RealType& outFunctionMultiplicator = ( RealType ) 0.0,
    88 const RealType& inFunctionMultiplicator = ( RealType ) 1.0 );
    89 89
    90 90 template< typename OutMeshFunctionPointer, typename InFunctionPointer >
    91 91 static void evaluateBoundaryEntities( OutMeshFunctionPointer& meshFunction,
    92 92 const InFunctionPointer& function,
    93 const RealType& time = 0.0,
    94 const RealType& outFunctionMultiplicator = 0.0,
    95 const RealType& inFunctionMultiplicator = 1.0 );
    93 const RealType& time = ( RealType ) 0.0,
    94 const RealType& outFunctionMultiplicator = ( RealType ) 0.0,
    95 const RealType& inFunctionMultiplicator = ( RealType ) 1.0 );
    • Pass-by-value of fundamental types is more natural, simpler (does not require explicit cast when RealType is float) and performance-wise either the same (when the method is inlined) or better (because e.g. float is twice smaller than a pointer which is needed for pass-by-reference).

    • Please register or sign in to reply
  • 210 214 /// @param separator Character, which separates substrings in given string.
    211 215 std::vector< String > split( const char separator = ' ', bool skipEmpty = false ) const;
    212 216
    217 #ifdef HAVE_MPI
    218
    219 /****
    220 * \brief Sends the string to the target MPI process.
    221 */
    222 void send( int target, int tag = 0, MPI_Comm mpi_comm = MPI_COMM_WORLD );
    223
    224 /****
    225 * \brief Receives a string from the source MPI process.
    226 */
    227 void receive( int source, int tag = 0, MPI_Comm mpi_comm = MPI_COMM_WORLD );
    • MPI-specific extensions of some objects should not be integrated into the object itself, but should be implemented as free functions. It would be more flexible and more readable - it is not clear what str.send(0) or str.receive(1) does, but mpi_send(str, 0) or str = mpi_receive(1) are readable. Or they should be methods of the MpiCommunicator which would make it consistent with how other types like float are sent with MPI.

    • See also mpi_api_wrapper for a nice interface.

    • Please register or sign in to reply
    Please register or sign in to reply
    Loading