Пример #1
0
    def _gen_perm(self, lhs, rhs):
        # In the special case of β = -0.5 it is better to sort by the
        # RHS interface; otherwise we simply opt for the LHS
        beta = self.cfg.getfloat('solver-interfaces', 'ldg-beta')
        side = lhs if beta != -0.5 else rhs

        # Compute the relevant permutation
        self._perm = get_opt_view_perm(side, 'get_scal_fpts_for_inter',
                                       self._elemap)
Пример #2
0
    def _gen_perm(self, lhs, rhs):
        # In the special case of β = -0.5 it is better to sort by the
        # RHS interface; otherwise we simply opt for the LHS
        beta = self._cfg.getfloat('solver-interfaces', 'ldg-beta')
        side = lhs if beta != -0.5 else rhs

        # Compute the relevant permutation
        self._perm = get_opt_view_perm(side, 'get_scal_fpts0_for_inter',
                                       self._elemap)
Пример #3
0
    def __init__(self, be, lhs, elemap, cfgsect, cfg):
        super(BaseAdvectionBCInters, self).__init__(be, lhs, elemap, cfg)
        self.cfgsect = cfgsect

        const_mat = self._const_mat

        # For BC interfaces, which only have an LHS state, we take the
        # permutation which results in an optimal memory access pattern
        # iterating over this state.
        self._perm = get_opt_view_perm(lhs, 'get_scal_fpts_for_inter', elemap)

        # LHS view and constant matrices
        self._scal0_lhs = self._scal_view(lhs, 'get_scal_fpts_for_inter')
        self._mag_pnorm_lhs = const_mat(lhs, 'get_mag_pnorms_for_inter')
        self._norm_pnorm_lhs = const_mat(lhs, 'get_norm_pnorms_for_inter')
Пример #4
0
    def __init__(self, be, lhs, elemap, cfgsect, cfg):
        super(BaseAdvectionBCInters, self).__init__(be, lhs, elemap, cfg)
        self._cfgsect = cfgsect

        view_onto, const_mat = self._view_onto, self._const_mat

        # For BC interfaces, which only have an LHS state, we take the
        # permutation which results in an optimal memory access pattern
        # iterating over this state.
        self._perm = get_opt_view_perm(lhs, 'get_scal_fpts0_for_inter', elemap)

        # LHS view and constant matrices
        self._scal0_lhs = view_onto(lhs, 'get_scal_fpts0_for_inter')
        self._mag_pnorm_lhs = const_mat(lhs, 'get_mag_pnorms_for_inter')
        self._norm_pnorm_lhs = const_mat(lhs, 'get_norm_pnorms_for_inter')
Пример #5
0
    def __init__(self, be, lhs, elemap, cfgsect, cfg):
        super().__init__(be, lhs, elemap, cfg)
        self.cfgsect = cfgsect

        const_mat = self._const_mat

        # For BC interfaces, which only have an LHS state, we take the
        # permutation which results in an optimal memory access pattern
        # iterating over this state.
        self._perm = get_opt_view_perm(lhs, "get_scal_fpts_for_inter", elemap)

        # LHS view and constant matrices
        self._scal0_lhs = self._scal_view(lhs, "get_scal_fpts_for_inter")
        self._mag_pnorm_lhs = const_mat(lhs, "get_mag_pnorms_for_inter")
        self._norm_pnorm_lhs = const_mat(lhs, "get_norm_pnorms_for_inter")
        self._ploc = None
Пример #6
0
    def __init__(self, be, lhs, elemap, cfgsect, cfg):
        super().__init__(be, lhs, elemap, cfg)
        self.cfgsect = cfgsect

        const_mat = self._const_mat

        # For BC interfaces, which only have an LHS state, we take the
        # permutation which results in an optimal memory access pattern
        # iterating over this state.
        self._perm = get_opt_view_perm(lhs, 'get_scal_fpts_for_inter', elemap)

        # LHS view and constant matrices
        self._scal_lhs = self._scal_view(lhs, 'get_scal_fpts_for_inter')
        self._mag_pnorm_lhs = const_mat(lhs, 'get_mag_pnorms_for_inter')
        self._norm_pnorm_lhs = const_mat(lhs, 'get_norm_pnorms_for_inter')

        # Make the simulation time available inside kernels
        self._set_external('t', 'scalar fpdtype_t')
Пример #7
0
 def _gen_perm(self, lhs, rhs):
     # Arbitrarily, take the permutation which results in an optimal
     # memory access pattern for the LHS of the interface
     self._perm = get_opt_view_perm(lhs, 'get_scal_fpts_for_inter',
                                    self._elemap)
Пример #8
0
 def _gen_perm(self, lhs, rhs):
     # Arbitrarily, take the permutation which results in an optimal
     # memory access pattern for the LHS of the interface
     self._perm = get_opt_view_perm(lhs, 'get_scal_fpts_for_inter',
                                    self.elemap)