TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Sous_domaine_VF.h
1/****************************************************************************
2* Copyright (c) 2024, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. 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.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* 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.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER 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;
12* 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.
13*
14*****************************************************************************/
15
16#ifndef Sous_domaine_VF_included
17#define Sous_domaine_VF_included
18
19#include <Sous_domaine_dis_base.h>
20#include <Domaine_VF.h>
21#include <TRUST_Ref.h>
22
23//! This abstract class contains the geometrical subdomain information common to finite-volume methods (VDF and VEF for example)
24/**
25 We assume that each face has at most two neighbouring elements in the
26 domain, which is always the case in a conforming mesh.
27
28 The array les_faces contains all the faces of the Domaine_dis that
29 belong to this subdomain, sorted as follows:
30 * Faces internal to the subdomain
31 * Faces internal to the domain, but whose only first neighbouring element
32 belongs to the subdomain
33 * Faces internal to the domain, but whose only second neighbouring element
34 belongs to the subdomain
35 * Faces that have only one element in the domain.
36 The separations are indicated respectively by the variables
37 premiere_face_bord_0, premiere_face_bord_1, and premiere_face_bord.
38
39 les_faces : nb_dim=1
40 dimension(0) = number of faces of the subdomain
41 integer value = index in the arrays le_dom_VF->face_voisins_,
42 le_dom_VF->face_sommets_,...
43
44 volumes_entrelaces(int face) returns the interlaced volume restricted
45 to the subdomain. The face number refers to the array
46 les_faces. Only the interlaced volumes that differ from those of the domain
47 are stored locally.
48*/
49
51{
52
53 Declare_instanciable(Sous_domaine_VF);
54
55public:
56
57 // Accessor methods
58 inline const IntTab& les_faces() const
59 {
60 return les_faces_;
61 }
62 inline IntTab& les_faces()
63 {
64 return les_faces_;
65 }
66 inline int premiere_face_bord_0() const
67 {
69 }
70 inline int premiere_face_bord_1() const
71 {
73 }
74 inline int premiere_face_bord() const
75 {
77 }
78 //! Returns the interlaced volume restricted to the sub-domain. face is the index in the les_faces_ array.
79 inline double volumes_entrelaces(int) const;
80
81 // Specific methods
82
83 //! Generates les_faces by iterating over the faces of domaine_dis and identifying which neighbours belong to le_sous_domaine.
84 void discretiser() override;
85
86protected:
87 OBS_PTR(Domaine_VF) le_dom_VF;
88 IntTab les_faces_;
93};
94
95inline double Sous_domaine_VF::volumes_entrelaces(int face) const
96{
97 if (face<premiere_face_bord_0_ || face>=premiere_face_bord_)
98 return le_dom_VF->volumes_entrelaces(les_faces_(face));
99 else
101}
102
103#endif
class Domaine_VF
Definition Domaine_VF.h:44
This abstract class contains the geometrical subdomain information common to finite-volume methods (V...
OBS_PTR(Domaine_VF) le_dom_VF
const IntTab & les_faces() const
DoubleTab volumes_entrelaces_
double volumes_entrelaces(int) const
Returns the interlaced volume restricted to the sub-domain. face is the index in the les_faces_ array...
int premiere_face_bord_1() const
IntTab & les_faces()
void discretiser() override
Generates les_faces by iterating over the faces of domaine_dis and identifying which neighbours belon...
int premiere_face_bord_0() const
int premiere_face_bord() const
This class is at the base of the discretized sub-domain hierarchy. At the time of domain discretizati...