Changeset 934
- Timestamp:
- 09/22/16 10:58:44 (7 years ago)
- Location:
- XIOS/trunk
- Files:
-
- 11 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/inputs/Unstruct/iodef.xml
r821 r934 20 20 21 21 <domain_definition> 22 <domain id="domain_srf" /> 22 <domain id="domain_srf" > 23 <compute_connectivity_domain id="compute" type="edge" /> 24 </domain> 23 25 </domain_definition> 24 26 -
XIOS/trunk/src/config/node_type.conf
r895 r934 71 71 #endif //__XIOS_CExtractDomainToAxis__ 72 72 73 #ifdef __XIOS_CComputeConnectivityDomain__ 74 DECLARE_NODE(ComputeConnectivityDomain, compute_connectivity_domain) 75 #endif //__XIOS_CComputeConnectivityDomain__ 76 77 73 78 #ifdef __XIOS_CContext__ 74 79 DECLARE_NODE_PAR(Context, context) -
XIOS/trunk/src/generate_fortran_interface.cpp
r891 r934 33 33 CZoomDomain zoomDomain; 34 34 CGenerateRectilinearDomain genDomain; 35 CComputeConnectivityDomain compConDomain; 35 36 36 37 CInterpolateAxis interpolateAxis; … … 290 291 file.close(); 291 292 293 file.open((path+"compute_connectivity_domain_interface_attr.F90").c_str()); 294 compConDomain.generateFortran2003Interface(file); 295 file.close(); 296 297 file.open((path+"iccompute_connectivity_domain_attr.cpp").c_str()); 298 compConDomain.generateCInterface(file); 299 file.close(); 300 301 file.open((path+"icompute_connectivity_domain_attr.F90").c_str()); 302 compConDomain.generateFortranInterface(file); 303 file.close(); 304 305 306 307 292 308 file.open((path+"inverse_axis_interface_attr.F90").c_str()); 293 309 inverseAxis.generateFortran2003Interface(file); -
XIOS/trunk/src/group_factory_decl.cpp
r895 r934 35 35 macro(CReduceDomainToAxisGroup) 36 36 macro(CExtractDomainToAxisGroup) 37 macro(CComputeConnectivityDomainGroup) 37 38 } -
XIOS/trunk/src/group_template_decl.cpp
r895 r934 24 24 macro(ReduceDomainToAxis) 25 25 macro(ExtractDomainToAxis) 26 macro(ComputeConnectivityDomain) 26 27 27 28 } -
XIOS/trunk/src/interface/c/icxml_tree.cpp
r891 r934 50 50 typedef xios::CInterpolateDomain * XInterpolateDomainPtr; 51 51 typedef xios::CGenerateRectilinearDomain * XGenerateRectilinearDomainPtr; 52 typedef xios::CComputeConnectivityDomain * XComputeConnectivityDomainPtr; 52 53 53 54 typedef xios::CTransformation<CAxis> * XTransformationAxisPtr; … … 452 453 } 453 454 *child_ = static_cast<XGenerateRectilinearDomainPtr>(tmpChild_); 455 CTimer::get("XIOS").suspend() ; 456 } 457 458 void cxios_xml_tree_add_computeconnectivitydomaintodomain 459 (XDomainPtr parent_, XComputeConnectivityDomainPtr * child_, const char * child_id, int child_id_size) 460 { 461 std::string child_id_str; 462 XTransformationDomainPtr tmpChild_; 463 CTimer::get("XIOS").resume() ; 464 if (cstr2string(child_id, child_id_size, child_id_str)) 465 { 466 tmpChild_ = parent_->addTransformation(TRANS_COMPUTE_CONNECTIVITY_DOMAIN, child_id_str); 467 } 468 else 469 { 470 tmpChild_ = parent_->addTransformation(TRANS_COMPUTE_CONNECTIVITY_DOMAIN); 471 } 472 *child_ = static_cast<XComputeConnectivityDomainPtr>(tmpChild_); 454 473 CTimer::get("XIOS").suspend() ; 455 474 } -
XIOS/trunk/src/interface/fortran/ixios.F90
r891 r934 106 106 xios(is_defined_reduce_axis_to_scalar_attr) 107 107 108 USE icompute_connectivity_domain, ONLY : txios(compute_connectivity_domain), xios(is_valid_compute_connectivity_domain) 109 110 USE icompute_connectivity_domain_attr, ONLY : xios(set_compute_connectivity_domain_attr), & 111 xios(get_compute_connectivity_domain_attr), & 112 xios(is_defined_compute_connectivity_domain_attr) 113 108 114 USE XIOS_INTERFACES, ONLY : xios(set_attr), xios(get_attr), xios(is_defined_attr), xios(get_handle), xios(add_child), & 109 115 xios(send_field), xios(recv_field), xios(field_is_active), xios(getVar), xios(setVar) -
XIOS/trunk/src/interface/fortran/ixios_interfaces.F90
r932 r934 88 88 xios(get_generate_rectilinear_domain_attr_hdl), & 89 89 xios(is_defined_generate_rectilinear_domain_attr_hdl) 90 USE icompute_connectivity_domain, ONLY : xios(get_compute_connectivity_domain_handle) 91 92 USE icompute_connectivity_domain_attr, ONLY : xios(set_compute_connectivity_domain_attr_hdl), & 93 xios(get_compute_connectivity_domain_attr_hdl), & 94 xios(is_defined_compute_connectivity_domain_attr_hdl) 90 95 91 96 USE ireduce_axis_to_scalar, ONLY : xios(get_reduce_axis_to_scalar_handle) … … 103 108 xios(add_generatedomaintodomain), xios(add_zoomaxistoaxis), & 104 109 xios(add_interpolateaxistoaxis), xios(add_inverseaxistoaxis), xios(add_scalar), & 105 xios(add_scalargroup), xios(add_scalartogrid), xios(add_reduceaxistoscalartoscalar) 110 xios(add_scalargroup), xios(add_scalartogrid), xios(add_reduceaxistoscalartoscalar), & 111 xios(add_computeconnectivitydomaintodomain) 106 112 107 113 PRIVATE … … 116 122 xios(set_interpolate_domain_attr_hdl), xios(set_inverse_axis_attr_hdl), & 117 123 xios(set_generate_rectilinear_domain_attr_hdl), xios(set_scalar_attr_hdl), & 118 xios(set_scalargroup_attr_hdl), xios(set_reduce_axis_to_scalar_attr_hdl) 124 xios(set_scalargroup_attr_hdl), xios(set_reduce_axis_to_scalar_attr_hdl), & 125 xios(set_compute_connectivity_domain_attr_hdl) 119 126 END INTERFACE xios(set_attr) 120 127 … … 128 135 xios(get_interpolate_domain_attr_hdl), xios(get_inverse_axis_attr_hdl), & 129 136 xios(get_generate_rectilinear_domain_attr_hdl), xios(get_scalar_attr_hdl), & 130 xios(get_scalargroup_attr_hdl), xios(get_reduce_axis_to_scalar_attr_hdl) 137 xios(get_scalargroup_attr_hdl), xios(get_reduce_axis_to_scalar_attr_hdl), & 138 xios(get_compute_connectivity_domain_attr_hdl) 131 139 END INTERFACE xios(get_attr) 132 140 … … 141 149 xios(is_defined_inverse_axis_attr_hdl), xios(is_defined_generate_rectilinear_domain_attr_hdl), & 142 150 xios(is_defined_scalar_attr_hdl), xios(is_defined_scalargroup_attr_hdl), & 143 xios(is_defined_reduce_axis_to_scalar_attr_hdl) 151 xios(is_defined_reduce_axis_to_scalar_attr_hdl), xios(is_defined_compute_connectivity_domain_attr_hdl) 144 152 END INTERFACE xios(is_defined_attr) 145 153 … … 153 161 xios(get_interpolate_domain_handle), xios(get_inverse_axis_handle), & 154 162 xios(get_generate_rectilinear_domain_handle), xios(get_scalar_handle), & 155 xios(get_scalargroup_handle), xios(get_reduce_axis_to_scalar_handle) 163 xios(get_scalargroup_handle), xios(get_reduce_axis_to_scalar_handle), & 164 xios(get_compute_connectivity_domain_handle) 156 165 END INTERFACE xios(get_handle) 157 166 … … 164 173 xios(add_interpolatedomaintodomain), xios(add_generatedomaintodomain), & 165 174 xios(add_zoomaxistoaxis), xios(add_interpolateaxistoaxis), xios(add_inverseaxistoaxis), & 166 xios(add_scalar), xios(add_scalartogrid), xios(add_reduceaxistoscalartoscalar) 175 xios(add_scalar), xios(add_scalartogrid), xios(add_reduceaxistoscalartoscalar), & 176 xios(add_computeconnectivitydomaintodomain) 167 177 END INTERFACE xios(add_child) 168 178 -
XIOS/trunk/src/interface/fortran/ixml_tree.F90
r903 r934 13 13 USE IINTERPOLATE_DOMAIN 14 14 USE IGENERATE_RECTILINEAR_DOMAIN 15 USE ICOMPUTE_CONNECTIVITY_DOMAIN 15 16 USE IZOOM_AXIS 16 17 USE IINTERPOLATE_AXIS … … 214 215 END SUBROUTINE cxios_xml_tree_add_generatedomaintodomain 215 216 217 SUBROUTINE cxios_xml_tree_add_computeconnectivitydomaintodomain(parent_, child_, child_id, child_id_size) BIND(C) 218 USE ISO_C_BINDING 219 INTEGER (kind = C_INTPTR_T), VALUE :: parent_ 220 INTEGER (kind = C_INTPTR_T) :: child_ 221 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: child_id 222 INTEGER (kind = C_INT) , VALUE :: child_id_size 223 END SUBROUTINE cxios_xml_tree_add_computeconnectivitydomaintodomain 224 216 225 SUBROUTINE cxios_xml_tree_add_zoomaxistoaxis(parent_, child_, child_id, child_id_size) BIND(C) 217 226 USE ISO_C_BINDING … … 582 591 END SUBROUTINE xios(add_generatedomaintodomain) 583 592 593 SUBROUTINE xios(add_computeconnectivitydomaintodomain)(parent_hdl, child_hdl, child_id) 594 TYPE(txios(domain)) , INTENT(IN) :: parent_hdl 595 TYPE(txios(compute_connectivity_domain)) , INTENT(OUT):: child_hdl 596 CHARACTER(len = *), OPTIONAL , INTENT(IN) :: child_id 597 598 IF (PRESENT(child_id)) THEN 599 CALL cxios_xml_tree_add_computeconnectivitydomaintodomain(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id)) 600 ELSE 601 CALL cxios_xml_tree_add_computeconnectivitydomaintodomain(parent_hdl%daddr, child_hdl%daddr, "NONE", -1) 602 END IF 603 604 END SUBROUTINE xios(add_computeconnectivitydomaintodomain) 605 584 606 SUBROUTINE xios(add_zoomaxistoaxis)(parent_hdl, child_hdl, child_id) 585 607 TYPE(txios(axis)) , INTENT(IN) :: parent_hdl -
XIOS/trunk/src/node/domain.cpp
r924 r934 73 73 m["interpolate_domain"] = TRANS_INTERPOLATE_DOMAIN; 74 74 m["generate_rectilinear_domain"] = TRANS_GENERATE_RECTILINEAR_DOMAIN; 75 m["compute_connectivity_domain"] = TRANS_COMPUTE_CONNECTIVITY_DOMAIN; 75 76 } 76 77 -
XIOS/trunk/src/node/field.cpp
r894 r934 1021 1021 } 1022 1022 } 1023 else if (grid && grid->hasTransform() && !grid->isTransformed()) 1024 { 1025 grid->transformGrid(grid); 1026 } 1023 1027 } 1024 1028 -
XIOS/trunk/src/node/node_enum.hpp
r895 r934 29 29 eReduceAxisToScalar, 30 30 eReduceDomainToAxis, 31 eExtractDomainToAxis 31 eExtractDomainToAxis, 32 eComputeConnectivityDomain 32 33 33 34 } ENodeType; -
XIOS/trunk/src/node/node_type.hpp
r895 r934 20 20 #include "reduce_domain_to_axis.hpp" 21 21 #include "extract_domain_to_axis.hpp" 22 #include "compute_connectivity_domain.hpp" 22 23 23 24 -
XIOS/trunk/src/node/transformation.hpp
r895 r934 3 3 4 4 #include "xios_spl.hpp" 5 #include "xml_node.hpp" 5 6 #include "transformation_enum.hpp" 6 7 -
XIOS/trunk/src/node/transformation_enum.hpp
r895 r934 15 15 TRANS_REDUCE_AXIS_TO_SCALAR = 6, 16 16 TRANS_REDUCE_DOMAIN_TO_AXIS = 7, 17 TRANS_EXTRACT_DOMAIN_TO_AXIS = 8 17 TRANS_EXTRACT_DOMAIN_TO_AXIS = 8, 18 TRANS_COMPUTE_CONNECTIVITY_DOMAIN = 9 18 19 } ETranformationType; 19 20 -
XIOS/trunk/src/object_factory_decl.cpp
r895 r934 36 36 macro(CReduceDomainToAxis) 37 37 macro(CExtractDomainToAxis) 38 macro(CComputeConnectivityDomain) 38 39 39 40 macro(CFieldGroup) … … 54 55 macro(CReduceDomainToAxisGroup) 55 56 macro(CExtractDomainToAxisGroup) 57 macro(CComputeConnectivityDomainGroup) 56 58 } -
XIOS/trunk/src/object_template_decl.cpp
r895 r934 23 23 template class CObjectTemplate<CReduceDomainToAxis>; 24 24 template class CObjectTemplate<CExtractDomainToAxis>; 25 template class CObjectTemplate<CComputeConnectivityDomain>; 25 26 26 27 template class CObjectTemplate<CContextGroup>; … … 41 42 template class CObjectTemplate<CReduceDomainToAxisGroup>; 42 43 template class CObjectTemplate<CExtractDomainToAxisGroup>; 44 template class CObjectTemplate<CComputeConnectivityDomainGroup>; 43 45 } -
XIOS/trunk/src/test/test_unstruct_complete.f90
r666 r934 30 30 INTEGER,ALLOCATABLE :: i_index(:) 31 31 LOGICAL,ALLOCATABLE :: mask_glo(:),mask(:) 32 INTEGER,ALLOCATABLE :: n_local(:),local_neighbor(:,:) 32 33 DOUBLE PRECISION,ALLOCATABLE :: lon(:),lat(:),field_A_srf(:,:), lonvalue(:) ; 33 34 DOUBLE PRECISION,ALLOCATABLE :: bounds_lon(:,:),bounds_lat(:,:) ; 34 35 INTEGER :: ni,ibegin,iend,nj,jbegin,jend 35 INTEGER :: i,j,l,ts,n 36 INTEGER :: i,j,l,ts,n, nbMax 36 37 INTEGER :: ncell_glo,ncell,ind 37 38 REAL :: ilon,ilat … … 164 165 ALLOCATE(field_A_srf(ncell,llm)) 165 166 ALLOCATE(mask(ncell)) 167 ALLOCATE(n_local(ncell)) 166 168 ncell=0 167 169 data_n_index=0 … … 205 207 CALL xios_set_domain_attr("domain_srf", lonvalue_1D=lon, latvalue_1D=lat) 206 208 CALL xios_set_domain_attr("domain_srf", nvertex=4, bounds_lon_1D=bounds_lon, bounds_lat_1D=bounds_lat) 209 ! CALL xios_set_compute_connectivity_domain_attr("compute", n_neighbor=n_local, local_neighbor=local_neighbor) 207 210 208 211 … … 211 214 CALL xios_set_timestep(dtime) 212 215 CALL xios_close_context_definition() 216 217 CALL xios_get_compute_connectivity_domain_attr("compute", n_neighbor_max=nbMax) 218 ALLOCATE(local_neighbor(nbMax,ncell)) 219 CALL xios_get_compute_connectivity_domain_attr("compute", n_neighbor=n_local, local_neighbor=local_neighbor) 213 220 214 221 DO ts=1,24*10 -
XIOS/trunk/src/transformation/algo_types.hpp
r895 r934 23 23 #include "axis_algorithm_extract_domain.hpp" 24 24 #include "extract_domain_to_axis.hpp" 25 #include "domain_algorithm_compute_connectivity.hpp" 26 #include "compute_connectivity_domain.hpp" 27 25 28 #endif // __XIOS_ALGORITHM_TRANSFORMATION_TYPES_HPP__ -
XIOS/trunk/src/transformation/axis_algorithm_transformation.hpp
r895 r934 11 11 12 12 #include "generic_algorithm_transformation.hpp" 13 #include "grid_transformation_factory_impl.hpp" 13 14 14 15 namespace xios { -
XIOS/trunk/src/transformation/grid_transformation_selector.cpp
r933 r934 18 18 { 19 19 if (0 == source) 20 { gridSource_ = gridDestination_; isSameGrid_ = true; } 20 { gridSource_ = gridDestination_; } 21 if (gridSource_ == gridDestination_) isSameGrid_ = true; 21 22 22 23 //Verify the compatibity between two grids … … 321 322 322 323 //! Domain 323 //CDomainAlgorithmComputeConnectivity::registerTrans();324 CDomainAlgorithmComputeConnectivity::registerTrans(); 324 325 CDomainAlgorithmInterpolate::registerTrans(); 325 326 CDomainAlgorithmZoom::registerTrans(); -
XIOS/trunk/src/type/type_util.hpp
r895 r934 40 40 class CExtractDomainToAxis; 41 41 class CExtractDomainToAxisGroup; 42 class CComputeConnectivityDomain; 43 class CComputeConnectivityDomainGroup; 42 44 43 45 template <typename T> inline string getStrType(void); … … 96 98 macro(CExtractDomainToAxis) 97 99 macro(CExtractDomainToAxisGroup) 100 macro(CComputeConnectivityDomain) 101 macro(CComputeConnectivityDomainGroup) 98 102 #undef macro 99 103 } -
XIOS/trunk/src/xml_parser_decl.cpp
r895 r934 29 29 macro( ReduceDomainToAxis ) 30 30 macro( ExtractDomainToAxis ) 31 macro( ComputeConnectivityDomain ) 31 32 } 32 33 }
Note: See TracChangeset
for help on using the changeset viewer.